Say that I have asked a question on MSE and then it is downvoted, after I edit it to form a better question will my question move up the queue of questions so that people can read it again and upvote it?

What can cause a question to be "bumped" to the first page in the Active tab of a Stack Exchange site? (Changing the "Last Active" date.)  .


let $ V= M_{10}\left(F\right) $ a vector space over some field $ \mathbb{F} $ I have to determine if its possible that exists $ A\in M_{10}\left(F\right) $ such that $ M_{10}\left(F\right)=span\left\{ A^{i}:0\leq i\leq100\right\}  $ I guess it cant be. But I cant prove why. I tried to separate the cases - if $ A $ is invertible and if it is not. But still, cant find anything that would help me decide. I noticed that there are 101 matrices in the set $ \left\{ A^{i}:0\leq i\leq100\right\}  $  so one of them has to be linear independent in the rest of them. But I cant see how to continue Thanks in advance

I don't know how to answer this question:     Is there a $10 \times 10$ matrix $A$ such that $$M_{10}(\mathbb{F})=\text{span}\{I,A,A^2,\ldots, A^{100}\}\textrm{,}$$ where $M_{10}(\mathbb{F})$ is the vector space of $10 \times 10$ matrices over $\mathbb{F}$?   I think there is a connection to Jordan normal form.


My iPod 5 gen is connected to wifi, I've lost the wifi password, how can I view the password on my iPod, could you please give me a step by step guide on doing this as I'm not tech savvy....

I've previously connected to a wifi network on my iPhone but I've no way of finding out the password. So is there any way to view saved wifi passwords on the iPhone?


is it possible to change of /pictures/wallpapers which is used automatically when selecting "use as background image" on a picture in a folder?  I have read in another thread that this specific folder is hardwired into nautilus, which is kind of inhibiting the setup for me.  It automatically makes a local copy of the picture, whereever the picture might be, to /pictures/wallpapers, and I don't want that.   The folder/ the issue is not mentioned in the "marked as duplicate:XDG paths".  I see no way to change this, can someone help me out?

Each time I changed and saved .config/user-dirs.dirs, and after restarted the system, the XDG_DOWNLOAD_DIR are reverted:  diff --git a/.config/user-dirs.dirs b/.config/user-dirs.dirs index 8f6e2db..dcff34e 100644 --- a/.config/user-dirs.dirs +++ b/.config/user-dirs.dirs @@ -7,11 +7,9 @@  #   XDG_PUBLICSHARE_DIR="$HOME/public"  XDG_TEMPLATES_DIR="$HOME/public/template" -  XDG_DESKTOP_DIR="$HOME/private/desktop"  XDG_DOCUMENTS_DIR="$HOME/private/doc"  XDG_PICTURES_DIR="$HOME/private/picture"  XDG_MUSIC_DIR="$HOME/private/music"  XDG_VIDEOS_DIR="$HOME/private/video" - -XDG_DOWNLOAD_DIR="$HOME/var/downloads" +XDG_DOWNLOAD_DIR="$HOME/"   How to make my changes permanent?


Suppose we are considering some fluid. As I currently understand, viscosity exists because of the following: supposing we draw one infinitesimal surface on the fluid, then the fluid parcels on either side have different momentum.   Since a fluid parcel is made up of a large number of molecules and its velocity is the average velocity of those molecules if some molecules cross the surface into the other fluid parcel they will change the average velocity of the fluid parcel they migrated into.  In that case, this will change the momentum of the fluid parcels and since change of momentum is related to force this will give rise to one kind of force which will be the viscosity force.  Is that understanding right? I thought at first there was something to do with the collisions of molecules but what I said above is what I understood when I read about it on the book. If it's not like that, how we should think about viscosity qualitatively?

What is the 'molecular' origin of the viscosity? The molecular origin of elasticity is almost clear for me: at the very bottom the 'elasticity' comes from the attraction and repulsion between atoms when they are reasonably far from each other or very close (like Lennard-Jones potential). Is there a similar description for the viscosity as well? Where does it come from?


Is there a name for an object $L$ that has an additive structure and a (not necessarily total) order such that for all $a,b,c \in $ L we have  $a+b = b+a$ $a+(b+c)= (a+b)+c $ $a+b \leq a+c \Leftrightarrow b \leq c$

I recently came across an algorithm that works on values assuming that they are draw from a monoid equipped with a total ordering relation.  I was wondering if there is a term for such a structure, since it seems related to concepts like Euclidean domains and fields (though the requirements are much less strict).  Does this entity have a name?  Or is it just "a monoid over totally ordered elements?"  Thanks!


What is the main difference between Ubuntu, Kubuntu, Mythbuntu, Xubuntu, Edubuntu and Lubuntu?

What different Ubuntu derivatives are there? And what is special with them?


I work as a graphic designer and until know I have worked only in vector. Now I have to do a very big banner like a landscape and I have to use a photo for this. What is an acceptable resolution for an image for a 10m x 2m banner?

(This question is meant to be a resource to direct others to given that this is a common question.)  Given the task of creating an image that will be printed at a certain size, what pixel dimensions and resolution should I be setting my file at?


Prove that   $\tan 2A = \frac{2 \tan A}{1- \tan^2 A} $   using identities of $\sin 2A$ and $\cos 2A$   Can I get a hint on how do I start this ?  Identities from $\sin 2A$ and $\cos 2A$ doesn't give me a $\tan A$ so how do I prove it ?

I need to use the fact that  $\tan 2x=\sin2x \ /\cos2x$ to prove that: $$\tan 2x=\frac{2\tan x}{1-\tan^2x}$$ I don't know where to start. Please help or hint. Thanks in advance.


I wish to write our manuscript by the font of this document:    We think it is legible and beautiful. However, we do not know what is the type of font (the name of that) to be implemented on our manuscript.   Does anyone have an experience for this font? Is anyone familiar with it?

Is it possible to identify the font used in a specific document/picture?  Answers to this question should identify:   Possible methods to do this (perhaps one answer per method) and adequately describe how to use it (as opposed to merely stating it); Ways of finding the identified fonts, if possible (free or not); and Any prerequisites associated with the method used, if required (for example, "In order to use method X, your document has to be in format Y").   This question is meant as an FAQ, based on an . Its aim is to facilitate the community with the general procedures involved in font identification. Similar cases are solved on a per-usage basis on 's  tag.


If my outcome variable is count data, people often recommend using some type of poisson regression. I'm struggling to understand why this is the preferred method.  Lets say for this scenario that my mean count is low, so the distribution is skewed and does not look normal.  Given that regression makes no assumptions about the normality of the outcome variable, why does it matter that it is skewed? Why could I not run OLS regression anyway?  If my outcome mean was large the poisson distribution of the variable would look more normal, and I've heard people say in that case OLS with no transformation is acceptable. So there seems to be something special about a low mean count and the skew of the resulting distribution  Is it because the likelihood of a non-normal residual distribution increases with highly positively skewed data, and the reason for using poisson regression is to circumvent that normality violation?  Assuming the residuals are distributed normally, what is the actual problem with modelling (untransformed) count data using OLS regression (barring the decimal predictions)?

I need some advice regarding two main dilemmas in my research, which is a case study of 3 big pharmaceuticals and innovation. Number of patents per year is the dependent variable.  My questions are    What are the most important criteria for a good model? What is more/less important? Is it that most or all of the variables will be significant? Is it the prob of "F STATISTIC"? Is it the value of "Adjusted R squared"? Second, how can I decide the most appropriate model for the research? Besides patents which are a count variable (so maybe a Poisson count) I have explanatory variables such as return on assets, research and development budget, repeated partner (% not a binary variable), company size (employees) and a couple more. Should I do a linear regression or Poisson?


Already  seen a bunch of questions about proving that $(GL_{n}(\mathbb{R}),||-||)$ is a manifold, with the norm $||-||:M_{n}(\mathbb{R})\longrightarrow \mathbb{R}$ with $||(a_{i,j})||=\sqrt{A^tA}=\sqrt{\sum_{j=1}^{n}(\sum_{i=1}^{n}a_{i,j}^{2})}$, ($M_{n}(\mathbb{R})\cong\mathbb{R}^{n^2}$). None of them give any hints on how to prove it is a topological space ANII (or second countable) and that it is locally Euclidean. For the first property, i have to prove that there exists a base which is countable, i.e. there exists a countable set $\{\mathcal{U}_{i}\}_{i\in I}$, $\mathcal{U}_{i}\subset GL_{n}(\mathbb{R})$ open, such that every open set in $GL_{n}(\mathbb{R})$ is written as $\mathcal{O}\subset GL_{n}(\mathbb{R}), \mathcal{O}=\cup_{i\in I}\mathcal{U}_{i}$. Is that true? Also, i have no idea on how to see it is locally Euclidean. I supose we have to use at any point the norm defined previously, although I have no idea how. Any help will work, thanks.

We know that the the general linear group is defined as the set $\{A\in M_n(R): \det A \neq 0\}$. I have a homework on how to prove that it is a smooth manifold. So far my only idea is that we can think of each matrix, say $A$, in that group as an $n^2-$dimensional vector. So i guess that every neighborhood of $A$ is homeomorphic to an open ball in $\mathbb{R}^{n^2}$ (However, i don't know how to prove this.)  Now, I'm asking for help if anyone could give me a hint on how to prove that the general linear group is a smooth manifold since I really don't have an idea on how to do this. (By the way, honestly, I don't really understand what a $C^{\infty}-$smooth structure means which is essential to the definition of a smooth manifold.) Your help will be greatly appreciated. :)


Can I apply linear regression to any function to the x's.  For example:  Polynomials with one variable: y = w_0 + w_1 * x + w_2 * x2 + ... + w_D * xD  Polynomials with multiple variables (let's say there are 2 variables and the order of the polynomial is also 2, so it's easy to write): y = w_0 + w_1 * x_1 + w_2 * x_2 + w_3 * x_1 * x_2 + w_4 * (x_1)2 + w_5 * (x_2)2  Radial basis functions: y = w_0 + w_1 * f(x_1) + w_2 * f(x_2) + ... + w_D * f(x_D), where f(x) is a radial basis function.

I was reading the following link on non linear regression . My understanding from reading the first section "Nonlinear Regression vs. Linear Regression" was that the equation below is actually a linear regression, is that correct? If so why?  $$y = b_1x^3 + b_2x^2 + b_3x + c$$  Am I also to understand that in non linear regression multicollinearity isn't an issue? I know that multicollinearity can be an issue in linear regression so surely if the model above is in fact a linear regression there would be multicollinearity?


I have installed "ffmpegthumbs", "mplayerthumbs", "kffmpegthumbnailer", "kio-extras", and set up everything for Dolphin which used to work on OpenSUSE 42.1, but there is still no thumbnail for videos, how to fix it?

I installed Ubuntu 16.04 and installed dolphin (15.12.3) + FFMpegThumbs so that I can see thumbnails of videos but when I went to the previews the box was just blank.


I have a user configuration GPO (nothing on the computer side and computer configuration is disabled), linked to a user only OU.  I need to filter the users on which the GPO apply. When using specific users or groups in the security filtering, the GPO is not applied on the user side : "Not applied (unknown reason)." When using the default "Authenticated users" group the GPO is applied.  I'm on a W 2012 R2 domain with W10 clients.  I'm lost. Any ideas ?

I have a Windows Server 2012 R2 Domain.  Yesterday, a computer’s (running Windows 10 Pro) network drive stopped working.  After further investigation (gpresult /h) it appears ALL group policy objects are failing with the reason Inaccessible, Empty, or Disabled.  I have confirmed that all the GPOs still exist and are enabled on both (redundant and local) domain controllers.  Furthermore, there are 20 other machines on the same domain and LAN with absolutely no problems.  However, there is one other computer that I tested which presented with the same problem!  Does that mean the problem is with the servers?  gpresult /r reports that one client is getting GPOs from local DC1, and the other from DC2.  So it is not a problem related to a specific DC.  gpupdate /force fixed nothing (though it claimed that policies were applied).   I tried deleting the registry entries for local policies (following this guide ) and rebooting - same problem.    I found this support page from Microsoft (), but it claims it only applies to Windows 7 or earlier clients.  All my machines (both server and client) are running 64-bit versions and are fully updated.  I have rebooted all of them just to be sure.


Please answer Want proof  Let $G$ be a connected graph with $m$ edges and $n$ vertices. Prove that the minimum number of cycles in $G$ is $m-n-1$. (Where one cycle is a path that starts that begins and ends at the same vertex.)

The question I have is:   Prove that the minimum number of cycles is $m-n+1$ in a connected graph. Where one cycle is a path that starts that begins and ends at the same vertex. Where $m$ is edges and $n$ is the vertices.   I have no idea where to start. A few hints would be appreciated. Please do not provide me with the answer.


Recently I saw that I got unbanned from asking question and so I asked a question...   I got a good positive reaction to the question but I looked at the "ask a question" and it blocked it to me again... Anyone know why and whats the problem? Why would it block it to me again?

The simple equation that decides whether you get question banned or not is:  (total questions - negative score questions - closed questions)/total questions >= 0.5   And closed questions probably includes deleted questions too. For example, a new user asks a question, and the question gets:   Downvoted, stays at negative score Deleted before 30 days from posting time Closed   The equation above would not work as:  (total questions - negative score questions - closed questions) < 0.5   Which means question ban. But that is way too early to get banned. It seems that the user has to reach a certain number of questions or rep or time for the above equation to be implied towards the user. I have a small grip on the subject myself. So when does the question ban equation get applied?


I recently graduated graduate school and am looking for a proof on R squared.  Specifically when to not use it.  I really remember a professor impressing upon me multiple times not to report R squared due to the fact it is unreliable.  I did a proof on the matter, I just do not remember it.  I've looked all over the internet, and can not seem to remember the solution.  Of course do not use R square when the data is non-linear.  And do not add variables in order to increase R square.  Here are some links to back me up:   Specifically section 3.1 #6   Do not use R sq for non-linear regression

I was skimming through  by Cosma Shalizi (in particular, section 2.1.1 of the ), and was reminded that you can get very low $R^2$ even when you have a completely linear model.  To paraphrase Shalizi's example: suppose you have a model $Y = aX + \epsilon$, where $a$ is known. Then $\newcommand{\Var}{\mathrm{Var}}\Var[Y] = a^2 \Var[x] + \Var[\epsilon]$ and the amount of explained variance is $a^2 \Var[X]$, so $R^2 = \frac{a^2 \Var[x]}{a^2 \Var[X] + \Var[\epsilon]}$. This goes to 0 as $\Var[X] \rightarrow 0$ and to 1 as $\Var[X] \rightarrow \infty$.  Conversely, you can get high $R^2$ even when your model is noticeably non-linear. (Anyone have a good example offhand?)  So when is $R^2$ a useful statistic, and when should it be ignored?


Below class DTO used in another class MyController. The issue is DTO class get 100% code coverage but I am not able to code coverage more than 50% for MyController class. Need help in TestMyController test class.  Class : DTO   public class DTO{      public String categoryCode {get;set;}     public Date dueDate {get;set;}     public Id account {get;set;}     public Decimal amount {get;set;}      }   Class : MyController  public with sharing class  MyController{      public Trans__c invoice {get;set;}     public Trans__c inputObject{get;set;}      public List<DTO> d {get {         if(d == null){             d = new List<DTO>();         }         return d;     }set;}      //createDT() method call on Button click from VF Page     public PageReference createDT(){      Id invoiceId = (Id)ApexPages.currentPage().getParameters().get('Id');       invoice  = [Select Id,Name,Account__c,Due_Date__c,CategoryCode__c,Amount__c from                  Trans__c where Id=:invoiceId];      inputObject = new Trans__c();     inputObject.Id = invoice.Id;      DTO dto = new DTO();     dto.categoryCode= inputObject.CategoryCode__c;     dto.dueDate =inputObject.Due_date__c;       dto.account =invoice.Account__c ;      dto.amount =inputObject.Amount__c;       return null;     } }   Test Class : TestMyController  @isTest     private class TestMyController{         static testmethod void testCase(){                Account__c acc = new Account__c();             acc.Name = 'Test';             insert acc;              Trans__c t = new Trans__c();             t.CategoryCode__c = 'Test';             t.Account__c = acc.Id;             t.Due_Date__c = System.today();             t.Amount__c = 1000.5;             insert t;              DTO dto = new DTO();             dto.categoryCode= t.CategoryCode__c;             dto.dueDate =t.Due_date__c;               dto.account =t.Account__c ;              dto.amount =t.Amount__c;         }     }

I am unable to cover the following class get set method. Need help in creating test class  public class Aresult{      public class Parent {         public String type {get; set;}         public String id {get; set;}         public String sequence_id {get; set;}         public String etag {get; set;}         public String name {get; set;}     } }   Please suggest  @isTest  public class CirriusGetItemsResultTest {     public static void myUnitTest(){         Aresult.parent a = new Aresult.parent();         a.type='hello';         a.id='hello';         a.sequence_id ='hello';         a.etag ='hello';         a.name ='hello';     } }


Today I'm trying to connect to multiple database (I hope I'm calling it right) with one PDO, so my code looks like this: class DB{     private $con;     private $DATABASE_HOST = 'localhost';     private $DATABASE_USER = 'root';     private $DATABASE_PASS = '';     private $DATABASE_NAME = 'phplogin';          public function __construct(){         $dsn = "mysql:host=$this->DATABASE_HOST;dbname=$this->DATABASE_NAME";          try {             $this->con = new PDO($dsn, $this->DATABASE_USER, $this->DATABASE_PASS);             $this->con->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);         }     }      public function viewData($database){         $query = "SELECT nome FROM :name";         $stmt = $this->con->prepare($query);         $stmt->execute(['name' => $database]);         $data = $stmt->fetchAll(PDO::FETCH_ASSOC);         return $data;     } }  Doing like that it throws me an error for $database because it tell me that there is a Syntax error or access violation. Now, what I want to do is to give to $database the name of the database I want to connect with when i call the function, but I don't know which is the right way, I thought that PDO could help me but I can't understand why it doesn't work... Can anyone help me?

Why can't I pass the table name to a prepared PDO statement?  $stmt = $dbh->prepare('SELECT * FROM :table WHERE 1'); if ($stmt->execute(array(':table' => 'users'))) {     var_dump($stmt->fetchAll()); }   Is there another safe way to insert a table name into a SQL query? With safe, I mean that I don't want to do  $sql = "SELECT * FROM $table WHERE 1"


Let $a_1=\sqrt2$ and let $a_n=\sqrt{2+a_{n-1}}$ for $n \ge 2$. How do I prove that this sequence converges?

(Fitzpatrick Advanced Calculus 2e, Sec. 2.4 #12)  For $c \gt 0$, consider the quadratic equation $x^2 - x - c = 0, x > 0$.  Define the sequence $\{x_n\}$ recursively by fixing $|x_1| \lt c$ and then, if $n$ is an index for which $x_n$ has been defined, defining  $$x_{n+1} = \sqrt{c+x_n}$$  Prove that the sequence $\{x_n\}$ converges monotonically to the solution of the above equation.  Note: The answers below might assume $x_1 \gt 0$, but they still work, as we have $x_3 \gt 0$.    This is being repurposed in an effort to cut down on duplicates, see here: .  and here: .


I have a list which may be of any length. I have a method which calculates results for 50 elements at a time. I want to use the list in that manner such that for every iteration i get the next 50 elements.  What is did is, with the length of the list i calculated the no of times my loop should iterate,  count = math.ceil(len(newList)/float(50))   how should i iterate such that i can get the next 50 elements every iteration?  for c in range(0,count):     newList[:50]   how to get the next 50 and then next 50 ?

I have a list of arbitrary length, and I need to split it up into equal size chunks and operate on it. There are some obvious ways to do this, like keeping a counter and two lists, and when the second list fills up, add it to the first list and empty the second list for the next round of data, but this is potentially extremely expensive.  I was wondering if anyone had a good solution to this for lists of any length, e.g. using generators.  I was looking for something useful in itertools but I couldn't find anything obviously useful. Might've missed it, though.  Related question:


I am using AWS micro instance running Apache HTTP Server and Tomcat servers. I have couple of Web Apps deployed on them where I use port forwarding from 80 to 8080 using Apache. Since I work for a startup (not a sysadmin, and willing to learn), I have to figure out whether we need to upgrade the server from micro to some other instance.  What benchmarks should I check to see if I should update the server? I checked free -m which gives about 300mb of free memory.  But what else should I check to see if the number of connections that Apache is receiving isn't choking it at anytime. Since I use port forwarding how do I check if the Tomcat connections are choking or not.  300mb Free memory is at the instance of time when I checked. But other times when the system may have load, how do I check that?

This is a  about capacity planning for web sites. Related:      What are some recommended tools and methods of capacity planning for web sites and web-applications? Please feel free to describe different tools and techniques for different web-servers, frameworks, etc., as well as best-practices that apply to web servers in general.


I've apparently told my follower to stay put somewhere or they have died or something along those lines,I have slept and waited for days and days,I've used the dog companion fix,and ive done a mission that's fast traveled me somewhere on its on,but if I ever go to get a follower it tells me that I have a current follower and can have only one at a time

I went to do  quest where you need to get Eldergleam Sap. The pilgrim (Maurice Jondrelle) died in a fight on the way there so I was forced to battle with the Spriggans.   They were beating me, so I decided to just book it, hoping Faendal would follow me. I noticed a while later he was gone but didn't think anything of it.   Anyway, he didn't show up and I killed the dragon, getting Lydia to join me, when I asked her to she said it looks like someones already in my group, so I looked for Faendal, finally found him back at his house after I broke in and slept in his bed.  However, he isn't in my party and when I ask him to follow me he says I've already got someone with me. I think the game still thinks Faendal is following me because I never told him to stay put, or go our own ways.  I've even tried killing Faendal, paying my fine, then getting Lydia. But she still thinks someone is with me. When I talk to Faendal, the only option I have is to improve my archery or have him follow me.  How can I unlock my follower slot so Faendal (or someone else) can join me again?


Im working on a GUI. I am getting magic numbers for setSize values. since magic numbers are bad practice, How can i get rid of the magic numbers in size? should i assign a variable to each of them?   setSize(250x400)   so that it will be like setSize(x,y). what is the best way to overcome this? should i do this or is there another better way? what if there are many sizes, this will be useless as i cannot be assigning for each and every one.

What is a magic number?  Why should it be avoided?  Are there cases where it's appropriate?


Are community ads still a thing? , and I can’t remember when I last saw a community ad banner (this might be due to ad blocking, although I’ve in principle disabled it on Stack Exchange sites).  I’m asking since the  is interested in .

All the launched sites get Community Promotion Ads meta posts posted every year by a SE mod.  Previously, I thought that beta sites simply weren't allowed them. However,  is still in beta, and they had community promotions meta posts in  and  (I guess they haven't made one for 2015 yet).  So what happens? Do you just have to ask for one? Can the moderators of that site just create one as they like? Can anyone on that site just create one as they like?


In the context of creating a hopefully better OO wrapper around the  optimization library where the objective and constraint functions signature and implementation can be defined using  types I have the following problem:      This compiles:  namespace nlopt { template <class Data> struct Oracle {     typedef boost::tuple<double, VectorXd>   (*f_t) (const VectorXd&, Data& data);     typedef boost::tuple<VectorXd, MatrixXd> (*mf_t)(const VectorXd&, Data& data); }; };  /// Concrete Nlopt adapter search space implementation. /**  * Concrete Nlopt adapter search space implementation.  */ template <class ConstraintData> class NloptSpace : public ContinuousSpaceInterface<double, VectorXd> { public:     /// nonlinear constraints     struct NonlinearConstraint {         typename nlopt::Oracle<ConstraintData>::f_t func_; ConstraintData* data_; double tol_;         NonlinearConstraint(typename nlopt::Oracle<ConstraintData>::f_t func, ConstraintData* data, double tol) {             func_ = func;             data_ = data;             tol_ = tol;         }     };     // ... };  typedef typename NloptSpace<ConstraintData>::NonlinearConstraint NonLinearConstraint; const std::vector<NonLinearConstraint>& inequality_constraints = space.inequality_constraints();   However, this extra line does not compile and gives me the following totally uninformative error:  std::vector<NonLinearConstraint>::const_iterator iter;  error: expected a ";"      std::vector<NonLinearConstraint>::const_iterator iter;                                                  ^   btw just in case you are wondering whether I have the correct includes this also compiles:  std::vector<int>::const_iterator iter;   and this also compiles:  inequality_constraints.begin(); // can't assign it to anything without the compiler error   Somehow the compiler doesn't like the NonLinearConstraint template as a vector const iterator but it really doesn't give any hint as to what's wrong.   I don't expect anyone to help me fix the issue here but to give me a pointer how to get more information on this compiler error.

In templates, where and why do I have to put typename and template on dependent names? What exactly are dependent names anyway?    I have the following code:  template <typename T, typename Tail> // Tail will be a UnionNode too. struct UnionNode : public Tail {     // ...     template<typename U> struct inUnion {         // Q: where to add typename/template here?         typedef Tail::inUnion<U> dummy;      };     template< > struct inUnion<T> {     }; }; template <typename T> // For the last node Tn. struct UnionNode<T, void> {     // ...     template<typename U> struct inUnion {         char fail[ -2 + (sizeof(U)%2) ]; // Cannot be instantiated for any U     };     template< > struct inUnion<T> {     }; };   The problem I have is in the typedef Tail::inUnion<U> dummy line. I'm fairly certain that inUnion is a dependent name, and VC++ is quite right in choking on it. I also know that I should be able to add template somewhere to tell the compiler that inUnion is a template-id. But where exactly? And should it then assume that inUnion is a class template, i.e. inUnion<U> names a type and not a function?


The following phrase     I ain't got no money   Is it meant to be used for a past action (I didn't get no money) or is it used to mean (I don't get no money right now)?   What confuses me is the usage of got (past tense of get). I understand that ain't can be used ad a substitution of am not, did not, do not, is/are not, etc.

I know the ultimate meaning of this is "I have no money."  But why? If ain't means have not, then isn't it true that "I ain't got no money" would be read as "I have not got no money"?  Can I have not got [no money] be interpreted as double negative, and hence determining that "I have money", which is not the true meaning of such saying?


when i install ubuntu alingside windows I had resized windows partition and now windows has got corupted and could not boot. Is that possible to undo the resized partition diring ubuntu 16.4LTS installation. Any one can help me?

I installed Windows on my computer, followed by an installation of Ubuntu. However, now I'm unable to boot into my Windows install.  What can I do to fix this?


I want to find the order of $ab$, which I have tried to find as follows. Let order of $a$ be $|a|=m$ and that of $b=|b|=n$  Let $x=\text{lcm} (m,n)$,  then clearly $\exists$ integers $ s , t $ such that $x=ms$ and $x=nt$ Thus, $(ab)^x=a^x b^x=a^{ms}b^{nt}=e$  If $y\lt x$ then, $(ab)^y=a^yb^y=b^y (\text{or} a^y)$, if $y$ is some multiple of $m$, less than $x=ms$(or, if $y$ is multiple of $n$ but less than $nt$. Either way,$(ab)^y\ne e$ Therefore, $|ab|=x$=lcm$(m,n)$  Is the above reasoning correct? Can you please help me find the right solution. Thanks.

Let $a,b$ be two group elements of finite order that commute.   What can be said about the order of $ab$?   I thought that $|ab| = \text{lcm}(|a|,|b|)$. My proof was that $(ab)^n = a^n b^n =e$ if and only if $a^n = b^n = e$ if and only if $|a|,|b|$ both divide $n$. The smallest $n$ such that both orders divide it is the least common multiple of $|a|$ and $|b|$.  By chance I came across . It has an upvote so it's clearly correct. (?)  But it contradicts what I think: It's clear that   $$ (ab)^{\text{lcm}(|a|,|b|)} = e$$  hence $|ab| \mid \text{lcm}(|a|,|b|)$.  It seems to me that this is saying more than $|ab| \mid |a| |b|$. Is it not?     Now my question is: what is the precisest statement that can be made about $|ab|$?  Is there anything more than $|ab| \mid \text{lcm}(|a|,|b|)$ that can be said about $|ab|$?


Help! Let $f(x,y)$ given by $f(x,y)=ax^2+by^2+cxy+dx+ey+l$ in $R^2$. If $(x_0, y_0)$ is a local maximum point of $f$, show that $(x_0, y_0)$ is an global maximum point.  The suggestion to consider the function $g$ given by $g (t)=f(x_0+ht,y_0+kt)$ and verify that its graph is a parabola. Even with the suggestion, I could not do it.  Excuse, my English is not very good!

An exercise on a book asks me to prove that if a point $(x_0,y_0)$ is a local extrema for the function $$f(x,y) = ax^2 + by^2 + cxy + dx + ey + l$$ then it's also a global extrema.  The exercise asks me to consider that $g(t) = f(x_0+ht,y_0+kt)$ is a parabola, but I couldn't understand how it helps. Maybe since it's a parabola, I know that this derivative has to be $0$ in some point, and also that this function $g(t)$ has a global extrema point, but I couldn't derive anything from this. I also tried to find the derivatives, equal them to $0$ and solve the system. I got:  $$x_0 = -\frac{2 b d - c e}{4 a b - c^2}, y_0 = -\frac{   c d - 2 a e}{-4 a b + c^2}$$  But when I try to find   $$f\left(-\frac{2 b d - c e}{4 a b - c^2},-\frac{   c d - 2 a e}{-4 a b + c^2}\right)$$ so I can try to prove:  $$f(x,y)-f(x_0,y_0)$$  is either greater or less $0$ depending on the case (so I can do $f(x,y) \le f(x_0,y_0)$ and $f(x,y) \ge f(x_0,y_0)$)  things get hairy.


I launch connexion ssh to use rsync command in terminal and I would like to shutdown my computer, but I need to let run the process rsync.  I executed this command on a remote host. If I quit now then the process will stop I guess?  Yes I know I should run my command with option to avoid to lost the process.

I sometimes have long running processes that I want to kick off before going home, so I create a SSH session to the server to start the process, but then I want to close my laptop and go home and later, after dinner, I want to check on the process that I started before leaving work. How can I do that with SSH? My understanding is that if you break your SSH connection you will also break your login session on the server, therefore killing the long running process.


Suppose that Sally’s preferences over baskets containing food (good x), and clothing (good y), are described by the utility function U(x,y)=√x+y  Sally’s corresponding marginal utilities are,  Ux=$1\over2√x$ and Uy=$1$  Use Px to represent the price of food, Py to represent the price of clothing, and I to represent Sally’s income.      Question 1: Find Sally's food demand function, and Sally's clothing demand function. For the purposes of this question you should assume that I/Py greater than or equal Py/4Px.   Even by using the I=Py(y)+Px(x) formula, I tried using $MUx\over MUy$=$Px\over Py$ and letting one of the price be 1. But I am unable to substitute into the income function as I could find y value.

Suppose that Sally’s preferences over baskets containing food (good x), and clothing (good y), are described by the utility function $U(x,y)=\sqrt{x}+y$.  Sally’s corresponding marginal utilities are,  $U^\prime_x=\frac{1}{2\sqrt{x}}$   and    $U^\prime_y=1$.  Use Px to represent the price of food, Py to represent the price of clothing, and I to represent Sally’s income.          Question 1: Find Sally's food demand function, and Sally's clothing demand function.     For the purposes of this question you should assume that I/Py greater than or equal  Py/4Px.      Clothing demand function : y= I/py - Py/4Px  Food demand function : x = P^2y/4P^2x  After deriving demand function for both Clothing and Food, the following  question confused me.     Question 3: Now assume that I/Py less than Py/4Px. Find Sally's food demand function, and   Sally's clothing demand function.   How do i get about doing this following question and getting the NEW Demand function for Food and Clothing?  I do know it might  possible be a corner solution.. But how do i explain it in terms of the function as i am not given the price of food and price of clothing in numerical form?


Let $F$ be a field where $char(F)\neq2$ and let $A$ be a skew-symmetric matrix over $F$. Prove that rank of $A$ is even.   I think the best way to prove it, is using induction on size of $A$.  for $n=1$, matrix $A$ should be zero matrix so $rank(A)=0$ and it's even.   for an $(n+1)\times (n+1)$ matrix, by eliminating the last row and the last column we will have an $n \times n$ skew-symmetric matrix which by the induction hypothesis has even rank. Now how should I prove that by adding back the eliminated row and column the rank of matrix again will be even?  I've stuck here!  Please do not mark the question as duplicate with . At least the approach that I'm trying to prove this question with is different. No one has proved this statement by induction, This question is not duplicate really!

Is there a succinct proof for the fact that the rank of a non-zero skew-symmetric matrix ($A = -A^T$)  is at least 2? I can think of a proof by contradiction: Assume rank is 1. Then you express all other rows as multiple of the first row. Using skew-symmetric property, this matrix has to be a zero matrix.   Why does such a matrix have at least 2 non-zero eigenvalues?


I thought about using the Chinese Remainder Theorem here as $\gcd(6,8)=2$ and not $1$, but $$\begin{cases} x = 2 \pmod 6 \\ x = 6 \pmod 8 \end{cases}$$ has indeed a solution. But right now, I'm stuck with $$\begin{cases} x = 2 \pmod 6 \\ x = 5 \pmod 8 \end{cases}$$ Which obviously after some calculations does not seem to have an integer solution, but how can I show it more "elegantly", like by using some theorem?

I'm trying to learn how to use the Chinese Remainder Theorem (CRT), and in order to give some context:  We search for all $x ∈ Z$, where $Z$ is the set of integers.  $x≡a_1\pmod{m_1}$  $x≡a_2\pmod{m_2}$  ...  $x≡a_k\pmod{m_k}$  The easy case (which I can solve) is if all $m_i$, where $i=1,2,...,k$ are pairwise coprime.  Example:  $x≡4\pmod 5$  $x≡5\pmod 6 $  $x≡3\pmod 7$  Then the first equation is satisfied iff $x=4+5s$, for some $s ∈ Z$.  These $x$ also satisfy the second equation iff $4+5s≡_6 5 ↔ -s≡_6 1 ↔ s=-1+6t$, for some $t ∈ Z$. Thus $x=4+5(-1+6t)=-1+30t$.  Lastly, these $x$ also satisfy the third equation iff $-1+30t ≡_7 3 ↔ 2t ≡_7 4 ↔ t ≡_7 2 ↔ t = 2+7n$, for some $n ∈ Z$. Thus $x=59+210n$.  Now to my issue, I have the problem:  $x≡2\pmod 4$  $x≡3\pmod 5$  $x≡5\pmod 6$  Here $\gcd(4,6)=2$, so they are not coprime and I don't know how to solve this. Can someone please solve it and explain why the problem becomes more difficult to solve when $m_i$ are not pairwise coprime.


I am going to install Ubuntu 12.04, and I wonder if I should trust/run the .sh script proposed on this site: .  By the way, do I need to anything in particular after installing Ubuntu?

I am new to Linux and Ubuntu. When I don't know how to do something with this OS I search on the web and Ask Ubuntu and always find the answer.  But sometimes it's not a great answer nor complete tutorial. I follow the instructions anyway, but I don't know what all the commands mean.  So my question is:   When I follow a tutorial, am I 100% safe? If not, then how can I tell I am in danger?


Can we prove that $\lim_{x \to 0} \frac{x - \sin x}{x^3} = \frac 16$ using just algebra, trigonometric theorems and notable limits $\left( \mathrm{i.e. }\quad \frac{\sin x}{x} \to 1 \quad \mathrm{and} \quad \frac{1 - \cos x}{x^2} \to \frac 12 \right) $ and no l'Hospital rule, no series expansion, no Taylor series?

How can I prove that $$\lim_{x \to 0}{\frac{x-\sin{x}}{x^3}}=\frac{1}{6}$$  without using L'Hospital or Taylor series?   thanks :)


asks for a set of real numbers that is measure-dense, whose complement is also measure dense. In terms of $[0,1]$, the question asks for an $S$ such that for every open interval $I$ we have $0 < \mu(I \cap S) < 1$.  This question can be made a little more precise: is there a set of real numbers $S$ such that for every open interval $I$, we have $\mu(I \cap S) = \frac{1}{2} \mu(I)$? The Cantor-set construction referenced above doesn't really lend itself to finding the volume of $I$ contained in $S$, just guaranteeing that it isn't zero. You can modify that construction to get a set that has measure $1/2$, but it's not clear at all that it satisfies the property mentioned here.

I am a graduate student at Iowa State University attempting to return after a five-year hiatus and take the Real/Complex Analysis qualifier on January 8 for potential reinstatement. Since the professors here are on hiatus, I hope you guys don't mind if I bombard the board with a few past questions from our quals here, like this one from Spring 2013:      Let $m$ denote Lebesgue measure on $\mathbb R$ and $M$ the $\sigma$-algebra of Lebesgue measurable subsets. Given $E \in M$ with $m(E) > 0$ and $\alpha \in (0, 1)$, prove that there is an interval $I$ such that $m(E \cap I) > \alpha \, m(I)$.   I've attempted to force the issue using the definition of outer measure but it doesn't seem to work. I've also attempted using the definition of Lebesgue measurability but that doesn't seem to work either - so I'm at a loss!   Thanks in advance!   -Darrin Rasberry


I deleted the linux partitions from a dual boot configuration and extended the unallocated space back to my main C drive. Now when I boot back into my PC it automatically boots into the grub prompt. What should I do? I already tried many of the solutions on this site. I can boot into windows using the chainloader command but I would like the prompt to disappear entirely

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.


Let $F:\mathbb{R}^d\rightarrow \mathbb{R}^d$, $F$ is continuously differentiable, and for any $x,y$ in $\mathbb{R}^d$, $||F(x)-F(y)||\geq||x-y||.$ Prove that $F(\mathbb{R}^d)=\mathbb{R}^d.$ Edit:I can prove $F$ is an injective function. But why is $F$ a surjective function?

Let $f:\mathbb{R}^{n}\rightarrow\mathbb{R}^{n}$ be a continuously differentiable map satisfying $\|f(x)-f(y)\|\geq\|x-y\|$ for all $x,y\in\mathbb{R}^{n}.$ Then   $A.$ $f$ is onto.  $B.$ $f(\mathbb{R}^{n})$ is a closed subset of $\mathbb{R}^{n}.$  $C.$ $f(\mathbb{R}^{n})$ is a open subset of $\mathbb{R}^{n}.$  $D.$ $f(0)=0.$  According to me $f$ is one one and onto so image is closed and open both. Please suggest me. Thanks in advance.


I wanted to assign string response = "\x4F\x07\xA0\x00\x00\x00\x04\x10\x10\x5F\x55" If i do so the string is initialize till \x4F\x07\xA0\ and response.length() is retrund as 3 Is there any way to skip the null check while assigning these types of values to string in c++?

If I want to construct a std::string with a line like:  std::string my_string("a\0b");   Where i want to have three characters in the resulting string (a, null, b), I only get one.  What is the proper syntax?


Q. Why does Cycling consumes less body energy than walking?  Any logical explanation? I've been trying to seek any logical explanation for this question for few days! But why does Cycling consumes less body energy with more displacement, are there any factors related to this? Is it because of gravity or friction or work done and whatever! It is fair in the cases of motor  vehicles because much of the work is done by engine! But a cycle does not have any engine, then who provides the additional work required to displace ourselves from one point to other?  Any help would be appreciated

I feel more tired walking 1 km than cycling 1 km at the same speed. However when cycling I am moving the extra weight of the cycle along!


Suppose we have a given set of vectors $\{a_1,a_2,...,a_k\}$ in $\mathbb R^n$ where $k>n$.How do I find a basis out of the given vectors i.e. to find a subcollection of this set that forms a basis.I want to do this using Gaussian elimination.But row reduction may change all the vectors and give me a basis that is not a subcollection of the given one.How to avoid that?I have heard about considering something like 'pivot' position but I do not understand how they do it.Can someone tell me about making a basis using pivot positions and what pivot is?Please illustrate through examples.

Given a set of vectors, we can compute the number of independent vectors by calculating the rank of the set, but my question is how to find a maximal linearly independent subset. Thanks!


I want to achieve a certain hue but also have the color that carries that hue contain a certain opacity.  For example if I were after #ff0000 with 50% opacity, the color I would want to identify is the (dark) shade of red that when at 50% opacity yields #ff0000.  Is there an equation I can use that lets me plug in the desired hue and alpha to identify the color values that produce that hue when at the given opacity value?  (I know this won't exist for all target color / alpha combinations, but I'd like to find the equation that specifies the parameters for those combinations that are achievable.)

I have a color 0xADADAD, it was originally white, now it's grey, because it's been alpha blended with 30%(0.3 alpha) black + the unknown original value. In this case I know from lots of trial and error that the original color was 0xF8F8F8  Problem is I have over 20 other colors that need to be fixed like this, but I have no accurate way of finding the original colors. Is there a formula I can do to figure this out? Is it even possible?


I have the compiler error shown in the image and am not able to resolve it - "Consults.exe does not contain a static 'Main' method suitable for an entry point". My program does contain a Main method.    public static int Main(string[] args)  {      Program s = new Program();      s.name();      string d = Console.ReadLine();      return 0;  }

My MS Visual C# program was compiling and running just fine. I close MS Visual C# to go off and do other things in life.  I reopen it and (before doing anything else) go to "Publish" my program and get the following error message:     Program C:\myprogram.exe does not contain a static 'Main' method suitable for an entry point   Huh?  Yes it does... and it was all working 15 min earlier.  Sure, I can believe that I accidentally hit something or done something before I closed it up... but what?  How do I troubleshoot this?    My Program.cs file looks like this:  using System; using System.Collections.Generic; using System.Linq; using System.Windows.Forms; using System.Threading;  namespace SimpleAIMLEditor {     static class Program     {         [STAThread]         static void Main()         {             Application.EnableVisualStyles();             Application.SetCompatibleTextRenderingDefault(false);              Application.Run(new mainSAEForm());         }     } }   ...and there are some comments in there.    There are no other errors.  Help?


In many fields of physics and engineering, when we want to describe an infinitesimal, for example, the electric field, we could say $dE(x_i,y_i) = e^{jkr}...dx_0dy_0$   Since derivatives are not fractions, does it still make sense, in a mathematically rigorous way to talk about infinitesimals and would this be the correct notation of describing it? What would be the rigorous way of dealing with infinitesimals?  --Edit--  The history of this question went from "duplicate to an irrelevant question" but once reopened was closed for being "missing context" despite proper english, a clear yes or no question with already great answers (which would be impossible if the question was indecipherable). It seems like those with points have been abusing their powers an incorrectly closing questions that they simply don't like.

In the book Thomas's Calculus (11th edition) it is mentioned (Section 3.8 pg 225) that the derivative $dy/dx$ is not a ratio. Couldn't it be interpreted as a ratio, because according to the formula $dy = f'(x)dx$ we are able to plug in values for $dx$ and calculate a $dy$ (differential). Then if we rearrange we get $dy/dx$ which could be seen as a ratio.   I wonder if the author says this because $dx$ is an independent variable, and $dy$ is a dependent variable, for $dy/dx$ to be a ratio both variables need to be independent.. maybe?


Apologies as i know this question has been asked before but i've tried doing what was said with still no luck. I am getting this error everytime:  java.lang.NullPointerException at test.XSLTransformer.main(XSLTransformer.java:35) ERROR:  'Could not compile stylesheet' FATAL ERROR:  'java.lang.NullPointerException'            :null Exception in thread "main" javax.xml.transform.TransformerConfigurationException: java.lang.NullPointerException     at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl.newTemplates(TransformerFactoryImpl.java:988)     at test.XSLTransformer.main(XSLTransformer.java:35)   // ... import jdk.nashorn.internal.runtime.regexp.JoniRegExp;  import javax.xml.parsers.DocumentBuilder; import javax.xml.transform.*; import javax.xml.transform.dom.DOMSource; import javax.xml.transform.stream.StreamSource; import javax.xml.transform.stream.StreamResult; import java.io.*; import java.net.URISyntaxException; import java.util.Scanner; import javax.xml.parsers.DocumentBuilderFactory; import org.w3c.dom.Document; import org.w3c.dom.NodeList; import org.w3c.dom.Node; import org.w3c.dom.Element; import java.io.File; import java.io.IOException; import java.net.URISyntaxException; // ...  public class XSLTransformer {      public static void main(String[] args) throws IOException, URISyntaxException, TransformerException {               File xmlFile = new File("D:\\FastFlow.IntegrationDb-Data.xml"); // source file             File  resultFile = new File ("D:\\staffnumbers.xml"); // result file             File  xslFile = new File ("D:\\CanonicalSectionTmpltTOPMNF.xsl"); // template file           TransformerFactory factory = TransformerFactory.newInstance(); // this is the line that throws the exception         Source xslInput = new StreamSource(xslFile);         Templates xsl = factory.newTemplates(xslInput);          Transformer transformer = factory.newTransformer(xslInput);          Source xmlInput = new StreamSource(xmlFile);         Result result = new StreamResult(resultFile);         transformer.transform(xmlInput,result);           System.out.println(result.toString());      } } ```

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?


Mathematical side of the problem Given the metric $$ds^2 = dr^2+r^2d\theta^2+r^2\sin^2\theta d\varphi^2$$ we can easily construct the action of a free particle $$S=\alpha \int d\tau \underbrace{\sqrt{\dot{r}^2 + r^2 \dot{\theta}^2+r^2\sin^2\theta \dot{\varphi}^2}}_{:=L},\quad \text{where}\quad \dot{\vphantom{r}}:=\frac{d}{d\tau}.$$ Consider now the following action $$\bar{S} := \alpha \int f(L)d\tau, $$ where $f$ is an arbitrary smooth function. For the specific case $f(g)=g^2/2$ one can show that the resulting equations of motion will describe the same curve, see  and . My question is now if one can generalize this to an arbitrary smooth function $f$? For example, $f(g)=g^2$ seems to work just as well. Physic's problem Even if the above works out form the mathematical side, I'm still confused on why we are allowed to do this in a physics context. The Lagragian is a well defined property for a given physical system, as well as the action. Why can I just square the Lagragian and still get something physically meaningful? What about the parametrization of time? If I change the parametrization, form lets say the eigentime to some arbitrary frame, what happens then to the equations of motion when such a function $f$ is involved?

It is well known that geodesics on some manifold $M$, covered by some coordinates ${x_\mu}$, say with a Riemannian metric can be obtained by an action principle . Let $C$ be curve $\mathbb{R} \to M$, $x^\mu(s)$ be an affine parametrization of $C$. (Using same symbol for coordinates and parametrization here, but it's standard). The action yielding geodesics is:  $$ S (C) =\int_CL ds $$ where  $$ L\equiv \sqrt{g_{\mu\nu} \dot{x}^\mu \dot{x}^\nu} $$  Now the popular  makes the claim that variation of $$F \equiv \frac{L^2}{2}$$  Will yield the exact same action principle solutions. However, the reference above ONLY shows that:  $C$ solves euler Lagrange equation for $L$ $\implies$ $C$ solves euler Lagrange equation for $F$  And this can be shown through a direct brute force computation.   My question: Is the converse of the above true, and how does one go about proving it. In particular, how do we show that $F$ yields no extraneous solutions to the Euler Lagrange equations.


Exercise 2.2.6:  Let $n$ be a natural number, and let $P(m)$ be a property pertaining to natural numbers such that whenever $P(m+1)$ is true, then $P(m)$ is also true. Suppose that also $P(n)$ is true. Prove that $\forall (m \le n) \ P(m)$. Hint: induction on $n$.  I don't know what is meant by doing induction on $n$. What's the property $Q(n)$ that I should attempt to prove by induction on $n$? Normally I see backwards induction being proven with the well-ordering property but at this point in the book it's not been mentioned yet. I would appreciate hints greatly.

I have difficulty in neatly writing down a proof for the following from Terence Tao's Analysis I, where $m{+\!+}$ is the :     Let $n$ be a natural number, and let $P(m)$ be a property pertaining to the natural numbers such that whenever $P(m{+\!+})$ is true, then $P(m)$ is true. Suppose that $P(n)$ is also true. Prove that $P(m)$ is true for all natural numbers $m\leq n$; this is know as the principle of backwards induction. (Hint: apply induction to the variable $n$.)   First of all, I am unsure about what the base case should look like. For the induction step, I understand that if we suppose inductively that $P(n)$ is true, that then for a natural number $a$ s.t. $a{+\!+}=n$ it holds that $P(a)$ is true, and then for a natural number $b$ s.t. $b{+\!+}=a$ it holds that $P(b)$ is true etc. Hence for all natural numbers $m\leq n$, $P(m)$ is true.  Could anyone please tell me what the base case should look like, and whether there is a neater way of writing down the induction step?


I'm a bit new to OO programming and I'm trying to understand all facets of this kind of practice : inheritance, polymorphism and such, but there's a thing my brain DOESN'T WANT to fully understand: Interfaces.  I can understand the benefits of using interfacing instead of class-inheritance (mostly because a class can't inherit from multiple parents) but here's where I'm stuck:  Let's say I have something like this:  /** a bunch of interfaces **/ public interface IMoveable {     void MoveMethod(); }  public interface IKilleable() {     void KillMethod(); }  public interface IRenderable() {     void RenderMethod(); }  /** and the classes that implement them **/ public class ClassOne : IMoveable {     public void MoveMethod() { ... } }  public class ClassTwo: IMoveable, IKilleable {     public void MoveMethod() { ... }     public void KillMethod() { ... } }  public class ClassThree: IMoveable, IRenderable {     public void MoveMethod() { ... }     public void RenderMethod() { ... } }  public class ClassFour: IMoveable, IKilleable, IRenderable {     public void MoveMethod() { ... }     public void KillMethod() { ... }     public void RenderMethod() { ... } }   By using interfaces here, I would have to declare MoveMethod, KillMethod and RenderMethod each time, in each classes... That means duplicating my code. There must be something wrong, because I don't find this really practical.  So should I implement interfaces only on a few classes? Or should I find a way to mix inheritance and interfaces?

When should I use an interface and when should I use a base class?   Should it always be an interface if I don't want to actually define a base implementation of the methods?  If I have a Dog and Cat class. Why would I want to implement IPet instead of PetBase? I can understand having interfaces for ISheds or IBarks (IMakesNoise?), because those can be placed on a pet by pet basis, but I don't understand which to use for a generic Pet.


Say I have a database column that is defined as VARCHAR(255) that stores names.  I can assume that names can be up to 255 chars.   I need a public key encryption so that I can replace names with their ciphertexts. However the DB structure cannot be changed. In other words I need a public key encryption method that ensures ciphertexts are the same range as plaintexts. (i.e., a permutation).  RSA permutation is no good as it expands ciphertexts to the key size.   surely something like this must exist in the literature. ("format preserving public key encryption" or something like that).

I would like to encrypt a string asymmetrically.  I would like the ciphertext to be as short as as plaintext. (or shorter)  I've read about format preserving encryption functions - are there asymmetric variants of them?


I want  a method  for find the number triangles in the under image.

I saw this question today, it asks how many triangles are in this picture.    I don't know how to solve this (without counting directly), though I guess it has something to do with some recurrence.  How can count the number of all triangles in the picture ?


I am making a truck animation video so at one stage my (truck) model is taking turn on the road, i want to rig the hook between truck and trolley like shown on the right side.

I am trying to rig a truck with a trailer so it can be animated along a path/curve. Having the trailer follow is not a problem, but in order to look realistic it shouldn't follow the exact path of the truck it is attached to, but a shorter one.  There is surprisingly little documentation about this on the web, for Blender or any software.  I have seen that this dynamic is sometimes built into ordinary car rigs, where the front axle of the car is animated and the rear is dragged behind it in a realistic manner, but no tutorial I have found has a setup like that explained.


As a matter of fact, I was learning stellar astrophysics where I couldn't understand the chain of events at the time of death of stars, Once the hydrogen fuel core is exhausted, the stars start shrinking until the helium nuclei starts fusing under immense gravitational pressure. Due to powerful radiation pressure the star starts expanding. Like our sun is expected to stretch 200 times it current radius, gobbling up the Mercury and Venus planets. Here I couldn't understand that helium fusion starts when star is shrinking, but after star starts expanding, so how could star sustain fusion $?$ I mean helium fusion requires even more pressure or temperature than hydrogen, but once star starts expanding, it become cooler and less denser, which should make fusion impossible. And during this phase of Red giant, not only helium, but more heavier nuclei are formed like oxygen which should require even more pressure and temperature. Is there any flaw in my understanding,then  please tell$!$ Please help and thanks in advance $!$

When a star starts to run out of hydrogen to fuse, it begins to collapse due to gravity until the central core temperature rises to $10^8~\text{K}$  Then due the force generated by the fusion of helium, the star expands again and becomes a red giant.  So, why doesn't the expansion cool the core?


How to sum all 'Luas_sawah' attributes in accordance with the 'Kabupaten' attributes?

Are there QGIS tools that will allow users to get tabular statistics from their table?  I kind of expected I would be able to just open the table, select the field I was interested in, right-click on the field header and get something similar to this (screenshot taken from ArcGIS):    More specifically, I am looking for a QGIS alternative to the ArcGIS  and  tools, that offer a  you can retrieve about the tabular data.    Just after asking, I found  (see section 4.2 ) that describes how to find this functionality... Vector > Analysis Tools > Basic statistics.  I also found Vector > Analysis Tools > List Unique Values right next to it.  This gets me the list of unique values, but I would also like to see an additional column of frequency (count) of each unique item.  Is this similar tool available "out-of-the-box"?


In this example I have issue with \par command within tkz-tab tabular    ! Paragraph ended before \\tkzTabLine was complete. <to be read again>                     \par  l.27 \tkzTabLine{,\vcenter{\hsize3cm $x$ \par                                                $f(x)$},} % <---- here ?    I need to add multiline text in \tkzTabLine   \documentclass[12pt]{article} \usepackage{tkz-tab} \begin{document}  $\vcenter{\hsize3cm $x$ \par $f(x)$}$  \bigskip  \begin{tikzpicture} \tkzTabInit {$x$ / 1 ,$f(x)$ /1}% {$-5$,$-3$} \tkzTabLine{,\vcenter{\hsize3cm $x$ \par  $f(x)$},} % <---- here  \end{tikzpicture}  \end{document}

How do I add an acknowledgements section (maybe not specifically \section) outside of (before) my document environment?  in my .cls, there is  \def\@acknowledge{} ... \def\acknowledge#1{\booltrue{@ack} \gdef\@acknowledge{#1}} ... \def\ackpage{ \chapter*{Acknowledgments} \@acknowledge \newpage }   but it seems that I find problems when I put newlines in the  \acknowledge{folks in here}  (see  )


If I have a spawner at y level 12 and AFK there will it run my farms at the the same x and z level above ground (will it load the chunks?)

What's the max height of blocks for a redstone contraption to still work even I'm in the surface below?  Like if I build a pillar to the max height of blocks and build a redstone contraption there, is it still going to work even I'm on the surface below?


I have a homework assignment. I've got the following code  hey = ["lol", "hey","water","pepsi","jam"]  for item in hey:     print(item)   Do I display the position in the list before the item, like this:  1 lol 2 hey 3 water 4 pepsi 5 jam

How do I access the index in a for loop like the following?  ints = [8, 23, 45, 12, 78] for i in ints:     print('item #{} = {}'.format(???, i))   I want to get this output:  item #1 = 8 item #2 = 23 item #3 = 45 item #4 = 12 item #5 = 78   When I loop through it using a for loop, how do I access the loop index, from 1 to 5 in this case?


I am making a program that makes a randomized lotto ticket and compares it to a user's set of numbers. My problem is I cannot locate the error of NullPointerException. I also feel like my method for comparing numbers is sub-optimal but I can't think of better way to write it.  package lotteryapplication;  import java.util.Random; import java.util.Scanner;  public class LotteryApplication {      public static int lotteryNumbers[];     public static int usersNumbers[] = new int[5];      /**      * @param args the command line arguments      */     public static void main(String[] args) {          System.out.println(                 " This is the lottery. Numbers in my lottery range from 1 through 60.");         System.out.println(" See if you can win\n");         getUserPicks();         getRandomNumbers();         checkLotteryMatch();     }      public static void getUserPicks() {         Scanner keyboard = new Scanner(System.in);         for (int i = 0; i < 5; i++) {             System.out.print(String.format(                     "Enter a Number from 1 through 60 for spot :" + (i + 1))                     + "\n");             usersNumbers[i] = keyboard.nextInt();             keyboard.nextLine();         }     }      public static void getRandomNumbers() {         int lotteryNumbers[] = new int[5];         Random r = new Random();         for (int i = 0; i < 5; i++) {             lotteryNumbers[i] = r.nextInt(60) + 1;         }     }      public static void checkLotteryMatch() {         int matchedNums = 0;         if (usersNumbers.length == lotteryNumbers.length) {              for (int i = 0; i < lotteryNumbers.length; i++) {                 if (usersNumbers[0] == lotteryNumbers[i]) {                     matchedNums++;                 }             }             for (int i = 0; i < lotteryNumbers.length; i++) {                 if (usersNumbers[1] == lotteryNumbers[i]) {                     matchedNums++;                 }             }             for (int i = 0; i < lotteryNumbers.length; i++) {                 if (usersNumbers[2] == lotteryNumbers[i]) {                     matchedNums++;                 }             }             for (int i = 0; i < lotteryNumbers.length; i++) {                 if (usersNumbers[3] == lotteryNumbers[i]) {                     matchedNums++;                 }             }             for (int i = 0; i < lotteryNumbers.length; i++) {                 if (usersNumbers[4] == lotteryNumbers[i]) {                     matchedNums++;                 }             }             for (int i = 0; i < lotteryNumbers.length; i++) {                 if (usersNumbers[5] == lotteryNumbers[i]) {                     matchedNums++;                 }             }         }         if (matchedNums == 1) {             System.out.println("You only got one match sorry you win nothing.");         }         if (matchedNums == 2) {             System.out.println("You only got two matched sorry you win nothing");         }         if (matchedNums == 3) {             System.out.println(                     "you will recieve a free Lottery ticket as the prize");         }         if (matchedNums == 4) {             System.out.println("You will recieve a $2,000 prize");         }         if (matchedNums == 5) {             System.out.println("You will recieve a 500,000 prize");         }         if (matchedNums == 6) {             System.out.println("You will recieve a grand prize of $1,000,000");         }     } }

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


I'm a moderator at Robotics, and I have a persistent indicator for questions in my review queue, despite the fact that there aren't any.   I can open an incognito tab and log in, I can open in Internet Explorer, I hit F5 - nothing will get those numbers to go away. It's been 4 for a while now, but that number is prone to change on a seemingly random basis. It's frustrating for me because I tend to ignore it completely since it doesn't indicate correctly, and then posts go by without attention.   I posted this question on  a while back. Previously I could get the number to go away eventually by logging completely out and then back in, but that doesn't clear it any more.   Is there something else that I'm supposed to be doing? This problem isn't the end of the world, but it's the only nagging grievance I have about the site and I'd like to get it resolved.   Screencap:    EDIT  Regarding the  already asked, the only answer states,     "[S]omeone needs to keep an eye on things to make sure stuff is actually getting done."   How do I know what "stuff" needs to get done when the number doesn't appear to mean anything?     "If that number is high or growing, then there's a problem."   What is the problem? How do I know what to do? What does the number mean?  That question links to a  as related, where the OP says, "This should be something that you can get to 0 every day."   In comment to the accepted answer to that question, moderator Shog9 says,      "this is everything in review, even stuff that you, personally, can't review. Super-expensive to personalize this - so the alternative is simply not having an indicator. Think of it as... A reminder to encourage your peers to review."   There's no built-in direct/private message system, so how exactly are we supposed to "encourage" our peers to review?  Further, I'm not just a super-user, I'm a moderator. It was frustrating when I had access to all of the tools, but now I'm a moderator and there's still stuff I'm not allowed to see?   So, to refine/distinguish this question and separate it from the others:  What am I supposed to do about the review number when all of the queues are empty for me?  (This is really just a rephrasing of my original question - the only thing with a question mark, that says, "Is there something else that I'm supposed to be doing?")

Since a , I see more than I should:    I see no reason to see 134 posts are awaiting review, when there is literally nothing I can do about them. I think it is a bug, because notification is meant as something that will make me act. When I know I usually can't, obviously I will start to ignore it.  If it's not a bug, please remove bug tag and explain how it is supposed to be useful, or how can I switch to only seeing notifications about things I can act on.  Note that apaprently there are no flags for me, neither. I see only stats, migrated, close, delete, there, as if there was no flags waiting:    If you expect us to click on it every few minutes  just to see personalized numbers next to queues, why don't you simply query for personalized numbers every few minutes and cache them for us? It should cost you similar, in database usage, and will save us a lot of clicking and frustration.  If all this number means is "there might be reviews, or not" or "for sure there are none"  it would be simpler just to hide "review" link in the second case. We don't need two links with the same function next to each other, thank you, one is enough, and meaningless numbers are only irritating.


There is a limit on the number of close votes, flags and suggested edit reviews a user can do in a day. However, while the number of close votes and flags you have remaining is clearly shown, the number of edit reviews left is not displayed anywhere. Would it be possible to display this number when reviewing an edit? (In the same way the number of close votes and flags remaining is shown when voting to close or flagging).  My primary motivation for this is that I quite often participate in the suggested edits review queue, but I never want to spend all of my edit reviews there - this leaves me powerless if a post I encounter normally needs an edit, but already has an edit suggestion pending. I would really like to save a few review votes a day for situations like this; but without being able to see the number I have left, I have to count the number of reviews I did in my profile's activity tab, which is tedious.

Once you already have a gold badge for a queue, the number of total reviews is hard to keep track of where you're at. I'd like to see how many reviews I've done so far today in the queue. For example, if I've already done 16 out of my 20 possible, show that.   I don't care whether it's a bar graph, just text, tally marks, etc.  It'd be nice to show this info, so it can maybe motivate people to complete all their reviews for the day, and give the user a status of where they are at for the day. I suggest implementing this in all queues, for all users, whether gold badge or not in the queue.


Is it true if we say that every open set can be expressed as a union of disjoint open intervals

Let $U$ be an open set in $\mathbb R$. Then $U$ is a countable union of disjoint intervals.    This question has probably been asked. However, I am not interested in just getting the answer to it. Rather, I am interested in collecting as many different proofs of it which are as diverse as possible. A professor told me that there are many. So, I invite everyone who has seen proofs of this fact to share them with the community. I think it is a result worth knowing how to prove in many different ways and having a post that combines as many of them as possible will, no doubt, be quite useful. After two days, I will place a bounty on this question to attract as many people as possible. Of course, any comments, corrections, suggestions, links to papers/notes etc. are more than welcome.


I would like to know what terms can be used in English to refer to people that rejoice in other people's suffering (as opposed to empathizing with such people).  What are some of the motivations that would cause people to feel this way? Is it an inborn trait? Is it that people suffer so upon seeing other people suffer they can finally feel equal to others as opposed to feeling less than others?

One word to denote a person who derives pleasure from another's misfortune?


I have two variables of type number:  row.priceList row.markUp   And a simple multiplication:  row.priceList = row.pricePurchase * row.markUp;   Why if I set pricePurchase to 1500 and markUp ad 2.3, the result is 3449.9999999999995 ?!  This is just a simple formula, with plain values...   Thanks to support

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


I cannot understand why my flag was marked as helpful if no action was taken on it.  I am talking about this flag on .        It's helpful but no action was done on it.  Any explanation how flag was helpful?

I flagged a post and (choose one)   my flag was marked as helpful, yet nothing was done my flag was marked as declined, yet the post was deleted/edited/closed   Why?


Prove that: $$e ^ π > π ^ e.$$ Hint: Take the natural log of both sides and try to define a suitable function that has the essential properties that yields the above inequality

How can I  compare (without calculator or similar device) the values of $\pi^e$ and $e^\pi$ ?


Can "at" and "in" be used interchangeably without worry or is one of them specifically wrong especially in the case of:  Working at a new job vs. Working in a new job? and Living in a new apartment vs. Living at a new apartment?

Is the preposition in universal in conjunction with the verb ‘to work’ and can it be used with any organizations and businesses?  For example:        He works as a cook in a local hotel near here.   He works in an office in Chicago.   She works in a big company.   She works in the emergency unit at the hospital.   She works in a shoe repair shop.   After leaving school, he worked in a restaurant for a year. military hospital.   His sister works in a bank.   She works in a shoe factory.   He works in a steel plant.   She works in a gift store on weekends.   Ann works in a research institute.      When should the prepositions at and for be used? For example:        Barbara works at a travel agency.   She works at the local supermarket.   Now he works for a bank.   I work for a small non-profit organization.      I’ve never heard:     She works for a shoe factory.   But with a law firm it’s OK:     She works for a law firm.   Why?


What changes, or what it is obtained, in my stackoverflow account (or any other) when 200 (total) rep is reached?

On Stack Exchange, users may gain a certain level of reputation.  What does reputation do? How can a user gain or lose reputation?   See also   in the Help Center  - Maximum amount of votes a user can use in a day and reputation requirements to vote.  - How to get an exact overview of the actions that got you your reputation.  - A full list of all privileges granted at each reputation level on all sites.


What is the correct way to form a relative clause after the word "vendor" in the following sentence?   Our machines are serviced by a third party vendor who checks the machine during regular service.  Our machines are serviced by a third party vendor that checks the machine during regular service.

I often get confused when trying to use who vs that.  Some examples that often confuse me:  That     The person that went to the store.      The people that went shopping.      The persons that went shopping.      The group that went shopping.   Who     The person who went to the store.      The people who go shopping.   Please explain when to use either for plural subjects and singular subjects.  Animate and inanimate objects as well.


Suppose we have two $n \times n$ matrices $A, B$. It seems like $\delta(AB)=\delta(BA)$, but I can't generally poove it.   If $\det(A) \neq 0$ then $\det(AB - \lambda I) = 0 \Leftrightarrow $ $ \det(AB - \lambda I) \cdot \det(A) = 0 \Leftrightarrow \det(ABA - \lambda A) = 0 \Leftrightarrow $ $ \det(A) \cdot \det(BA - \lambda I) = 0 \Leftrightarrow \det(BA - \lambda I) = 0$, so $$\delta(AB)=\delta(BA)$$ Same if $\det(B) \neq 0$.  But how to prove it for $\det(A) = \det(B) = 0$? Is it still true?

Let $A$ and B be $n\times n$ matrices over a field $F$. Then prove or disprove  $(i)\, AB$ and $BA$ have same characteristic values.  $(ii)\, AB$ and $BA $ have same characteristic polynomial.  $(iii)\, AB$ and $BA $ have same minimal polynomial.  Proof of $(i)$   Let $c$ be an eigen value of AB and v be corresponding eigen vector. Then    AB(v)=cv,    B(ABv)=B(cv),    BA(Bv)=c(Bv),   this implies $Bv$ is an eigenvector of $BA$ corr. to eigen value $c$.  But this statement holds if $Bv$ is nonzero.  What if $Bv=0$?  $(ii)$ If $A$ is invertible then ($A$ inverse)$(AB)A= BA$, i.e. $AB $ and $BA$ are similar and hence have same charateristic polynomial.   Similar proof when $B$ is invertible.  But what if both $A$ and $B$ are not invertible?  I have no idea about $(iii)$.  Please help me to complete these proofs.


I am looking into PhD in Business program at various universities in North America, and I realized that many of those programs require their candidates to have "a Master's degree". If I have a non-thesis, course-based Master's degree, am I still meeting this minimum admission requirement? or by "Master's degree", did they mean a "thesis-based research Master's degree"?  Thank you

If I do a non-thesis MS program in statistics, will I be eligible for an admission in to a PhD program in Statistics later in my life? The MS program I am looking into is a non-thesis program but I still have to complete a research project requirement (which involves oral presentation as well as some form of a written report) towards the end of the program...I am still not sure if it can lead to a PhD program though.  Thanks!


I need a regular expression that matches words regardless of order. As an example, these lines should match with the marked range, A longword1 B longword2 C   ^-------------------^  A longword2 B longword1 C   ^-------------------^  while these shouldn't: A longword1 B longword1 C A longword2 B longword2 C A longword1 B A longword2 C  (A, B, C are fillers, they can be essentially any text) It is possible to just use alternations, such as: \b((longword1).*?(longword2)|(longword2).*?(longword2))\b. But the regex would grow factorially, i.e. three words would need 3! alternates. It's also possible to use subroutines, e.g. \b((?'A'longword1).*?(?'B'longword2')|(?P>B).*?(?P>A))\b. Although shorter, I would still need to include all of its permutations. Now I've read  and , but the accepted answers don't exactly solve my problem. Using \b(?=.*longword1)(?=.*longword2).*\b would match the whole line instead of the range I've shown. I understand, that it would be much easier if I checked the sentence against a list of words. But my current use case prevents it from being possible; I can only use regexes. Here are some links to demonstrate what I meant: EXPECTED:  Using alternates:  Using subroutines:   INCORRECT:  Using positive lookahead (as linked):   Are there any simpler regex(es) to tackle this?

Obviously, you can use the | (pipe?) to represent OR, but is there a way to represent AND as well?  Specifically, I'd like to match paragraphs of text that contain ALL of a certain phrase, but in no particular order.


With this class:  public class MyClass implements Comparable<MyClass> {      private String status;     private String name;     private String firstName;        @Override     public int compareTo(MyClass o) {         return 0;     }  }   I'd like to sort a list of MyClass objects with this order:   Firstly, status = "open", then "working" then, "close" Secondly, name = "toto", then "titi" Finally, firstName = "tutu", "tata"   How can I do this with the Comparable interface ?

Assume you have some objects which have several fields they can be compared by:  public class Person {      private String firstName;     private String lastName;     private String age;      /* Constructors */      /* Methods */  }   So in this example, when you ask if:  a.compareTo(b) > 0   you might be asking if a's last name comes before b's, or if a is older than b, etc...  What is the cleanest way to enable multiple comparison between these kinds of objects without adding unnecessary clutter or overhead?   java.lang.Comparable interface allows comparison by one field only Adding numerous compare methods (i.e. compareByFirstName(), compareByAge(), etc...) is cluttered in my opinion.   So what is the best way to go about this?


id   name    2    ravi kumar     2    mohit kumar    ...   and I want to result   id name    2 ravi kumar / mohit kumar     ...   Thanks

Consider a database table holding names, with three rows:  Peter Paul Mary   Is there an easy way to turn this into a single string of Peter, Paul, Mary?


In QFT, it is easy to find resource on a free scalar quantum field theory. When I tried to search for a free conformal field theory, I could not find a good resource.   Can anyone either give some information with regards to how free conformal field theory would look like, or give some links that would help?

I have a background in QFT, GR and differential geometry at the level of a master student in theoretical physics. I would like to touch the area of CFT. I know the textbook of Philippe Di Francesco. It may be too big for the beginner like me. Are there some good introductory lectures or textbooks adapted to the needs of beginners?


This is a re-edit, because no one seems to want to answer the actual question.  To simplify: Will a non-root backup save everything? Do I have to log in as root to copy sbin, home, etc to a backup disk?  Thanks for all the answers on logging in as root, but that wasn't the problem.

I want to login as root, but when I enter   sudo -s   and enter password, this message is shown: "you are not in sudoers file", and when I enter   su   and enter password, this is shown: "authentication failure".  My os has one account only. about past1 hours ago I log on as root and do some commands , when I logout , I can't login another time!


This might be repeated question, but i am not able understand those answers or it old post?  I am having a windows meachine, how to develop a iphone app and test that in simulator?  Is there any IDE or tools which can be install/work in Windows?

Is there any way to tinker with the iPhone SDK on a Windows machine? Are there plans for an iPhone SDK version for Windows?  The only other way I can think of doing this is to run a Mac VM image on a VMWare server running on Windows, although I'm not too sure how legal this is.


Let $A\in M_3(\mathbb{R})$ be such that $A^8=I$, Then : $(1)$ The minimal polynomial of $A$ can only be of degree $2$. $(2)$ The minimal polynomial of $A$ can only be of degree $3$. $(3)$ either $A=I$ or $-I$ $(4)$ There are uncountably many $A$ satisfying the above Here's my approach: An annihilating polynomial of $A$ is $p(x)=x^8-1 = (x-1)(x+1)(x^2+1)(x^4+1)$ and we know that $m_A(x)|p(x)$ and also $m_A(x)|\chi_A(x)$ and $\chi_A(x)$ is of degree $3$ so $m_A(x)$ must be at most degree $3$. Let $A= \begin{pmatrix} 0 & -1 & 0 \\ 1 & 0 & 0 \\ 0 & 0 & 1 \end{pmatrix}$ (as given by  Ravi Fernando in the comments) then $m_A(x)=(x-1)(x^2+1)$ so Option $(1)$,$(2)$,$(3)$ are false 4th option is true because we can take all the matrix which are similar to $A$

I'm working on the following problem:     Let $A \in M_3 (\mathbb {R})$ be such that $A^8=I$. Then           the minimal polynomial of $A$ can only be of degree $2$.     the minimal polynomial of $A$ can only be of degree $3$.     either $A = I$ or $ A = -I$.     there are uncountably many such $A$.        By taking $A=I $ we can eliminate options (1) & (2). For the minimal polynomial of $A$ in that case is of degree $1$. Now take   $$A = \begin{bmatrix}      1 & 0 & 0 \\      0 & -1 & 0 \\      0 & 0 & -1 \end{bmatrix}$$  Then $A^8=I $ but $A$ is neither $I$ nor $-I$. So option (3) is eliminated. Now I don't know how to proceed about with option  (4). Can someone help me please? Thanks in advance.


Given a set of integers $x_1, x_2, ..., x_n$, how can I check that there exists a linear combination $x_1 a_1 + x_2 a_2 + ... + x_n a_n$ with non-negative coefficients $(a_i \ge 0)$ equal to a particular value $N$?  For example, if I have $x_1 = 4, x_2 = 2$, there exists a sum that is equal to $6$ ($4 \cdot 1 + 2 \cdot 1$), but there is no set of coefficients that will give me the value of $9$.

I'm interested in knowing if there's a theorem for checking if combinations of $n$ given positive numbers can be summed up to a certain number.   For example, if I was given $n = 2$ numbers, which are $k_1$ and $k_2$, and I was asked if I could make a combination like $n_1 * k_1 + n_2 *k_2 = C$, all $\in \mathbb{N}^+$, I could check remainders to see if it is possible.   However, if $n = 3$ or higher, how could I check if combinations of $k_1, k_2, ..., k_n$ can be summed up to a $C$? Thank you for any inputs!


I'm a beginner.i can't understand the difference between "ArrayList list=new ArrayList();" and "  List list=new ArrayList();".please help me.Thank you very much!

I have seen this mentioned a few times and I am not clear on what it means. When and why would you do this?   I know what interfaces do, but the fact I am not clear on this makes me think I am missing out on using them correctly.   Is it just so if you were to do:  IInterface classRef = new ObjectWhatever()   You could use any class that implements IInterface? When would you need to do that? The only thing I can think of is if you have a method and you are unsure of what object will be passed except for it implementing IInterface. I cannot think how often you would need to do that.   Also, how could you write a method that takes in an object that implements an interface? Is that possible?


I port forwarded 45555 and tested the port locally using , with the command PortQry -n <my local ip> -e 45555 and the verdict was LISTENING but when I tried to listen from the public IP address, PortQry -n <my public ip> -e 45555, the verdict was FILTERED. I assumed it had something to do with my firewall, or maybe the router firewall, so I disabled each then tried again, still no success. I even tried adding port rules in the firewall to allow inbound and outbound connections for this port. Could you kindly guide me on how to fix this? Please try to use layman terms where possible, I am not very able on these matters. I am using a PPPoE connection. My router is TP-Link Wireless N Router WR840N. The port is a TCP/UDP port. I got the public IP from Google by searching .  this is my WAN setup. My WAN IP is very different from the IP from google. But the DNS server match up except for last 3 digits.

I am trying to access the server from the public ip. for that I have enabled port forwarding on the tp-link router for port 8069.  My pubic is is 123.201.xx.xx   When I try to access my public address with port number, it gives me no response.  I have checked  to resolve the issue. and get to know that my public ip and wan ip is different. i tried to access the server with the wan address and it allows me to access the server locally, not publicly.  my wan address is 100.66.xx.xxx.   what additional configuration i need to do to access server publicly? why my wan address and public ip is different?


I'm searching for a way to remove the white border of images. I have 6000-7000 images, so I can't do this by hand... Every image has a different size and a different white border. Is there any plugin that does this?  For example:    has to be:

I need to scan a large volume of book covers and even though the scanner (HP) most of the time scans/auto-sizes, many are left with white/grey space on the sides.  What is the best way I can automate the "crop" on these images?  Is there some software/tools that automate this?


Am new to developing, am successfully store the images to database by converting the images in to bytes array and store it to SQLite database in BLOB (find below code). But am not getting how to store audio's/video's into DB any one help me PLZ...   public void getImage(View view){     Intent intent = new Intent();     intent.setAction(Intent.ACTION_GET_CONTENT);     intent.setType("image/* video/*");     startActivityForResult(Intent.createChooser(intent, "select picture"), 1);  }  public void onActivityResult(int requestCode, int resultCode, Intent data){     if(resultCode == RESULT_OK){         Uri imageUri = data.getData();         String imagePath = getPath(imageUri);          image1.setVisibility(View.VISIBLE);          image1.setImageURI(imageUri);         Bitmap bitmap = BitmapFactory.decodeFile(imagePath);         Toast.makeText(getApplicationContext(), ""+bitmap, Toast.LENGTH_SHORT).show();         ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();         bitmap.compress(Bitmap.CompressFormat.PNG, 100, byteArrayOutputStream);         img = byteArrayOutputStream.toByteArray();     } }   public String getPath(Uri uri) {     String[] projection = { MediaStore.Images.Media.DATA };     Cursor cursor = managedQuery(uri, projection, null, null, null);     int column_index = cursor.getColumnIndexOrThrow(MediaStore.Images.Media.DATA);     cursor.moveToFirst();     return cursor.getString(column_index); }  public void saveImage(View v){      imageDatabase = new ImageDatabase(this);      imageDatabase.insert("first",img);      Toast.makeText(getApplicationContext(), ""+imageDatabase.numberOfRows(),Toast.LENGTH_LONG).show(); }   In above code am taking the image from sdcard and displaying in ImageView and storing into DB.

So I'm using an app that stores images heavily in the DB. What's your outlook on this? I'm more of a type to store the location in the filesystem, than store it directly in the DB.  What do you think are the pros/cons?


Are there any existing tools which take as  input: TypeSet Math Formula  output: LaTeX code which produces something similar to the existing math formula?  Googling "inverse LaTex" gets answers about inverse/matrix symbols.   Googling "image to LaTeX" gets answers about inserting images in LaTeX  Thanks!  EDIT: Not duplicate of "OCR -> TeX". I don't need "handwriting -> TeX", for me, it suffices to do "rendered math formula -> TeX"

Is there an  software that can convert a graphical image (in PNG, GIF, TIFF, PDF... format) of a mathematical formula into the corresponding TeX markup?


Is the function $f(x) = \sqrt{x^{2} - 9}$ continuous at $x = 3$?  I tried to check by solving each requirement for continuity, which are the following:  The limit at the point must exist; The function at the point must exist; The limit at the point must be equal to the function at the point.  The second requirement can be easily checked as 'satisfied' as $f(3) = 0$. Thus, I only need to check if the first requirement is satisfied. I started by solving for the left-hand limit as follows: \[L^{-} = \lim_{x \to 3^{-}}\left[\sqrt{x^{2} - 9}\right]\] Then, I eventually got $L^{-}$ to be zero.  My question is this: Is it correct to rewrite the problem by substituting $x = 3 - a$, where $a \geqslant 0$, then solving for the limit as $a$ approaches zero?  Edit: This is a question about solving one-sided limits, and not about the continuity of the square root function.

If a function has a limit from the right but not from the left, is it still continuous?


I use Windows since ever, sometimes Linux, sometimes OSX.  Since Windows ME/2000 I have been having this major problem:  I install a fresh copy of Windows, it boots fast as hell, everything goes smoothly. 1 month later, and I have to wait between 10-15 minutes for it to boot up. This has happened to me 10 years ago, and still happens today, with different computers and different versions of the OS.  So I can only come up with this conclusion: or it is the OS which sucks, or it is me.  I really don't know what is going on, . Take a note that even after that video some programs were still booting up.  These are the specs of my current machine, but as I said, different machines, same problem:    My HDD status:      According to this defrag tool I have my HDD 30% fragger, however it spent all night defragging and the furthest it went was 2% complete!!    These are the apps I have installed:    These are my non-Microsoft services:    These are my startup apps:    (I always keep removing that Google Chrome from the startup but he insists going there, sucker... Also I cannot understand why I have two spotifies there, however no spotify opens at bootup as you can see from the video).  Disk performance tests    (repetition just in case)    My device manager showing unknown devices    With Driver Inspector I get this:      PCI-Z findings report      AutoRuns generated file:     Driver Identifier report:      I really dont know what to do... I hate windows for this. My other OS don't have these kind of trouble.

When I start my PC, it boots into Windows (Windows 7 32-bit) quite happily, I login and the main Windows screen appears. At that point, however, the system is extremely unresponsive for up to 5 minutes - if I click on Firefox to start it, nothing appears to happen for a long time, etc, etc. The mouse and Windows UI is responsive, but programs take forever to start, webpages seem to hang (or at least load extremely slowly) and so on.  I imagine that the issue is with one or more programs that run on startup, but I don't know quite how to identify which one it might be. The event log shows nothing of any obvious interest. I can't see any high CPU activity in task manager or Process Explorer, and I can't hear any high disk activity.  I'd rather understand what's happening and then work out how to address it, than have to go for a blind "switch things off and see what helps" approach, but maybe that's being optimistic :-)  I suspect disk bottlenecks or network, but I don't know how I could set something up to diagnose this (and in particular, given that I can't get programs to start in a timely manner, I'd prefer something that automatically starts and logs data for later analysis than something like Process Explorer, which always leaves me worrying that by the time it started the problem had gone away :-)  I guess my ideal would be 2 things:   Something that gave me an overall "what are the current key bottlenecks in this system" summary (ideally, which could be set to run in the background and collect data for later analysis). Some means of starting a program (say, Firefox) and have it record what was going on in terms of waits and delays in the system.   Unfortunately, I've never really found anything like either of these.  I'm not a professional systems admin - my background is database admin - so if there are "obvious" tools to look at or try, then I'd be grateful to know of them (particularly if the information they give is easy for an amateur to analyze) :-)


This question is related to linear algebra.  Suppose we have a finite set of linear operators called $T$:    $T= \{ T_1, T_2, T_3, ...,T_k \}$  How can I prove the following claim?  $\exists T_i \in T \; such \; that \; (T_i) \alpha=0 \implies (T_1T_2...T_k) \alpha=0 $  I mean if there exists some linear operator that sends a vector to zero then the multiplication of all linear operators also sends the vector to zero.  ---------------------------------------------MY EDIT-------------------------------------------  I ask this question because I saw something like this in a linear algebra book. I state what was exactly in the book:    Let $T$ be a diagonizable linear operator and let $c_1,...,c_k$ be the distinct characteristic values of $T$. Then it is easy to see that the minimal polynomial fot $T$ is the polynomial $$p=(x-c_1)...(x-c_k).$$ If $\alpha$ is a characteristic vector, then one of the operators $T-c_1I,...,T-c_kI$ sends $\alpha$ into $0$. Therefore $$(T-c_1I)...(T-c_kI)\alpha=0$$ for every characteristic vector $\alpha$.  Please explain if I asked the wong question and explain why the last claim is true i.e. $(T-c_1I)...(T-c_kI)\alpha=0$ for every characteristic vector $\alpha$.

There proof given in my textbook is as follows:  Let T be a diagonalisable linear operator and let $c_1, ..., c_k$ be the distinct eigenvalues of T. Then it is easy to see that the minimal polynomial for T is the polynomial  $$ p = (x-c_1)...(x-c_k)$$  If $\alpha$ is an eigenvector, then one of the operators $T-c_1I,...,T-c_kI$ sends $\alpha$ into 0. Therefore  $$ (T-c_1 I)...(T-c_kI)\alpha = 0$$  for every eigenvector $\alpha$. There is a basis for the underlying space which consists of eigenvectors of T and hence  $$ p(T) = (T -c_1I)...(T-c_kI) = 0$$  I cannot understand this proof at all. I understand that one of the operators $T-c_1I,...,T-c_kI$ sends $\alpha$ into 0, but I can't see why we we multiply them together, it still works. And I also don't understand why there is a basis for the underlying space. Can someone kindly explain to me please. Thanks


I have a windows 8 laptop, 64 bit OS, x64 based processor. I downloaded Ubuntu 12.04 LTS matching all of these specs. I go to boot it, and I hit "install Ubuntu" but it just gives me a blank screen. I let it sit for 10 minutes, but it didn't change, so I tried it again. Same result. I tried running Ubuntu without installing and it still didn't work. Any suggestions?? And am I supposed to run wubi.exe file??

I'm absolutely new to Linux. I would like to know how to install Ubuntu alongside the pre-installed Windows 8+ OS.  Should I do it with Wubi, or through the Live USB/DVD?  What steps do I need to take to correctly install Ubuntu?