I am new to Ubuntu world since I've been using it for near a year or so. Software is great, but I have some hardware issues.  Along with Ubuntu 14.04 come kernel witch was ok – some minor issues : bluetooth and wireless were constantly turning on after reboot - fine. With Ubuntu 14.10 and kernel 3.16 things slightly improve on bluetooth side – good. With 3.18.8 things got back they wore -bad. But then I installed kernel 3.19 and things got worse. Now my ethernet connection have problem. I can start it, load a page, then it turns off, then on..... I can't use old kernel forever and newer kernels are worse than the old ones.  My laptop is Lenovo y580 with: Qualcomm Atheros AR8161 Gigabit Ethernet (rev 08) Intel Corporation Centrino Wireless-N 2200 (rev c4).  How do I solve this problems, no software could help (blueman,windows wireless drivers, network tools)? Can I download a single driver for each device if some of the issues come back with newer kernels? Should I report this problems and where? I understand it's not an easy task.

I am having the same trouble as others getting my Atheros AR8131 Ethernet card recognised by Ubuntu 12.10 on my new HP Pavillion P7-1449 PC. I found the same question where the answer suggested the following:   Download Tarball compact-wireless-3.6.8-1-snpc Run  ./scripts/driver-select alx make sudo make install    The problem is when I run the make command I get the following:  make -C /lib/modules/3.5.0-21-generic/build M=/home/chris/Downloads/compat-wireless-3.6.8-1-snpc modules make: *** /lib/modules/3.5.0-21-generic/build: No such file or directory.  Stop. make: *** [modules] Error 2   Found a link to an alternative patch file (compat-wireless-2012-09-25-pc) but then I get the similar error:  make -C /lib/modules/3.5.0-21-generic/build M=/home/chris/Desktop/compat-wireless-2012-09-25-pc modules make: *** /lib/modules/3.5.0-21-generic/build: No such file or directory.  Stop. make: *** [modules] Error 2   Any help you could provide would be greatly appreciated.


Is there any way to allow people which aren't my friends to comment on my public posts (the ones which they can see)? I've looked for it, but to no avail.

I want to know how to comment on Mark Zuckerberg's posts. When I see his posts the comments are either from people in his personal relation or they are employees at Facebook.  However, there are some comments by people who have no connection with him but can still comment on his post. I asked one of them by message but I haven't had any reply.  I want to know how they comment if they aren't friends with him.


I understand that it is important in the field of matrix-vector multiplication when vectors can be interpreted as a matrix of one row/column vector. But I do not really understand when I should use column vectors and when to use row vectors generally - when does it make a difference? Is it more a question on asthetics/style? Let $v \in \mathbb R^d$, is it a column vector or a row vector? (I think, it depends on interpretation, doesn’t it?) When does one care about it?

I'm a student in an elementary linear algebra course. Without bashing on my professor, I must say that s/he is very poor at answering questions, often not addressing the question itself. Throughout the course, there have been multiple questions that have gone unanswered, but I must have the answer to this one question.  "Why are some vectors written as row vectors and others as column vectors?"  I understand that if I transpose one, it becomes the other. However, I'd like to understand the purpose behind writing a vector in a certain format.  Taking examples from my lectures, I see that when I'm trying to prove linear independence of a group of vectors, the vectors are written as column vectors in a matrix, and the row reduced form is found.  Other times, like trying to find the cross product or just solving a matrix, I see the vectors written as row vectors.  My professor is very vague on the notations and explanations, and it bugs me as a person who needs to know the reason behind every small thing, why this variation occurs in the format. Any input is greatly appreciated.


I've got a fresh Ubuntu 17.04 server, I've configured networking and can resolve all addresses as I'd expect, however when I run sudo apt update I get to ~19% at which point I get a load of messages indicating failures, such as...  err http://security.ubuntu.com/ubuntu zesty-security release 404 not found  [91.189.88.162 80]   and then  Repository http://security.ubuntu.com/ubuntu zesty-security does not have a release file   this is repeated several times.  All the listed URIs are reachable/resolve from terminal.  sudo apt-get upgrade   Fails with    reading package list... done  building dependency tree  reading state information... done  calculating upgrade... done  0 upgraded, 0 newely installed, 0 to remove and 0 upgraded   The problem is that without updates I can't get any other packages to install and I'm not familiar enough with linux to deal with it. Anyone got any thoughts on why updates aren't taking?  I know I'm supposed to be on 17.10 by now but I was hoping that'd be able to be sorted with an upgrade!

Recently I have installed an older version of Ubuntu on my old machine. Whenever I try to install any software, I get an error saying it couldn't be found:  $ sudo apt-get install vlc Reading package lists... Done                Building dependency tree        Reading state information... Done     E: Couldn't find package vlc


Recently built a computer and installed ubuntu 14.04 from USB. I struggle with using the interface, programs and terminal so I plan to put windows 7 ultimate iso onto a USB while in ubuntu. Then remove ubuntu and install windows 7. How do I go about doing this and what programs do I use? I have attempted to burn an iso file to a usb but it seems to corrupt itself, the usb might be the wrong file type for holding a windows 7 iso. I have attempted to do this before and I lost all of my files only for windows 7 to not install and so I came here to hopefully get some help. Since a moderator has closed the question that is unlikely.

I have absolutely no experience with Linux, and I desperately need to get my computer back up and running again with Windows.  How do I remove Ubuntu and reinstall Windows?    Editor's note: many of the answers are about removing Ubuntu from dual-boot but keeping Windows (which is a bit complicated), while other answers are about removing Ubuntu from single-boot (which is easy: basically just format the disk while installing Windows). The question as written is ambiguous between dual-boot or single-boot.


I am opening this so that if I run into the same situation would perhaps know what to do as well as others.   I am trying to login to sites and most sites work except for some meta sites. For this I was told to try    where I failed test 3   Messaging **failed**  Your browser does not support the HTML5 postMessage feature, or it is disabled. Please make sure that you have a reasonably modern browser (e.g. IE8+, Chrome 4+, Safari 4+, FireFox 3.6+, Opera 10.61+), and that you don't have cross-document messaging disabled in your browser settings.   The failed is in red letters. I did go to  which kinda tells what it does but doesn't tell me what to do in a failure nor thus the test page.   Addons used :-  a. HTTPSEverywhere 4.0.2  -   b. RequestPolicyContinued 1.0.beta8.2 -   The 3rd test seems to have something to do with https-everywhere  Update - The issue with networklogin test passes if https-everywhere is taken out so definitely the issue with either https-everywhere the addon (unlikely) or the HTTPS implementation at stackexchage (most probably) . If so, is there a place/ticket etc. where I can get news on the on-going implementation of HTTPS.

I can't seem to log in with my Stack Exchange OpenID. When I try, I get the error message:     Unable to log in with your OpenID provider:      The openid.return_to parameter (.) does not match the actual URL (.) the request was made with.   It works if I disable the HTTPS-Everywhere plugin in Firefox, but if I then re-enable the plugin and go to a site on which I am not logged in (in which case login is normally nearly seamless), it fails again with the same error message, or at least something very similar.  I'm not aware of having done anything that might have caused this, although I will admit I don't recall seeing https:// in the address bar on Stack Exchange before (I do now, and that's a good thing IMO!). I was using the site  and it worked fine then, but not now...


I want to write a C# method that can accept any number.  Something like:  public static T Sum(T a, T b) where T : number {  // (not real code)     return a + b; }   But I don't see a "number" base class in C#, as exists in most other languages I've used.  The numeric value types are IComparable, IFormattable, IConvertible, IComparable, and IEquatable, but nothing that seems to have any arithmetic capabilities.  They're all structs, with no apparent common superclass, apart from object.  (Forgive me if I'm screwing up the meaning here, since I'm not too familiar with C# structs and precisely all the ways they are like or unlike classes.)  Am I missing something, or is it not possible to write a method in C# that does "a + b" without declaring exactly what a and b are in the context of the "+"?

Can anyone tell me if there is a way with generics to limit a generic type argument T to only:   Int16 Int32 Int64 UInt16 UInt32 UInt64   I'm aware of the where keyword, but can't find an interface for only these types,  Something like:  static bool IntegerFunction<T>(T value) where T : INumeric


Remembering one of two Original Star Trek series, Spock said that the past couldn't be change, Yet in the other one a science ship mate made it back to the time of WW II and the Enterprise was No longer there in there time  on that planet that had a Rock WormHole.

Normally Star Trek seems to based on some sort of logic, but the time travel in "Star Trek: Enterprise" seems to have no logic at all, or  am I just missing it?  Example: If they go back in time to change something it takes time until it has any effect in the future? I can't see any reason for this.


I have a Frame within a Page, and would like to view other pages from within this Frame. I created the generalized method below, which works well from the Page that contains the Frame, called here during InitializeComponent:  public partial class MainPage : Page {     //public object SendPage { get; internal set; }     private Page RefPage  = new Page();     public MainPage()     {         InitializeComponent();         {             NavAway("Page1.xaml");         }     }      public void NavAway(String OurUri)     {         MainFrameXAML.Content = null;         MainFrameXAML.Navigate(new Uri(OurUri, UriKind.Relative));     }      ... }       However, when attempting to call this from other pages (that are contained in the Frame), I get the error:     An object reference is required for the non-static field, method, or property 'MainPage.NavAway(string)'.     Example of one of these calls from Page1.xaml.cs:  private void EventDoneMD(object sender, RoutedEventArgs e) {     MainPage.NavAway("Page2.xaml"); }   I am very new to c# and WPF, and have researched a fair number of methods to approach this, but I haven't found anything that distinctively addresses this while allowing me to keep the structure.  There are two ways that I've thought were promising:  One was to set the method as static, but eventually the error just requires the MainPage.MainFrameXAML to be set as static, which I'm unsure how to do, or if I can do it.  The other has been to use a variation of the following:  var mw = Application.Current.Windows.OfType<MainWindow>().FirstOrDefault(); mw?.SetBadge(counter);   Specifically for the Frame or Page (copied from this post: ).  What are my best options for achieving this?  !!!!Post hoc edit: I appreciate the answer provided, and it certainly got me on the right path.  The route that I ended up going was inspired by this post:   My Syntax for c#/WPF as follows:        private void EventDoneMD(object sender, RoutedEventArgs e)     {         Object frame = Application.Current.MainWindow.Content;         var MP = (MainPage)frame;         MP.NavAway("Page2.xaml");     }     AND        public void NavAway(String OurUri)     {         MainFrameXAML.Navigate(new Uri(OurUri, UriKind.Relative));     }

Consider:  namespace WindowsApplication1 {     public partial class Form1 : Form     {         public Form1()         {             InitializeComponent();         }          private void button1_Click(object sender, EventArgs e)         {             //int[] val = { 0, 0};             int val;             if (textBox1.Text == "")             {                 MessageBox.Show("Input any no");             }             else             {                 val = Convert.ToInt32(textBox1.Text);                 Thread ot1 = new Thread(new ParameterizedThreadStart(SumData));                 ot1.Start(val);             }         }          private static void ReadData(object state)         {             System.Windows.Forms.Application.Run();         }          void setTextboxText(int result)         {             if (this.InvokeRequired)             {                 this.Invoke(new IntDelegate(SetTextboxTextSafe), new object[] { result });             }             else             {                 SetTextboxTextSafe(result);             }         }          void SetTextboxTextSafe(int result)         {             label1.Text = result.ToString();         }          private static void SumData(object state)         {             int result;             //int[] icount = (int[])state;             int icount = (int)state;              for (int i = icount; i > 0; i--)             {                 result += i;                 System.Threading.Thread.Sleep(1000);             }             setTextboxText(result);         }          delegate void IntDelegate(int result);          private void button2_Click(object sender, EventArgs e)         {             Application.Exit();         }     } }   Why is this error occurring?     An object reference is required for the nonstatic field, method, or property 'WindowsApplication1.Form1.setTextboxText(int)


In a double ended Linked List, , I used another Link theLink which is copied through copy constructor to copy firstLink . But when I iterate through Linked List to insert from the back end , It throws me a Null Pointer Exception.  package javaapplication2;  import java.util.Arrays;  public class DoubleEndedLinkList {  Link firstLink; Link lastLink; int data;   public boolean isEmpty() {     return firstLink == null; }  public void insertAbove(int data) {     Link toInsert = new Link(data);      if (isEmpty()) {         firstLink = toInsert;     } else {        // System.out.println("firstLink : " + firstLink.data);         toInsert.next = firstLink;         firstLink = toInsert;     } }  public void insertBelow(int data) {    Link toInsert = new Link(data);    if(isEmpty()){        lastLink = toInsert;    }else{        Link traversal = new Link(firstLink);        while(traversal!=null){            traversal = traversal.next;        }        System.out.println("LastLink = " + traversal.data ); //Here exception occurs         lastLink = traversal;        lastLink.next = toInsert;        lastLink = toInsert;    } }  public void display() {     Link theLink = firstLink;     try {         System.out.print(theLink.data + "->");         theLink = theLink.next;         while (theLink != null) {             System.out.print(theLink.data + "->");             theLink = theLink.next;         }         System.out.print("||");      } catch (NullPointerException e) {         System.out.print("->||");     }  }    @Override public String toString() {     return String.valueOf(data); }   public static void main(String[] args) {      DoubleEndedLinkList dl = new DoubleEndedLinkList();     dl.insertAbove(5);     dl.insertAbove(10);     dl.insertAbove(15);     dl.display();     dl.insertBelow(99);     System.out.println("FirstLink = " + dl.firstLink.data + " LastLink = " + dl.lastLink.data);   }   }

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


My data explorer profile contains some throwaway or duplicate queries. They make it harder to find the queries that I want to find later. Can I remove queries from my profile?  (If the answer is no, this is a feature request.)

Is it possible to delete or at least hide your own data explorer query when you know you've only been testing something and don't want it to show?


I have a CentOS bare metal with 1TB SSD and, a couple weeks after having my application in production, we noticed it needs to be case-insensitive.  Is there any easy way to accomplish this? Also, should we expect a long downtime?  Reason for wanting a case-insensitive file system:  We use Dropbox API as the core of our application to get files and store them in our server.   The API doesn't tell, in an efficient way, when a file has uppercase letters. From Dropbox API best practices: A common thing that trips up new developers is that the Dropbox 'file system' is case-insensitive, meaning that A/B/c.txt is the same file as a/b/C.txt and is the same file as a/B/c.txt.  and  Note: Dropbox treats file names in a case-insensitive but case-preserving way. To facilitate this, the <path> values above are lower-cased versions of the actual path. The last path component of the <metadata> value will be case-preserved.  More  and .  While we can have some workarounds in the app itself to make this work, the best alternative for us was having the file system case-insensitive.

What methods are there to make the Linux filesystem case-INSENSITIVE ?  I have asp.net applications developed on Windows, but there are always issues with capitalization/spelling on mono when putting it on Linux.  One way is to mount a localhost SMB share to /var/www. Are there any others ?


Is there an English word that's similar to the meaning of envy, but in a positive way? In other words, if "envy" is hoping for the removal of someone else's blessing, what is the word for "wanting the same blessing for yourself but without wanting the blessing to be removed from the possessor"?  Envy = "I hate to see her luxurious house". Word? = "I wish I were as generous as he is".

Imagine your college buddy is now running a multi-billion dollar company, while you're still stuck at the same white-collar day job 5 years after graduation. You chat with him and want to express the idea that you're happy for him and fancy having his lifestyle--something like "I wish I could buy a yacht and cruise around the world like you do; I'm glad you're doing really well!"  Basically, it's the feeling of envy when you take out the resentment from it. Is there a word for it?   (I thought about "admire", but found it too strong and broad)


I have a valid uk visit visa that will expire in 2020 , will i be able to visit the uk for 6 months and return back to my home country then after a month visit the uk again for another 6 months and so on?  My husband is a british citizen so i am staying with him for 2 years visa and i am planning to return to my country every  6 months but the question is that i heard that i can stay only for total of 6 months the whole two years..   Can someone confirm pls?

A relative of mine has received a multiple-entry UK visa for 2 years. Is there a particular limit on how many months in total per year she can stay in UK? The way I understand the current rule is that such visitors can enter UK as many times as they want as long as they do not stay for longer than 6 months per single visit. However, does this mean that if she stayed with us for 5 months and went back home for 1-2 months, she could come and stay for another 5 months? I heard that it is advisable to spend only 180 day per calendar year in UK and not more, but I could not find that rule in any official UK Home Office documents. Thanks in advance for any info about this.


My computer in on LAN. I'm connected to the local domain at MyDomain. Within that domain exists something like WIKI for a training (http://training-wiki/). I would like to download entire WIKI into my PC to make it available for chosen clients. I found something called HTTrack but it doesn't seem to work. Our domain needs a login and password. Is there any tool that handles such a case?  I tried some other programs, but the same problem. Maybe I'm doing something wrong? I get:      401 Unauthorized   I tried wget:  wget --http-user=MyDomain\UserName --http-passwd=MyPassword --mirror -p --html-extension --convert-links http://training-wiki/   but getting the same 401 Unauthorized.  [EDIT]    It's not a duplicate. I said I want to download entire web site within domain using login/password. Programs listed in "duplicated" thread don't solve my problem at all... Please, READ the question before you mark it as a duplicated one...

How can I download all pages from a website?  Any platform is fine.


Hi I have an xml text like this  <w:p> abc </w:p> <w:p> def </w:p> <w:tr #A1b2c3> <w:p> 123 </w:p> </w:tr> <w:tr #C1d2e3> <w:p> 456 </w:p> </w:tr> <w:p> ghi </w:p>   I need to extract all paragraphs like  abc  except those inside a table row like   123  . Any help please?

How do I read and parse an XML file in C#?


I have these two classes  public class Category {     public int Id { get; set; }     public string Name { get; set; }     public int? ParentId { get; set; } }  public class CategoryVm {     public int Id { get; set; }     public string Name { get; set; }     public List<CategoryVm> SubCategories { get; set; } }   and I have a list of the first class and I want to convert it to the second form to be displayed inside a tree view.    Example input    Example output

I have a bunch of objects in a flat structure. These objects have an ID and a ParentID property so they can be arranged in trees. They are in no particular order. Each ParentID property does not necessarily matches with an ID in the structure. Therefore their could be several trees emerging from these objects.  How would you process these objects to create the resulting trees ?   I'm not so far from a solution but I'm sure it is far from optimal...  I need to create these trees to then insert Data into a database, in proper order.  There are no circular references. A Node is a RootNode when ParentID == null or when ParentID can't be found in the other objects


$$ \begin{bmatrix} X & 0\\ 1 & X\\    \end{bmatrix} =  \begin{bmatrix} X & 0\\ 1 & X\\    \end{bmatrix}$$ $$\begin{bmatrix} X & 0\\ 1 & X\\    \end{bmatrix}^2 = \begin{bmatrix} X^2 & 0\\ 2X & X^2\\    \end{bmatrix}$$ $$\begin{bmatrix} X & 0\\ 1 & X\\    \end{bmatrix}^3 = \begin{bmatrix} X^3 & 0\\ 2X^2+X^2 & X^3\\ \end{bmatrix}$$ $$ \begin{bmatrix} X & 0\\ 1 & X\\    \end{bmatrix}^n = \begin{bmatrix} X^n & 0\\ nX^{n-1} & X^n\\    \end{bmatrix}^n$$ Here you can see that the this matrix on the n-th exponent is it's own derivative. Is there any explanation for this ? $n = 1,2,3 \rightarrow\text{induction holds}$ $n \rightarrow n+1$ $$ \begin{bmatrix} X & 0\\ 1 & X\\    \end{bmatrix}^{n+1} = \begin{bmatrix} X & 0\\ 1 & X\\    \end{bmatrix}^n \begin{bmatrix} X & 0\\ 1 & X\\    \end{bmatrix}=\begin{bmatrix} X^n & 0\\ nX^{n-1} & X^n\\\end{bmatrix}\begin{bmatrix} X & 0\\ 1 & X\\\end{bmatrix} = \begin{bmatrix} X^{n+1} & 0\\ (n+1)X^n & X^{n+1}\\\end{bmatrix}$$

I happened to stumble upon the following matrix: $$ A = \begin{bmatrix}     a       & 1  \\     0       & a  \end{bmatrix} $$  And after trying a bunch of different examples, I noticed the following remarkable pattern. If $P$ is a polynomial, then: $$ P(A)=\begin{bmatrix}     P(a)       & P'(a)  \\     0       & P(a) \end{bmatrix}$$  Where $P'(a)$ is the derivative evaluated at $a$.  Futhermore, I tried extending this to other matrix functions, for example the matrix exponential, and wolfram alpha tells me: $$ \exp(A)=\begin{bmatrix}     e^a       & e^a  \\     0       & e^a \end{bmatrix}$$ and this does in fact follow the pattern since the derivative of $e^x$ is itself!  Furthermore, I decided to look at the function $P(x)=\frac{1}{x}$. If we interpret the reciprocal of a matrix to be its inverse, then we get: $$ P(A)=\begin{bmatrix}     \frac{1}{a}       & -\frac{1}{a^2}  \\     0       & \frac{1}{a} \end{bmatrix}$$ And since $f'(a)=-\frac{1}{a^2}$, the pattern still holds!  After trying a couple more examples, it seems that this pattern holds whenever $P$ is any rational function.  I have two questions:   Why is this happening? Are there any other known matrix functions (which can also be applied to real numbers) for which this property holds?


It's a kind of mask that is worn by horses so that they can't see sideways or backwards.   I think it's called a blinder (not sure though) but is there a proper term for this accessory in English? Preferably something that is used by Race Organizers?  Update 1 : The definition I found from      A screen attached to a horse's bridle preventing it from being able to see things to its side.   My question - Does a blinder have other names? (For example, blinker is one...)  Update 2 : Possible  flag raised. I felt that blinders were more of a colloquial term(It's my personal view and I may well be wrong). I was looking for a formal term, if there was one.

I am looking for a word for a thing that covers the eyelid of horses and lead the horses to run straight without track distractions.  Something similar to funambulist.


As a user I want to be able to, for instance, search for “Homer” or “Herodotus” and see results from across the network, i.e., from History, Philosophy, etc.   It sort of feels maybe like there should be an “affixed” search bar at the top of SE-wide feed (that maybe flows out if you pull down.) Not really sure about optimal UX but I would love this functionality.  (Maybe this already exists and I can’t find it?)

I'm using the official Stack Exchange mobile app for iOS or Android, and  My app crashed! It doesn't look good on my new smartphone. It won't run after I updated my device. I noticed another bug. I have an idea for a new feature which is currently not in the app.  How do I report bugs with or request features for the iOS and Android apps? Also:  I've used the built-in functionality of the app to report a bug or submit a feature request. Did I do the right thing? The app prompted me to post on Meta after an error occurred. Should I post about it here? I'm wondering why the latest version is from 2017. I've heard rumors that the apps are no longer supported; is that true? I can't find the app on my device's app store anymore! Where did it go?     We get a lot of bug reports from users about the mobile apps, which are unsupported, and at the moment, there is no centralized Q&A pair for those to be closed as duplicates of (the relevant answers are spread across multiple unrelated questions). This question is an FAQ proposal, to serve as a directly-related duplicate target for those questions.


What really was the Gray Jedi order?  Please tell me.  I want to know what they really where, there code, and some of the Gray jedi.

From what I understand they are basically Force users who choose a mix between Sith and Jedi teachings without being either, Using both to reach a balance. Am I correct?


string mystring = "Display(String type1, String type2, String art3, String ar4, String art5, String art6, String arg7)"   Get parameter name only from above string like type1,type2,art5 etc..  How should i manipulate

If I have a method such as:  public void MyMethod(int arg1, string arg2)   How would I go about getting the actual names of the arguments? I can't seem to find anything in the MethodInfo which will actually give me the name of the parameter.  I would like to write a method which looks like this:  public static string GetParamName(MethodInfo method, int index)   So if I called this method with:  string name = GetParamName(MyMethod, 0)   it would return "arg1". Is this possible?


I'm a math student going over some old exam questions. I have arrived at a number of questions that ask me to compute the limit of a function near a given number (2 in this case). But they appear to be harder than I first realised.  $$\frac{x^2 - 4}{x-2} = \frac{1- \frac{4}{x^2}}{\frac{1}{x} - \frac{2}{x^2}} \iff \lim_{x \to 2} \frac{1- \frac{4}{x^2}}{\frac{1}{x} - \frac{2}{x^2}}= \frac{1-1}{\frac{1}{2} - \frac{1}{2}} = \frac{0}{0} $$  Even though I used the algebra of limits I still arrived at a division of zero. I feel I have made a rookie mistake or assumption, but if anyone can help me fill the hole in my logic that would be much appreciated!

I have passed the calc sequence, and thought that I understood things.  But I have trouble with limits now and again.  From the way I understand it, the 'best' way to evaluate a limit, is to evaluate the expression at the number in the limit.  In that way it's not only a limit, but an algebraic expression (so, I think, the need for limits goes away entirely, superseded by accuracy.)  But then I see something like $\lim_{x\to 2} \frac{x^2-4}{x-2}$.  Now, I think in my mind 'the best way to evaluate this is just to plug in $2$'  But it doesn't work that way, as the limit is $4$, and if I plug in, the answer is $0/0$.  I think that people here, with their natural talent in math, can perceive where my train of thought is going wrong, and correct me.  Please!


Find, with proof, all functions $f:\Bbb N \to \Bbb N$ such that for all $n \in \Bbb N, f(n) + f(f(n)) = 2n+3$. Any ideas?

Find all functions $f:\mathbb{N_{0}} \rightarrow \mathbb{N_{0}}$ satisfying the equation $f(f(n))+f(n)=2n+3k,$ for all & $n\in \mathbb{N_{0}}$, where $k$ is a fixed natural number.  A friend of mine suggested me to use recurrence relation. While it is unfortunate that I have problems understanding recurrence relation. Please refer information to understand difference equation, homogeneous equation & auxillary equation.  Thanks in advance! Kindly don't down vote for not showing my attempt. I am seriously not able to understand the question and the process suggested to use.


Trying to work out this tricky trigonometry question for a game I am programming. My maths knowledge is basic so if possible please keep the answer as basic as possible. Need the formula to calculate point B on an infinite line L given two points AC where the angle ABC is equal to a specified angle X. I understand also that there are normally two points with the specified angle X on the line L So for example, if line L passed through points (0,10) and (10,0) and point A = (2,5) and point C = (5,2) and I wanted to find the target angle of 90 degrees then point B would be (5,5). Now, what if my target angle was 45 or 5 degrees what would point B be? New image to illistate:  Thank you.

In planning some video game camera behavior, I hit a math problem I am having some difficulty with. The camera in this case is restricted to moving along a line and chooses a location along the line to get close to important objects while keeping them in frame.  So to phrase the question in a mathy way:  Given a line (through points $L_1$ and $L_2$ in the drawing), two points $A$ and $B$ not on the line, and an angle $\theta$ (based on the camera's field-of-view), how would you calculate the possible locations of a point $P$ on that line such that $\measuredangle APB = \theta$?  (It looks like there could be zero, one, or two solutions depending on $\theta$ and where the points are in relation to the line)


I have trouble discerning conceptually between these two notions. I am aware of their formal relations, proprieties and what not, but I just can't wrap my head around what they "mean", if that even makes sense. I have checked some answers, such as , but I think none of these addresses my problem.  So, given some data $\mathcal{D}$ and parameters $\theta$,  $$ p(\theta|\mathcal{D})=\frac{p(\mathcal{D}|\theta)p(\theta)}{p(\mathcal{D})} $$  I have learned that the posterior is "the probability of $\theta$ being the statistical parameter underlying $\mathcal{D}$". And the likelihood is "the likelihood of $\theta$ having generated $\mathcal{D}$". In my head, these two notions are exactly the same. So how can I distinguish them?

We can write Bayes' theorem as  $$p(\theta|x) = \frac{f(X|\theta)p(\theta)}{\int_{\theta} f(X|\theta)p(\theta)d\theta}$$  where $p(\theta|x)$ is the posterior, $f(X|\theta)$ is the conditional distribution, and $p(\theta)$ is the prior.  or  $$p(\theta|x) = \frac{L(\theta|x)p(\theta)}{\int_{\theta} L(\theta|x)p(\theta)d\theta}$$  where $p(\theta|x)$ is the posterior, $L(\theta|x)$ is the likelihood function, and $p(\theta)$ is the prior.  My question is   Why is Bayesian analysis done using the likelihood function and not the conditional distribution? Can you say in words what the difference between the likelihood and conditional distribution is?  I know the likelihood is not a probability distribution and $L(\theta|x) \propto f(X|\theta)$.


this is my simplified code:  Text ... \ref{table:x} and \ref{table:y}.  \begin{table}[!h] \begin{tabular}{lcc}      \toprule     AAA & BBB & CCC\\     \midrule     DDD & \( 1 \) & \( A \) \\     EEE & \( 2 \) & \( B \) \\     FFF & \( 3 \) & \( C \) \\     HHH & \( 4 \) & \( D \) \\     \bottomrule \end{tabular} \label{table:x} \caption{something about table x} \end{table}  \begin{table}[!h] \begin{tabular}{lcc}      \toprule     AAA & BBB & CCC\\     \midrule     DDD & \( 1 \) & \( A \) \\     EEE & \( 2 \) & \( B \) \\     FFF & \( 3 \) & \( C \) \\     HHH & \( 4 \) & \( D \) \\     \bottomrule \end{tabular} \label{table:y} \caption{something about table y} \end{table}      My problem is related to the fact that when i compile on my .pdf i get this as result:  Text...?? and ??.  How can i solve this? It seems like \ref is not working. I think that i am doing something wrong with \label but i can't understand what. Thank you for your help

\documentclass{article} \usepackage{algorithm}  \begin{document} \setcounter{section}{54} \section{A section with no label} \begin{algorithm} \label{myalg} \caption{An algorithm with the label `myalg'.} \end{algorithm} Reference to myalg: \ref{myalg}. \end{document}   With this code, the reference givens 55 (the section number); if I move the label after the caption command, I get the correct reference (1).  Why should this be the case? I find it confusing: when thinking about an algorithm as an environment, you expect to be able to label it right after you began it. At the very least I would expect some kind of error or "??" to appear, rather than the previous environment or reference-able entity being used.


prescription.prescriptionDate gives me a proper date object prescription.prescriptionExpirationDate gives me a number (7, 14) Please keep in mind I am trying to get this done in-line. I am trying to add the number 7 or 14 into the date object and it should give me a new date object with the 7 or 14 days added into it. I am definitely doing something wrong as I get this error: TypeError: Cannot read property 'getDate' of undefined  Here's my code: <Typography variant="body2" component="p">     {new Date(prescription.prescriptionDate).setDate(prescription.prescriptionDate.getDate() + prescription.prescriptionExpirationDate).toDateString()}    </Typography>  Here's the code that works, to prove that I do get infact the prescription.prescriptionDate value correctly. <Typography variant="body2" component="p">         {new Date(prescription.prescriptionDate).toDateString()}        </Typography

How to add days to current Date using JavaScript. Does JavaScript have a built in function like .Net's AddDay?


I have been trying to use Ubuntu 14.04; before that I was trying 13.10, but due to the hardware structure of my Lenovo g400 Intel® Core™ i5-3230M CPU @ 2.60GHz × 4 and VESA: Intel® Sandybridge/Ivybridge Graphics I can't get it to work.  I am able to boot only in recovery mode because a normal boot is stopped by few flashes, a black screen and then a "Low Graphics Mode" window from which I can go nowhere.

Note: This is an attempt to create a canonical question that covers all instances of "low-graphics mode" error that occurs to a user, including but not limited to installation of wrong drivers, incorrect or invalid lightdm greeters, low disk space, incorrect installation of graphics card like ATI and Nvidia, incorrect configuration of xorg.conf file while setting up multiple monitors among others. If you are experiencing the "low-graphics mode" error when trying to login but none of the following answers work for you, please do ask a new question and then update the answers of this canonical question as and when your new question gets answered.   When I try to boot into my computer, I am getting this error:  The system is running in low-graphics mode Your screen, graphics cards, and input device settings could not be detected correctly. You will need to configure these yourself.   How do I fix the failsafe X mode and login into my computer?  Answer index:


I currently run Windows 7 on my 1 TB hard drive, but also have a spare 320 GB hard drive.  I have a USB with Ubuntu 13.04 loaded on it, and my goal is to have Windows 7 on the 1 TB hard drive and Ubuntu on the 320 GB hard drive.  I know you are supposed to somehow set up partitions so that Ubuntu can install properly, but I don't know what the partitions should be and how big they should be.  Please advise on how I should install Ubuntu on the hard drive.  Thanks.

I want to install Ubuntu side by side on my Windows XP.But instead of placing it on HDD C: drive, i want to place it on a slave HDD (which would be drive F:).I already tested on a virtual machine in placing on a second HDD but it doesn't appear to work. How should i proceed?


Given that   $$5\cos \theta -12\sin \theta = 13$$   I'm trying to evaluate a general solution for this equation. It appears I'll be using vector product.    My equation is equivalent to  $$\langle (5,12), (\cos\theta, \sin\theta)\rangle = 13$$  which yields (by Cauch Schwarz Inequality) $$|\langle (5,12), (\cos\theta, \sin\theta)\rangle| \le \|(5,12)\|\|(\cos\theta, \sin\theta)\| = 13$$  This is where I'm stuck.  Regards

Given that $$5\cos(x)-12\sin (x) = 13 $$  I'm trying to evaluate the general solution for that expression. It reminds me of $5-12-13$ triangle. Since we don't know the degree of $x$, I couldn't proceed further. Specifically, let's take its derivate, which yields   $$\dfrac{d}{dx} 5\cos(x)-12\sin (x) = 13  = 0$$


If I delete the code between the two command tags, I got the normal footcite result. But with that code, which I use to print a bibliography for each form of publication, I got allignment differences. How could I change this?  \documentclass[a4paper,dutch]{report} \usepackage[backend=bibtex,citestyle=verbose-ibid,bibstyle=numeric,sorting=nty,defernumbers=true]{biblatex}  %Begin \DeclareBibliographyCategory{websites} \DeclareBibliographyCategory{spoken} \DeclareBibliographyCategory{books}  \AtEveryCitekey{   \ifentrytype{misc}{     \iffieldundef{howpublished}{       \addtocategory{websites}{\thefield{entrykey}}     }{       \addtocategory{spoken}{\thefield{entrykey}}     }   }{   } }  \AtEveryCitekey{   \ifentrytype{book}{       \addtocategory{books}{\thefield{entrykey}}   }{} } %End   \usepackage{filecontents}  \begin{filecontents}{\jobname.bib}  @book{3,   author = {Menger, Carl},   title = {Grunds{\"a}tze der Volkswirtschaftslehre},   publisher = {Braum{\"u}ller},   year = {1982}  } @misc{blockchain1,   author = {Blockchain},   title = {{Transactie}},   url = "https://blockchain.info/tx/1c12443203a48f42cdf7b1acee5b4b1c1fedc144cb909a3bf5edbffafb0cd204",   urldate = "2014-11-16" } } \end{filecontents}  \addbibresource{\jobname.bib}  \begin{document}  \chapter{Chapter} Some text\footcite{3} another one\footcite{blockchain1}  and a footnote\footnote{I would like to add a footnote with some information too.}  \end{document}

I see that the code in many packages and examples contains percent signs % at the end of (many) lines. What are they used for? Do they affect the parsing of those lines?


It's pretty obvious a straight-up disarm would not work, as this requires an attack roll and the mage hand can't attack, but can they grab a bow, hand crossbow, etc. while the opponent is wielding something else? This is basically retrieving an object so perhaps contested by their Perception roll to check if they notice and stop it from happening?  This has some obvious synergy with, for example, the booming blade spell and Mobile feat, where if they want to be able to attack they have to move and trigger extra damage or pull out a ranged weapon.

Can Mage Hand be used in combat to grab something from an opponent?  For example, one could grab a bow out of their hands or the arrows from a quiver, or try to push them out of a tree, etc.  Mage Hand can carry up to 10 pounds, but what is its ability to interact in situations like these?


I have a fresh Ubuntu 16.04.1 LTS system and have noticed that key-based SSH authentication asks for the account's password the first time I login to the machine and subsequent SSH attempts work without prompting for a password.  So far, the behavior can be reproduced by rebooting the machine.  There may be a timeout as well, but I'm in the process of setting up the machine and haven't encountered it yet.  In general this is pretty neat as it mitigates a compromised SSH key, though it has a drawback for automated processes; in my case config management with Ansible.  Where is the SSH server behavior configured?  Specifically, to ask for password authentication even if a key-based auth succeeds, but only the first time the key is used to open a session.  I'd like to keep this "two-factor"ish behavior for interactive sessions, but disable it (i.e. do not prompt for password) for certain accounts (e.g. a dedicated ansible user).  Thanks!

So I set up passwordless ssh using the following:   After setting this up, I'd expect that I wouldn't need a password to ssh.  My issue is that on my first connection to ssh, it will ask me for a password, but additional sessions on top of that will not ask for a password.    I've already checked my sshd_config to make sure that it contains:  RSAAuthentication yes PubkeyAuthentication yes AuthorizedKeysFile  %h/.ssh/authorized_keys   Pretty sure my permissions are right, because if they weren't then passwordless ssh wouldn't be working at all.  To add more "fun" to this problem, I noticed that when I restart my computer (either the client computer or the ssh server computer), sometimes it will work.  Then when I shut down the computer and try it again the next day, it doesn't work anymore.  Maybe this is completely random, but it's something I've noticed.


When I was younger I had a cool game, that I forget the name of, and would like to re-acquire.  It was a small wooden board, with a grid of squares on it. There were two players, and each turn, you could move your piece, or place a barrier in one of the slits. You couldn't completely block your opponent, but you had to try to get to the other side of the board before they did.  Does anybody know what this game was called?

Does anyone recognize this game, where players take turns in a square board, each turn a player can move his pawn or place a wall and the objective is to reach the other side of the board before the other player.  Here is a picture of a near end game.


I am migrating a Drupal 7 project from one PC to another and I did the following steps     1) Copy pasted the root folder into D:\XAMPP\htdocs    2)   Imported the database of that project into phpmyadmin (had to increase   max_file_uploads to 20 in php.ini)  3) reset admin password   by referring   4) updated the   password in settings.php  5) cleared cache in the imported db   (by deleting the content of cache and cache_* tables)   Now I am able to login but the admin panel is blank, When I click Dashboard, Content, Structure, Appearance etc. nothing appears  No error is console.  PS: this is the first time I am using Drupal, so in-depth instructions is much appreciated  Edit  After 's suggestion I had set display_errors to on and error_reporting to E_ALL. Still no error appears anywhere  Edit From watchdog the last two rows;  Second-Last row      uid : 1 Message : Session opened for %name. location :   http://localhost:81/mysite/user referer :   http://localhost:81/mysite/user   Last Row     uid : 0 Message : Attempting to re-run cron while it is already   running. location : http://localhost:81/mysite/users/admin   referer : http://localhost:81/mysite/user

Here are the facts:   Made a clean install of Drupal 6.20 Installed and enabled  module   From this point on I can't access any admin/* page however I can access to both node/* and user/*...  PHP log:  No entries   Apache error log:  No entries   Apache access log:   127.0.0.1 - - [10/Mar/2011:16:22:16 +0000] "GET /drupal_testes/ HTTP/1.0" 200 5771 127.0.0.1 - - [10/Mar/2011:16:22:14 +0000] "GET /drupal_testes/admin HTTP/1.1" 200 -   DB table watchdog:  Nothing serious...    And that's all, for a single access to /drupal_testes/admin... Disabling admin_menu (at the system table) does work. Also, as a side note, when I go to admin/build/modules and try to enable Admin Menu again the page will take forever to load and end in a WSOD. After that if I go to drupal_testes/node the admin_menu is active and working, except for the admin/* pages.     I'm aware of  but none of the reasons seems to apply this case.. Any idea why can this be happening?      Edit #4     Exactly the same behaviour when installing      Edit #5   Installing CCK, which in theory is much heavier than Token or Admin Menu, presents no problems. Flushing the cache_* tables changes nothing. Increasing php.ini memory_limit didn't make any difference...     Although the problem is solved by disabling the offending modules, the goal is to have them active and working properly...


I installed Ubuntu Server 14.x for use as a server. It comes with a plain vanilla terminal UI.  How can I install a graphical desktop on it?

After installing Ubuntu server how do I install the desktop environment?


What is the derivative of $y$ with respect to $y'$ in general? In the context of variational calculus, we treat $y$ and $y'$ as independent variables and when taking the partial derevitives with respect to each other it gives 0. Is that always the case in general that partial derevitive of $y$ with respect to $y'$ is zero, or it's just for reasons that got to do with variational calculus that we treat $y$ and $y'$ as independent?

I know that $\frac{dy'(x)}{dy}=0$ (where $y'=\frac{dy(x)}{dx}$). The reason explained is that $y'$  does not depend explicitly on $y$. But intuitively, $y'$ depends on $y$, since if you vary $y$ you will modify $y'$. Why is my reasoning wrong (my reasoning sounds like it's related to functional calculus, instead of standard calculus)?  I tried to write  $\frac{dy'(x)}{dy}=\frac{d}{dy}\frac{dy}{dx}=\frac{d}{dx}\frac{dy}{dy}=\frac{d}{dx}1=0$, but this proof doesn't convince me.  I think that other way to see this is saying that if a function is of the form $f(y)$, it will not dependend on the variable $y'$.  But the same way you write $f(y)=y^2$, you could write $f(y)=\frac{d}{dx}y$, which clearly depends on $y'$. So I don't know if there are some types of operations which are restricted (for example, taking limits):  Note: The problem raises in the context of Classical Mechanics, where: $\frac{\partial L(\dot{x},t)}{\partial x}=0$.


Let $A\in \mathbb{R}^{n\times n}$ be invertible such that $A$ and $A^{-1}$ have integer entries. Prove that $\det(A)\in\{-1,1\}$.  My work:  $\det(I)=\det(AA^{-1})=(-1)^n\det(AA^{-1})=(-1)^n\det(A)\det(A^{-1}).$  I'm stuck here. Can someone help me?

So, $A$ is a $n \times n$ matrix with integer entries.  The question is to prove that $A^{-1}$ has all integer entries if and only if ${\rm det}\ (A) =\pm 1$ .  I know that $A^{-1}= {\rm adj}(A)/{\rm det}(A)$ but I have no idea where to go from there for the forward direction.  Any help here would be greatly appreciated.  For the backwards direction, I think I am okay.  I plugged the 1 and the -1 options into $ {\rm adj}(A)/{\rm det}(A)$ So, I know that $A^{-1}= {\rm adj}(A)$ or $-{\rm adj}(A)$.  Then I said that because the ${\rm adj}(A)$ is simply the matrix of co-factors of $A$, and because $A$ has all integer entries then ${\rm adj}(A)$ will have all integer entries, which will mean that $A^{-1}$ will have all integer entries.  Is that okay? Or am I missing something else?   Thank you!!``


I seem to remember a command to show bad boxes in a PDF when using latex, but googling is not helping me to remember.   How can I show bad boxes in my PDF?

Is it possible to make LaTeX mark overfull boxes in the output, for example by drawing red rectangles in the PDF where the boxes overflow? The purpose -- to more easily "see" where the problems are in the output.


I have this kind of text:  /&gt; 23 visível (diagonal)&lt;br /&gt; Energy Star&lt;br /&gt;   I want to convert it to a real texto to show on browser....  I've tried htmlentities method, but i'm getting this:   23 visÃƒÂvel (diagonal)  Energy Star   And i should get:  visível (diagonal) Energy Star

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


As far as I understand, we do not know whether an electron is a point particle or not, but we have a very low upper bound for its potential volume. If it turns out that electrons do have volume, what exactly does that mean? What constitutes this volume and how does it compare with the classical notion of volume?

I am wondering if the mass density profile $\rho(\vec{r})$ has been characterized for atomic particles such as quarks and electrons. I am currently taking an intro class in quantum mechanics, and I have run this question by several professors. It is my understanding from the viewpoint of quantum physics a particle's position is given by a probability density function $\Psi(\vec{r},t)$. I also understand that when books quote the "radius" of an electron they are typically referring to some approximate range into which an electron is "likely" to fall, say, one standard deviation from the expectation value of its position or maybe $10^{-15}$ meters.  However it is my impression that, in this viewpoint, wherever the particle "is" or even whether or not the particle "had" any position to begin with (via the Bell Inequalities), it is assumed that if it were (somehow) found, it would be a point mass. This has been verified by my professors and GSIs. I am wondering if its really true.  If the particle was truly a point mass then wherever it is, it would presumably have an infinite mass density. Wouldn't that make electrons and quarks indistinguishable from very tiny black holes? Is there any practical difference between saying that subatomic particles are black holes and that they are point masses? I am aware of such problems as Hawking Radiation although at the scales of the Schwarchild radius of an electron (back of the envelope calculation yields $\tilde{}10^{-57}$ meters), would it really make any more sense to use quantum mechanics as opposed to general relativity?  If anyone knows of an upper bound on the volume over which an electron/quark/gluon/anything else is distributed I would be interested to know. A quick Google Search has yielded nothing but the "classical" electron radius, which is not what I am referring to.  Thanks in advance; look forward to the responses.


I have this base body pony and i cant select it in object mode. What do I do so I can adjust it? if this cant be dun meby there is a way to get it animate? i mage to grab all other stuff like main, tail, wings, eyes but all of that is mesh so i think i will be abol to put bones inside ones i convert it or what i need to do to do this thanks :-)

I want to lock objects from getting selected, but not change their visibility.  2.8 removed the lock button from the outliner. How do you lock objects in 2.8?


An error keeps popping up while I was making my table. This is the code:  \begin{table}  \caption{Pearson’s coefficient of mechanical properties with different compositional parameters.}  \label{tab:4}  \begin{tabular}{lllllll}  \hline\noalign{\smallskip}  & \rho\textsubscript{w} & \rho\textsubscript{d} & \%Min & \%Ash & \%Org\textsubscript{w} & \%H\textsubscript{2}O\\ %this isthe faulty line!!  \noalign{\smallskip}\hline\noalign{\smallskip}  \textit{E} & 0.55\textsuperscript{a} & 0.92\textsuperscript{a} & 0.93\textsuperscript{a} & 0.81\textsuperscript{a} & -0.14 & 0.14\\  $\textit{k} & 0.31 & 0.87\textsuperscript{a} & 0.70\textsuperscript{a} & 0.72\textsuperscript{a} & -0.30 & -0.23$\\  \noalign{\smallskip}\hline  \end{tabular}  \end{table}   I obtain following error:   l.179 & \rho             \textsubscript{w} & \rho\textsubscript{d} & \%Min & \%Ash & \%O...?

This error keeps popping while making my table:  ! Missing $ inserted. <inserted text>                   $ l.196 \textit{E} & 13.21 \cdot\rho_{dry}$+0.73 \cdot $\% Min$-0.06$\cdot$ ...?   This is my code:   \begin{table} \caption{Equations obtained from multiple regression analysis of Elastic modulus (\textit{E}) and Stiffness (\textit{k})} \label{tab:5} \begin{tabular}{lllll} \hline\noalign{\smallskip} Dependent & Multiple regression equation & $r^{2}$ & $Adj r^{2}$ & p- value\\ variable& & & &\\ \noalign{\smallskip}\hline\noalign{\smallskip} \textit{E} & 13.21 \cdot $\rho_{dry}$+0.73 \cdot $\% Min$-0.06$\cdot$ $\% Org$_{w}$-0.07 $\cdot$ $\% H_{2}O$-55.56$ & 0.96 & 0.95 & 4.8 x $10^{-13}$\\ \textit{k}& 1853.69 $\cdot$ $\rho_{dry}$ + 2.49 $\cdot$ $\% Min$ - 22.29 $\cdot$ $\% Org_{w}$ – 6.54 $\cdot$ $\% H_{2}O$ – 2190.16 & 0.95 & 0.93 & $4.35 x 10^{-12}$\\ \noalign{\smallskip}\hline \end{tabular} \end{table}


When I fit a logistic regression model with my data set, I get the warning "glm.fit: fitted probabilities numerically 0 or 1 occurred", and the result for one of my dummy coefficients $x$ is nonsensical (extremely high estimate and variance). I'm aware that this warning usually indicates a perfect prediction problem, where the independent variable $x$ is perfectly separated by the dependent variable $y$. In my case, the reason seems to be that $y$ has the same value for all cases where $x=1$. However, in cases where $x=0$, the values of $y$ vary and it sometimes takes on the same value as when $x=0$. So $y$ doesn't perfectly separate $x$, but still this is what causes the problem. When I change just one of the $y$ values for $x=1$, the model estimation works fine. Why does this error occur in my case, if the perfect prediction problem isn't the cause? I'm not looking for a solution, I just want to understand the problem.

Update: Since I now know that my problem is called quasi-complete separation I updated the question to reflect this (thanks to Aaron).    I have a dataset from an experiment in which 29 human participants (factor code) worked on a set of trials and the response was either 1 or 0. In addition, we manipulated the materials so that we had three crossed factors, p.validity (valid versus invalid), type (affirmation versus denial), and counterexamples (few versus many):  d.binom <- read.table("http://pastebin.com/raw.php?i=0yDpEri8") str(d.binom) ## 'data.frame':   464 obs. of  5 variables: ##      $ code           : Factor w/ 29 levels "A04C","A14G",..: 1 1 1 1 1 1 1 1 1 1 ... ##      $ response       : int  1 1 1 1 0 1 1 1 1 1 ... ##      $ counterexamples: Factor w/ 2 levels "few","many": 2 2 1 1 2 2 2 2 1 1 ... ##      $ type           : Factor w/ 2 levels "affirmation",..: 1 2 1 2 1 2 1 2 1 2 ... ##      $ p.validity     : Factor w/ 2 levels "invalid","valid": 1 1 2 2 1 1 2 2 1 1 ...   Overall there is only a small number of 0s:   mean(d.binom$response) ## [1] 0.9504   One hypothesis is that there is an effect of validity, however, preliminary analysis suggests there might be an effect of counterexamples. As I have dependent data (each participant worked on all trials) I would like to use a GLMM on the data. Unfortunately, counterexamplesquasi-completely separate the data (at least for one level):  with(d.binom, table(response, counterexamples)) ##         counterexamples ## response few many ##        0   1   22 ##        1 231  210   This is also reflected in the model:   require(lme4) options(contrasts=c('contr.sum', 'contr.poly'))   m2 <- glmer(response ~ type * p.validity * counterexamples + (1|code),              data = d.binom, family = binomial) summary(m2) ## [output truncated] ## Fixed effects: ##                                      Estimate Std. Error z value Pr(>|z|) ##   (Intercept)                            9.42     831.02    0.01     0.99 ##   type1                                 -1.97     831.02    0.00     1.00 ##   p.validity1                            1.78     831.02    0.00     1.00 ##   counterexamples1                       7.02     831.02    0.01     0.99 ##   type1:p.validity1                      1.97     831.02    0.00     1.00 ##   type1:counterexamples1                -2.16     831.02    0.00     1.00 ##   p.validity1:counterexamples1           2.35     831.02    0.00     1.00 ##   type1:p.validity1:counterexamples1     2.16     831.02    0.00     1.00   The standard errors for the parameters are simply insane. As my final goal is to assess whether or not certain effects are significant, standard errors are not totally unimportant.   How can I deal with the quasi complete separation? What I want is to obtain estimates from which I can judge whether or not a certain effect is significant or not (e.g., using PRmodcomp from package pkrtest, but this is another step not described here).   Approaches using other packages are fine as well.


Little micro-controller (arduino) for my home automation project listens to a pin high low status change.  When the pin status changes,   function is called like below:    NotSureYet  sendMessageOnPinChange(8, "You turned on the kitchen lights ");   returns   The function will check if it was invoked with first parameter being an integer range from 0 to 16, else it returns 'error' (like: you should use a number between ...) the function checks if the second param is of type char * (a string), else it returns an error (like: the message is not a string) the function also returns if the message was 'sent' correctly or not   Question What would be the return type NotSureYet?  While once it returns "Message Sent success", which is NOT an error, and any other case it returns "error integer" or "error Message" or ... So I am not looking for error checking, I am looking for the return type of 'NOT_SURE_YET'

What do you consider "best practice" when it comes to error handling errors in a consistent way in a C library.  There are two ways I've been thinking of:  Always return error code. A typical function would look like this:  MYAPI_ERROR getObjectSize(MYAPIHandle h, int* returnedSize);   The always provide an error pointer approach:  int getObjectSize(MYAPIHandle h, MYAPI_ERROR* returnedError);   When using the first approach it's possible to write code like this where the error handling check is directly placed on the function call:  int size; if(getObjectSize(h, &size) != MYAPI_SUCCESS) {   // Error handling }   Which looks better than the error handling code here.   MYAPIError error; int size; size = getObjectSize(h, &error); if(error != MYAPI_SUCCESS) {     // Error handling }   However, I think using the return value for returning data makes the code more readable, It's obvious that something was written to the size variable in the second example.  Do you have any ideas on why I should prefer any of those approaches or perhaps mix them or use something else? I'm not a fan of global error states since it tends to make multi threaded use of the library way more painful.  EDIT: C++ specific ideas on this would also be interesting to hear about as long as they are not involving exceptions since it's not an option for me at the moment...


Which is correct English, "you have minus one dollar in your account" or "you have minus one dollars in your account"?  Is the rule general?  For example, which is correct, "you have minus one diamond in your account" or "you have minus one diamonds in your account"?    I note that  gives "minus one dollar", and that of course "you have minus two dollar in your account" is wrong while "you have minus two dollars in your account" is correct. Further "please minus one dollar from my account" is correct, while "please minus one dollars from my account" is not.

Do we say "-1 thing" or "-1 things"?  I am interested in both      two things minus one thing(s)    and      minus/negative one thing(s)


I was recently thrown there from the windows world and I'd like to ask some questions about clipboards in Linux (and Unix?) systems. What is X clipboard? How many clipboards are in Linux? Actually, I'd like to copy command from terminal to clipboard and then paste it in an other application (gedit, skype etc.). I  echo !! | xclip in terminal. However when I tried to paste the command to other applications (via Shift+Ins or Ctrl+V), actually an old content have been pasted. At the same time I can paste this command in terminal.

Trying to cut + copy + paste from the standard urxvt shell in Puppy Linux Wary 5.3.  If I follow  and I press:   in urxvt:  ctrl + insert = copy in abiword: shift + insert = paste   It doesn't work.  Please suggest, what's the shortcut?  Or the menu command?


Suppose I have a code mentioned below. module dut#(parameter type tp =int, tp x = 12 ) (int r , reg [7:0] rg); endmodule  module mid (int r, reg [7:0] rg); endmodule  module bin (int z, logix s); endmodule  module med; endmodule   I want to extract the words dut, mid, bin and med, characterized by being the words after the keyword module and before the symbol #, ( or ;, whichever comes first. I want to accomplish this using only a csh script. Which regex can be used for that purpose?

I have the following in a file Output.dat. I need to extract the value between dn: uid= and ,ou=  dn: uid=user1,ou=Active,ou=Member,dc=domain,dc=org  dn: uid=user2@abc.com,ou=Active,ou=Member,dc=domain,dc=org  dn: uid=usertest,ou=Active,ou=Member,dc=domain,dc=org  dn: uid=abc1,ou=Active,ou=Member,dc=domain,dc=org   I tried using sed -e '/dn: uid=/,/,ou=/p' output.dat but  it returns complete line instead of value. When tried to use sed -e '/dn: uid=/,/,ou=/\1/p' output.dat  then got the following error: sed: -e expression #1, char 18: unknown command: `\'


How to prove  $$\frac{3!}{2(n+3)}= \sum_{r=0}^n (-1)^r \frac{ n\choose r}{{r+3}\choose r}$$?  I'm really not getting any nerve to prove this. Can anyone help me in deducing this. Any hint would be appreciated.


my niece and nephew apply for family visit and a gave the sponsorship also said i will bare cost they also submit their documents, however they has been refused under V4.2 a,c of appendix V what i can do now.  thank you      do my first cousin have any right to attend my wedding? if have the right is this under human right or not?

Many of the UK visa refusals we see here share a common pattern and the prevailing reasons refer to V 4.2 (a) and (c).    I do understand that, while the applicants may describe very different individual circumstances, there's a consistent pattern and, broadly, fall into specific categories:    Credibility (lifestyle, lack of ties, visit history, lies & omissions) Funding (insufficient funds, provenance of funds, funds parking) Sponsorship (family, friends, employer)   Question: What most commonly triggers a UK visa refusal where V 4.2 (a) and (c) are given as the grounds?  Secondarily: Given that there is a clear pattern, to what extent are these refusals predictable? Does sponsorship make a difference? Is there a set of personal circumstances, however abstract, where a refusal is all but guaranteed? For example, why do those we see here on TSE who sought entry for the PLAB or British Army appear to be refused with a common theme? Is there a uniform shortcoming or is it just discrimination?   PLAB: What is about applications for a visa, for the purpose of sitting the Professional and Linguistic Assessments Board (PLAB) exam, that seem to invite refusals. After all, the test is given so that international medical graduates can show that they qualify to practise medicine in the UK. The first part, PLAB 1, can be taken in centres outside of the UK. However, PLAB 2 can be taken only in the UK. Why can't you can't get a visa just to sit the exam, promising that you'll leave immediately after?    British Army: Since Commonwealth citizens are eligible to apply online to join, even those who don't reside in the UK, why is it so difficult to get a visa just to attend an interview to see whether you are suitable? Even with an invitation from the Army, such visa applications seem to be unsuccessful. Isn't a career in the British Army a valid reason?     Lastly:  After such a refusal, what approaches would increase the chance of a successful application?


Let's say we have two injective functions $u : \mathbb{N} \to A$ and $v : A \to \mathbb{N}$.  How can I demonstrate that $A$ is uncountable ?  If there is an injective function $u : \mathbb{N} \to A$ and $v : A \to \mathbb{N}$, consequently there is a bijection between $\mathbb{N}$ and $A$. But what can I do from that?  Thanks!

I am trying to prove that $D(\mathbb{N}$)={ $f\in \mathbb{N}^\mathbb{N}$ | f is a bijection such that $f(n)\neq n$ for all $n\in\mathbb{N}$} is uncountable. So, I was thinking of showing $D(\mathbb{N})$ ~ $P(\mathbb{N})$ using Cantor Bernstein Theorem.   For the one direction, is it found to say since $D(\mathbb{N})\subset \mathbb{N}^\mathbb{N}$ ~$P(\mathbb{N})$ then there is an injection from $D(\mathbb{N})$ to $P(\mathbb{N})$?   I am not too sure how to go about the other direction. Should I show equinumerous to functions from $\mathbb{N}^\mathbb{N}$ instead of using the power set?


I know for sure that there are two command-line arguments in C -- argc and argv[], but while taking an online test, I figured out that there are 3 command line arguments in C. Can someone please explain to me this.

What is the correct (most efficient) way to define the main() function in C and C++ — int main() or void main() — and why? And how about the arguments? If int main() then return 1 or return 0?  There are numerous duplicates of this question, including:       — For C++, with a very good answer indeed.     Related:


I make lollipops at home in a silicon mold but every time as soon as I take them out the mold not even two minutes after they seem to develop a sticky coating how can I prevent that in the first place? I have been dusting a coating of cornstarch but it seems to help temporarily.

When I candy-coat apples and let them sit out, the candy coating becomes sticky. I live in the Southern U.S., so humidity is usually pretty high, but other people in my area make them as well.


while adding another user with same computer name active directory i overwriting old one. Is there any way to prevent this?   I mean can i get some message or access denied when i try to add second computer with the same computer name as other that is already in active directory?

At work we have a Domain Controller running Server 2008 R2. Our desktop support group has the ability to join computers to the domain using their network credentials. We are now running into a problem where if the name of the computer that is being joined is the same as an existing computer on the domain, the existing computer will get a "The trust relationship has failed..." error and will not authenticate at all unless someone logs in as a local admin, changes the computer name and rejoins it to the domain.  I want to make it so that Desktop Support can only join computers with unique names to the domain. If the name already exists on the domain the operation should fail. Looking through TechNet it looks like this functionality exists but I can't seem to find out how to enable it.  Any ideas?


(1)$1=\sqrt{1}$  (2)$=\sqrt{-1×-1}$  (3)$=\sqrt{-1}×\sqrt{-1}$  (4)$=i×i=-1$  $1=-1$  Which step is wrong? I guess step 3 but I dont know why

I know there must be something unmathematical in the following but I don't know where it is: \begin{align} \sqrt{-1} &= i \\\\\ \frac1{\sqrt{-1}} &= \frac1i \\\\  \frac{\sqrt1}{\sqrt{-1}} &= \frac1i \\\\  \sqrt{\frac1{-1}} &= \frac1i \\\\  \sqrt{\frac{-1}1} &= \frac1i \\\\  \sqrt{-1} &= \frac1i \\\\  i &= \frac1i \\\\  i^2 &= 1 \\\\  -1 &= 1 \quad !!? \end{align}


I don't understand, why some programs are requesting some permissions, especially concerning my privacy.   So I want not to grant them or revoke after granting.  I don't care if application will crash. I expect, that polite application will never access my private data without first asking explicitly. Since I won't permit this, then polite application will never crash. And mutual, if application will crash, then it is not polite and should be uninstalled.  How to revoke permissions on Android?

Occasionally I want to install an application which requires certain permissions that I feel it really shouldn't need. Can I install the app without giving it these permissions? For example, GPS location, , internet connection, etc.  Is it possible to change the permissions of an application once it is installed?


A few effects on the Wild Magic table are spells that normally require concentration. Does the sorcerer have to give up their concentration for these effects to occur?  If so, do they have a choice in the matter? For example, if they're currently concentrating on Witch Bolt, does it automatically break if Wild Magic causes them to cast Levitate?

I can't find any official ruling about this.  I'll use the example of Fog Cloud on the Wild Magic Surge Table (PHB pg. 104) as an example.  The Wild Magic entry reads:     You cast fog cloud centered on yourself.   The spell Fog Cloud (PHB pg. 243) is a concentration spell, lasting for up to an hour.  The rules for concentration (PHB pp. 203-204) state:     Some spells require you to maintain concentration in order to keep   their magic active. If you lose concentration, such a spell ends. If a   spell must be maintained with concentration, that fact appears in its   Duration entry, and the spell specifies how long you can concentrate   on it. You can end concentration at any time (no action required).      Normal activity, such as moving and attacking, doesn't interfere with   concentration. The following factors can break concentration:         Casting another spell that requires concentration. You lose concentration on a spell if you cast another spell that requires   concentration. You can't concentrate on two spells at once.   Taking damage. whenever you take damage while you are concentrating on a spell, you must make a Constitution saving throw to maintain your   concentration. The DC equals 10 or half the damage you take, whichever   number is higher. If you take damage from multiple sources, such as an   arrow and a dragon's breath, you make a separate saving throw for each   source of damage.   Being incapacitated or killed. You lose concentration on a spell if you are incapacitated or if you die.         The DM might also decide that certain environmental phenomena, such as   a wave crashing over you while you're on a storm-tossed ship, require   you to succeed on a DC 10 Constitution saving throw to maintain   concentration on a spell.   So, does a spell such as Fog Cloud cast as a result of a roll on the Wild Magic Surge table require concentration? Can the PC that cast it cancel the concentration and the spell effect at will, as with a usual concentration spell? Upon casting, does it cancel any current concentration spells the caster has active? Or does having the level of control over a Wild Magic spell where you can cancel the effect defy the point of the class?


Basically, I messed up my partitions and decided to do a full re-install of both Windows XP and Ubuntu 11.10 (I know that 11.10 is outdated, but I was planning to do an update to 12.04 as soon as I got everything happened). Here is a sequence of what I did:   Installed Windows XP onto 20gb of hard-drive space Installed Ubuntu 11.10 onto the remaining 10 gb of space using the advance setup option where I partitioned: (1gb swap, 200mb /boot, and 8.8gb / , (see screenshot)) Trouble struck, when I rebooted, grub2 didn't show Windows XP under my boot options. I ran sudo update-grub but it still didn't find windows I opened gparted and added the 'boot' flag to my windows xp partition (I was getting desperate and didn't know what to do)   And now, I'm stuck with only Ubuntu, and I don't want to have to re-install both Ubuntu and Windows to get grub working again.   Please note, I have seen  and  but I couldn't find anything useful.   Thanks a lot,  DevNewb

I have finally installed Ubuntu on my second drive. When I start my computer GRUB only offers me to boot Ubuntu, not Windows 7. What needs to be done so that I can choose between Ubuntu and Windows in GRUB?  When I press F12 for boot menu at startup and I choose Windows Boot Manager it boots into Windows 7.    I ran command sudo fdisk -l and here is log ():  WARNING: GPT (GUID Partition Table) detected on '/dev/sda'! The util fdisk doesn't support GPT. Use GNU Parted.   Disk /dev/sda: 1000.2 GB, 1000204886016 bytes 255 heads, 63 sectors/track, 121601 cylinders, total 1953525168 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 4096 bytes I/O size (minimum/optimal): 4096 bytes / 4096 bytes Disk identifier: 0xc3ffc3ff     Device Boot      Start         End      Blocks   Id  System /dev/sda1               1  1953525167   976762583+  ee  GPT Partition 1 does not start on physical sector boundary.


After I installed Ubuntu 18.04 bluetooth worked and I could pair my bluetooth peripherals and they worked. I booted into Ubuntu again and the bluetooth icon in the launcher starts flickering and my devices stopped working. I rebooted Ubuntu and bluetooth was working again. Next time I rebooted it stopped working. This problem happens repeatedly everytime I boot Ubuntu, sometimes bluetooth works, sometimes it stops. I tried to use the drivers from Additional Drivers but the problem persists. I did some research and tried these commands, but I don't know what to do now.  lshw -class network description: Wireless interface        product: BCM4352 802.11ac Wireless Network Adapter        vendor: Broadcom Limited        physical id: 0        bus info: pci@0000:03:00.0        logical name: wlp3s0        version: 03        serial: 24:0a:64:49:78:65        width: 64 bits        clock: 33MHz        capabilities: pm msi pciexpress bus_master cap_list ethernet physical wireless        configuration: broadcast=yes driver=wl0 driverversion=6.30.223.271 (r587334) latency=0 multicast=yes wireless=IEEE 802.11        resources: irq:17 memory:df400000-df407fff memory:df200000-df3fffff   and  lsusb; dmesg | egrep -i 'blue|firm' Bus 002 Device 002: ID 8087:8000 Intel Corp. Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 001 Device 002: ID 8087:8008 Intel Corp.  Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 004 Device 003: ID 0480:0110 Toshiba America Inc  Bus 004 Device 002: ID 174c:3074 ASMedia Technology Inc. ASM1074 SuperSpeed hub Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Bus 003 Device 005: ID 1b1c:0c04 Corsair  Bus 003 Device 003: ID 0b05:17cf ASUSTek Computer, Inc.  Bus 003 Device 006: ID 04b4:0101 Cypress Semiconductor Corp. Keyboard/Hub Bus 003 Device 004: ID 0738:1705 Mad Catz, Inc.  Bus 003 Device 002: ID 174c:2074 ASMedia Technology Inc. ASM1074 High-Speed hub Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub [    0.032076] Spectre V2 : Enabling Restricted Speculation for firmware calls [    0.057619] ACPI: [Firmware Bug]: BIOS _OSI(Linux) query ignored [    3.349413] Bluetooth: Core ver 2.22 [    3.349441] Bluetooth: HCI device and connection manager initialized [    3.349445] Bluetooth: HCI socket layer initialized [    3.349448] Bluetooth: L2CAP socket layer initialized [    3.349453] Bluetooth: SCO socket layer initialized [    3.469459] Bluetooth: hci0: BCM: chip id 63 [    3.470452] Bluetooth: hci0: BCM: features 0x07 [    3.486477] Bluetooth: hci0: NUNO [    3.487455] Bluetooth: hci0: BCM20702A1 (001.002.014) build 1469 [    3.487864] bluetooth hci0: Direct firmware load for brcm/BCM20702A1-0b05-17cf.hcd failed with error -2 [    3.487865] Bluetooth: hci0: BCM: Patch brcm/BCM20702A1-0b05-17cf.hcd not found [    4.569598] Bluetooth: BNEP (Ethernet Emulation) ver 1.3 [    4.569599] Bluetooth: BNEP filters: protocol multicast [    4.569602] Bluetooth: BNEP socket layer initialized [   34.098347] hid-generic 0005:046D:B01A.0005: input,hidraw4: BLUETOOTH HID v0.03 Keyboard [MX Anywhere 2S] on 24:0A:64:39:1A:79 [   50.855727] Bluetooth: RFCOMM TTY layer initialized [   50.855731] Bluetooth: RFCOMM socket layer initialized [   50.855734] Bluetooth: RFCOMM ver 1.11 [  498.150022] Bluetooth: hci0: last event is not cmd complete (0x0f) [  514.274031] Bluetooth: hci0: last event is not cmd complete (0x0f) [  530.146048] Bluetooth: hci0: last event is not cmd complete (0x0f)   etc. it goes on like that.

Bluetooth is on but can't find or be found by any other devices.  Output of sudo service bluetooth status:  ● bluetooth.service - Bluetooth service    Loaded: loaded (/lib/systemd/system/bluetooth.service; enabled; vendor preset: enabled)    Active: active (running) since ხუთ 2015-06-04 22:33:18 GET; 13min ago  Main PID: 26678 (bluetoothd)    CGroup: /system.slice/bluetooth.service            └─26678 /usr/sbin/bluetoothd -n  ივნ 04 22:39:14 Rangoo bluetoothd[26678]: Endpoint registered: sender=:1.63 path=/MediaEndpoint/BlueZ4/HFPAG ივნ 04 22:39:14 Rangoo bluetoothd[26678]: Endpoint registered: sender=:1.63 path=/MediaEndpoint/BlueZ4/HFPHS ივნ 04 22:39:14 Rangoo bluetoothd[26678]: Endpoint registered: sender=:1.63 path=/MediaEndpoint/BlueZ4/A2DPSource ივნ 04 22:39:14 Rangoo bluetoothd[26678]: Endpoint registered: sender=:1.63 path=/MediaEndpoint/BlueZ4/A2DPSink ივნ 04 22:39:14 Rangoo bluetoothd[26678]: bluetoothd[26678]: Endpoint registered: sender=:1.63 path=/MediaEndpoint/BlueZ4/HFPAG ივნ 04 22:39:14 Rangoo bluetoothd[26678]: bluetoothd[26678]: Endpoint registered: sender=:1.63 path=/MediaEndpoint/BlueZ4/HFPHS ივნ 04 22:39:14 Rangoo bluetoothd[26678]: bluetoothd[26678]: Endpoint registered: sender=:1.63 path=/MediaEndpoint/BlueZ4/A2DPSource ივნ 04 22:39:14 Rangoo bluetoothd[26678]: bluetoothd[26678]: Endpoint registered: sender=:1.63 path=/MediaEndpoint/BlueZ4/A2DPSink ივნ 04 22:39:14 Rangoo bluetoothd[26678]: Adapter /org/bluez/26678/hci0 has been enabled ივნ 04 22:39:14 Rangoo bluetoothd[26678]: bluetoothd[26678]: Adapter /org/bluez/26678/hci0 has been enabled   Output of lsusb:  Bus 003 Device 005: ID 0a5c:21d7 Broadcom Corp. BCM43142 Bluetooth 4.0   How can I fix it?


I'm wondering because of Greatbow vs shortbow. Obviously the arrows are going to be of different sizes, and I got to wondering. Arrows for Greatbow, we'll call them great arrows, are they the size of small spears? Or would they be closer to the length of a longsword?  Same thing with the rest of the arrows, what are they the most comparable with visually?  In terms for this question, I'm not asking for damage-wise. What I'm actually asking for is what does the book/rules/DMs say about the arrow sizes visually. The reason why I ask this is because when I think greatbow, I immediately think of the Dragonslayer Greatbow from Dark Souls 3 and the Dragonslayer Greatarrows that it uses. Those, in comparison to the player is a small spear. A longbow in the same game has arrows roughly the same length as a shortsword, iirc. Of course, not the same width.

Since the lengths of the bows and, presumably, the optimal drawn string - bow center distance, are different, my DM has said that shortbow arrows and longbow arrows are different items, and trying to use a shortbow arrow with a longbow, or vice versa, would result in a penalty to attack rolls.  I am not sure whether this is an official rule or a houserule of hers, but that's not the main point. (Although I'm still curious about this.)  My main question is, by this logic, do a longbow arrow and a composite longbow arrow constitute separate items? In other words, is a longbow similar enough to a composite longbow for arrows made for one of them to be usable with both?


What I've got so far  I've finally got the functions.php plugin to append a string to custom post titles of a certain post type with this function:  function append_album_review_to_title( $title ) {     global $post;     $text = 'Album Review: ';      if ( get_post_type( $post->ID ) == 'album_review' && in_the_loop() ){         return $text . $title;     }     else {         return $title;     } } if(function_exists('add_filter')) {     add_filter('the_title', 'append_album_review_to_title'); }   and though it does almost everything I need it to, it still doesn't append the string to titles as they are posted via auto-posting plugins.  The Problem  The plugin I am using is NextScripts: Social Networks Auto Poster and everywhere I can see the title, the desired string is appended but when this plugin auto-posts, the string is not appended.  The Question  How can I change my function to also apply to the titles as they are output by auto-posting plugins?    UPDATE 1  Why in_the_loop()?  I use in_the_loop() because if I don't, the string gets appended to seemingly every link on the page.   I think this may happen because the post_type I am appending to is a custom type.   I just tried removing it, and of course "Album Review: " was added to every single link on the page.  Will %FULLTITLE% only work with manual <meta>s?  I tried using %FULLTITLE% without manual <meta> tags as you described, but it doesn't seem to append the string.  The reason why I bothered to try it this way is because YOAST plugin (as you said) not only already includes these tags, but because it already appends "Album Review: " to the title where necessary.  So, when I inspect source, in the <head>, the tags are like:  <meta property="og:title" content="Album Review: [the rest of title]">  Is YOAST's appending not enough, and I need to do the manual tags?  (Apologies for this form of communication; WordPress StackExchange still won't allow me to comment or upvote.)

The Challenge  I have been trying to write a filter that applies (prepends a string) to (a) post titles of a certain post type and (b) to that same post type WordPress admin backend for use by an auto social sharing plugin.  I've gotten really close.  I've achieved: 1.  prepending only to custom post_type post titles 2.  prepending to custom_post type titles AND all nav menu items 3.  prepending to ALL titles (post, page, nav menu, and backend auto-sharing plugin)  The final, 3rd attempt got me very hopeful, but yet still, no matter the function, conditional statement, or combination I use, I can't get custom_post title AND backend social sharing plugin, but not nav menu items.  My Code - what I've tried  I've tried different conditionals, like is_admin() and !is_nav_menu with all nav menu IDs.  I've also tried comparing the ID of the post to the ID of the menu.  Finally, I've also tried adding the filter only to loop_start and that seems promising if combined with other statements.  I will clean up my code for your review but I leave it this way for now in hopes it helps to see what I've tried and maybe where I went wrong with any of those methods.  // , $id = NULL function append_album_review_to_title( $title ) {     global $post;     global $dont_apply_title_filter;     $text = 'Album Review: ';     $prepended_title = $text . $title; /*     $nav_menus_obj = wp_get_nav_menus();     $nav_menu_ids = '';     foreach( $nav_menus_obj as $nav_menu ) {         $nav_menu_ids .= $nav_menu->term_id . ',';     }     rtrim($nav_menu_ids, ','); */ //  if ( get_post_type( $post->ID ) == 'album_review' && in_the_loop() ){ //  if ( get_post_type( $post->ID ) == 'album_review' && $id == get_the_ID() ){ //  if ( !is_nav_menu( '32057,32058,35135,32054,32056' ) ) { //  if ( get_post_type( $post->ID ) == 'album_review' && is_nav_menu( $id ) ) {     if ( get_post_type( $post->ID ) == 'album_review' && !$dont_apply_title_filter ) {         //print_r( $nav_menu_ids );         //print_r( is_nav_menu( $nav_menu_ids ) );         return $prepended_title; /*     } elseif ( get_post_type( $post->ID ) == 'album_review'  ) {         return $title; */     } else {         return $title;     }; } add_filter('the_title', 'append_album_review_to_title'); //add_action('save_post', 'custom_post_type_title', 100); /* function set_custom_title() {     add_filter( 'the_title', 'append_album_review_to_title', 10, 2 ); } add_action( 'loop_start', 'set_custom_title' ); */


ı am trying to stemmize words in tex of dataframe  data is a dataframe , karma is text column , zargan is the dict of word and root of word   for a in range(1,100000):     for j in data.KARMA[a].split():         pattern = r'\b'+j+r'\b'          data.KARMA[a] = re.sub(pattern, str(zargan.get(j,j)),data.KARMA[a])  print(data.KARMA[1])   I want to change the word and root in the texts

I want to use input from a user as a regex pattern for a search over some text.  It works, but how I can handle cases where user puts characters that have meaning in regex? For example, the user wants to search for Word (s): regex engine will take the (s) as a group.  I want it to treat it like a string "(s)" .  I can run replace on user input and replace the ( with \( and the ) with \) but the problem is I will need to do replace for every possible regex symbol. Do you know some better way ?


Can I install Ubuntu Mobile in my Lenovo phone with Android Marshmallow?

With the announcement of the Ubuntu Phone OS I'd like to know what phone (and tablet) models are supported at this time.  Note from foss & Oli: We are making this the master question for all future "Will this work on <insert random tablet/phone/device here>?!" questions


Suppose that $a_0 >a_1 >...>a_{2013} >0.$  Prove that $\sum_{n = 0}^{2013}a_nz^n \neq 0$ when $|z|<1$  Not sure where to begin with this.  Any suggestions?  Thanks.

I'm going to teach a preparation course for the complex analysis qualifying exam from my university (which basically consists of me doing some problems from past exams) and I'm trying to solve some questions from previous exams. One of the questions is the following:           Prove that $\displaystyle{\sum_{n = 0}^{2013} a_n z^n \neq 0}$ if the coefficients  satisfy $a_0 > a_1 > \dots > a_{2013} > 0$ and $|z| \leq 1$.      I tried to approach the problem by using the reverse triangle inequality to try to isolate the leading term, which I thought should be the constant coefficient, as follows:  \begin{array} . \left|  \sum_{n = 0}^{2013} a_n z^n \right| &= \left| a_0 +  \sum_{n = 1}^{2013} a_n z^n \right| \\ &\geq |a_0| - \left|  \sum_{n = 1}^{2013} a_n z^n \right|\\ &\geq |a_0| -  \sum_{n = 1}^{2013} |a_n z^n|\\ &\geq a_0 -  \sum_{n = 1}^{2013} a_n |z^n|\\ &\geq a_0 -  \sum_{n = 1}^{2013} a_0 |z^n|\\ &= a_0\left( 1  -  \sum_{n = 1}^{2013} |z^n| \right) \end{array}  Then for $|z| < 1$, we have that this last expression is equal to  $$ a_0\left( 1  -  |z| \frac{|z|^{2013} - 1}{|z| - 1} \right) $$  and my hope was to prove that this was always positive, nevertheless, after failing to prove it, I plotted the expression inside the parenthesis as a function of $|z|$, and found out that it changes sign in the interval $(0, 1)$.  Question  Can my approach somehow be made to work? And if not, how can I prove that the sum $\displaystyle{\sum_{n = 0}^{2013} a_n z^n \neq 0}$ under the given conditions?  Thank you very much for any help.


This is a repost of a quickly closed question to make it clear that it has nothing to do with naming conventions. Naming conventions are, well conventions: following simple patterns and using simple terms referring to design patterns. This question deals with searching for an appropriate word (or words) which describes, or at least mentally associates with some abstract concept. When programming, I use thesaurus (and dictionaries) more than Google and Stack Overflow combined, especially in the case of frameworks and libraries expected to be used by many other developers and with longer lifetimes. If you are a programmer, you know how a concise name suggestive of the implemented contract is almost impossible and, in situations where a good name comes to mind, there are several connected classes which could be named the same, due to the deficiency of natural languages. Differentiating between them is the most frustrating part of the job for me. I do not subscribe to the Java school of 'long descriptive names' as they tend to not work that well in strongly typed functional languages (due to types of higher kinds and type bounds on type parameters) and for abstract concepts, at least not in the API. As a non-native speaker, despite a fair understanding of English, the mind associations and sums of usage that form the subtle differences between synonyms can elude me. I sometimes ask such questions on linguistic fora (or Facebook), but they almost always are far too abstract for non-programmers to fully understand and attract interest. On the other hand, some questions are quite simple, but require some programming knowledge (design patterns, algorithms and data structures, databases, etc.). An example of one would be:  I need a word describing a tag marking where a Thing came from which binds with a specific preposition, so X <preposition> Y strongly suggests Y as that term.  I used Origin and it was good: it has the proper association and is not a common word, but this caused conflict with ...". Another:  What do you call a generalization of a from clause of an SQL select which includes a where clause and, possibly, a group by clause, but is not yet a complete select?  They obviously don't belong on Stack Overflow, but the way I see them, they do not invite open discussions and are less opinionated than a lot of questions that do get asked and answered on these sites (setting the topic aside for a moment). A good answer can be argued for successfully, just as with choices done by book translators which encounter the same kind of problems, although even if for made-up words and fantastic entities, they rarely venture far into the abstract.

Stuff like polls, recommendations based on subjective constraints, puzzles, webcomics etc. do not belong on the serious main SE sites, where professionals should be considered at work and having just a few spare minutes ("code's compiling") to answer questions, so they should not be distracted by such things. However, I'd also like to have a home for these things still using the SE engine. For the reason I mentioned before, this needs to be a separate place though. Let's call it four.[sitename-here].com.


I am trying to identify the MIME type using JAVA program, based on content.   For example:   I have a file abc.exe, i have renamed it to abc.xls and try to find the MIME type for the file, It supposed to show 'Application' But it showed as 'Excel' type. Can someone help me on finding the actual file type based on content?

How do you get a Media Type (MIME type) from a file using Java?  So far I've tried JMimeMagic & Mime-Util. The first gave me memory exceptions, the second doesn't close its streams properly. How would you probe the file to determine its actual type (not merely based on the extension)?


This is a two parts problem.  1) I want to replace the custom post type with custom taxonomy term on my permalink. By default my URL structure is:  http://example.com/holiday/remote-brazil  holiday = CPT  remote-brazil = CPT item  I also have a custom taxonomy term for that.  adventures =  CTT  My desired URL is:  http://example.com/adventures/remote-brazil  I solved the problem simply adding this line on the custom post type registration:  'rewrite' => array('slug' => '%holiday_category%','with_front' => false),   holiday_category = custom taxonomy.  It seems to be too easy :-) Is it that or am I missing something?  2) Now the problem. I'm using a commercial theme with regular updates (that's good), but if I make any changes there I'm surely that will lose them. My question is how do I write a plugin that will overwrite(or add) that specific line on the CPT from my theme?  Cheers.

I need to remove a function from the parent theme and replace it within the child theme.  The function is called print_meta($meta_box). The function is not pluggable and it located in a random file, not the functions.php file.   The function adds options to a metabox that shows in a page or post. I need to add more options but to do this I re-write the function from within the child theme.  I don't think I can use remove_filter() as the function is not hooked.  I tried this: print_meta($meta_box)  function remove_parent_theme_functions( $meta_box ) {   remove_filter( 'init', 'print_meta' ); } add_action( 'after_setup_theme', 'remove_parent_theme_functions' );   but I do not know what tag to use. I have tried all kinds.  Since the function is vital to setting up the metabox option, I assume that if I successfully removed the function when I use metabox I should get an error or the options should not appear.  So far I appear do matter what tag I use.   Is this even possible?


I write like following my prove, and I need to know if it's correct: If P is an orthogonal matrix, then $$PP^t = I = P^tP$$ Therefore, $$\det(P^tP) = \det (I) \implies \det(P) \det (P^t) \implies \det (P) \det (P) = [\det (P)]^2$$   So $$ [\det(P)]^2 = 1 \implies \det (P) = \pm \sqrt 1 $$  So  $$ \det (P) = \pm 1$$ I prove it writing this, I would like to know if this proof is correct.

I have a question on my assignment asking me to prove that if $A$ is an $n\times n$ orthogonal matrix, then $\det(A) = \pm1$. What I did so far is:  We know that $A\cdot A^t = I$ (since it is orthogonal), and that would mean that if $A$ is a matrix with elements $a,b,c,d$ then :  \begin{cases}a^2 + b^2 = 1\\ ac + bd = 0\\ c^2 + d^2 = 1\end{cases}  which implies that \begin{align}\det(A)&= ad - bc\\ &= -\frac{bd^2}{c} - cb\\ &= -\frac{bd^2}{c} - \frac{c^2b}{c}\\ &= -\frac{bd^2 + bc^2}{c}\\ &= -\frac{b(d^2 + c^2)}{c}\\ &= -\frac{b(1)}{c}\\ &= -b/c\end{align}  I might be doing something wrong here, could someone please help me out understand this?


I have a program that is running on a shell window. I would like to input command into that shell (using a script) to make the program behave in a certain way. What would be the command to send a command from one shell to another.  Thank you

I often lose track of the command flow due to the long text output of some commands, so I would like to have a main terminal window where user commands are executed and other terminal windows that „pop up“ displaying the commands' output and then are closed with the use of a short-cut.  Is it possible to code such a behavior? Any tips about the language I should use?  An even more user-friendly interaction would be for the terminal to ask whether it should display the output externally if it exceeds a user-set limit.


My text contains the following exercise:     Let $X$ be a continuous random variable with CDF $F_X$. Suppose that   $\mathbb{P}(X > 0) = 1$ and that $\mathbb{E}(X)$ exists. Show that:      $$\mathbb{E}(X) = \int_0^{\infty} \mathbb{P}(X > x) dx$$   I have already completed the proof, which centers on recognizing:  $$\int_0^{\infty} \mathbb{P}(X > x) = \int_0^{\infty} (1 - F_X(x))dx$$  And then applying integration by parts. But the proof didn't provide any intuition for why the proof statement is true. In particular it is surprising to me that we can integrate over probabilities (technically over probability densities) without including any value of the random variable at all and end up with a value that is in the same units/space as the random variable. $0 < F_X(x) < 1$ but values of $X$ are only required to be non-negative so they could be arbitrarily large. Why does this work?

I've read the proof for why $\int_0^\infty P(X >x)dx=E[X]$ for nonnegative random variables (located ) and understand its mechanics, but I'm having trouble understanding the intuition behind this formula or why it should be the case at all. Does anyone have any insight on this? I bet I'm missing something obvious.


Given $T(x,y)=(x',y')$ prove that the following two conditions are equvalent:  T transforms straight lines into straight lines. T is a linear transformation.   The "if" direction is easy. However, I have no clue how to start with the only if direction. Probability I would prove by contradiction by assuming that, if a transformation is not linear, then it transforms line to other things?

I want to answer this:  Given $T(x,y)=(ax+by,cx+dy)$ prove that:  T transforms straight lines into straight lines  T transforms parallel lines into parallel lines    I have no clue in how to show this. Any hint would be much appreciated. Thanks!