Getting NullPointerException while making a project

I want that if the result of pst = conn.prepareStatement("select * from employee where cnic = ?"); is returning empty set than if(rs.next()) will execute and if it returning some data than program skip if and execute else part. I don't know where I am getting NullPointerException. I think I am getting exception after the execution of pst = conn.prepareStatement("select * from employee where cnic = ?");. try {     while(!bool){         pst = conn.prepareStatement("select * from employee where cnic = ?");         pst.setString(1, s9);         rs = pst.executeQuery();         if(rs.next()){             pst = conn.prepareStatement("insert into employee(id,firstname,lastname,age,gender,job,salary,phone,cnic,email) values(?,?,?,?,?,?,?,?,?,?)");             pst.setString(1, s1);             pst.setString(2, s2);             pst.setString(3, s3);             pst.setString(4, s4);             pst.setString(5, s5);             pst.setString(6, s6);             pst.setString(7, s7);             pst.setString(8, s8);             pst.setString(9, s9);             pst.setString(10, s10);             JOptionPane.showMessageDialog(null, "Employee Added Successfully");             new EmployeeMenu().setVisible(true);             setVisible(false);             bool = true;         }else {             JOptionPane.showMessageDialog(null, "This CNIC Number is Already Registered");             s9 = JOptionPane.showInputDialog("Enter a correct CNIC Number:");                                    }     } } catch (SQLException ex) {     Logger.getLogger(AddEmployee.class.getName()).log(Level.SEVERE, null, ex); }


jQuery selectors not working for PHP-echoed elements

I'm using PHP to dynamically generate badges, and load them in my page via ajax. I then try to add functionality to these badges using jQuery, but the jQuery isn't acting on elements that are generated by the PHP. I figured that maybe the jQuery and bootstrap needed to be imported in the PHP script in order for it to work. No luck. Whether the jQuery is generated in PHP, or it is generated in the HTML file, it doesn't work with elements that are generated by PHP and loaded via ajax. The badges load fine, it's just that jQuery isn't able to do anything with them. Not assigning function, nothing. I'm out of ideas. You guys? PHP FILE if($tagpeople){      // FIND TAGS      // TRYING TO ADD BOOTSTRAP AND JQUERY HERE, BECAUSE I'M OUT OF IDEAS     $tags = "                                                    <link rel='stylesheet' href='https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css' integrity='sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm' crossorigin='anonymous'>                                                <link rel='stylesheet' href='https://maxcdn.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css'>                                                <link rel='stylesheet' href='https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css'>                                                         ";      // PULLING INFO FROM DATABASE TO GENERATE BADGES (OR, "TAGS")     $findtags = "SELECT * FROM pTags";     $alltags = mysqli_query($dragonden, $findtags);      // GENERATE HTML FOR EACH BADGE     while($tagDAT = mysqli_fetch_array($alltags))     {   $tags .=         "
         <input value='".$tagDAT[1]."' id='".$tagDAT[0]."' name='".$tagDAT[1]."' type='checkbox' class='ptag form-check-input form-check-inline'>

         ".$tagDAT[1]."

                  "; }          // SEND BADGES TO THE HTML PAGE     $data = array();     array_push($data, $tags);     print json_encode($data); }  JQUERY SCRIPT IN HTML FILE $.ajax({         type: "POST",         dataType: "json",         url: "q-svc-agr-builder.php",         data: { tagpeople:1 },         success: function(data){             $("#ptags").html(                 data[0]             );         }     }).fail(function(XMLHttpRequest, textStatus, errorThrown)            {             $("#ptags").html("Status: " + textStatus + "
Error: " + errorThrown);            });


How can I use the keyboard arrow keys to move a character across a grid?

So I have created code for a grid that looks like this :  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - X - - - - - - - - - - - - - - - - - -   Co-ordinates are accessed by calling my_grid.Grid[x_coordinate][y_coordinate], and new characters can be placed anywhere there (as shown by the 'X' with coordinates [1][1])  I want to be able to move this character in any direction using arrow key inputs, without using the 'Enter' key afterwards if possible.  What is the best way to do this?


How to find all columns in a table which containing the chr(0) character in oracle

How to find all columns in a table which containing the chr(0) character. Preference in a Oracle.


Classic Circle and Adjacent Arrangement Problem

Given: A circle with nine distinct positive integers. n is a fixed positive integer.  So these positive integers are arranged in the circle in such a way that the product of any selected two NON-ADJACENT numbers in the circle is a multiple of n. The product of two ADJACENT numbers in the circle is NOT a multiple of n. What is the smallest posible value for n.


OSX Server: should I use Open Directory?

I'm currently setting up an OSX Server (Mavericks) in a small company (10.9 on the clients as well), and I'm trying to decide what the best approach is to manage accounts.  The accounts will not be used for roaming; everyone has their own workstation, and never has any desire to log into other machines. This appears to eliminate the need for home directories on the server.  Now I'm wondering whether I should create Local Network Users or Local Users (in both cases without a home directory on the server). What is the advantage of using Open Directory to manage Network Users rather than creating Local Users and leaving Open Directory switched off?  There are no other servers or off-site networks involved that we need to 'hook into', so that is not something that seems to lead to a requirement for an Open Directory server.  Is there any reason why I should not just create Local Users instead? What can they not do that Local Network Users can do?  EDIT: While I'm still interested in the answer to this, I've since elected to set up accounts using Open Directory. I could not find a reason not to, and I figured that there might be services that require it of which I'm unaware at this moment. This will hopefully ease future migration.


Let $A$ be a subspace of $M_{n\times n}(F)$, prove that if $\dim(A)> n^2-n$ , $\exists$ invertible matrix $M \in A$.

Let $A$ be a subspace of $M_{n\times n}(F)$, prove that if $\dim(A)> n^2-n$ , $\exists$ invertible matrix M $\in$ $A$.


An regression output from STATA  reg lnQ lnL lnK COOP        Source |       SS       df       MS              Number of obs =      87 -------------+------------------------------           F(  3,    83) =  177.43        Model |  46.8044524     3  15.6014841           Prob > F      =  0.0000     Residual |  7.29838834    83   .08793239           R-squared     =  0.8651 -------------+------------------------------           Adj R-squared =  0.8602        Total |  54.1028407    86  .629102799           Root MSE      =  .29653  ------------------------------------------------------------------------------          lnQ |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval] -------------+----------------------------------------------------------------          lnL |   .7682515   .0662688    11.59   0.000     .6364455    .9000576          lnK |   .0537095   .0495861     1.08   0.282    -.0449153    .1523342         COOP |   -.158698   .0660776    -2.40   0.019    -.2901238   -.0272723        _cons |   4.946906   .2614977    18.92   0.000     4.426797    5.467014       firm            float   %9.0g                 firm code (or firm ID)     va              float   %9.0g                 value added in millions of lire     labor           float   %9.0g                 permanent employees at year end     capital         float   %9.0g                 fixed assets at historical cost in millions of lire COOP = a dummy variable for a worker cooperative. Conventional firms have code (or ID) numbers (given by FIRM) less than 100, while the code (or ID) numbers for worker cooperatives exceed 99. COOP_LNL=COOP*lnL     lnQ = the natural logarithm of output (value added) lnL = the natural logarithm of labor lnK = the natural logarithm of capital   I am asked to calculate the exact percentage change for the estimated COOP effect. I am wondering how does it differ from the interpretation that each additional unit of COOP is associated with 15.9% less in output (less say,  lnQ is output), if any?


Eigenvalue of a polynomial evaluated in a operator

Suppose $T:V\to V$, $p\in \mathcal{P}(\mathbb{C})$ (polynomials with complex coefficients), and $a\in \mathbb{C}$. Prove that $a$ is an eigenvalue of $p(T)$ if and only if $a=p(\lambda)$ for some eigenvalue $\lambda$ of $T$.  I can prove: if $a=p(\lambda)$ then $a$ is a eigenvalue of $p(T)$ because: $$Tv=\lambda v$$ $$T^kv=\lambda^k v$$ $$p(T)v=p(\lambda)v=av$$  But, how can I justify the other direction?  Thanks for your help.


Can you update an iPhone 4 on iOS 6.1.2 to 7.0.6 using an IPSW file?

So I have an iPhone 4 that's been happily jailbroken on iOS 6.1.2 for a while now, but I want to upgrade to 7.0.6. I downloaded the IPSW for it and shift-clicked on update, but I get the error 'The iPhone could not be restored. An unknown error occurred (3194)'. I read up on it and proceeded to correct my hosts and firewalls, but nothing seems to work.  So, the question is: Is what I'm trying to do even possible, or should I just settle for iOS 7.1 with no jailbreak? Also, is there any way to update without using iTunes, because it seems to be the only thing causing the problem?


Given A is a linear transformation find a non zero polynomial such that p(A)=0

Here $x_0$ is a fixed vector and $y_0$ is any linear functional.  (a) The space of all linear transformations $V \to V$ has dimension $n^2$. Consider $I,A,A^2,A^3,.....A^{n^2}$. Then this collection forms a linearly dependent set. So we have a non trivial relation amongst these which will give us a polynomial such that $p(A)=0$.  (b) Don't know how to proceed.


I'm trying to create a program that will simulate a dog race. and 3 players are able to bet on any of the dogs, but they can only bet up to $15 each. I have all of this set up except for only allowing up to $15 to be bet. the code is extremely long so I'll try to explain what I have so far  So I have radio buttons to select which player want to place their bet, once a player is selected, 4 radio buttons are enabled which allows the player betting to choose which dog they want to bet on. after a dog is chosen I have a textbox named txtAmount which they then enter an amount they'd like to bet. they then press a button named btnBet which confirms their bet and allows another player to bet.  my question is this: is it possible to allow the numbers entered into the textbox to only go up to 15? (I already have it so that only numbers can be enter, but I want to restrict what number it can go up to), or would it be better to just put in a ComboBox??  UPDATE  here is the code I used to restrict the textbox to numbers only:      private void txtAmount_KeyPress(object sender, KeyPressEventArgs e)     {         if (e.KeyChar != '\b')         {             e.Handled = !char.IsNumber(e.KeyChar);         }     }   my question is not a duplicate to the other question mentioned in the comment. here's why: I'm not asking how to restrict to just numbers, I'm asking how to restrict to certain numbers (1-15 inclusive)


"I'm Done" for Late Answers after "approve edit"

Sometimes when I feel that a "late answer" needs editing, there's already a suggested edit over there. But approving it (of course after inspection) doesn't enable the "I'm Done" action. On top of that, it switches me to "Review Suggested Edits".  Though I come back to that page, even refreshing it doesn't work.  Shouldn't this be changed?


Number of elements not equal to their inverses is even number

In any finite group, number of elements not equal to their own inverses is even number  In my book they have paired elements with their inverses, being elements and inverses different from each other. How do i see this hint ? Thanks


How to check if a string array contains one string in JavaScript?

I have a string array and one string. I'd like to test this string against the array values and apply a condition the result - if the array contains the string do "A", else do "B".  How can I do that?


Problem on "Distribution" of conditional expectation w.r.t a sigma field

Let $Y$ be a random variable s.t. $E|Y|<\infty$. Let $E[Y|\mathcal{G}]$ and $Y$ have the same distribution. I need to prove that $E[Y|\mathcal{G}]=Y$ a.s. How does one use the fact that a random variable and its conditional expectation has the same distribution ?


What are the pros/cons of having a model made of multiple meshes?

Here is a model shown in object and edit mode.  The topology is great, however, the body parts are all separate meshes.  From an animation perspective, what are the pros/cons of this approach, versus a single mesh?  Thanks! Edit- mods believe my question has been answered here:  However, I think my question is sufficiently different as I'm asking about animation of an organic object, not hard surface modelling.


How Do i mitigate my UK visa refusal, though i attached my company registration documents, income tax returns, invoice and receipts. Second paragraph was a mistake as i did not state anything like that   Though I attached to my application my company's registration documents, income tax return, invoices, contract agreement with my staffs, – Edited in from an almost identical question, which is now closed: What do I need to do to re-apply again? Though paragraph 2 was a mistake from the visa officers because I didn't state anything like that.


What's happend with bounty point if I answer my proper question?

What's happend with bounty point if I answer my proper question and resolve it myself after a work of search and documentation ?


In this folder, there are 14GB of archives with names such as WiFiDiagnostics follow by a date. Is it safe to delete these archives? A reboot did not remove them.


Rapid (ac/de)celeration in relativity does what to inertial clocks?

EDIT (to clarify my question): I think some of the answers here are  accounting for light travel time and telling me what I'd actually see  on Earth's clock, so I've edited my first paragraph to clarify. I  don't think this clarification changes the meaning of this question,  but it might.   Summary: if I accelerate to $0.8 c$ in 1 second, how much time passes  for observers in my starting inertial reference frame?   This seems like a simple question that has probably been answered, but  I couldn't find a simple answer for what appears to be a simple question:    I start 8 light years from Earth, at rest with respect to Earth, and  observe Earth's time is t=0. Of course, technically, I'm seeing Earth  the way it was 8 years ago (t=-8), but I know I'm 8 light years away  from Earth, so automatically add 8 years to the time I see.    I make this assumption throughout the question. In other words, when I  say "Earth's clock time", I mean: "the time I'm seeing on Earth's  clock right now plus my distance from Earth in light travel time".   I believe this is the norm in relativity questions, but could be wrong  about that.    Keeping an eye on Earth's clock, I accelerate to $0.8 c$ in 1  second. Because I'm accelerating, I know Earth's clock will go faster  than mine. The question is: how much faster, and where will it end  up after I've finished my one second of acceleration to $0.8 c$?  At $0.8 c$ the distance to Earth is now 4.8 light years (minus the  little bit I traveled during acceleration). Earth's clock now runs  slower than mine by time dilation. So, when 6 of my years have passed,  fewer than 6 years have passed on Earth's clock.  As I get close to Earth, I "decelerate" to the Earth's reference frame  so that I will be at rest when I actually arrive at Earth. Of course,  deceleration is just acceleration in a different direction, so, once  again, Earth's clocks run faster than mine.  And, once again, the question is: in that 1 second of deceleration,  how much time elapsed on Earth's clocks?    What vexes me about this problem:     In the 6 years I was traveling at $0.8 c$, Earth's clocks ticked  off only 3.6 years by time dilation.  By the time I arrive at Earth, Earth's clocks must have ticked off  10 years, since they say me traveling at 0.8c for (most of the) 8  light years.  The only way I can reconcile these numbers (10 years minus 3.6  years, or 6.4 years) is that my 1 second of acceleration and  deceleration each took 3.2 Earth years (about 10^8 seconds).  This seems high, and I can't get the numbers/formulas to yield  this, but...  On the other hand, it seems somewhat reasonable that the amount of  time that passes depends only on my final velocity ($0.8 c$) and not  how fast I reached that velocity.    Note that I don't think there's a simultaneity issue here, since I  start and end in Earth's reference frame.


My laptop down arrow key just stopped working, so how can I remap the right shift key to work as the down arrow key?


How can infinity be an accumulation point?

I can't wrap my mind around this: An accumulation point is a point of a set, which in every yet so small neighborhood (of itself) contains infinitely many points of the set, right?  So if (in my case) $-\infty$ is an accumulation point, then we could find a point of the set, that is finitely distant from infintity?!  Here's the task: Let $(a_n)_{n∈\mathbb N}$ be a set in $\mathbb R$. For every $r ∈ \mathbb R$ exits an accumulation point $b ∈ R$ ∪ {−∞} of $(a_n)_{n∈\mathbb N}$ (+∞ und −∞ are allowed as accumulation points) with b < r. Show, that −∞ is an accumulation point of $(a_n)_{n∈\mathbb N}$.


I'v found this proposition.  If $G$ is a finite  group , $ A \subset G $ a subset and $|A| > \frac{|G|}{2} $ then $AA = G $.  Why this is true ?


Is there a closed form of the sequence 1, 1, -1, -1, 1, 1, -1, -1, ...?

A closed form for $1, -1, 1, -1, ...$ is $(-1)^n$ for $n=0, 1, 2, ...$ But I can't find a closed form for $1, 1, -1, -1, 1, 1, -1, -1, ...$  That is: take the first two terms to be $1$, then the next two terms to be $-1$, and the next two terms to be $1$ again, and so ...  Is there a closed form of this sequence? I don't know of any result that can help me find it.


"been a watching", "been a playing" - why?

I first encountered adding an "a" before a verb in songs in phrases such as "I've been a-playing". At first I thought that songwriters add it when they need one more syllable to make a verse sound right. Then I thought that this may be some kind of a Texas dialect or slang.   But I also saw Charles Dickens using that: "and all mostly sounded as to be a-talking to theirselves, or a-passing blame on the t'others, and not a-talkin to us" and I'm confused.   Why would anybody speak like that and how formal/informal is it?


.thumbdata files maxing out internal SD memory

I have an 8GB Nextbook7 running Android 4.0.4. Recently, I discovered that I have 2 files named .thumbdata3... eating up all my internal space of 5+GB. These files are found in the .thumbnail folder under the DCIM folder. I have read on the internet that these files are produced by Android Gallery, but there is a bug in the OS that causes these files to grow so large and max out all the available internal storage space.  I have tried deleting the files, but they come back. I have tried writing small text files and saving them with the name .thumbdata3... as in the problem files, but that does not work either. I have downloaded an app called Thumbnail file deleter, which deletes the problem files, but the files will rebuild themselves again until the space is maxed out.  Does anyone have a permanent cure to this .thumdata3... problem? Any suggestions appreciated. Thanks.


Why does a lightsaber turn off when a Jedi dies or drops it?

I rewatched the three newer movies and noticed that whenever a Jedi was killed, or let go of their lightsaber, it immediately turned off.  What was curious was that the lightsaber turns off right away, when a Jedi is killed, even before it leaves their hand (if it does fall out).  I could understand if the button needs to be held for it to stay on, but when a Jedi is shot and is still holding the lightsaber why would it turn off?


How can I recover data from my external hard disk after formatting using the Media Creation Tool?

I had a lot of important data in WDmypassport external HD but I made this HD bootable (using media creation tool) without knowing that it can wipe off my data backup. I am new to this and I admit this was a big blunder. Can I get the complete data back, organized like before. Is there any way? There are a lot of recovery tools but they all give data unorganized, which can be a big loss in my case. Any help would be appreciated.


Updated I've updated the question because it was not clear and some of you gave me hints.What i originally want to achieve is the following example on visualforce page  I want them to be grouped and rendered as:  -Family  -Brand   -Product1   -Product2   -Product3 -Family  -Brand   -Product1   -Product2   -Product3   I am trying to create a visualforce page that will group products by Family/Brand. Can anyone advise me how or what is the easiest way to do this? I am trying to render the page as PDF for my sales team.  Controller      public with sharing class StandardProductDisplayController{  public List<Product2> records {get; set;}  public StandardProductDisplayController(){  records = [select Name, ProductCode, Brand__c, Family from Product2 order by Family];  }  }   Apex     <apex:page controller="StandardProductDisplayController" renderAs="pdf">      <apex:pageBlock title="Product List">          <apex:pageBlockTable value="{!records}" var="record">              <apex:column >                  <apex:facet name="header">Product Name</apex:facet>                  <apex:outputText value="{!record.Name}"/>              </apex:column>              <apex:column >                  <apex:facet name="header">Product Brand</apex:facet>                  <apex:outputText value="{!record.Brand__c}"/>              </apex:column>              <apex:column >                  <apex:facet name="header">Family</apex:facet>                  <apex:outputText value="{!record.Family}"/>              </apex:column>          </apex:pageBlockTable>      </apex:pageBlock>  </apex:page>


What is the meaning of "nail" in "if they nail vaccinations"?

I was watching YouTube and suddenly got an ad advertising the following - the ad is from Bloomberg  If they nail vaccinations, drugstores will be the heroes of 2021.  Checking the definition of nail in the dictionary does not make any sense to me  fasten with a nail or nails. "the strips are simply nailed to the roof" INFORMAL detect or catch (someone, especially a suspected criminal).  Can someone explain what it means?


How to use this and that in daily conversation. For example: 'this' or 'that is a good question'

I'm a little confused about the usage of that and this. For example: My teacher was giving out our predicted grade. When it was my turn, she said:"A, A*" I asked "What does that mean?" She said that "It means we think you will get an A* if you work hard enough" Here, is the usage of 'that' correct? Or should I use 'this' instead? How am I able to tell? Another example is when someone explains to me what a word means, I say "that actually makes a lot of sense" or should it be 'this'? And also when I ask someone about something, should the other person say ''that or this is a good question" ? Is there a common rule?


Bolzano-Weistrass theorem true in any vector space?

Let’s say I have a vector space $V$ endowed with an order relation : $\leq$.  Then is Bolzano-Weirstrass theorem true in $V$ ?  In class we have seen Bolzano-Weirstrass theorem only in $\mathbb{R}$, that’s why I am wondering if this theorem is true in arbitrary ordered structure like for example a vector space.  In the case where it’s not true for every vector space, is it possible to classify the vector space in which Bolzano-Weirstrass theorem holds ?


Article “the” why is it the Port Authority Bus Station and not “the Penn Station”?

Why is it “the” Port Authority Bus Terminal, but not “the Penn Station”?


Origin or explanation of using "the same" when you mean "it"

I just got this error message from some software     Request does not fall under your permitted scope. So you are not authorized to update the same.   This "the same" construction was particularly odd to me. I've been hearing it more and more in corporate contexts.    Can anyone explain where it comes from?  My instinct was that it was military phrasing (or other government/public agency).


Calling a generic method in a loop with varying types

I'm still just getting back into the swing of things in .NET (took a 6 year hiatus) and am running into a problem which I feel I am close to solving, but can't quite get there.   What I'm trying to do is refactor some code I wrote that does some setup various parts of a service. The code is pretty repetitive and I have to do a similar thing in another place so I thought I would make it more generic. Right now I am doing something like:  public void InitConfiguration() {   ...   myservice.AddPart(s =>   {     s.ShouldDoStuff = true;     s.MethodWithGeneric<SomeType>();   }      myservice.AddPart(s =>   {     s.ShouldDoStuff = false;     s.MethodWithGeneric<SomeOtherType>();   }   // do this 5 more times }   So.. my approach was to create a MyConfigCollection class that has a List of IMyConfig objects that have the members I need to do .AddPart() on my service:  interface IMyConfig {     public bool ShouldDoStuff {get; set;}     public Type FooType {get;} }  public class MyConfig<TFooType> : IMyConfig {     public bool ShouldDoStuff {get; set;}     public Type FooType {get {return typeof(TFooType);}} }  public class MyConfigCollection {    public List<IMyConfig> MyConfigs {get; set;} }   It sort of started smelling weird to me when I realized I had to make an interface for a config then implement it with a generic type param in order to have a List of MyConfig with different types. Then when I tried to use it:  public void InitConfiguration(IConfigCollection configurations) {     foreach ( IMyConfig config in configurations)     {         myservice.AddPart(s =>          {             s.ShouldDoStuff = config.ShouldDoStuff;             // I can't do this!!!             s.MethodWithGeneric<config.FooType>();         });     } }   Righhtt I can't do that. I understand generics are intended to be set at compile type so it's a code smell to try and make  them dynamic. The api of myservice is not something I can change (third party) I also am not sure what approach I could take here to achieve my goal.  I feel like this is a solved problem and there exists a best practice for situations like this but my Google-fu has failed me.  Could anyone suggest an approach I could take here? How could I trim down the duplication I am doing(and will have to do again) and make this a bit more flexible? Any advice is appreciated. Thanks!


Can a player get his second yellow card while being replaced? What happens then?

In football, a yellow card can be given to a player when he/she is losing time on purpose.  Typically, a team wining the match will make changes on the last minutes to lose some extra time: the player will make sure to be far away from the bench, so that the distance to cover will be quite big. Also, he will walk all the way, making the other team feel very nervous for it.  For this, 30 seconds are summed to the extra time to be added to the end of the match. However, in many cases this change takes way more than this.  I was wondering: would it be possible for a player that is being replaced already having a yellow card to get another one for being so slow during the replacement? Would the replacement then be cancelled? Has it ever happened?


This is a question which started off with a , then turned into an , and now it's a question in its own right (as suggested by Jeff). I'm not sure where it could go from here :)  It's obvious that different people cast downvotes for different reasons. (Upvotes are less controversial, generally.) Here are some possible reasons:   Answer is wrong Answer is misleading (may be technically accurate, but will lead to readers making mistakes) Answer doesn't match the question (e.g. a C# answer to a question about Java) Answer doesn't really address the question, e.g. suggesting a completely different solution, even if the question specifies that there are good reasons why the current approach has to be followed Answer is okay, but not as good as another one which currently has fewer votes Answer appears to be plagiarised from existing answers. Answer is by someone I don't like. Answer is abusive (profanity, spam etc). No reason, I just felt like it. I'm a , and prefer down to up. Have you considered down? Ideological grounds: answer suggests a technology I don't like, or expresses a negative opinion of a technology I do like   Personally I go with 1, 2 and 8 - although I'll add comments suggesting changes in various other situations.  Have I missed anything? What do you do, and why? What are the net benefits (to you, the world in general, and the answerer) from your approach?


Why can $R^2$ be negative in a multiple regression that doesn't have an intercept ($\hat{\beta}_0 = 0$)?

I saw this answer () that said that $R^2$ can be negative if it's defined as $1-\frac{SSR}{SST}$. SSR is the sum of squared residuals which is defined as  \begin{align} SSR &= \displaystyle\sum\limits_{i=1}^n (y_i - \hat{y}_{i})^2 \\ &= \displaystyle\sum\limits_{i=1}^n (y_i - \hat{\beta_1} x_{i1}   - \hat{\beta_2} x_{i2} - \ldots - \hat{\beta_k} x_{ik}     )^2 \\ \end{align}  when theres no intercept, and SST is the total sum of squares, or   \begin{align} SST &= \displaystyle\sum\limits_{i=1}^n (y_i - \bar{y})^2 \\ \end{align}  Also SSE, or the explained sum of squares, is  \begin{align} SSE &= \displaystyle\sum\limits_{i=1}^n (\bar{y} - \hat{y}_i)^2 \end{align}  in the notation of my book. I just got to the section in my textbook that mentions this too and I'm confused. Why is this true?  Here's what I could work out. I know that  \begin{align} R^2 &= 1-\frac{SSR}{SST} \\ \end{align}  So for $R^2 < 0$, we need $\frac{SSR}{SST} > 1$. Here's what I worked out:  \begin{align} SSR &> SST \\ \displaystyle\sum\limits_{i=1}^n (y_i - \hat{y}_{i})^2 &> \displaystyle\sum\limits_{i=1}^n (y_i - \bar{y}_{i})^2 \\ \end{align}  Here's the proof I tried to work out:  \begin{align} SSR &> SST \\ SSR &> \displaystyle\sum\limits_{i=1}^n (y_i - \bar{y})^2 \\ &> \displaystyle\sum\limits_{i=1}^n \left[ (y_i - \hat{y}_i) - (\bar{y} - \hat{y}_i)\right]^2 \\ &> \displaystyle\sum\limits_{i=1}^n (y_i - \hat{y}_i)^2 - 2\displaystyle\sum\limits_{i=1}^n (y_i - \hat{y}_i)(\bar{y} - \hat{y}_i) - \displaystyle\sum\limits_{i=1}^n (\bar{y}_i - \hat{y}_i)^2 \\ &> SSR - 2\bar{y}\displaystyle\sum\limits_{i=1}^n (y_i - \hat{y}_i) + 2\displaystyle\sum\limits_{i=1}^n \hat{y}_i(y_i - \hat{y}_i) - \displaystyle\sum\limits_{i=1}^n (\bar{y} - \hat{y}_i)^2 \\ &> SSR - 2\bar{y}\displaystyle\sum\limits_{i=1}^n (y_i - \hat{y}_i) + 2\displaystyle\sum\limits_{i=1}^n \hat{y}_i(y_i - \hat{y}_i) - SSE \\ 0 &> -2\bar{y}\displaystyle\sum\limits_{i=1}^n (y_i - \hat{y}_i) + 2\displaystyle\sum\limits_{i=1}^n \hat{y}_i(y_i - \hat{y}_i) - SSE \\ SSE &> -2\bar{y}\displaystyle\sum\limits_{i=1}^n (y_i - \hat{y}_i) + 2\displaystyle\sum\limits_{i=1}^n \hat{y}_i(y_i - \hat{y}_i) \\ \end{align}  This is where I get stuck. Is the proof on the right path, or is there a mistake before I got stuck? Hints would be great.  I'm starting to get why this is the case logically. SSR is the sum of the squares of the distances from the points to the regression line, while SST is the sum of the squares of the distances from the points to a line drawn through $\bar{y}$. $R^2$ is negative because $SSR > SST$, which means that because we impose the limitation that the regression line MUST pass through the origin, our regression line is an even worse fit than if we just drew a horizontal line at $y =\bar{y}$ and used that. The distances from the points to the regression line are higher than the distances from the points to the line at $\bar{y}$ (ok thhe sum of squares of the distances is larger). Is that the right logic?


Calling query having multiple IN Clause from JAVA

This query runs fine from SQL Developer : select * from MYTABLE where (field1, field2) IN (('A', '1'), ('B','2'), ('C','3')) ;  But when I try to call it from java I am getting exception.  public List<MYVO> callDB(List<String> sourceAndIdList) {         System.out.println(sourceAndIdList);         String query = "select * from MYTABLE where (field1, field2) IN (:source_monitorId_list)";         Map<String, List<String>> namedParameters = Collections.singletonMap("source_monitorId_list", sourceAndIdList);         return this.namedParameterJdbcTemplate.query(query , namedParameters, new RowMapper<MYVO>() {             @Override             public MYVO mapRow(ResultSet rs, int rowNum) throws SQLException {                 ....             }         });     }   One printing my list I am getting : [('A', '1'), ('B', '2'), ('C', '3')]  Exception:     SEVERE: Servlet.service() for servlet [selfservice] in context with   path [/mymonitoring] threw exception [Request processing failed;   nested exception is org.springframework.jdbc.BadSqlGrammarException:   PreparedStatementCallback; bad SQL grammar [select * from MYTABLE   where (field1, field2) IN (?, ?, ?)]; nested exception is   java.sql.SQLSyntaxErrorException: ORA-00920: invalid relational   operator ] with root cause java.sql.SQLSyntaxErrorException:   ORA-00920: invalid relational operator        EDIT: This is not a duplicate as I am looking for a solution with springs NamedParameterJdbcTemplate for a query having multiple IN clause and the size of parameters are known only at runtime.


English idiom for keeping a lousy employee on the payroll because of his connections?

You know (hypothetical) Larry, the CEO's third cousin, who was hired on an important and well paid position even though he totally sucks at it, dragging the entire department down, but the CEO keeps him and blames everything on lower level employees, reducing their pay and rerouting it to Larry?  Is there an idiom in English for this kind of situation?  To clarify, the idiom should reflect the actions of the CEO. In my native language there is an idiom, roughly translating to "keeping someone on the feeding lot" although I feel like the context is diminished in English, it sounds like fattening cattle, while the original context is "keep feeding someone who hasn't earned or deserved it" but even more pronounced, not simply one who hasn't deserved it, but someone who actually doesn't deserve it.


I want to create a shutdown icon for the launcher in 13.04. In former versions of Ubuntu I used this desktop file and put it in the launcher:  .local/share/applications/indicator-session-shutdown.desktop  [Desktop Entry] Name=Shut Down TryExec=/usr/lib/indicator-session/gtk-logout-helper Exec=/usr/lib/indicator-session/gtk-logout-helper --shutdown Icon=system-shutdown Terminal=false Type=Application OnlyShowIn=Unity; Categories=System; Version=1.0 X-Ubuntu-Gettext-Domain=indicator-session   I wonder if  /usr/lib/indicator-session/gtk-logout-helper --shutdown   is still the correct command in 13.04.  Here is a screenshot with old shutdown dialog:     Here is a screenshot with new shutdown dialog:


I try to write a simple Markdown parser in JavaScript. Therefore I want to check for the [link content][link id] syntax. I use the following code:  data = data.replace( /\[(.*?)\][ ]*\[([0-9]+)\]/g, '$1' );   It works well, but now I want to do this with a RegExp object. So I set up the following bit of code:  var r = new RegExp( '\[(.*?)\][ ]*\[([0-9]+)\]', 'g' ); data = data.replace( r, '$1' );   But it doesn't work. It even says that my regular expression (which works since the first example does a good job) is invalid:     unmatched ) in regular expression   I think it must have to do with some RegExp-object peculiarities I am not aware of. What am I doing wrong and how can the problem be solved?


I have a client who is a event organizer and his clients are both corporates as well as individuals. I have a few questions on how should i organize his accounts   When should one use person accounts?   Do we need to specifically enable person accounts? If so how can we do it? When a lead is converted how does it decide if the account needs to be a person account or Business account?   Thanks


Probability of rolling three different dice

Three fair dice, colored red, blue, and yellow, are rolled once. We denote it by R, B, Y the numbers appearing on the upper side of the three dice, respectively.  (a) $P(R=B)=\frac{1}{6}$  (b) $P(R\lt B)=\frac{1}{2}(1-P(R=B))=\frac{5}{12}$  (c) $P(R=B=Y)=\frac{1}{36}$  (d) $P(R\lt B\lt Y)$  I know how to do (a), (b), (c). I think (d) is $$\frac{\left(^{6}_{3}\right)}{216}$$  but this problem need us to solve it with (c) and symmetry. How to do it?


If Lubuntu uses the same repositories as Ubuntu, can it have OpenShot & GIMP?

I'm using Ubuntu 17.10 and I'm considering switching to Lubuntu since my machine is pretty old for this heavy OS. I read it uses the same repositories as Ubuntu, but when trying Lubuntu from a disk on key the "shop" (app market) did not show GIMP or OpenShot in search.  I noticed Lubuntu has a built in tool similar to GIMP but I would like to use those two I mentioned.  So will I have a problem if I switch?


I've downloaded Ubuntu for the first time on a old desktop because I want to learn how to use Ubuntu as I would any other OS. But the machine is Ethernet only and I don't really want to buy 20M cable or a power line adapter.  I do have a USB wireless network adapter I dug out. So I've downloaded the driver for it and I've also got 'wine-3.0.tar.xz' file onto a USB stick from a different device and put them on the desktop.  But I don't know how to install the wine file onto the system properly to then run the exe file for the driver... Any help?  I've currently tried:  sudo cp ~/desktop/wine-3.0.tar.xz* /var/cache/apt/archives/   (which worked as it should.)  Then:  sudo apt-get install wine   Which didn't work. :(


Ubuntu installation instead of Windows 7

I am  an Ubuntu newbie user. I used Ubuntu on a virtual machine and I liked it very much. Now I want to install it instead of Windows 7 on ''C'' drive. Will that format my other drives too?


Why "Section, Chapter, Table, Figure" are capitalized in articles

The goal of this section is to analyse the features introduced in Section 3 for boilerplate detection.   In books and papers, we see "Figure 1", "Chapter 2", "Section 1", "Table 2". Why are they capitalized?   From my searching, this is recommended by academia, but what is the grammar for it - why no article? Can such things be regarded as proper names? For example we don't say Page 10. I don't think it's a duplicate as I asked for the reason for it.


Search inputs are synced accross applications, how to disable?

A colleague of mine has macOS 10.15 (Catalina) and complained about the following thing: He uses the search bar in Mail and searches for something. Then in Xcode he presses CMD+F and sees the same email address there as the search input. We have checked and that is not in the system clipboard.  This synchronization of search strings might be a helpful idea, but in practice it does not make sense to search for things across applications. Is there some way to disable this behavior?


What is the difference between:   "I promise not to misbehave." "I promise to not misbehave."   as in something a kid would say to convince its parents that it will behave well?


How do I calculate pressure drop across a reduction in pipe diameter?

If reducing from one pipe size to another through a reducing fitting, say 6.25cm to 5cm, how do I calculate the pressure drop?  Also, how does this impact a change in volumetric flow rate (or does it affect the volumetric flow rate)?


Is there a Mac screen capture tool that will export to animated gif?

I'm looking for a screen capture tool working on MacOSX that will export the capture to animated gif.


Is there any option to see how many vertex and faces are on my individual models in Blender 2.92

After activating the Statistics option it shows the total polycount in the viewport. is there any way to see individual objects' polycount? I was wondering is there any way where I can see separately after clicking individual objects polycount. I would like to know is there any option to see how many vertex and faces are on my individual models.


What does "can only heal so much" mean in this sentence?

I found the following sentence in an American novel (this one:  you can read the whole paragraph). A woman broke her wrist and just had her cast removed. She thinks she can start playing piano again, but her wrist still hurts too much. I'm not sure I understand the meaning of the final sentence:  But a body can only heal so much, so fast.  Can someone help me, please?


Create a multidimension list from a range of unique values

I'm trying to create a nxn 2D list where its values starts from 0 to n something like this  [ 1 2 3 4 ] [ 5 6 7 8 ] [ 9 10 11 12]  I tried to use the following code to do it     self.board = [[list(range(n*n) for i in range(self.n)] for num in range(self.n)]  but instead it fills every element in the list with 16 elements What expression should I use to replace list(range(n*n)) ?


Weird processes hogging lots of resources on my MacBook

This is an old screenshot but basically these two processes (eriocaulaceae and stahlhelmer) just popped out of nowhere, and I couldn't find any information online. Just now they were hogging 99% of CPU but it disappeared when I opened stack exchange tab to post this question.  Any help identifying these two processes would be greatly appreciated.  I have mid 2012 MacBook Pro with 10.14.5 Mojaves.


Manual removal of trailing spaces from macros

Suppose I'm defining a macro of some word I'm using a lot: \providecommand{\pv}{\emph{p-valor }} I already put the trailing space because most of the time it'll save from adding it manually (yes, I try to save myself from adding a space). However, sometimes I need to add a comma or something after the command, but using \pv. renders as      With a space after between the stop and the command. How do I prevent this space from appearing after the command? Note that removing it from macro definition is not an option and I'm looking for something between the command and the stop that "eats up" the trailing space.


2.80 Make the data single user. Like pressing U key in blender 2.79

In 2.79 I could press U to make data single user.  How can I do this in 2.80, what is the hotkey?


$(0,1)$ is an open subset of $\mathbb{R}$ but not of $\mathbb{R}^2$, when we think of $\mathbb{R}$ as the x-axis in $\mathbb{R}^2$. Prove this.

It's problem #1 of Chapter 2 in Pugh's book.  I think I got the first part by taking $r=1$ and pointing out that $d(p,q) < 1 \implies q \in (0,1)$ for all $p \in (0,1)$ but I have no idea how to show it isn't a subset of $\mathbb{R}^2$.  I tried proof by contradiction and got no where.  I've been working at this problem for hours and not getting anywhere.  How should I do it?


How to detect character sets encoding for all of language?

I have a .smi file. When i open with notepad++ i had:  - °øµ¿¹ø¿ªÀÌ´Ùº¸´Ï Áö¸í°ú ÀÌ¸§ÀÌ ¾à°£¾¿ Æ²¸±¼ö ÀÖ½À´Ï´Ù.-   Then i set Character sets > Korean > UEC-KR:  - 공동번역이다보니 지명과 이름이 약간씩 틀릴수 있습니다.  -   So, what can i do it in C#? I want when i open a file, app can detect Character sets and display in a richtextbox. I used:  System.IO.StreamReader sr = new System.IO.StreamReader(openFile.FileName); inputText.Text = sr.ReadToEnd(); inputText.SelectAll(); inputText.SelectionFont = new Font("Arial Unicode MS",9,FontStyle.Regular);   Result in inputText:  - ���������̴ٺ��� ����� �̸��� �ణ�� Ʋ���� �ֽ��ϴ�.  -


How to pronounce '-ing' followed by a vowel

I'm getting into English recently and I'm a little confused by the way people pronounce a word that starts in a vowel right after a word ending in -ing.  For example:      You have to bring it up now?   I don't know if I should pronounce it as:   bring /ŋit/ brin' /nit/ bring /git/   Another example would be "I'm coming out".  Likewise, what about the ending -ang? For example:      We can just hang out and have a good time.    And to round it all up, what about a combination of the two? For example,      He got sick of hanging around waiting for you and went home.   I've been asking myself these questions for weeks.


I was trying to run the Windows diagnostic that ships with Sony laptops when it "froze" and I've lost my Linux 12.04 partition. I had VM's and software configured that I can't afford to lose. Please help me return to the state where I was before I tried running that Windows tool.  I am running a Lunux 13.10 LiveCD.   When I run the command: sudo gpart /dev/hda, I get the following output:  *** Fatal error: open(/dev/hda): No such file or directory.   However, when I run the command sudo fdisk -l, I get the following output:  Disk /dev/sda: 640.1 GB, 640135028736 bytes 255 heads, 63 sectors/track, 77825 cylinders, total 1250263728 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x2d85c4ea     Device Boot      Start         End      Blocks   Id  System /dev/sda1            2048    28887039    14442496   27  Hidden NTFS WinRE /dev/sda2        28887040    29091839      102400    7  HPFS/NTFS/exFAT /dev/sda3        29091840  1250260991   610584576    7  HPFS/NTFS/exFAT ubuntu@ubuntu:~$ gpart /dev/hda   How should I proceed?


Do massless particles have a meaning in Newtonian mechanics? Do they have a physical interpretation? Because we don't have an equation of motion for massless particles, we don't have a gravitational potential. We could have electric potential but then we lack the equation of motion. I don't see how they can be a physical object, but I would love to hear from you about this.


Is there a way to make the LaTeX labels appear in the .pdf (say as a note)?

Here's some background: I have multiple chapters in the dissertation I am writing. I have LaTeX-labelled the figures, the table and the equations.  Whenever I add a chapter, I create a .pdf of the entire manuscript written till that point, and then I use it as a source of references (talking material) for the subsequent chapters.  The problem: Say if in Chapter 6 I need to talk about a figure in Chapter 2, I have to open the code document and then hunt for the particular figure label. This task would be immensely simplified if there were some way (perhaps a package) which would add sticky-notes (which seem to be quite common in most PDF readers) to all the labelled elements. The sticky-notes then can be scripted to contain the labels. Of course, for the final documents I will need to disable this feature to reduce the clutter of the sticky-notes.   If you can think of some other workaround to achieve the same end, please let me know as well.


Aligning shapefiles from different ArcMap documents?

I've been working on this one ArcMap document containing a shapefile of Hong Kong (HK) city. I've been adding lots of shapefiles to the city and creating mostly polygons(see below pic). I've made sure my data frame's coordinate system is the same as all the shapefiles in my document which is Hong_Kong_1980_Grid.   Then, I made a new arcmap document and imported an image which showed the vessel fairways of HK. I did not give the image a spatial reference as I can't figure out a way of doing it, but I'm not sure its necessary(?).Anyway, I digitized the fairways, again making sure they had the Hong_Kong_1980_Grid coordinate system. Then, I exported these shapefiles and made sure the coordinate system was the same as the data frame's. I then saved my document and opened back up the HK city ArcMap document. Then I imported the fairway shapefile into the document but found that they were not aligning although they have the same coordinate system. I can't seem to find a good answer online.


Detect and Track Features from Frame 1 using Python

I am trying to detect and track markers in a clip, from the first frame forwards. I am using bpy.data.scenes["Scene"].frame_current = 1 to set the clip to the first frame, followed by detecting and tracking features using: ctx = bpy.context.copy() for area in bpy.context.screen.areas:     if area.type == 'CLIP_EDITOR':         ctx['area'] = area  bpy.ops.clip.select_all(ctx,action='DESELECT') bpy.ops.clip.detect_features(ctx)  bpy.ops.clip.track_markers(ctx,backwards=False, sequence=True)  However, I am struggling to integrate the two components as detect and track runs from the current frame, not the first frame (i.e. if frame 48 is the current frame, the features will be detected and tracked from frame 48 to the final frame, not frame 1 to final frame). Printing the current frame in the python console yields '1' after running bpy.data.scenes["Scene"].frame_current = 1. I can't seem to work out what the issue is here and any help with this would be greatly appreciated! Thanks!(:


Where can I find the downloaded Catalina files to free up the disk space?

I am running macOS Mojave. I've downloaded Catalina, but I regret to install it. The download was completed. Where can I find the downloaded file(s) to free up the disk space?   I haves checked in Applications folder. I checked with find, couldn't find the files.


Do I apply my proficiency bonus to a cantrip attack for a Sorcerer?

I decided to through the Firebolt cantrip into the "Attacks and Spellcasting" box on the character sheet. I understand I use my Char modifier, but do I also apply a proficiency bonus as well to the Atk bonus? Thanks in advance.


Simple app for making Question answer pair table that could be exported in csv format?

I tried Libreoffice, but its Import option while pasting in the cell is very  annoying.I also tried Gnumeric but I am not able to paste using middle button.Parcellite to make copy paste faster and middle button pasting is not working with Gnumeric. Is there any simple table maker app available that can accept only simple unformatted text? All these software are very complicated for this simple work.


My computer is not receiving the 16.04.1 update

I've  that the 16.04.1 update was made public last week. There it says that users of 16.04 should only run the usual system update to receive this upgrade. However I'm not receiving this update at all. I tried with GUI Software Updater as well as Terminal commands sudo apt-get update && sudo apt-get upgrade && sudo apt-get dist-upgrade, to no avail. I've changed the update server from Main to US and back to Main again, no effect. I've changed settings from Any new version to LTS only and back to Any new version again, still nothing.  I would like to know, if I'm not receiving the upgrade, what could be the reason for that, and also how can I make 100% sure that I'm running 16.04 and not 16.04.1? In System Details I can see it says Ubuntu 16.04, does that mean that it's definitely not .1?


How to change object value from another class in Java (look like same as Arraylist)?

I'm confused about ArrayList with another variable that can change the value from another class. I have two classes and two examples with the ArrayList and Object variables. Can somebody help me to understand why it's different and if there is a solution to make it have the same effect? This is the code with ArrayList: import java.util.List;  public class Test {     private String name = "Fifi";          void fill(List<Test> a) {         a.add(this);     } }  import java.util.ArrayList; import java.util.List;  public class B {     private List<Test> a = new ArrayList<Test>();     //a variable is empty      public B() {         // TODO Auto-generated constructor stub         Test oa = new Test();         oa.fill(a);// After this method is called, a variable has change with name is "FiFi"     }      public static void main(String[] args) {         new B();     } }  And then, I have the same form like that with the object variable, but the result is not the same. public class Test {     private String name = "Fifi";          void fill(Test b) {         b = this;     } }  public class B {     private Test a;     // so a variable is null      public B() {         // TODO Auto-generated constructor stub         Test oa = new Test();         oa.fill(a);// after fill method is called, a still null!     }      public static void main(String[] args) {         new B();     } }  What is different from Arraylist and object variables like above? I do not understand the basics of how it's happening!


POI XSSF class Throws NullPointerException when createCell or setCellValue to empty row in existing Excel  If Existing Excel's row is fill with data then .. below code will execute and override the data.. CODE :                    rowsline= sourceSheet.getRow(RowNo);             rowsline.createCell(CellNo);             rowsline.getCell(CellNo).setCellValue(DataValue);             outputStream = new FileOutputStream(file);             srcBook.write(outputStream);   ERROR :        Exception in thread "main" java.lang.NullPointerException       at Source_Program.SourceProgram.SetDataInExcel(SourceProgram.java:146)


I am having problems with my Wi-Fi connection. I just installed Ubuntu 18.04 on my Asus TP500LA, and in the Wi-Fi setting it says "No Wi-Fi Adapter Found"  Can someone please help me figure out this Wi-Fi dilemma. Thank You in advance!  Output of lspci -knn | grep Net -A3:  03:00.0 Network controller [0280]: MEDIATEK Corp. MT7630e 802.11bgn Wireless Network Adapter [14c3:7630]     Subsystem: Foxconn International, Inc. MT7630e 802.11bgn Wireless Network Adapter [105b:e074]


I am doing a LaTex document in VS Code with the extension LaTex Workshop, but when I build the pdf sometimes it delays 30 seconds, or even more, which feel like an eternity. Is it the average time or is there a way to speed it up?


How to publish Unity Game Engine app (executable binary) to Ubuntu Store?

Quite recently  (not to be confused with Ubuntu's Unity user interface) added an option to create a linux build. The result is a set of two executable binary files .x86 and .x86-64, plus a folder with some resources. I have exported my Unity game and it runs great on my Ubuntu machine.  I would like to publish the game on the Ubuntu Store, but I have no idea how to do it, and if it is possible at all. The  instructs me to use Ubuntu SDK for packaging into "click app". When I run the SDK, it asks me what kind of project I want to create, with lots of project type options (QML App, HTML5 App, Web App, Plain C Application made with gmake etc), but I cannot see any way to simply package the existing executable binaries exported from Unity.  Could anyone help? My game (don't want to advertise here) would be a great and free asset in the Ubuntu store, to the benefit of the whole community :)  To clarify: I don't want to publish sources of my app; and of course I am not able to publish any sources of Unity Engine player. I simply want to publish my free app to the store, which I have as binary.


Change Windows 7 explorer "Edit" context menu action for jpg and other image file types

When I right click on a jpg file in Windows Explorer (Windows 7), I see that there is an "Edit" menu item.  If I click this item, it opens the image in MSPaint.  Blah.  I have Paint.NET installed, and I'd like to change the "Edit" action to open the image in Paint.NET.  How can I go about doing this?


Can a system have a negative energy? What is the energy of black hole compared to the normal star?

I thought about gravitational field. In Newtonian mechanics, gravitational energy between two matter is $U=-G\frac{M_1 M_2}{R^2}$ when mass of each matter is M1 and M2, having a distance R. With this equation, I was able to obtain the energy density of the gravitational field. But since Newtonian mechanics are good approximation of relativity, it should be used only in non-relativistic situation. Anyway, I obtained the formula that if the strength of gravitational field(which also means gravitational acceleration) is g, the energy density of field was $u_g=-\frac{1}{8\pi G}g^2$. Now here is my question.  Does gravitational field really has negative energy density? Or is my miscalculation due to an error between Newtonian mechanics and relativity? If so, can a system have a negative net energy?  edit) In the link from comment, there was solution using Schwarzschild raidus. Then what is the net energy difference between black hole with mass $M$ and system with same mass $M$, but nearly no potential energy due to large distane between particles. (Lets assume that black hole is Schwarzschild Black Hole for simple calculation :)


A native speaker said: "I have ever went to"

I heard a guy from Manchester, UK said —     It was the best restaurant I have ever went to.   And Google offers 23 million pages for the query "have ever went to", and only 3 millions for "I have ever gone to".  Is this form correct? Has the grammar changed?


I asked a question on Network Engineering. Question has been put on-hold after less than 10 minutes after creation. While I do not contest the utility of the "on-hold" flag I suggest allowing some time (hours or days) before flagging the question. If Stack-Exchange aspires to be a real open to discussion and open to opinions platform it should give an equal  chance to both parties. Flagging a question shortly after creation kills all chances to be answered by a late reader and demoralizes the asking person who expects something positive, constructive not a door-slam in face. There is a hunt-for-questions and a competition for answering-question-rewards on this site. My personal feeling is the first arrived, if it doesn't know the answer and have enough privileges will flash the question "on-hold" closing all later attempts to answer it. It is detrimental for everyone and for the knowledge base.


Short story with a woman made immortal by nanotechnology, sees end of Earth

Trying to find a short story. I first read it approximately five years ago. It was part of a short story collection from various authors. I can only guess at the original published date, but the paperback I read it in was in good condition and seemed fairly new. Written in English.   Story focused around a woman, who for some reason had been injected/infected with a form of nanotechnology (I think that was the term used). These nanobots initially repaired any injury or damage the woman received. However as the years pass the nanobots have repaired so much of the woman that little or no flesh or blood exists, even replacing elements of the brain. The woman is still lucid and self aware.   The consequence of the repairing is the woman is now unable to die, and immortal (I think). As the years pass by she witnesses the end of the earth and the death of the sun in a supernova.   This is as far into the story as I can remember. If an answer was to include where I can read the story again that'd be great.   I'm familiar with many of the works of classic sci-fi authors, and I believe if I'd heard of the author before I would have remembered their name, and therefore found the story myself.


Why does my Network shows different speed in a Terminal and in the Browser?

I have seen this question:    and this one      and they are old, referring a different version of my current OS   and/or related to a different thing.   My system:   Laptop Dell inspiron 15 3000 RAM: 16 GB SSD 480 GB Kingston Intel Core i3 7th Generation OS: Ubuntu 18.04 with Software and System Updates Web Browser: Mozilla Firefox, Google Chrome, Palemoon. All latest. Terminal emulator: Yakuake, gnome-terminal. Other Terminal: TTY1 Internet service provider connection speed: 100 Mbps (asymmetric)   My connection is showing different speed when running speed tests from terminal emulator, TTY and compared to what the speedtest.net page is showing on a web browser.  Screenshots here:    Firefox results on speedtest.net    Results on Yakuake, using the speedtest command in a terminal. TTY results are the same.  As you can see, the web browser shows I have 94.07 Mbps upload but the terminal shows only 4 Mbit/s.  Additional Questions   The results I am receiving in the terminal are real or is the web browser the real speed on my computer? Is the terminal "locked" on the Internet speed? If the answer to the previous question is "Yes", how can I unlock it? If the answer to question 2 is "No", how can I make sure the web browser shows the real Internet connection speed? Is it there a difference between "Mbit/s" and "Mbps"?   I have noticed some low speed when downloading large files, but had no problem until today, when I noticed that big files are delaying a lot uploading. And after checking out my logs on one of my local computers, which automatically uploads large files to a web server, I can see it is taking a long time to upload the file.  If you need further information about my system or connection, please let me know.


A while back, there was a question on here about . One statement in particular struck me:     The foundation of academia is production and dissemination of knowledge [...] Likewise, since it is such a foundational and corrosive problem, an institution can be badly damaged by tolerating it or by gaining a reputation for tolerating it   It struck me because, having been a teaching assistant in graduate school has made me develop a type of -esque outlook on academia. I understand that certain societal problems are extremely complex and multi-layered but, I've seen a lot of things that have made me uneasy. These things are: grade inflation, revision of courses so that they will have a higher success rate, teachers not giving grades for the entire semester for coursework and so on. Therefore I ask; is reputation really so important to a school that things such as this are really necessary to improve the statistics in the school's favour?  In my university, there are students who, no matter how hard a course is, will thrive and those are usually the ones who tend to become good researchers. So by permitting the aforementioned practices are we "softening" our researchers?


Mechanical cause of loss of consciousness

Consciousness is an electrical and chemical interaction in the brain, caused by neurons firing and chemical interactions. How does a mechanical "force" cause this to stop working?  i.e. How does a mechanical action (such as a punch to the head) cause this electrical/chemical system to stop working (leading to unconsciousness)?


How do I run software as an administrator using Wine/PlayonLinux?

Today I was wondering if I could run a Program I installed on a virtual drive as an administrator?  I installed Cain and Abel on this drive, When I run the program it works fine. But in order for it to actually work, you need to run as admin.  Does anyone know how I can accomplish this?


Why `kill %jobnumber` not working on stopped jobs?

I'm running few tasks side by side on an ubuntu 18 LTS. So I'm switching between these jobs by running  # command & # fg # fg -   (Also) use of Ctrl+z sometimes to send running job to background.  Say I have 3 jobs in my list  # jobs [1]+  Stopped                 nano /etc/nginx/site-available/blog.conf [2]   Stopped                 top [3]-  Stopped                 nano script.sh   I can successfully switch between these, but when I run kill command on these, jobs still showing in the list, none gets killed, I wonder why?  # kill %1   I list again, and jobs are still there.  # jobs [1]+  Stopped                 nano /etc/nginx/site-available/blog.conf [2]   Stopped                 top [3]-  Stopped                 nano script.sh


Why my reputation decreased on Stack Overflow ?

I can not find any proper reason for that. As the reputation Tab is not Showing any red coloured -reputation. Yesterday Night when I logged off it was 157, and on morning it is 153, I want to learn from my mistakes but where I committed it, I can not figure out?


How do I lower processor usage to its bare minimum operating?

I am running on Windows 7 and I have the habit of not turning off my computer at all. This is due to me hosting some services on my pc that have external users.   The question here is, how do I lower CPU usage and power consumption to its minimum yet keep the services working? Things such as screen rendering should not need to run when i am sleeping or not using the computer. How to I tell the PC to turn off Display on the press of a button? Additionally, what else can I do to lower power consumption?


Story identification - Fabled spaceship wreck discovery leads to planet full of descendants

This is a book I've read a few (4-5) years ago and I do not believe it's from the Golden Age of SciFi. A guy working for the Space Survey Service (?) in charge of exploring new stellar systems stumbles upon a spaceship lost for centuries then is killed by greedy treasure hunters (?). An antiques / space souvenirs dealer finds a coffee mug and uniform patches of the long lost ship and traces them back to the Survey officer. He then buys the dead man's survey ship and is able to crack its memory banks and find the wreck which leads him to its sistership wreck orbiting around a planet where the descendants of the two ships live in complete ignorance of the rest of mankind. Thanks for your help :)


Gmail won't send to a real address; what can I do about it?  I get the error below (numbers are changed to #, letters changed to X):     The address "######@xxxx.xxxxxxx.lg.jp" in the "To" field was not recognised. Please make sure that all addresses are properly formed.


How can I compute the following limit, and is there a general method to resolve problems of this type?  $$\lim_{x\to\infty}x\left[\left(1+\frac{1}{x}\right)^x-e\right]$$


How to upgrade an iPad to iOS 8 from iOS 7?

I have an iPad running iOs 7.x  I want to install an app which requires iOs 8.0 or newer. But for compatibility reasons I can't install iOs 9.x yet, as it may break some existing app.  Is there a way to install iOS 8 from iOS 7 ?  P.S. If it's possible I'd rather not to downgrade, that is I would like to install directly iOs 8 instead of installing 9 and then downgrading to 8 somehow.


Fundamental difference between microcontroller and PLC

I am a teaching assistant for a sophomore mechanical engineering laboratory course. One of our lab modules is focused on PLCs, and another uses Arduino micro controllers. One of my students asked why they are different and I found myself without a good answer.  They both have input and output pins, perform logical operations, and are programmed via regular computers. They can be used to control the same equipment, read the same sensors, and make the same logical decisions. The differences in programming languages and the fact that they look and feel very different seems superficial. Is there a fundamental difference between the two, or is a PLC just a micro-controller designed to work in an industrial environment? How can I explain this difference to a sophomore college student with no background in electronics?  A good answer will either answer my question or offer a useful frame challenge; I may be asking the wrong question entirely.


I am looking for a possibility to make a one-to-many table-join in QGIS. I have a shapefile with postal codes and would like to join them with survey results (more than one). In other words, there is a specific postal code (shapefile) on one side and there are many survey participants on the other side. postal **code1** ----- survey participant **1** postal **code1** ----- survey participant **2** postal **code1** ----- survey participant **3** postal **code2** ----- survey participant **1** postal **code2** ----- survey participant **2** and so on ...  If I do a normal join (right click on Layer --> Properties --> Join) , I just get the first entry of the table with the postal codes. I found out a way to do it ArcGIS with the tool "Make Query Table", but I´m looking for a possibility to do it in QGIS.


What is the lifetime of a typical hard disk?

What lifetime can be expected of the typical hard disk? Or are there big differences between different types? And does it make a difference if it is used heavily instead of never being connected to system (for example serving as a backup medium)?


sizeof is not returning correct size of LPVOID variable

sizeof is not returning the size of Data to which tData is Pointing my compiler visual studio c++ 2012  bool FixReloc(LPVOID pModule,LPVOID tData,LPVOID pAddressNew,DWORD pAdrressOld,WORD fImageX64) {     DWORD iDelta = (DWORD)pAddressNew - pAdrressOld;     long iSize =  sizeof (tData);   iSize was 4 but when i create tData i did that  byte* tData = new byte[2057]; relocRaw = reinterpret_cast<byte*>(pointerToRawData + (virtualAddressBaseReloc - virtualAddress));   iSize should be 2057 any solution?


I have a number of clients that will never see an Internet connection, thus will never receive Windows updates that I need to somehow make happen.  I read a SuperUser suggestion from 2009 that spoke of Windows Server Updates.  I tried to download and install it on my Windows 8 (Internet connected one) and it said it was incompatible.  Any ideas as to where I can go to get the latest Win 7 and XP updates, burn them to disc and manually update my clients?


I'm just beginning to learn java and I'm figuring out method calls. I wrote the code below, so the method 'calling' uses the method 'called' to add 1 to 'number', but it doesn't seem to be executing properly. here's the code:  private void calling(){      int number1 = 4;       int number2 = 2;       called(number1);      System.out.println("number1 = " + number1);     System.out.println("number2 = " + number2); }  private void called(int number1){       number1++;  }   and then the output I want is 'number1 = 5' & 'number2 = 2', but instead i'm getting this:       number1 = 4      number2 = 2   is there something I'm missing? thanks in advance!


Is it possible to install Linux as a standalone OS with a UEFI system that came preinstalled with Windows 8?

I've tried installing Ubuntu several times as a standalone OS on my Toshiba Portege z935 which has a UEFI Bios and came pre-installed with windows 8 and it does not work. Is it really only possible to dual boot with Windows 8?


What's the difference between you, you had, you have?

Are these all interchangeable or do they have different meanings? Someone you loved. Someone you had loved. Someone you have loved.


Which story is true at end of the movie "Life of Pi"?

At the end of the movie  Pi tells us two stories. One with the tiger (unrealistic) and one without the tiger (realistic).  I believe that he was metaphorically referring himself as the tiger who enters the forest (world) after being rescued.  Is my thinking correct? can you explain me the ending?  At the end did Irfan Khan (older Pi/narrator) say that "even God chose the first story"? Does it mean that the first story was indeed real?


Is it possible to pass the name of the Quick action button that initialized the lightning component?

IE i have a request for a classic to lightning conversion.  There's two buttons that exist that pass parameters to a new record creation page (modal in lightning). One button creates a opp of recordtype x the other of record type y, and they also pass different values over.   I was going to go with a Click the quick action --> component front end shows a picklist of record types, pick one and pass it to a a function that does the e.force:createRecord but with a switch depending on the record type, but they don't want that because...well you know how sales people are. So it had me thinking, i can pass the sObject from a page a quickaction-->cmp is initialized from.....you can in fact pass a lot of information.   But can you pass the name of the quick action that initialized the component to the component? Then do something like this.  showCreateRecordModal : function(component, recordTypeId, entityApiName) { debugger; var objectType = component.get("v.quickActionName"); var createRecordEvent = $A.get("e.force:createRecord");  console.log('QA name is TYPE IS: ' + JSON.stringify(quickActionName)); if(createRecordEvent){      if(recordTypeId){         //using switch if sobject type needs to be expanded (it's a cleaner way than if/else)         switch (quickActionName) {             case "Create_International_Opp":                     createRecordEvent.setParams({                         "entityApiName": entityApiName,                         "recordTypeId": <record type y>,                         "defaultFieldValues": {                            data to be passed,                         }                      });                     createRecordEvent.fire();                     break;             case "Create_domestic_Opp":                 createRecordEvent.setParams({                     "entityApiName": entityApiName,                     "recordTypeId": <record type x>,                     "defaultFieldValues": {                          data to be passed,                      }                 });                 createRecordEvent.fire();                 break;         }


sources.list file malformed Ubuntu 18.04

Now I get this error:  WARNING:root:could not open file '/etc/apt/sources.list'   I would somehow like to get my original file back, plus some good instructions about how to install R that won't corrupt it.    ok - copied old version. Looks like the version after some program copied in the sources for the R package. Now get error:  sudo apt-get update E: Malformed entry 50 in list file /etc/apt/sources.list (absolute Suite Component) E: The list of sources could not be read.   Here is the file - what I think are lines  49 - 51. (Got an error about too many links when I tried to include the whole file)  # deb-src http://security.ubuntu.com/ubuntu bionic-security universe deb https://cloud.r-project.org/bin/linux/ubuntu bionic-cran35/ apt update sudo # deb-src https://cloud.r-project.org/bin/linux/ubuntu bionic-cran35/ sudo apt update   (The first and third line start with #)    Ok - now tried gedit with line numbers on as you suggested. Just deleted line 50. Now get update is running. Don't know if R will actually install but this solves the issue I posted here. How do I accept your answer? And thank you very much for all your help.


I'm fairly new to blender so I don't for sure that what I'm doing is correct. But I need recreate this jar.  I got as far as the overall shape. But now I have to put the dents at the bottom in and I don't know how to best do that.  I've tried to make a displacement map with Photoshop but that turn the render very dark, almost black even. It seems like a lot of shading issues are happening.  How do i get the dents correct without artifacts and render issues?


How can I make my procedural brick texture map correctly to both a cube and cylinder?

I've been experimenting with node-based procedural materials in Cycles lately, and after spending a few hours working out a brick material that works pretty well along walls, I noticed that it has a few issues. Here's my initial setup:    It's not perfect, since it switches the different orientations in an all-or-nothing way, but for my purposes, it looks good enough.  So I went ahead and used this throughout my test scene. But then I turned the camera around and looked at the other side, and... there's something wrong with the side of the cube facing away on the X axis!    This isn't a huge issue, because I don't plan to render my objects from that angle, but I'm concerned about the way it will affect reflections, light bounces, etc. so I started looking around for other solutions. I happened on this thread at Stack Exchange:   Particularly, Rich Sedman's answer seemed promising (since I'm trying to avoid using UV mapping). Following what he posted, I created this:    This new setup works great for the cube - on every side - but you can see pretty plainly that the cylinder, strangely, has problems. By the way, there is a part of the node setup that I omitted from the screenshot that isn't really relevant here - it checks the Z value of the geometry surface and subs in the default vectors for the texture coordinates if Z is over a certain amount, for sides that face upward.  I've been experimenting with this for a few more hours now, but I'm afraid I've reached my limits in terms of vector math.  Is there anything obvious I'm missing here that might help fix this, and make this setup work for both the cube and cylinder?


I'm working on writing a program that requires two methods based on the user option. When prompted, the user selects whether or not they want to count vowels or words. Once they select their option, I need to print their result, and keep asking for more inputs until they enter "q". One of the methods outputs the number of vowels in a word, and the other puts out the numbers of words in a sentence, but it isn't working. I'm new to programming and have a very basic understanding, so my options for answers are limited. Here's what I have so far:  *I've fixed my = versus == sign issue. The first thing that comes up when I try to compile is incompatible types between char and a java string. I'm not sure how to tell the computer to look for a letter as an option to begin the rest of the program.        import java.util.Scanner;     public class MethodTester     {        public static void main (String[] args)        {     Scanner in = new Scanner (System.in);    System.out.println ("Please enter 'v' to count vowels or 'w' to count words.");    String count=in.nextLine();    char choice = count.charAt(0);    boolean done = false;     while (!done)    {    if (choice == "v")    {         Sytem.out.println("Please enter a single word or press q to quit.");        string str = in.nextLine();         System.out.println(str+" has "+str.countVowels+"Vowels.");        return countVowels;      } else if (str == "q")         {done = true;          }  else if (choice == "w")        { System.out.println("Please enter a sentence or phrase or press q to quit.");          string str = in.nextLine();            System.out.println(str+ " has "+ str.countWords+"words.");          return countWords;            } else if (str == "q")         {done = true;         }         }         System.out.println("You have quit.");   }          public static int countVowels (String str)        {char c=str.charAt(0);    int length = str.length();    int count = 0;    int location = str.charAt(0);     do{        if (c=="a" || c=="e" || c=="i" || c=="o" || c=="u" || c=="A" || c=="E" || c=="I" || c=="O" || c=="U" ){         location++;         count++;         c++;     }}     while(location<length);     return count; } public static int countWords (String str) {     int countWords=0;     boolean word = false;     int endStr = str.length() -1;      for (int i=0; i < str.length(); i++)     {         if (Character.isLetter(str.charAt(i)) && i != endStr)         {             word = true;         }         else if (!Character.isLetter(str.charAt(i)) && word)         {             countWords++;             word = false;         }         else if (Character.isLetter(str.charAt(i)) && i ==endStr)         {             countWords++;         }     }     return countWords; }        }


Why do gravitational mass and inertial mass appear to be indistinguishable?

I have learnt that heavier the object is (the more gravitational mass it has), the more resistance to the change of motion it is (the more inertial mass it has).  I can accept this fact but I can't find out the reason behind it. What dynamic, what phenomena could cause this? Does it have something to do with the atomic structure of the object?


I have setup my mythtv server (runnning ubuntu 12.04) to have a static IP address.  This is required because the IPAddress must be hardcoded in the mythtv server settings and if it changes the the mythtv client will not be able to connect.  I did this using the UI (command line answers will not be accepted) using: Network Connections -> Wired -> Edit -> IPv4   and setting the settings as follows:    This works great for mythtv however I can no longer access the internet via domain names. if I use the IPaddress it works but I can't resolve the DNS entries.  If I look at Connection Information UI it does not list any Primary DNS: (entry is not there at all) like it is when on DHCP.    How do I configure my DNS with a static IPAddress using the GUI?


How can I add an empty directory to a Git repository?

How can I add an empty directory (that contains no files) to a Git repository?


If a function has a finite limit at infinity, does that imply its derivative goes to zero?

I've been thinking about this problem: Let $f: (a, +\infty) \to \mathbb{R}$ be a differentiable function such that $\lim\limits_{x \to +\infty} f(x) = L < \infty$. Then must it be the case that $\lim\limits_{x\to +\infty}f'(x) = 0$?  It looks like it's true, but I haven't managed to work out a proof. I came up with this, but it's pretty sketchy:  $$ \begin{align} \lim_{x \to +\infty} f'(x) &= \lim_{x \to +\infty} \lim_{h \to 0} \frac{f(x+h)-f(x)}{h} \\ &= \lim_{h \to 0} \lim_{x \to +\infty} \frac{f(x+h)-f(x)}{h} \\ &= \lim_{h \to 0} \frac1{h} \lim_{x \to +\infty}[f(x+h)-f(x)] \\ &= \lim_{h \to 0} \frac1{h}(L-L) \\ &= \lim_{h \to 0} \frac{0}{h} \\ &= 0 \end{align} $$  In particular, I don't think I can swap the order of the limits just like that. Is this correct, and if it isn't, how can we prove the statement? I know there is  already, but I think this is different in two aspects. First, that question assumes that $\lim\limits_{x \to +\infty}f'(x)$ exists, which I don't. Second, I also wanted to know if interchanging limits is a valid operation in this case.


"The Owls Are Not What They Seem" vs "Owls Are Not What They Seem".  This is a popular statement from Twin Peaks TV series, but is there any difference if you put "The" at the beginning or not?


Software Updater: Broken Update UBUNTU 16.04

I am using Ubuntu 16.04. Following error is coming while updating through Software Updater.  The repository 'http://download.opensuse.org/repositories/home:/sarimkhan/xUbuntu_14.04 ./ Release' does not have a Release file. N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use. N: See apt-secure(8) manpage for repository creation and user configuration details. E: Failed to fetch http://download.opensuse.org/repositories/home:/sarimkhan/xUbuntu_14.04/./Packages  404  Not Found [IP: 195.135.221.134 80] E: Some index files failed to download. They have been ignored, or old ones used instead.   How to solve this?


Examples of nowhere continuous functions

Do you know examples of nowhere continuous functions, besides the Dirichlet function and its modifications?


Unable to update Ubuntu 17.04 to 17.10 Hash Sum mismatch error

I tried going to the the links mentioned below. I tried changing the servers. Still i am getting the Hash Sum MisMatch Error. I tried updating using the terminal and using the software updater.  How do i proceed to  update?


Terminal autocomplete: cycle through suggestions

I had this on my Ubuntu setup and since I switched to Fedora I want to set it and I forgot how... The idea is simple :   I don't want the terminal to show me suggestions when I double tab, instead I want it to cycle through every possible suggestion with each press on tab... this can be done in Vim also.   So when I type gedit a and press tab it will show me every file with a first letter a.


I want to prevent the user from being able to stream to remote speakers with any client on their laptop. Is there a way to globally disable AirPlay on a Mac OS X (10.6 or 10.7) system?


Is there a Stack Exchange site for product recommendations?

Searching for things online is pretty easy since the invention of search engines. However, there are situations, where you are searching for a product with specific details, which can be a very long process.  For example, just a couple of days ago I was searching for an open-source talking caller ID app for Android, and it was very hard for me to find one finally. (Just incase someone came here from a search engine, the app I have found is called Announcify.)  So, is there such a thing as a Stack Exchange site for asking other people if such a thing exists, or is it allowed to ask if such a thing exists on the product's related Stack Exchange site? That is for example, if you are asking if a programming tool exists, can you ask it on Stack Overflow? If no, why isn't this the case? It would be very helpful.


One of the project that I've been working on is to create a word counter, and to do that, I have to effectively remove all punctuation from a string.   I have tried using the split method and split at punctuation, however, this will later make the list very weird (from separating at a word to having a list that has 5 words). I then tried to have a list or a string full of punctuation, and use a for loop to eliminate all punctuation, but both are not successful  content_string = "This, is a test! to see: whether? or not. the code can eliminate punctuation" punctuation = list["'", '"', ',', '.', '?', '!', ':', ';', '()'] for i in content_string.lower():     if i in punctuation:         i = i.replace[i," "]     else:         i = i   It says that     "TypeError: 'type' object is not subscriptable"   This message appears both when using a string or using a list.


How to install vanilla gnome on ubuntu 17.10?

Ubuntu 17.10 comes with modified gnome. I would rather use vanilla gnome the way i like it.  How can i install it?


There are many, many old posts on meta asking for suggestions on how to better organize favorites.  ,  and , among others.  This is not meant to be an open discussion on how to improve favorites, but rather a specific feature request that I'd like feedback on.      I would love to see a feature added that would let users arbitrarily create "groups" of favorites, and drag individual favorited questions under these groups.  I have about 2 pages of favorites (I know others have much more), and finding an individual one is quite difficult, especially since the specific question title is usually forgotten.  I just added  to my favorites, since I liked Andrew Whitaker's answer, and might want to come back and look at it later; I'd love to add this to a group called, say, "Useful Code".    I've favorited other posts since they had neat tricks in them, or because there were answers written on interesting theoretical computer science topics.  Having different groups for all these areas would be immensely helpful in finding posts later.


Joint distribution of range $(R=X_n-X_1)$ and mid-range $(V=\frac{1}{2}(X_1+X_n)$order statistics

Let $X_1,X_2, \ldots , X_n$ be independent and identically distributed Uniform random variables on the interval (0, a) for a > 0, each having a density function $f(x) = \frac{1}{a}$, $0<x<a$. Let $X_{(1)},X_{(2)}, \ldots , X_{(n)}$ denote the order statistics. The range of the data is defined as $R = X_{(n)}−X_{(1)}$ and the midrange is defined as $V = \frac{1}{2}(X_{(1)}+X_{(n)})$ Derive the joint distribution of $(R, V )$ and deduce the marginal distributions of $R$ and $V.$  Attempt:   First I am attempting to generate the joint distribution of $(V,X_{(1)})$ and then integrate out the $X_{(1)}$.   For the joint distribution of $(V,X_{(1)})$ I have:   $$ f_{v,x_{(1)}}(v,x_{(1)})=2n(n-1)\int_{-\infty}^v [F(2v-x_{(1)})-F(x_{(1)})]^{n-2} f(2v-x_{(1)})f(x_{(1)}) \, dx_{(1)}$$  At this point I have no idea how to integrate out the $x_{(1)}$.  Edit: I have located the joint distribution of the range and mid-range:  $$ f_{r,v}(r,v) = n(n-1) \left[F\left(v+\frac{r}{2}\right) - \left(F\left(v-\frac{r}{2}\right)\right)\right]^{n-2} f\left(v-\frac r 2 \right) f(v+\frac{r}{2})$$  For each marginal distribution, I have to integrate out:  $$ f_r(r) = \int_{-\infty}^\infty n(n-1)[F(v+\frac{r}{2})-(F(v-\frac{r}{2})]^{n-2}f(v-\frac{r}{2})f(v+\frac{r}{2}) \, dv$$  $$ f_v(v) = \int_0^{\infty}n(n-1)[F(v+\frac{r}{2})-(F(v-\frac{r}{2})]^{n-2}f(v-\frac{r}{2})f(v+\frac{r}{2}) \, dr$$


I deleted files from my Linux box's /boot directory and now it won't boot

I deleted files from /boot to save space, but now when I boot I see:     GRUB loading, please wait ... ERROR 15   /boot still has files corresponding to the 2.6.32-27 version of Linux. But I deleted all others that did not have that string in /boot  How can I fix this?


General trigger bulkification - best practices

A general question asked from time to time on stack exchange is question of trigger bulkification.  Therefore I have 2 questions:   Which best practices are you using? What is the best way to handle updates of more than 200 records? (In case of more than 200 records the trigger is executed more than once.)


I'm looking for recommendations on how best to abbreviate the following demographic income range:     1 below 3,000,000 Japanese yen (JPY)   2 between 3,000,000 and 4,999,999 JPY   3 between 5,000,000 JPY and 7,999,999 JPY   4 8,000,000 JPY and above   Would it be correct to rewrite as:     1 below 3M JPY    2 between 3M and 4.9M JPY   3 between 5M and 7.9M JPY   4 8M JPY and above   Should the M for million be in caps or lower case, and should there be a space between the number and the m?


I can login to Mojang but can't login to Minecraft.net

I bought Minecraft yesterday and had so much fun. I heard about skins from my friend and decided to change it. I went to minecraft.net and tried to log-in, but I couldn't. I logged in succesfully at account.mojang.com though. I also bought Minecraft at account.mojang.com too with a gamecard at Walmart. How do I migrate my mojang account to Minecraft?


I lost all my progress in pokemon go after deleting app?

I deleted my Pokemon go app and reinstalled, in turn I lost all my data and had to restart. But my "nick name" is already taken . So is my account still valid ? How do I recover it?


Redirect, Change URLs or Redirect HTTP to HTTPS in Apache - Everything You Ever Wanted to Know About mod_rewrite Rules but Were Afraid to Ask

This is a  about Apache's mod_rewrite.   Changing a request URL or redirecting users to a different URL than the one they originally requested is done using mod_rewrite. This includes such things as:   Changing HTTP to HTTPS (or the other way around) Changing a request to a page which no longer exist to a new replacement. Modifying a URL format (such as ?id=3433 to /id/3433 ) Presenting a different page based on the browser, based on the referrer, based on anything possible under the moon and sun. Anything you want to mess around with URL   Everything You Ever Wanted to Know about Mod_Rewrite Rules but Were Afraid to Ask!  How can I become an expert at writing mod_rewrite rules?   What is the fundamental format and structure of mod_rewrite rules? What form/flavor of regular expressions do I need to have a solid grasp of? What are the most common mistakes/pitfalls when writing rewrite rules? What is a good method for testing and verifying mod_rewrite rules? Are there SEO or performance implications of mod_rewrite rules I should be aware of? Are there common situations where mod_rewrite might seem like the right tool for the job but isn't? What are some common examples?   A place to test your rules  The  web site is a great place to play around with your rules and test them. It even shows the debug output so you can see what matched and what did not.


Characteristic polynomial $g(x)$ of $\alpha$ over $K$ of a finite extension field $F$

Let $F$ be a finite extension of the finite field $K$ and $\alpha \in F$. The mapping $L: \beta \in F \mapsto \alpha \beta \in F$ is a linear transformation of $F$, considered as a vector space over $K$. Prove that the characteristic polynomial $g(x)$ of alpha over $K$ is equal to the characteristic polynomial of the linear transformation $T$; that is $g(x) = det(xI - L)$, where $I$ is the identity transform.


I signed up for stack exchange about a year and a half ago, and have it signed in on my phone and can (clearly) ask questions. I want to sign in on my laptop, but it keeps saying that there is no account under any of my e-mail addresses, and none of the external sign ins are associated with my account. Is there any way I can get into my account, or an I just going to have to start over?


I'm learning C#, so I made a little C# program that says Hello, World!, then compiled it with mono-csc and ran it with mono:  $ mono-csc Hello.cs $ mono Hello.exe Hello, World!   I noticed that when I hit TAB in bash, Hello.exe was marked executable. Indeed, it runs by just a shell loading the filename!   Hello.exe is not an ELF file with a funny file extension:  $ readelf -a Hello.exe readelf: Error: Not an ELF file - it has the wrong magic bytes at the start $ xxd Hello.exe | head -n1 00000000: 4d5a 9000 0300 0000 0400 0000 ffff 0000  MZ..............   MZ means it's a Microsoft Windows statically linked executable. Drop it onto a Windows box, and it will (should) run.  I have wine installed, but wine, being a compatibility layer for Windows apps, takes about 5x as long to run Hello.exe as mono and executing it directly do, so it's not wine that runs it.  I'm assuming there's some mono kernel module installed with mono that intercepts the exec syscall/s, or catches binaries that begin with 4D 5A, but lsmod | grep mono and friends return an error.   What's going on here, and how does the kernel know that this executable is special?    Just for proof it's not my shell working magic, I used  (aka sh) to run it and it still runs natively.    Here's the program in full, since a commenter was curious:  using System;  class Hello {   /// <summary>   ///   The main entry point for the application   /// </summary>   [STAThread]   public static void Main(string[] args) {     System.Console.Write("Hello, World!\n");   } }


Ubuntu 16.04 and 17.10 do not perform well for me. What should I install instead?

In another question of mine, I reported that Ubuntu wasn't working well, and the only answer I got said that Ubuntu 17.10 has bad memory usage, and recommended I move from Ubuntu to Xubuntu, Lubuntu, etc.  My question is, should I move to a different Linux system (I want a faster yet beautiful one) or move to a older Ubuntu version? I have tried 16.04 (with unity) and now I have the 17.10, both of them give me problems.  Once again, my specs are:   2 GB of RAM Intel Core 2 Duo CPU T6570 2.10GHz x 2 64 bits 500 GB of Memory My graphics card is NVIDIA GeForce 9300M GS - 256 MB, Núcleo: 580 MHz, Memoría: 702 MHz, GDDR3 VRAM, 7.15.11.7482 (ForceWare 174.82), it seems that Ubuntu doesn't recognize it, what Linux distro will?


Can anyone help me in interpreting PCA scores? My data come from a questionnaire on attitudes toward bears. According to the loadings, I have interpreted one of my principal components as "fear of bears". Would the scores of that principal component be related to how each respondent measures up to that principal component (whether he/she scores positively/negatively on it)?


It says that Sauron waited over a thousand years or more laying dormant regaining his strength after being destroyed when his ring was severed from him. But does the text say how he actually recovers strength?


In math mode, I would like to have a variable both bold and italic. To do so, I used the code below, assuming that variables in math mode are italic automatically. $\mathbf{p}$-dimensional  However, the result of this code is as follows:  What can I do to have the letter 'p' italic here?


free module implies surjective map of affine schemes

If $A\to B$ is such that $B$ is a free $A$-module, is it true that $Spec(B)\to Spec(A)$ is surjective? I suspect it is true that there is a projection $B\to A$ so that the composition $A\to B\to A$ is the identity map (of rings), but I'm not sure.


How to create a text file to run wine application on ubuntu 18.04?

I have installed a windows application using wine and I tried to create a text file on desktop containing the following line:  wine ".wine/drive_c/Program Files/app1/app2018/app.exe"   then I saved the file as a .sh file and I made the file executable to be able to open this application directly by double clicking the text file, but it didn't work.  Note that when I write the same line in terminal the application opens directly with no problems.  Any ideas please?