I met a problem when I want to remove a specific Node from a NodeList,  void removeNode(Node head, int value){     if (head == null) {         System.out.println("error : Null linkedList");     } else {         Node cur = null;         if (head.item == value) {             //The problem is here.             head = head.next;         } else {             cur = head;             while( cur.next != null && cur.next.item != value) {                 cur = cur.next;             }              if(cur.next != null && cur.next.item == value){                 cur.next = cur.next.next;             }         }     } }   as you know that the form of a Node is defined:  public class Node{       int item;       Node next;   }   and my test goes like this:   void test(){     Node node1 = new Node();     Node node2 = new Node();     Node node3 = new Node();     Node node4 = new Node();      node1.item = 1;     node2.item = 2;     node3.item = 3;     node4.item = 4;      node1.next = node2;     node2.next = node3;     node3.next = node4;     node4.next = null;  }   It went well when I do       removeNode(node1,2);     removeNode(node1,3);     removeNode(node1.4);   but I can't remove the first node      removeNode(node1,1);   It doesn't work, So I set a debug point at this sentence. In debug mode, I saw clearly that after executing this sentence, "node1 " turns to be "node2" whose "item" equals to "2". But after exiting the whole "removeNode", node1 returned to original "node1" whose "item" equals "1".  I thought that the "head" I use in the method is a copy of the node1, but I learned that Java always use reference passing parameters. I am confused what "head" really is inside the method.

I always thought Java uses pass-by-reference. However, I've seen a couple of blog posts (for example, ) that claim that it isn't (the blog post says that Java uses pass-by-value). I don't think I understand the distinction they're making. What is the explanation?


I am using AJAX requests (jQuery) for getting collections of data. Some of the endpoints support extra options for filtering out data (eg api.com/users/?name=chr)  When the data parameter (eg name) is empty, I don't want the request to send it.  I've tried this {name: name !== '' ? name : null} but the request is sending the 'name' parameter as empty string (eg api.com/users/?name=&anotherparam=value)  [EDIT]  Because it got marked as duplicated due to the fact that a possible solution would be to remove empty properties from the data object that is sent, I want to clarify that firstly I wanted to use a feature (parameter omitting) of the framework (in that case jQuery) if that exists, which as I state in my answer, does.

How do I remove all attributes which are undefined or null in a JavaScript object?  (Question is similar to  for Arrays)


Let's put an object (hypothetical superman) inside a "well sealed" box containing only mirrors. Is it possible to create number of images that will be close to infinity, assuming that resolution of our superman's eye is very small (infinitesimal) and he can observe and count all the images that he observes of himself.  If we assume that mirrors will leak some energy, then is it possible to put objects such as a photo multiplier tube (in combination with a mirror) and adjust it in such a way that only the amount of energy lost by reflection of the mirror is recovered and sent back to the other mirror.  What are the other hurdles ?

What happens when you place two mirrors facing each other? Is it possible to have an infinite amount of reflections?


For several decades I've observed in westerns that during gun fight scenes, it appears that someone out of frame is firing frangible projectiles (chalk?) very close to the actors. Seems to illustrate bullet strikes well enough but seems really risky for the actors since they are not wearing eye protection. Am I correct that projectiles are fired at the actors? Did anyone ever get hurt?

For example, in "Matrix Reloaded", we see that the agents fire on the car driven by Morpheus. We see that the bullets penetrating the body of the car.  If the gun is not real, how did it happen?  If the gun is real, how did they maintain the safety of the actors?


Where should I ask a question that has to do with "working your way around a program"?  Here's the question:     I have 2 monitors (they are different sizes). I'm trying to view and   edit the code (HTML, css, JavaScript) in one screen, and have the   live/preview window at the second screen. There doesn't seem to be an   easy way to do this. Do you have any suggestions?

There seems to be more than a few computer science/programming Stack Exchange networks (is that the correct term?). Stack Overflow, being the first, has by far the most users, questions, and answers.  What is the reasoning for creating the others, and are there clear guidelines for which kinds of questions should be posted? I can see a large amount of potential overflow, many cases of people not getting a good answer to their question, because the person who has the answer isn't browsing that particular network at the moment.  I understand that they were probably created for organizational purposes, but wouldn't it almost make more sense to just have them as categories under Stack Overflow, keep them separated but still connected, instead of making people have to create multiple 'account's, one for each network?  I am sure there was a very good reason to break them up, but as someone that is new to SE, it can be somewhat intimidating to decide which one to post in to ensure you get a good answer. For example, if I am a computer science student, my first instinct might to be to post in the computer science network, until I see that it literally has 1% of the users as the Stack Overflow network, which still seems to be for programming/computer science related questions.  So my second instinct would then to be to post it into the Stack Overflow site on the basis that I have a significantly higher chance of my question being seen and getting a good answer. Then I notice that there is also a 'programmers' network, and I don't even begin to know where that fits in. I, and I am assuming most people, will probably just post on Stack Overflow to be safe.  My question is, other than the short little description blurb of each one, is there a clear cut set of guidelines which what each network is intended for, what kinds of questions should go to each one, and is anything being done to encourage people to post in these newer, smaller (more specialized?) networks as opposed to just posting in big daddy Stack Overflow?  Now again, this is for computer science/programming/"why isn't this code doing what I want?" related questions, I am not saying that if I had a question about Linux or WordPress or something I would have the same confusion.


I am new to app development and I have a problem with coding in android studio. I want to compare an input text with a string in the string array. For some reason it won't work. When i try the java code in eclipse it works.  I already run the debugger and the inputmessage is "Banana". The debugger also shows that message = "Banana" when it is in CheckAnswer(message). But for some reason the function isn't returning "Right". It returns "wrong"  I hope somebody can help me.  Here is my code:  public void sendMessage(View view) {     // Do something in response to button     Intent intent = new Intent(this, DisplayMessageActivity.class);     EditText editText = (EditText) findViewById(R.id.edit_message);     String message = editText.getText().toString();     intent.putExtra(EXTRA_MESSAGE, message);     String message2 = CheckAnswer(message);     intent.putExtra(CORRECT_MESSAGE, message2);     startActivity(intent);  }  public static String CheckAnswer(String string) {     String rightanswer[] = {"Apple", "Banana", "Coconut"};     String answer = null;     for (int i = 0; i <= rightanswer.length-1; i++) {         if (string == rightanswer[i]) {             answer =  "Right!!";             break;         }         else answer = "Wrong.";     }     return answer; }

I've been using the == operator in my program to compare all my strings so far. However, I ran into a bug, changed one of them into .equals() instead, and it fixed the bug.  Is == bad? When should it and should it not be used? What's the difference?


I having an issue when I trying to pass params from one batch to another (BatchA --> BatchB).  In the constructor of BatchB, I can see the values that I passed from BatchA, but in the execute method, Only the first chunk is having the values but from the second to the last, it's not.  What can be the issue??  Batch A :    global class BatchA implements Database.Batchable<sObject>, Database.Stateful {     Map<Sobject,Set<String>> pMap = new Map<Sobject,Set<String>>();     Set<String> bigSet = new Set<String>();     String query;      global BatchA() {      }      global Database.QueryLocator start(Database.BatchableContext BC) {         query = 'SomeQuery FROM SobjectA';          return Database.getQueryLocator(query);     }      global void execute(Database.BatchableContext BC, List<SobjectA> scope) {             Set<String> intrersts;             for(Sobject ifr : scope){                 intrersts = new Set<String>();                 intrersts.add(ifr.SomeField_1__c);                 intrersts.add(ifr.SomeField_2__c);                 intrersts.add(ifr.SomeField_3__c);                  bigSet.addAll(intrersts);                  porposalToInternstsMap.put(ifr,intrersts);                }           }       global void finish(Database.BatchableContext BC) {          Id batchJobId = Database.executeBatch(new BacthB(this.pMap,this.bigSet), 200);     }   BatchB :   global class BatchB implements Database.Batchable<sObject> , Database.Stateful {     Map<SobjectA,Set<String>> pMap  = new Map<SobjectA,Set<String>>();     String query;     List<String> bigSet = new List<String>();     // Map<ContactDetails,Set<Call_for_proposal__c>> contactToProposal = new Map<Contact,Set<Call_for_proposal__c>>();      global Matching_Proposal_Intersts_Batch(Map<Sobject,Set<String>> interstedMap,set<String> bigSet) {          this.bigSet.addAll(bigSet);         this.pMap .putAll(interstedMap);          System.debug('pMap   => ' + this.pMap ); // Work - give me exactly what I passed from the first batch.     }      global Database.QueryLocator start(Database.BatchableContext BC) {            this.query = 'SomeQuery FROM SobjectB';         return Database.getQueryLocator(query);     }      global void execute(Database.BatchableContext BC, List<SobjectB> scope) {          for(SobjectB b : scope){              for(SobjectA curPmap : pMap.keySet()){                  System.debug('pMap values   => ' + this.pMap.values() ); // Work only in the first chunk! From the Second chunk to the last the Values of the Map Is null .                 System.debug(pMap.get(curPmap)); // in the first chunk it work fine! in the second to the last chunck It getting null.             }          }     }      global void finish(Database.BatchableContext BC) {      }   I tried to send A Map of Map<Id, Set<String>> In BatchA and retrive the records in a SOQL inside the contructor of BatchB, If the problem is in with the hashing when Sobject is a key in a map - But the issue is remaining.  Thanks!

I'm working on a batch which getting a params from another batch in the finish method.  The Params are :    A Map - Map<Sobject,Set<String>> A Set -  Set<String>   I lost the values of my Map on the second run of the execution method - Means - Map.get(Sobject) returned with null although it had values in it.  That happened only within the second to the last run of the batch (from the second till the end of the chunks).  The first chunk getting the values as expected.  I guess it could be because defined a Sobject as a Key in a Map is not Best Practice because Hashing issue - Because the second param that I'm sending to the batch is a Set<String> - And it keeps its values for all the chunks.   Because of this issue, I decided to send a Set<Id> of all the Sobjects from the first batch, and retrieve the records in the second batch with SOQL query. and I wanted to know what are the best practices to do so.  the queryLocatoer in the Start method is needed to go over another Sobject without any related to the Sobject that I sent.  Where can I put this Query? Can I put it inside the Constructor and assign it to a global variable? Inside the Start method before I set the query for the queryLocator? - since it always will be the same results, I don't want to put it on the execute method.  What do you think? Why we have hashing issue when the key of a Map is a Sobject?  Thanks!


So I tried a bunch of values for a and b and got integers m and n to exist so I believe this conjecture to be true. Can someone please help me formulate a proof.

Let $S = \{ax + by: x,y \in \mathbb{Z}\}$  and let $e > 0$ be the smallest element in $S$. Prove that $e \mid a$, and hence prove that $e = \gcd(a,b)$  I'm afraid I can't provide much of my initial working here because I'm at a loss of how to start.  I suppose that to show $e\mid a$ I would have to show that $eg = a$ for some $g \in \mathbb{Z}$. But I have no idea how I would do this.


Can I use ubuntu-13.04-desktop-amd64  in order to install ubuntu on my laptop having Intel(R) Core(TM) i5-2320 processor

I'm thinking about installing Ubuntu Desktop, but I don't know what flavor is the best for my system. What are the minimum and recommended hardware requirements? What kind of CPU? How much memory? Should I have Hardware Acceleration? What flavor should I use?  This is an attempt of a canonical answer. My answers have the "official  requirements", the recommended are a mix of official sources and opinion based (along with the answer it's told the source). You can comment or edit if you feel that the information is obsolete or incomplete. It is a good rule of thumb that any system capable of running Windows Vista, 7, 8, x86 (Intel) OS X will almost always be a lot faster with any Ubuntu flavor even if they are lower-spec than described below.


I am using hyperref package for referencing but when i do references it gives me the chapter number instead of the label name and don't know why it is doing this as I am new to lateX. I searched a lots of example but nothing is working.  Here is my code  \begin{figure} \includegraphics[width = 150mm]{flowChart.jpg}  \label{Figure:1} \end{figure}   And for referencing  ~\ref{Figure:1}   after this in PDF I am getting chapter number as 2.

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


I am writing a paper and the citation in APA format. I am using \cite{authoryear} for the indirect citation e.g. Paraphrased summary of the ideas (lastNameofAuthor1, year)  What should I do for a direct citation according to lastNameofAuthor1(year) paraphrased idea?  Please don't ask me to follow the first format, if you don't know the workaround. sometimes it is natural to write ideas directly quoting the author.

This is the first time I have to submit to a journal and need to reformat my bibliography according to APA guidelines.  This leaves me very confused since there seem to be multiple ways to do the same thing:   Use natbib and \bibliographystyle{apa} Use natbib and \bibliographystyle{apalike} Use package apacite. How is this different from natbib? Apparently I also need to specify \bibliographystyle{apacite} even though I have already loaded the package apacite. Plus, I can also load natbib through apacite!? The document class apa6. I understand that this formats the entire article, not just the bibliography. But as an option to this document class, I can load natbib as well?   I think my problem is that I'm only taught in simplistic terms, i.e. use natbib for your bibliography, without having a systematic understanding of how the process of creating a bibliography works. Could anyone please explain?


I was solving this problem in Terence Tao's book about analysis and i got stuck trying to prove this by mathematical induction.   2.2.5 -> Prove the following proposition:  (Strong principle of induction) Let $m_0$ be a natural number, and let $P(m)$ be a property pertaining to an arbitrary natural number $m$. Suppose that for each $m \geq m_0$, we have the following implication : if $P(m')$ is true for all natural numbers $m_0 \leq m' \leq m$, then $P(m)$ is also true. Then we can conclude that $P(m)$ is true for all natural numbers $m \geq m_0$.  He gives the hint to define $Q(n)$  to be the property that $P(m)$ is true for all $m_0 \leq m \leq n$  I begun doing a induction on $n$ with $m_0$ as a base case, but when i got to prove that given that $Q(k)$ implies $P(k)$ then to prove that $ Q(k+\!\!+)$ implies $P(k+\!\!+)$ i got stuck. The $+\!\!+$ is the increment operator that is basicaly a succesor function.

I have no idea how to prove it by using only what the book has talked about so far. Can anyone help? The proof shouldn't be using set theory as set theory is only mentioned in the following chapter. The proof should only make use of the addition of natural numbers, order properties of natural numbers, the trichotomy of order for natural numbers and principle of induction.  Proposition 2.2.14 (Strong principle of induction). Let $m_0$ be a natural number, and let $P(m)$ be a property pertaining to an arbitrary natural number $m$. Suppose that for each $m ≥ m_0$, we have the following implication: if $P(m')$ is true for all natural numbers $m_0 ≤ m' < m$, then $P(m)$ is also true. (In particular, this means that $P(m_0)$ is true, since in this case the hypothesis is vacuous.) Then we can conclude that $P(m)$ is true for all natural numbers $m ≥ m_0$. Exercise 2.2.5. Prove Proposition 2.2.14. (Hint: define $Q(n)$ to be the property that $P(m)$ is true for all $m_0 ≤ m < n$; note that $Q(n)$ is vacuously true when $n < m_0$.)  Thanks!


I must prove, without induction, the relationship above is:  $$\sum _{ k=0 }^{ \lfloor n/2\rfloor}{ \binom{n-k}k } ={F}_{n+1}$$  I understand how the equation works but I have no idea how to prove it.  Thanks for any help!

The binomial sum   $$s_n=\binom{n+1}{0}+\binom{n}{1}+\binom{n-1}{2}+\cdots$$   satisfies the Fibonacci relation.   I failed to prove that $\binom{n-k+1}{k}=\binom{n-k}{k}+\binom{n-k-1}{k}$... Any hints or suggestions?


$e^z=e^x cos\,{y}+ie^x sin\,{y}=u+iv$, then $u_x=v_y, u_y=-v_x$ for all $z\in C$. So $e^z$ is differentiable everywhere in $C$.  True?  But we know that if  $f(z)$ satisfies Cauchy Riemann equations at $z_0$ does not imply $f(z)$ is differentiable at $z_0$.  Please help me to get the right conclusion. Please help me to understand  "If Cauchy-Riemann equations are satisfied everywhere, then does it mean the function is differentiable for all $z$"

Another question just now reminded me of something I realized a while ago I didn't know how to do: Say $V\subset\Bbb C$ is open, $f:V\to\Bbb C$, $f=u+iv$, and at every point of $V$ the partials of $u$ and $v$ exist and satisfy the Cauchy-Riemann equations. How do we show that $f$ is holomorphic? I mean it seems it "must" follow. But note if you think this is totally trivial it's possible you're wrong; for instance it's not clear how the hypothesis implies that $f'(z)$ exists.


I am trying to convert list of string into json object. My string is : personName + rank. This is string is arranged as per the person's rank. PS: the backend code is in solidity My code so far is as follows:      var ranks = new Array(5);     PersonNames = Object.keys(names);     ranks = contractInstance.dashboard.call(PersonNames);// function in solidity      var finalList = [];     for (var j = 0; j < ranks.length; j++){       var winList = web3.toAscii(ranks[j]);       var winCount = contractInstance.RanksFor.call(ranks[j]).toString();       var person = {};         person["name"] = winList[j];         console.log(winList[j]);         person["ranks"] = winCount[j];       finalList.push(person);     } var myJSON = JSON.stringify(finalList);   Please let me know if I am making use of the correct syntax. I am learning how to implement javascript. Any help would be appreciated. Thank you!!

Given a string of JSON data, how can I safely turn that string into a JavaScript object?  Obviously I can do this unsafely with something like:  var obj = eval("(" + json + ')');   but that leaves me vulnerable to the JSON string containing other code, which it seems very dangerous to simply eval.


I'm trying to make a blue background color to stay on the SVG icon that is active displaying the text using pure JavaScript. I'm also getting icons from semantic UI. This is the code of the current menu list, and so far clg prints me the items inside for: HTML     <svg><svg/>     <svg><svg/>     <svg><svg/>     <svg><svg/>          CSS .menu-bar {    display: block;    width: 100%;    height: 100%;    margin-top: -10px; }  .menu-bar svg {     display: inline-block;     width: 1em;     padding: 0.3em;     border-radius: 4px;     margin-right: 20px; }  .menu-bar a.toggle-state  {    background-color: #1A41B5; }  JavaScript code (so far) function changeIndex(){     for (let i = 0; i <= items.length; i++) {         console.log(items[i])     } }   I managed to fixed it with: function _clearIcon() {     for (const icon of items) {         if(icon.classList.contains('menu-barActive')) {             icon.classList.remove('menu-barActive')         }     } }  function changeIndex() {     for (const icon of items) {         icon.onclick=()=> {             _clearIcon()             let activeId = document.getElementById(icon.id)             activeId.classList.add('menu-barActive')         }     }

I'm looking for a way to change the CSS rules for pseudo-class selectors (such as :link, :hover, etc.) from JavaScript.  So an analogue of the CSS code: a:hover { color: red } in JS.  I couldn't find the answer anywhere else; if anyone knows that this is something browsers do not support, that would be a helpful result as well.


I have to answer if the following code compiles and which are the results:  char *s1 = "A String"; char *s2 = "Other String"; *s1 = *s2;   I didnt really find what happens in the background when you do declarations like that. Is s1 pointing to memory looking like this?:   |A| |S|t|r|i|n|g|\0|   In my understanding *s1 = *s2 is the same like s1[0] = s2[0], right? So why do I get a memory error? Shouldnt it be?:  |O| |S|t|r|i|n|g|\0|

The following code receives seg fault on line 2:  char *str = "string"; str[0] = 'z';  // could be also written as *str = 'z' printf("%s\n", str);   While this works perfectly well:  char str[] = "string"; str[0] = 'z'; printf("%s\n", str);   Tested with MSVC and GCC.


Recently I met with this error  "non-static variable cannot be referenced from a static context"   where I had initialized all the variables in my main method, which is a static method. But after making all the variables static It compiled without an error. Please Can anyone explain why it happens this way?  public class Test2 {  String[] mycharset;  String chkfor;   public static void main(String[] args){     mycharset = new String[5];     chkfor = "k";     mycharset[0] = "a";     mycharset[1] = "b";     mycharset[2] = "c";     mycharset[3] = "d";     mycharset[4] = "e";     } }

The very common beginner mistake is when you try to use a class property "statically" without making an instance of that class. It leaves you with the mentioned error message:     You can either make the non static method static or make an instance of that class to use its properties.   Why? I am not asking for solutions. I would be grateful to know what is the reason behind it. The very core reason!  private java.util.List<String> someMethod(){     /* Some Code */     return someList;             }  public static void main(String[] strArgs){                // The following statement causes the error. You know why..     java.util.List<String> someList = someMethod();          }


As for the sentence, 'there's no such thing as ghosts.'  Is it grammatically correct to use the plural form of ghost? From what I have learned, the object 'thing' is in singular form, so ghost should be singular too. But I see a lot of native speakers use this sentence.

For example:     There's two options here   or     There are two options here   I hear a lot of people say the first line (or something similar), but isn't that incorrect? Isn't it plural and therefore you should use "there are"?


If buying $12,000 worth of low-cost index funds, let's say that I buy $1000 per month for a year, instead of buying $12,000 all at once. From what I understand, this makes it more likely to improve investments over the long term. But what happens if you take that to its extreme (not accounting for brokerage fees at each purchasing event), by buying about $230 per week or even $33 per day? Would that eliminate/increase/decrease the effectiveness of the dollar-cost averaging strategy? Could it increase its effectiveness, but at a diminishing rate of increase?

I've read descriptions of DCA as buying more of something when it's cheap, and less when it's expensive.  In contrast, if you buy much of that thing all at once, you may be buying the whole load at a peak or trough price, i.e., you're either way worse off or way better off.  This means it's more of a gamble due to its uncertainty.  In a sense, with DCA, you end up buying at the temporally local average price.  As a conceptual toy problem, I pondered what would be a good frequency at which to make DCA purchases.  I haven't been able to see an intuitive answer over the years, but I'm wondering if this next idea might be a good rough guide.  The fluctuations in the price of a thing to buy has a slow and fast variations.  You'll never average out the slower fluctuations unless you intend to make DCA purchases forever.  Would it be a good idea to look at the autocorrelation of the price function in time, gauge the time interval that it takes to fall "relatively" flat, then choose a DCA purchase interval to be that time?  My thinking is that, with purchases made at that interval, the prices are uncorrelated, so you end up averaging out the faster fluctuations.


Some recipes I've seen use an egg + yolk combination. A lot of them just use one egg. Does it make a big difference, as long as there is enough liquid in the batter? Would big brands use egg + yolk for a chocolate chip cookie? Wouldn't that waste a lot of whites?

I want a chocolate chip cookie like the ones Subway has. Those cookies have a smooth top and chewy texture.  I have a recipe for 3/4 cup fat, 0.5 cup sugar 0,5 cup brown sugar, 3/4 cup flour, 1 egg, 2 tsp extract. I get a semi stiff dough, but also an airy cookie, not as dense like Subway. I use room temperature margarine.  I have tried to bake cookies with 2 eggs and with 1 egg, but they always come out wrinkly on top, not as stiff. Is it possible that using an egg and a yolk would work? (But wouldn't that waste a lot of whites if that's how they do it?)  I think as part of this I want a stiff dough, that'll leave the bowl clean, to minimize spread and keep the tops from getting wrinkly as stiffness will keep the the cookies from expanding and contracting. Is that true? If so, I'm afraid that if I add more flour to stiffen the dough will make the cookies cakey - is that the case? How would I avoid that?


So is "P for trend" the same in principle as a common-or-garden P-value, but in a specific application i.e. odds ratios?  And can P-value, P for trend, and P-trend be regarded as interchangeable conceptually, terminologically, and in terms of statistical significance (at least)?  A pointer to an appropriate and citeable reference would be most useful, particularly if it states any differences or confirms sameness.  Edit responding to whuber's moderation  @whuber - thanks, but wouldn't an exact duplicate at least mention the topic of my question. I can see no mention of 'trend' or 'P for trend' on that page you provided. If on the other hand you know that P for trend is the same thing, then is there a citeable reference you can provide? Just to be clearer it is the use of the word 'trend' that confuses me, not the use of letter 'P'.   Another edit responding to whuber's moderation  Sorry if my question was not well formed. In attempting to provide my own answer  in the hope of a confirmation, I think that the word 'trend' when talking about P-trend (e.g. for a reported result in the literature) sets the context as a P-value test for linear trend in odds ratio in logistic regression, against a categorical predictor variable. If that is correct, then this is described in standard texts as 'test for trend', in which case my copy of Kirkwood & Sterne provides a citeable reference. Hopefully this addresses whuber's concerns. Whilst the correct interpretation of P-value is very important, I was missing the context of logistic regression.

After taking a statistics course and then trying to help fellow students, I noticed one subject that inspires much head-desk banging is interpreting the results of statistical hypothesis tests.  It seems that students easily learn how to perform the calculations required by a given test but get hung up on interpreting the results.  Many computerized tools report test results in terms of "p values" or "t values".  How would you explain the following points to college students taking their first course in statistics:   What does a "p-value" mean in relation to the hypothesis being tested?  Are there cases when one should be looking for a high p-value or a low p-value? What is the relationship between a p-value and a t-value?


Is there a way to compile lyx file in terminal?  If that helps, I want to do this because I made a lyx file with many packages, which is really slow running in lyx GUI. I wonder if there is a way to compile that in terminal just like running tex files by texmk -xelatex xxx.tex.  Actually I found following command in Converting LyX to LaTeX  $ lyx --force-overwrite --export pdflatex document.lyx   However, it returns me following information. I tried pdflatex and xelatex both.     Error: Couldn't export file   No information for exporting the format xelatex.   Thanks in advance.  with best regards

I'm using LyX for technical documentation and want to automate the process of creating PDF files.  Within LyX, I can simply click the button "View PDF (XeTeX)", and LyX performs the whole build process for me: it creates a .tex file, does some bibliography magic, and uses XeTeX to create the final PDF file.  What I'm looking for is a way to call LyX from the command line and get the same result. So far, I've only managed to generate a plain .tex file (using --export-to xetex). However, when I run xelatex on the generated file, it keeps showing errors that don't occur when building using LyX. Is there a way to get LyX to do the work?  My system: Windows 7 64bit, LyX 2.1.0


I have a HTML variable an it contains characters like "●","❒","◉","⭕","■". And i have to store these in MYSQL database. I am using Capsule for this without laravel. There is no problem with printing these characters but when put them into database they show up like this "â—","Ã¢Â—Â". I dont want to remove these characters.  I have tried all html escape functions.  Edit: My database's charset is utf8_general_ci.

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


I have a VPS server on which CentOS 6.5 x64 is installed. Kernel version from uname command is 2.6.18-028stab107.  When I want to use iptables rate limiting like in the following command, I got the error message below.  iptables -I INPUT -p tcp --dport 80 -m state --state NEW -m recent --set iptables: No chain/target/match by that name.   I think required conntrack modules are not installed on system, lsmod command output is empty.  [root@myserver ~]# lsmod Module                  Size  Used by   I try to load modules like below, and got the errors.  [root@myserver ~]# modprobe ip_conntrack FATAL: Module ip_conntrack not found. [root@myserver ~]# modprobe nf_conntrack FATAL: Module nf_conntrack not found.   Finally, I think, I have to install state and conntrack modules, but cant install because yum search result does not include required packages.  [root@myserver ~]# yum search conntrack Loaded plugins: fastestmirror Determining fastest mirrors epel/metalink                                                                                | 5.2 kB     00:00       * base: sg2plmirror01.shr.prod.sin2.secureserver.net  * epel: kartolo.sby.datautama.net.id  * extras: sg2plmirror01.shr.prod.sin2.secureserver.net base                                                                                | 3.7 kB     00:00      base/primary_db                                                                                | 4.4 MB     00:00      epel                                                                                | 4.4 kB     00:00      epel/primary_db                                                                                | 6.1 MB     00:02      extras                                                                                | 3.4 kB     00:00      extras/primary_db                                                                                |  18 kB     00:00      updates                                                                                | 3.4 kB     00:00      updates/primary_db                                                                                | 3.1 MB     00:02      =================================================== N/S Matched: conntrack =================================================== libnetfilter_conntrack.i686 : Netfilter conntrack userspace library libnetfilter_conntrack.x86_64 : Netfilter conntrack userspace library libnetfilter_conntrack-devel.i686 : Netfilter conntrack userspace library libnetfilter_conntrack-devel.x86_64 : Netfilter conntrack userspace library    Name and summary matches only, use "search all" for everything.   How can install these modules and use my iptables commands given at the top?

So I am trying to setup shorewall firewall on my linux vps. The vps is running ubuntu 12.10. When I type $ shorewall check I get this error.  iptables: No chain/target/match by that name.    ERROR: Log level INFO requires LOG Target in your kernel and iptables   So I run iptables -L and I get  Chain INPUT (policy ACCEPT) target     prot opt source               destination  Chain FORWARD (policy ACCEPT) target     prot opt source               destination  Chain OUTPUT (policy ACCEPT) target     prot opt source               destination   I tried looking at other posts and there is one similar, but it did not help me. The kernel I am using is 2.6.32-042stab079.5  Does anyone know what I need to do to fix this? I've seen a few things about changing the kernel config, but I have no idea how to do that or what to change.


How can I make the stuff below sup to be stacked? Many thanks in advance. \documentclass[a4paper,13pt]{scrartcl} \usepackage[utf8]{inputenc}   \usepackage{amsthm} \usepackage{amssymb} \usepackage{mathtools}   \begin{document}  \begin{equation} \sup_{y \in B_{\| \bar{x}-x^{k} \|}(\bar{x}), s \in (0, \Delta_{k} / \|d\|]} \frac{f(y+s d)-f(y)}{s}  \end{equation}  \end{document}

Possible Duplicate:          I want to write expression \sum_{i=0}^n i with i\neq 4 under the summation symbol. How can I write this?


I am implementing IComparible with  public int CompareTo(RangeEx range) {     if (range == null)                 return 1; // more stuff }  public static bool operator ==(RangeEx x, RangeEx y) { return x.CompareTo(y) == 0; }   The problem is the "if (range == null)" calls the operator overload. How can I do the check for null by not calling the overload?

The following will cause infinite recursion on the == operator overload method      Foo foo1 = null;     Foo foo2 = new Foo();     Assert.IsFalse(foo1 == foo2);      public static bool operator ==(Foo foo1, Foo foo2) {         if (foo1 == null) return foo2 == null;         return foo1.Equals(foo2);     }   How do I check for nulls?


How can I show that the differential equation:     $${dx \over dt }=\sqrt x, x(0)=0$$   has infinitely many solutions.   One solution will be $x={t^2 \over 4}$

Show that the first order differential equation $y'(x)=\sqrt{|y(x)|}$ with intial value $y(1/2)= 1/16$ has infinitely many solutions on the interval [−1, 1].  My thought were to show that this equation has two solutions (just by ansatz, or just looking at the interval $]0, 1]$ to get $y'(x) = \sqrt{|y(x)|}$) and deduce from that that there must be infinitely many solutions since the solution set forms a vector space. I've got a nagging feeling this isn't the way to go though. Can anybody give me a hint where to look?


I have set no paging files from the virtual memory settings, I noticed that my PC’s performance became bad and slow. Is there a way to restore these files or download some?

As can be seen on the image above (see below for English Virtual Memory window for easy translation), the Virtual Memory window does not give me the option to set the highlighted hard drive to set my page file location. It should have a SET button to select.   Is there any way to fix this issue with the window not showing all the options, or is there a way to set the page file location and settings via command line?  Note: It does not give me any option to resize the window either.  Side-by-Side Translated Image   ("nenhuma" means "none")


I'm trying to create a mask with a nondestructive gradient. So far I have managed to create my shape in a smart object and the masking gradient in another smart object.  My mask looks like this:    The image that I'm trying to mask looks like this:    By setting my image over this gradient smart object, I was able to produce the following:    The setup looks like this:    The problem is that it's also displaying the black from the clipping mask. I have tried turning down the fill on the masking layer but it also hides the image to be masked. I need to make the clipping mask work without displaying itself. I managed to create a bitmap layer mask which produces the desired result (below) but I need a non-destructive solution.  Desired result:    I need a way to not show the clipping mask layer and only use its transparency. I am also open to other solutions that can do the same thing, provided they are non destructive.  How can I create a non destructive mask over my target object, to achieve the effect I have shown in the final image?

Let's say I create a complex smart object containing layers, filters, effects, shapelayers, etc.  Then, in the main comp I want to use that smart object to mask another layer/smart object with.  However, I do not want to see the masking smart object itself.  Is there a configuration, such as blend mode, or similar, that lets me do this, without just adding a layer mask and copying over the visible parts?  Basically, I want to let the smart object (the mask) be fully editable, and make it automatically apply as a mask to another layer/smart object, with no manual steps other than editing the smart object.  Note, I am specifically not asking how to make a "clipping mask", by Alt-clicking on the separator line between two layers. I know about this function, but if the layer above (the one being clipped) is transparent, parts of the layer below (the one masking) will be visible. That's what I want to avoid.  Basically, to reproduce an example comp, create two layers by using the rectangular marquee tool, and creating two solid color layers, of different colors:  +==============+ I              I I              I I      +------------+ I      |            | I      |            | I      |            | +======|            |        |            |        +------------+   Then I want to mask the topmost layer so that only that layer is visible, but only the parts masked by the bottom layer, without the bottom layer being visible, like this:         +-------+        |       I        |       I        |       I        +=======+   With a straight clipping mask, I would still see the underlying layer.


I made several edit suggestions and each time my reputation increased by 2, except once when it increased by 4 (cool! :D) . But my reputation increased only by 2 (less cool ;) ).        I think there is a bug when I received +4 instead of +2.

I edited  and noticed my reputation change from 1466 to 1470 (i.e +4). I went to check my reputation changes and found:        Note: My reputation later went down from 1470 to 1468, so it appears the system realized it made a mistake and corrected my reputation, but hasn't gotten rid of the second revision or the history event.  My  still shows 1 suggested edit with 2 revisions.


I used to have only a stack overflow account. Later I used this account to link a number of different communities.  Now, I was joining Area 51 this week and it required me to make a new account, which did not get linked to SO. In an attempt to rectify, I tried login in to the main stackexchange site, using the same OpenID provider (facebook).  But now, any new SE community I join, gets listed in the SE account and my list on SO remains as it was. I am continuous signed in on both sites. Can someone help me out?  I am aware of , but since that bug has long be fixed, I assume my problems are different (and maybe my own error). I tried to user account merge on stackoverflow, but it denies the use address of stack exchange.

I accidentally posted a question without being logged in. Is there a way to associate that question with my account?   For more information, visit "" in the .   a.k.a. How can you link a registered account to a cookie-based account? a.k.a. How do I merge an unregistered account with a registered account a.k.a. Merging users a.k.a. How do I associate anonymous questions I’ve asked with my registered account? a.k.a. Is there a way to claim an unregistered user? (in case anyone searches with those terms)


The latest September 2014 Stack Exchange data dump is available at .  I am interested in previous data dumps, and in May 2014 data dump (the one that was published before the September one) in particular.  Is it possible to get the torrent file for that dump? Is it still available?  UPDATE: Is there anyone who has a torrent for the May 2014 dump?

The original ClearBits link to the September 2011 data dump has broken. How can I access it and other previous data dumps? The Internet Archive only has .


Certain lands, such as , state that they can add two types of land, but when does that happen? When I cast it, it enters the battlefield as just one land, right? So does it add the additional land when tapped?

What is the relationship between lands and mana in Magic and what do each of them do?  A good answer should especially include how a new player should think about them.    Note:  This is an attempt to create a canonical question about the relationship between lands and mana in Magic.  Beginners are often confused about this given the same symbols are used to mean different things across basic lands, non-basic lands, and mana costs.  This can lead to confusion about , about , or even about .


Can standalone (not joined to domain ) Windows Server 2019 VM be configured to install updates automatically? I have such VM via small hosting provider (use it for software development) and once in a while when I login I am informed there are updates available. I get them downloaded, installed and then I reboot. I would rather prefer this to be done automatically - downloading, installing and rebooting. Because I don't log in that often I really want VM to be protected as soon as possible. Is there way to configure this? I checked all the settings under "Windows Update" but haven't found a way to set it up.

On a freshly-installed, non-domain-joined Windows Server 2019 (with desktop experience) VM, the ability to change Windows Update installation settings seems to have vanished, with the "Some settings are managed by your organization" message:    Viewing the configured update policies shows two set on the device, both with a type of Group Policy:   Download the updates automatically and notify when they are ready to be installed Set automatic update options   However, running rsop and gpresult both (as expected) show no group policy objects applied. (It's a standalone system, so no domain policy applies.)  Is this expected?   Amazon also acknowledge this () for their 2019 EC2 images, but it seems odd that using gpedit.msc is the only mechanism for enabling automatic update installation.


I want my footer to look like this   Currently, it looks like this :    My image is not fixed and I want "Thanks our friends at" to be near the image middle, like in the example above.  Another problem is when I resize the page, all the text from the footer exits from the div.  Code:     #footer {     background-color: #3f4951;     display:block;     margin:0 auto;     width:100%; }  section {     display:block; }  .row {     margin:0 auto;     width:100%; }   .footer-top {     padding: 37px 0 38px; }  .column {     padding-left: 20px;     padding-right: 20px; }  .footer-top nav {     float: left;     margin: 0;     max-width: 60%;     text-align: left; }   .footer-top nav a {    color:#a9abad; }  .footer-top .thanks {            margin-left:200px;    float:left;    max-width: 35%;    width: 250px; }  .thankstext {      color:#a9abad;      font-size: 16px; }   .footer-top * {     color:#a9abad;         }  .footimage {  }

                                        New or Existing Home Installation |                      Flushing |                      Serivicing |                      Service3 |                      Service4 |                      All Services will be listed here.

Thanks our friends at

Why won't vertical-align: middle work?  And yet, vertical-align: top does work.   span{   vertical-align: middle; }
      Doesn't work.


i have a .csv file like the picture above i want to read the csv file and be able to pull out the information and make it like something below:  |mode        |   lon            |   lat       |  name      |  |subway     |   116.3572162|   39.8980033|  name1     |  i want to create a mesh according to the information from the csv file i want the mesh to be in the exact location of the longitude and latitude. please help , i'm really new to programming :(

How can i use the value in column 'lon' and 'lat' as the position of my uv_sphere? For example,read the values from line 4, (116.4559081, 39.9139083), and make these 2 numbers as my uv_sphere x and y position in blender? and gives different colors for different mode, for example i have 4 modes in the csv , i want to make the uv sphere that represents the bus mode to be red, and subway to be green , rail to be blue and tram to be yellow., and use the row ['from'] and ['to'] to connect the nodes with a cylinder with x scale 0.5 , y scale 0.5 and the z scale with the value in ['length'] value.


We will get tag synonyms created that should not have been, so there needs to be method that lets user say a tag synonym is wrong so a moderator can look at it.  Something like   You can vote to say a synonym is wrong If more than n people says a given tag synonymy is wrong than a moderator looks at it.   Being able to add comments to the tag info page would be a good start.

Most actions are reversible: delete/undelete, edit/rollback, close/open, protect/unprotect, vote, etc. But tag synonymization isn't. There are cases where the community thought an idea  just to discover years later that . This can only be addressed by a moderator, which can take time and effort from the team. Since moderators are supposed to do as little as possible, community shouldn't bother them if they can clean up their own mess.


In Joseph Gallian's Contemporary Abstract Algebra, example 11 of chapter 2, the author leaves it to the reader to check closure for U(n), so I am trying to figure out if my solution is correct, or what I did incorrectly. My roadmap is to Take $a,b\in U(n)$ and use the fact that $gcd(a,n)=gcd(b,n)=1$. Since a and b are elements of $U(n)$, we have that $a mod n = b mod n$, thus $a=q_1n+1$ and $b=q_2n+1$. Let $r=(ab) mod n$, so $ab=pn+r$. We want to show that $r\in U(n)$ by showing that $gcd(r,n)=1$. What is did was to multiply a and b, and through cumbersome steps, I got $nl+1=r$, where $l$ contains terms like $q_1,q_2,p,n$. From that, I concluded that $r mod n =1$, so $gcd(r,n)=1$. But this looks very inelegant. I'm sure there is a better way, but I can't think of it.

Prove that that $U(n)$, which is the set of all numbers relatively prime to $n$ that are greater than or equal to one or less than or equal to $n-1$ is an Abelian group.  My thought process: for $a, b \in U(n)$  Associativity:  $(a + b) + c = a + (b + c)$ Identity: $1$ is in the set so $a\cdot 1 = a = 1\cdot a$ Inverse: I'm stuck on how to determine the inverse of the set if it exist. Abelian criteria : $a\cdot b = b\cdot a$  Thanks


Sometimes I see the use of truemm (or true mm) instead of mm (same for other units). So I’m wondering what is the difference between these? Or: Why are some units false?

In examples found around the web, some people specify lengths such as width=5truecm with \includegraphics or the geometry package. How is this different from regular 5cm?


I'm curious how I can recreate these effects in Photoshop ?  examples:    specifically this

I like the effect on the images used on this  page, and out of curiosity I'm trying to replicate it in Illustrator. It's not a simple multiply mask, and seems a more involved than the kind of duotone I can do in inDesign.


I need to write a new method that checks if certain values are of the type String or not.  I have two objects and I want to be able to check if these two objects are strings, if they are to then return true, and false otherwise.  I did start off with the following method:  public boolean stringTest() {       boolean aString; }   But could not get anything to work after that, any help would be greatly appreciated!

If class B and class C extend class A and I have an object of type B or C, how can I determine of which type it is an instance?


I know what are Hermitian operators and anti-hermitian operators.but as i have studied quantum mechanics most of the operators we had dealt with them are hermitian and this question popped up in my mind that does any anti-hermitian operator exists in quantum mechanics?

Why can't we measure imaginary numbers? I mean, we can take the projection of a complex wave to be the "viewable" part, so why are imaginary numbers given this immeasurable descriptor? Namely with operators in quantum mechanics, why must measurable quantities be Hermitian, and consequently real?


I would like to access a protected method from a variable. For example,  A.java (a third-party library, like Spring's class)  package a; public class A {     protected void doA() {} }   B.java (my own class)  package b;  public class B {     public void doB(A a) {        // how to invoke a.doA() here.     } }   As you can see from above, is there a way to access a.doA() in my own class withour using reflection?

In Java, are there clear rules on when to use each of access modifiers, namely the default (package private), public, protected and private, while making class and interface and dealing with inheritance?


I have the first version of the Canon EF 24-105mm F/4L IS USM lens. It has annoying zoom creep. If I walk around with this lens, with the camera hanging from my neck, occasionally the zoom automatically extends from 24mm. This happens rarely enough that checking the zoom ring every 5-10 minutes is enough to stay most of the time at 24mm, when walking around -- I counted approximately three occurrences of zoom creep per hour when walking around. There is no zoom lock in this lens. I have never found the zoom ring too hard to rotate, contrary to .  I would like the zoom mechanism to be stiffer so that the zoom doesn't creep. How to achieve this? I wouldn't want to throw away a perfectly fine second-hand-purchase and purchase a 1200 USD new lens instead. The lens is absolutely flawless apart from this zoom creep issue.  Related, although this question asks about the typicality of the issue and not how to fix it:

(This could turn out to be a bone, practical, product-specific query, but this is the internet so the worst that could happen is a 0 rather than a 1.)  Anyhoo: is it possible to lock a zoomable lens to a certain focal length? Is this a typical feature for a lens?  I want to keep my SELP1650 at X mm to help with some creative experiments, but the thing shifts whenever I move my hand against the lens ring. Does SELP1650 (or the body, Sony A6000) specifically have this option?  Or... is there a reasonably non-goofy DIY trick I could pull off, without bricking the thing? (anticipating a sarky 'duct tape' suggestion)


When I try to install mysql-server i get the following error:  Reading package lists... Done Building dependency tree        Reading state information... Done mysql-server is already the newest version (5.7.20-0ubuntu0.17.04.1). 0 upgraded, 0 newly installed, 0 to remove and 2 not upgraded. 2 not fully installed or removed. After this operation, 0 B of additional disk space will be used. Do you want to continue? [Y/n] y Setting up mysql-server-5.7 (5.7.20-0ubuntu0.17.04.1) ... invoke-rc.d: policy-rc.d denied execution of stop. update-alternatives: error: alternative path /etc/mysql/mysql.cnf doesn't exist dpkg: error processing package mysql-server-5.7 (--configure):  subprocess installed post-installation script returned error exit status 2 dpkg: dependency problems prevent configuration of mysql-server:  mysql-server depends on mysql-server-5.7; however:   Package mysql-server-5.7 is not configured yet.  dpkg: error processing package mysql-server (--configure):  dependency problems - leaving unconfigured No apport report written because the error message indicates its a followup error from a previous failure.                             Errors were encountered while processing:  mysql-server-5.7  mysql-server E: Sub-process /usr/bin/dpkg returned an error code (1)

My overall upgrade went well, but I am left with a critically lingering issue of mysql-server not being able to install itself, and nothing I am trying gets it to work.  This is the error I see when trying to install/reinstall it:  Setting up mysql-server-5.7 (5.7.11-0ubuntu6) ... Job for mysql.service failed because the control process exited with error code. See "systemctl status mysql.service" and "journalctl -xe" for details. invoke-rc.d: initscript mysql, action "start" failed. dpkg: error processing package mysql-server-5.7 (--configure):  subprocess installed post-installation script returned error exit status 1 dpkg: dependency problems prevent configuration of mysql-server:  mysql-server depends on mysql-server-5.7; however:   Package mysql-server-5.7 is not configured yet.  dpkg: error processing package mysql-server (--configure):  dependency problems - leaving unconfigured No apport report written because the error message indicates its a followup error from a previous failure.                    Processing triggers for systemd (229-4ubuntu4) ... Processing triggers for ureadahead (0.100.0-19) ... Errors were encountered while processing:  mysql-server-5.7  mysql-server E: Sub-process /usr/bin/dpkg returned an error code (1)   I've tried completely removing it, though doing so attempts to install MariaDB because of dependencies (?). Any suggestions on what I can do to fix this would be most welcome.  EDIT: Looks like I'm not the only one:


I am  in the process of launching a hot sauce business. . but I would life to know what ingredients  to add in it so that it have a longer shelf life ..

I would like to be able to can and then sell my own hot sauce. The hot sauce I make is a low acid meat (ground beef) and tomato based sauce. I had sent it in to get a shelf life expectancy, and was advised the acidity level was too low and the only way I could make the sauce in a way that it was shelf stable was if I used a retort or sold it as a frozen product. Neither of these are options I can consider at this time.


Let A and B be two fixed points on a straight line. Two circles touch this line at A and B respectively and the tangent to each other at M, when the circles vary the locus of M is?  This question has already been asked , but I could not comprehend that answer properly, also I am not allowed to comment on that answer as I don't have 50+ reputation. I have only drawn the rough sketch but not able to go any further.

Let $A$ and $B$ be two fixed points on a fixed straight line. Two circles touch this line at $A$ and $B$ respectively and tangent to each other at $M$. When the circles vary, what does the locus of $M$ form?


Text is clipped, e.g. Fa...e instead of Favorite. Also, the text looks like it could be much smaller and still be readable. Another contributing factor is there is a gap of about 0.5 inches (13 mm) at the bottom and 0.8 inches (20 mm) at the top (0.6 inches (15 mm) excluding the notch) that has no content at all. I think the app might need to opt in to full screen or something to put content there. As long as there's nothing critical in the rounded corners or notch section, it should work fine.   App Version: 1.6.6.2 Device: Unknown (iPhone12,5) OS Version: Version 13.2.3 (Build 17B111)

I just updated my iPhone 7 Plus to iOS 13 tonight and noticed that the post menu in the Stack Exchange app became close to unreadable, because the font/text is too large to be properly displayed. Luckily we can still recognize the icons...    (Yes, app development has been frozen for quite a while but the app continues to serve me well.)


Learning x86 assembly and the frame pointer is blowing my mind a little. I learned from this  that EBP makes life awesome for debugging.  That's great, but I was curious, "What else is EBP used for?"  Looking at the  Wikipedia article, EBP is necessary for dynamic stack allocation.  As I've always been under the assumption that dynamic allocation goes on the heap. So, why would I want to use dynamic stack allocation - why isn't the heap good enough?  And, how is EBP useful for this?

I'm a beginner in assembly language and have noticed that the x86 code emitted by compilers usually keeps the frame pointer around even in release/optimized mode when it could use the EBP register for something else.  I understand why the frame pointer might make code easier to debug, and might be necessary if alloca() is called within a function.  However, x86 has very few registers and using two of them to hold the location of the stack frame when one would suffice just doesn't make sense to me.  Why is omitting the frame pointer considered a bad idea even in optimized/release builds?


On any given question the last person to add something to the question, be it ask, edit or answer it, is displayed(on the main page).      1m ago TsSkTo 96   This, however, doesn't show what I did. So if someone comes along and edits it it would show their name and how long ago. Which can be confusing if one assumes the name assosiated with the question is the asker.   But even if the person with the last action on the question is displayed, shouldn't it be something like this?     Asked by: TsSkTo 96 1m ago   and then     Edited by: [moderator] 500k 25s ago   The Idea here being to add a field explaining what was the last action applied to the question along with who did it.  The Duplicate question shows the same problem, that being:   The last user to modify or add to the question is displayed on the list, along with the time stamp. It does not, however say what he or she did to the question, that is unless you click the time stamp and inspect the post.  In the previous question it was suggested that the original poster always be the one displayed on the question. That is flawed, I understand that the latest user to add to the question should be displayed in order to show when the question was last active. If one goes on to read the comments, the fact that there is no "Modified by" in the main list is mentioned and proposed as a good idea by the moderator answering the question. The last comment suggests the exact same thing.  The is the idea of this post is to provide and implement the solution that the "duplicate" post was unable to. The problem is still there. It is ambiguous what the person displayed has done to the question. Why not provide that information on the list?

I find it odd that in the list of Active Questions, the name of the person is the last one who replied/edited/commented on the question. However when you open the question, you see the real author + last editor:    However, the very same question in the “list” looks like this:    This is awful, because it gives the reader the impresion that I wrote that question, which in this case belongs to Mr. Sam Day.   As someone who has editing permission on the site, I am constantly fixing small typos and formatting errors, but this makes my name appear in the front page all the time. (note: the site is apple.se, but I’m sure this is the same for others).  update: Let me put it in another way. I go to apple.se.com and I see this:    In both cases it looks like I asked the questions mainly because the second one doesn’t have any answer yet has a “name”.   In my opinion, it’s not clear and it should say or show both names.


First of all, I want to let you know that I am a complete Ubuntu (and Linux in general) beginner, basically what you can call a newbie.  So last time I wanted to install Ubuntu 16.10 in a dual boot with Windows 10. I downloaded the .iso and mounted it on a Flash drive using LiLi. Everything went pretty well until I booted on the USB : The mouse seemed to be moving (I could notice that by seeing some buttons getting highlighted as I moved the mouse) but the mouse cursor wouldn't leave the top-left corner of my screen !  Fun thing : When I tried to move the mouse to my secondary screen, the cursor just got blocked in the top-left corner... of the secondary screen !  I thought that maybe it was just an issue with the installer, so what I did was that I kept installing the OS and everthing went pretty good. When I booted, I could see the GRUB interface and both Windows and Ubuntu were accessible. Except that the issue was still here.  I've tried several things that I saw on this forum in order to fix this and I did get a pretty bizarre result. When I installed the nvidia-current package, a lot of stuff changed within my Ubuntu : First, my secondary screen wasn't usable anymore, so I had to deal with only one screen (which didn't really bother me for now). Then, the resolution was really downgraded but it did fix my cursor problem ! The thing is that while solving one problem, it created another. I was stuck in the login screen, meaning that when I tried to log in, a kind of terminal (I guess ?) appeared in a flash and brought me back to the login screen.   I tried installing Ubuntu Gnome (as I prefer the Gnome environment) but got the same results.  Any ideas ?

I just installed Ubuntu 16.10 on my desktop and have a USB deathadder. The problem is I can't see where the cursor actually is because it appears only in the top left of my screen. The mouse still moves but the cursor graphic doesn't follow


In trying to debug various strange issues on a machine, I found something strange - when I go to C:\Users\administrator and get properties, security tab, it lists the users (the local admin account, system, and 'administrator' which is the domain administrator account).  It all looks fine in terms of permissions (full control, etc.) compared to other machines.  The one difference is there is a small red circle with an X to the left of the user icon/name.    Additionally, there are various folders where it says access denied under there - for example, my documents!  Even logged in as the local machine administrator account (which is not named administrator), I am unable to change the permissions - it says access denied.  Any ideas what this means and how to fix it?  I even tried re-joining the machine to the domain.

On shared folders on the file server, for the domain user name object under the security tab, the icon has a red x.  There are no symptoms, the users have full access, there is just a red x on the icon for their name.    Why is this?  For clarification, logged into the windows 2008 r2 file server, browse to a users shared folder, right click on the folder, hit properties, click the security tab. The object representing the users domain name has a little red x on the lower right hand corner of the icon that looks like a single man. There are no symptoms beyond me wondering why the red x is there.  update: it does not show the x when you look at permissions from a workstation, only on the file server


\documentclass{beamer}  \begin{document} \newcommand{\b}{\begin{frame}} \newcommand{\e}{\end{frame}}  \b \titlepage \e  \section{AAA} \b \frametitle{Contents} \e  \end{document}   How to fix this for abbreviation?

I would like to create a Latex macro for my beamer presentations. I use beamer frequently, and want to make macros for the \begin{frame} and \end{frame} to require fewer keystrokes. At the beginning of the document I have:  \newcommand{\bfrm}{\begin{frame}}%start new frame \newcommand{\efrm}{\end{frame}}%end new frame   Which compiles fine. I then test the first of the two macros for the beginning of the frame:  \bfrm{New frame testing}     blah blah \end{frame}   Which produces the result I am looking for. I then test the second of the macros:  \bfrm{New frame testing}     blah blah \efrm   Fails to compile, saying that there is a runaway argument. What is the reason for the failure?


Why is Logan is the last movie of this franchise starring Hugh Jackman?  Is there any chance of him appearing in a future X-Men movie, or even a guest appearance?

has played the role of Wolverine as a major character in various X-Men films since 2000 and contributed highly to the brand of the X-Men movie series. But is he playing the Wolverine character for the last time in Logan?  I am getting to know from my friends that  is the last movie in which he is playing Wolverine and they all say that this is his last contracted film.  Are these rumors true? Is there any official information that confirms that this is Hugh Jackman's last movie as Wolverine?


In McDonald's 2016 annual report Balance Sheet, it shows Total Liabilities is greater than Total Assets. So it's Total Stockholder's Equity appears to be negative, with these fields reported as negative figures:  Accumulated other comprehensive income Common stock in treasury   What is the meaning of these 2 fields? Does it indicate any unhealthy financial position when they are negative?

What does negative Total Equity mean in McDonald's balance sheet?  Please refer to   For "Total Equity" row, it is showing "-2,204.30 million" As of 2016-12-31      According to      "When shareholder equity is negative, it’s often due to the accounting   methods used to deal with accumulated losses in previous years. Such   losses are generally viewed as liabilities that carry forward until   future cancellation. Often, they exist only on paper, which enables a   company to stay open even with large, ongoing losses"   Isn't McDonald a very healthy company that has never lost money?


I'd like to order a dictionary by the value. It seems the way it would usually be done in .Net doesn't exist in the Mono API.   Is there any particular API call or should I do this myself?   Thanks

I often have to sort a dictionary, consisting of keys & values, by value. For example, I have a hash of words and respective frequencies, that I want to order by frequency.  There is a SortedList which is good for a single value (say frequency), that I want to map it back to the word.   orders by key, not value. Some resort to a , but is there a cleaner way?


last week i have problem I can't deal with. How i can to install Windows directly from Linux (elementary OS) without flash drives and anything other? Tried everything and all of tries ended with failure

I have a different problem that I don't think can be solved but it's better to ask before loosing all hope.  I currently run Crunchbang (Debian dist) and would like to install Windows 7 as well. However, my computer don't have a dvd-reader and all my usb-drives are too small.  Is my only solution to this problem to buy a larger usb-drive?


I was expecting this page to render as the string "TryErrorFinally", but the result is just the string "Try".  Do I need to do something else to see the exception generated by calling the non-existent foo() function?  <?php   try {     print "Try";     foo();   } catch (Exception $e) {     print "Error";   } finally {     print "Finally";   } ?>

I can use set_error_handler() to catch most PHP errors, but it doesn't work for fatal (E_ERROR) errors, such as calling a function that doesn't exist. Is there another way to catch these errors?  I am trying to call mail() for all errors and am running PHP 5.2.3.


I tried mapping a table that does not have a spatial geometric component (CSV file) into a shapefile in QGIS with a common ID column. But I noticed that most of the data which is on the CSV file does not show when I open the attribute table in the shapefile.   My CSV file has 728 rows and my shapefile has only 160 rows  After I join these two tables with a common ID column, only 160 rows are being shown on the shapefile attribute table.  Does anyone know how to combine all the data in the CSV to the shapefile?

I'm trying to create a join/relate in QGIS where I have a shapefile of buildings and to that I would like to join a non-spatial table (.csv-file) containing people who work in each building. So I have multiple records in my table that I would like to be able to join to my single features in my shapefile. I can only run a join in QGIS where the first record is joined to the shapefile feature (ie building) but subsequent records get removed. Could someone let me know how to complete this join/relate in QGIS?


Why is i++ and ++i same in the following code?  #include <stdio.h>    int main()   {       int i=5;        while(1)       {           i++;                  /*replacing i++ by ++i also gives 6*/           printf("%d",i);           break;       }        return 0;  }     The output is 6. I learnt that the increment operator i++ has its value the current value of i and causes the stored value of i to be incremented.But i's value is displayed as 6 though the current value of i is 5. Replacing i++ by ++i also gives the same value 6. Why is i++ and ++i same in this case and why output is 6 though initial value is 5.

In C, what is the difference between using ++i and i++, and which should be used in the incrementation block of a for loop?


I am trying to figure out why i get two different outputs for seemingly similar loops. I think it has something to do with looping with doubles versus ints, but I am not sure.   This code outputs 4:  int num = 10; int cost; int counter = 0;  for (cost = 1; cost <= num; cost += 1){     counter += 1;     num -= cost; }  cout << counter << endl;   This is the output for this section:  Current Cost: 1 Remaining: 9 Current Cost: 2 Remaining: 7 Current Cost: 3 Remaining: 4 Current Cost: 4 Remaining: 0 4 candies; 0 left over   This code outputs 3:  double num = 1.0; double cost;  int counter = 0;  for(cost = 0.1; cost <= num; cost += .1) {     counter +=1;     num -= cost; }  cout << counter << endl;   Edit:  This is the output for this code when I tried debugging it:      Current Cost: 0.1     Remaining: 0.9     Current Cost: 0.2     Remaining: 0.7     Current Cost: 0.3     Remaining: 0.4             3 candies; 0.400000 left over   Why is there a difference between the two?

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


void main()  {  int x=7;  printf("%d",x&(x-1)); int y=6;  printf("%d",y&(y-1));  printf("%d",y>>2);    }   When I put an odd number I get output n-1 where n is a odd number but when i put y= even number I get output 0.I am not able to understand this please help.   My second question is that when i print y>>2 that is 6>>2 I get ouput 1.Please explain me this also. I know these are bitwise operations but my concept is not clear.Thanks

I'm someone who writes code just for fun and haven't really delved into it in either an academic or professional setting, so stuff like these bitwise operators really escapes me.  I was reading an article about JavaScript, which apparently supports bitwise operations. I keep seeing this operation mentioned in places, and I've tried reading about to figure out what exactly it is, but I just don't seem to get it at all. So what are they? Clear examples would be great! :D  Just a few more questions - what are some practical applications of bitwise operations? When might you use them?


I read information , and in other places. But I can't come up with the perfect example that move away my doubt.  I found this in  which help me a little bit. But no really entirely.  so as to do something  In order to do something: She had put her hair up so as to look older.  So, if I understood well, I think that I can use so as for get accomplish something. Right?  I mean, Can I ,literally, replace so as by in order?

I'm a Korean and I learned in school that 'to' is equal to 'in order to' and 'so as to,' if they are used in expressing intent.   Are the sentences "I study in order to achieve my goal" and "I study so as to achieve my goal" same, in terms of nuance? If there's even the slightest difference when viewed by a native speaker, please elaborate! :)


I have the following code in an .sh file:  for num in {1..10} do   echo $num done   Which should print numbers from 1 to 10. But, this is what I get:  {1..10}   Also, using C-like sytax doesn't work as well:  for ((i=1; i<=10; i++))   This gets me an error:  Syntax error: Bad for loop variable   The version of bash that I have is 4.2.25.

How do I iterate over a range of numbers in Bash when the range is given by a variable?  I know I can do this (called "sequence expression" in the Bash ):   for i in {1..5}; do echo $i; done   Which gives:     1    2    3    4    5   Yet, how can I replace either of the range endpoints with a variable? This doesn't work:  END=5 for i in {1..$END}; do echo $i; done   Which prints:     {1..5}


I want to change Custom Post Type Permalink slug order: From: example.com/cpt-slug/post-name To: example.com/post-name/cpt-slug Does this possible?

I there any way for changing the order of custom post type name in permalink From /{custom-post-type}/{post-name} To /{post-name}/{custom-post-type} Is this possible?


This bit of code if from an example for a linked list but I'm struggling to understand the 2nd line of this function, could someone talk me through it?  template <typename T> typename List<T>::Node* List<T>::search(T d) {     if(!head) return NULL;     Node* cur = head;     while(cur) {         if(cur->data == d) return cur;         cur = cur->next;     }     return NULL; }

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


I have that $5^{2^{k-2}}\equiv 1 \mod 2^{k}$ but I am unsure how to show that $2^{k-2}$ is the least integer that has this property.  I thought perhaps I could show that $2^{k-2}|\operatorname{ord}_{2^k}(5)$ since I already have (from above) $\operatorname{ord}_{2^k}(5)|2^{k-2}$ but I have been stuck with this.  Any help appreciated :)

Let $r$ be an integer greater than $2$.  Is there a simple way of showing that $2^r$ divides  $\left(\begin{array}{c}  {2}^{r-2} \\ k \end{array}\right) 2^{2k}$  but it does not divide $\left(\begin{array}{c} 2^{r-l} \\ k \end{array}\right) 2^{2k}$ for $l>2$ and for all $k$ greater than $0$ and less or equal than $2^{r-2}$?  Equivalently, is there a simple way of showing that the element $5$ has order $2^{r-2}$ in the group of units of the ring $\mathbb{Z}_{2^r}$?  The two questions are connected by writing $5 = 4 + 1$ and using the binomial expansion formula to study the order of $5$.


I'm on windows 10, I need a batch script or a powershell script to solve this problem.  I have downloaded the flash tv series, the structure looks like this      flash tv series folder episode 1 folder episode 2 folder episode 3 folder ...   And the movie files are inside the episodes folders along with subtitles srt sometimes. The folders containing the episodes have different names. The episodes are sometimes mkv and mp4 mostly.   I want a script to search every folder inside flash tv series folder looking for mkv, mp4, srt and move them up to the parent folder so I can add them to a vlc or SMplayer playlist. Because now I can't do that.

I would normally open the parent folder and search for * in order to select all of the files in subfolders, but in this instance, I have over 1,000,000 files that I need to sort through, so my explorer often crashes when trying to copy that many files through the GUI. I am not sure how much more effective this will be through the command prompt or a batch file, but it is worth a try, I suppose.  What I need to do is make it so that  |parent |    |123 |    |    123abc.png |    |456 |    |    456def.png |    |789 |    |    789ghi.png   becomes  |parent |    123abc.png |    456def.png |    789ghi.png   Yes, my actual file structure has the first 3 characters of the file name given to the folder name, if that can help at all in sorting these.


I've always used !$ to refer to the last argument of the previous command.  e.g.  ~/dir » mkdir birthday ~/dir » cd !$ ~/dir » cd birthday   However I've started seeing tutorials use $_ in place of !$  I've tested the two and the only difference I've noticed is subtle, but it appears that $_ will evaluate and execute the command whereas !$ will let you sanity check the output before hitting Enter, but is this the only difference between $_ and !$?  Update: flagged as a duplicate? This question may be answered by the accepted answer for the suggested question, but only because the answer is more detailed than the question required.  Searching for What does _$ mean? does yield the suggested duplicate, however I already and I knew prior to asking what !$ did, and there is nothing that suggests that question might also answer other questions.

I'm following through a tutorial and it mentions to run this command:  sudo chmod 700 !$   I'm not familiar with !$. What does it mean?


I have ssh-copy-id root@c199 succeeded before.  I can login by ssh root@c199 without password prompt I want to auto login by another user ufo  (remote machine has this user) ssh-copy-id ufo@c199  ask me enter password,   /usr/bin/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed /usr/bin/ssh-copy-id: INFO: 1 key(s) remain to be installed -- if you are prompted now it is to install the new keys ufo@c199's password:  Number of key(s) added: 1  Now try logging into the machine, with:   "ssh 'ufo@c199'" and check to make sure that only the key(s) you wanted were added.  But login by ssh ufo@c199 still prompt password input .     I try to login remote centos on msys2(on Windows) by ssh , I found there are many same lines like   ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCs7RTfvn83Rxdmvgfh+F4kUlM5FzIUb9rRHaqq11xKIW1gztn/+G4tr+OWl4o6GTW2Z361hIi ugy8DPtMATN66nTTDUYO0sSvw2BrQfDY4iIENdLpkkHO8KQVGpQE+8tDkaZfD6EQLVtl0uvDE3D77tfcnBLODXgZPQsUSlssMi+pxDbSVjjKgrP hM1G/L9OTrEHKWDhF+ZBgY1RuLl7ZEdoATbhJaK4FFb9hNn/2CSibVfLts8HJGYQXIQRX/RBzaDZp47sKZvq302ewkkVorNY+c9mmoze6mi8Ip2 zEQOMi6S9zM/yRiD0XZrbmzYfNkoXA03WTmMR/DynVvX2nV /c/Users/xxxx/.ssh/id_rsa   in centos's /home/ufo/.ssh/authorized_keys ,   I have changed .ssh user's folder permissions to 700 and authorized_keys file to 644 .   Same ssh key, ssh root@c199 promptless login , but ssh ufo@c199 prompt password input ..    UPDATE  ssh ufo@c199 -vv output:  .... debug1: Server host key: ecdsa-sha2-nistp256 SHA256:zmCg5vHhBAMd5P4ei82+KsVg072KXbC63C44P0w3zbU debug1: Host 'c199' is known and matches the ECDSA host key. debug1: Found key in /c/Users/xxxxx/.ssh/known_hosts:35 debug2: set_newkeys: mode 1 debug1: rekey after 134217728 blocks debug1: SSH2_MSG_NEWKEYS sent debug1: expecting SSH2_MSG_NEWKEYS debug1: SSH2_MSG_NEWKEYS received debug2: set_newkeys: mode 0 debug1: rekey after 134217728 blocks debug2: key: /c/Users/xxxxx/.ssh/id_rsa (0x60006bec0), agent debug2: key: /c/Users/xxxxx/.ssh/id_dsa (0x0) debug2: key: /c/Users/xxxxx/.ssh/id_ecdsa (0x0) debug2: key: /c/Users/xxxxx/.ssh/id_ed25519 (0x0) debug2: service_accept: ssh-userauth debug1: SSH2_MSG_SERVICE_ACCEPT received debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic,password debug1: Next authentication method: publickey debug1: Offering RSA public key: /c/Users/xxxxx/.ssh/id_rsa debug2: we sent a publickey packet, wait for reply debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic,password debug1: Trying private key: /c/Users/xxxxx/.ssh/id_dsa debug1: Trying private key: /c/Users/xxxxx/.ssh/id_ecdsa debug1: Trying private key: /c/Users/xxxxx/.ssh/id_ed25519 debug2: we did not send a packet, disable method debug1: Next authentication method: password

I'm working from the URL I found here:    My ssh client is Ubuntu 64 bit 11.10 desktop and my server is Centos 6.2 64 bit. I have followed the directions. I still get a password prompt on ssh.  I'm not sure what to do next.


Does tension in a string remain same even if masses attached to it are of different weights?   I have provided a diagram, according to me the tension in string should be different as masses hanging are different. My teacher has told me that tension in string will remain same.   Please explain why does it remain same?

So, I had this lecture where it was explained that if the pulley is friction-less, then the tension on any point of the rope is going to be same.  I can understand the friction-less part, as pulley is not applying any resistive forces that change the magnitude of the tension force.  But even then, how can the force of tension be same at any point on the rope?


In <a href="/tips/page.html">   /tips/page.html is a relative path or absolute path?  EDIT: This question is not duplicate. i have read http://stackoverflow.com/questions/181805/absolute-path-relative-path. That question says it is absolute path while http://www.coderanch.com/t/628765/Servlets/java/Relative-absolute-path says it is relative. therefore i have asked.

What's the difference between absolute path & relative path when using any web server or Tomcat?


I'm currently setting up a dictionary and am attempting to convert the values associated with a key from strings to integers. So I'm trying to go from this:      {'Georgia': ['18', '13', '8', '14']}   To this:      {'Georgia': [18, 13, 8, 14]}   Any ideas on how I would go about doing this?

In Python, how can I parse a numeric string like "545.2222" to its corresponding float value, 545.2222? Or parse the string "31" to an integer, 31?  I just want to know how to parse a float str to a float, and (separately) an int str to an int.


I'm really interested in playing role-playing games like D&D, but I don't know how to get into it. I have very few friends, and only 2 of them would probably even be interested in playing with me. (Also, one is moving away in the summer, and me and my other friend aren't really even that close.) How do I get started? Oh, and just in case this matters for some reason, I'm a 13 year old American boy.

I have been told that roleplaying is great fun. I've looked and looked and it all seems so complicated. Could anyone tell me a good place to start, and what sort of things you end up doing in roleplaying?


I'm a developer and don't have much design experience. I'm creating a landing page for a project I'm working on. I want to use the below image as the background for my landing page.   As you can see the text on it is not visible. I have tried using a few colors and none of them look good on that image because some part of the text gets joined with the image.   Can you please advise me on what color I should use?    Thank you

I've come here seeking for a bit of design help or advice on how I could possibly improve the following:  Like the title says, I'm having a website banner with multiple text displayed on different images as backgrounds. Now, since most of the images are dark, I've set the font color as white. But even then, some of the text is not very readable on a couple of images like:    Since I'm working with CSS, I've tried different options such as:  Adding Text Shadows:    CSS:  text-shadow: 3px 3px 0px #000;  Also tried, creating a semi-transparent box around the text:      I feel the box one looks out of place.  I've created a  for anyone who knows CSS. If not, please feel free to advice me based on your imagination alone.  PS: You could also advice on using a different font if that would help it stand out better.


We have seen that the use of "Avada Kedavra" produces a green flash and a dead body.  When Voldemort comes to Godric's Hollow, he kills James and Lily, whose bodies are now buried in the church graveyard, and attempts to kill Harry.  Of course, the curse rebounds back to Voldemort, 'killing' him.  Many years later, Voldemort and Peter recreate a body for Voldemort.  Is there anything, anywhere that says what might have happened to the Voldemort's original body/corpse?

At the start of Harry Potter and the Philosopher's/Sorceror's Stone Voldemort's Killing Curse backfires      due to Lily's sacrifice protecting Harry from Voldemort.   leaving Harry with his scar      and a loose piece of Voldemort's soul   and Voldemort as a loose soul, self-described as "Less than a ghost".  Voldemort was not dead, but had no physical body (until he got better in book 4).  What happened to his body?  Did it disappear?  Or was it left in the rubble of the house, alongside the bodies of James and Lily?


Let M be an R-module and e : M → M a morphism of R-modules such that e 2 = e. Show that M = ker(e) ⊕ Im(e).

Let $M$ and $N$ be $R$-modules, $f\colon M \to N$, $g\colon N \to M$ $R$-module homomorphisms such that $f(g(y))=y$ for all $y \in N$. Show that $M$ is direct sum by  $\mathrm{ker} f$ and $\mathrm{im} g$.  I can't understand how to use R-module homomorphism in this question.What's the use of module homorphism.


that I found are rather vague.  (Related question: )

Both methods collect particles or electromagnetic waves, and in both methods it's possible to reconstruct a 2D image, which may represent morphology (,  for example), electronic structure (,  for example), magnetic structure (,  for example) etc.  But is there a reason (other than historic) to divide  between microscopy and spectroscopy?  (Related question: )


I have two variables. The first variable is binary (yes or no) and measures if a person is happy or not. The second variable consists of 5 integers from 1 to 5 and measures if an emotion is positive or negative. For example, a 1 means negative emotion and a 5 means very positive emotion. I'm not sure if this variable is categorical or ordinal. In total I have 10'000 measures for each variable. I would like to calculate the correlation between these two variables. Which is the best measure? Is it Pearson correlation?

I'm struggling with my lab report. I have a questionnaire which contains Likert responses (1-7) as well as questions that require only yes or no answers. I want to see if there is a correlation between higher scores on the likert scale and responses to the binary answers to the other questions.   Specifically - the likert response is about anxiety levels. The binary (yes/no) answer is about negative consequences due to alcohol use. I want to just run the one ordinal likert item with all the negative consequence responses to see if there is a relationship. Can anyone help me?     Thanks so much for the fast comments. It definitely assures me that Spearman's Rho can be used but my main problem is the fact that i am mixing binary and ordinal variables together in the one correlation matrix.  I have one ordinal variable (anxiety - 1-7 on likert scale) crossed with 13 dichotomous (0 or 1 representing yes or no) to answers ("have you ever been hospitalised due to your alcohol use?). I get statistically significant answers (<.05 and < .01 but the Correlation coefficients are tiny (i.e o.2) at best.   the hospitalisation is the DV an the anxiety levels the IV.   I just think i'm doing something wrong here. should i collapse the 13 binary variables in to one some how?   i can't see how SPSS will recognise the values between 1-7 when correlating with binary answers. i keep thinking it will just read that there is something in that box (ordinal) but not recognise the value (i.e 1-7) . but people keep saying that SPSS does in fact recognise this difference and account for it.


According to terms of service of this site, can I create a account as my company name?  For example: assume that I have company / Business / Start-up called "ABCDEF".  Can I create a Stack Exchange account with "ABCDEF" as display name?

While doing some flagging (yes, I'm a little bit addicted) I stumbled upon the user . At first the case seemed clear, Spammer, but...and that's a big one, he seems to be a productive member of SU and SO (his account on SF isn't there anymore, but it's still in the Data-Dump of the explorer, not sure what happened).  He does never seem to link against StarWind-Software, except with his name and profile. He also  that he's a developer there...so...at what am I looking here? I can't really place him somewhere.


Ideally, I would like to be able to add people as friends (with their approval). So that when they ask a question, I get a notification.  How is this useful? I have to exchange e-mails with co-workers about C++ questions. And often I need to make a post on SO and send them a link. It would be more user-friendly to just add friends and avoid e-mails.   The only disadvantage of it that I see is that users will boost their friends' ratings faster than average, which makes it unfair. The advantage for the community is that more users will use SO.  One hack (or short term solution) would be to create a tag with the name of a group and all members will rss to that tag.

I think it would be nice to have a "friends list" on Stack Overflow. This would allow us to be able to follow the questions and answers that are posted by users that we want to watch/monitor.  I suggest it be implemented in the same fashion as DotNetKicks.com; where you can add someone to your "friends list" without them needing to approve you the way that other social networks do it. It should be completely open for us to add anyone to our "friends list" that we like.


In pg. 81 of the Physics from Symmetry , the author deduced that the $(\frac{1}{2}, \frac{1}{2})$  representation of the Lorentz $SO(1,3)$ group acts on $2\times2$ Hermitain matrices using the following arguments:  First assume that the $(\frac{1}{2}, \frac{1}{2})$ representation acts on general  $2\times2$ matrices.  Any $2\times2$ matrix can be written as a sum of a Hermitian and an anti-Hermitian matrix.  Transformations in the $(\frac{1}{2}, \frac{1}{2})$  representation always transform a $2\times2$ Hermitian matrix into another $2\times 2 $ Hermitian matrix  and equivalently an anti-Hermitian matrix into another anti-Hermitian matrix.  The above point tells us that the  if $(\frac{1}{2}, \frac{1}{2})$ representation acts on general $2\times2$ matrices, it is a reducible representation. But this contradicts the fact that the $(\frac{1}{2}, \frac{1}{2})$ representation is irreducible.  Thus the $(\frac{1}{2}, \frac{1}{2})$ representation acts on $2\times 2$ Hermitian matrices.   The leap in logic from the 4th to 5th point confuses me. Why can't the $(\frac{1}{2}, \frac{1}{2})$ representation act on $2\times2$ anti-Hermitian matrices?

Why can we write an arbitrary object  $v_{a \dot{b} }$ our transformations in this basis act on as  $$ v_{a \dot{b} } = v_{\nu} \sigma^{ \nu}_{a \dot{b} } = v^0 \begin{pmatrix}    1&0 \\ 0&1 \end{pmatrix}  + v^1 \begin{pmatrix}    0&1 \\ 1&0 \end{pmatrix}  +v^2 \begin{pmatrix}    0&-i \\ i&0 \end{pmatrix}  + v^3 \begin{pmatrix}   1&0\\0&-1 \end{pmatrix} $$  Formulated differently: How do we know that the vector space for the $(\frac{1}{2},\frac{1}{2})= (\frac{1}{2},0) \otimes (0,\frac{1}{2})$ representation of the Lorentz group is the space of hermitian $2\times2$ matrices? The vector space for the $(\frac{1}{2},0)$ representation is $\mathbb{C}^2$ and I guess the same is true for the $(0,\frac{1}{2})$  representation, but I can't put it together to end up with hermitian matrices.   EDIT: I found in the book  by Matthew Robinson the following explanation.      Recall that just as any real matrix can be written as the sum of a symmetric matrix and an antisymmetric matrix, any complex matrix can be written as the sum of a Hermitian matrix and an anti-Hermitian matrix. However, the two indices on our matrix $v^{a \dot b}$ transform under representations of $SU(2)$. Notice that in the generators of these copies of $SU(2)$, both sets of generators $N^-$ and $N^+$ are Hermitian (cf. (3.229)). So, we’ll limit our discussion to the case where $v^{a \dot b}$ is a Hermitian $2 \times  2$ matrix.   If anyone could help me understand this line of thought my problem would be solved.  Why does this allow us to " limit our discussion to the case where $v^{a \dot b}$ is a Hermitian $2 \times  2$ matrix"?  I understand that our representation here acts on complex $2\times2$ matrices. But I don't understand why we can restrict to hermitian matrices.


I just want to have a simple clickable button but I'm getting a NullPointer and I dont know why. Maybe does it matter if this button is placed in a table layout? My Code: package com.christoph.memo; import android.os.Bundle; import android.view.View; import android.widget.Button; import com.google.android.material.bottomnavigation.BottomNavigationView; import androidx.appcompat.app.AppCompatActivity; import androidx.navigation.NavController; import androidx.navigation.Navigation; import androidx.navigation.ui.AppBarConfiguration; import androidx.navigation.ui.NavigationUI;  public class MainActivity extends AppCompatActivity {      Button buttonChangeFontColor;      @Override     protected void onCreate(Bundle savedInstanceState) {         super.onCreate(savedInstanceState);         setContentView(R.layout.activity_main);         BottomNavigationView navView = findViewById(R.id.nav_view);         AppBarConfiguration appBarConfiguration = new AppBarConfiguration.Builder(R.id.navigation_memo, R.id.navigation_options).build();         NavController navController = Navigation.findNavController(this, R.id.nav_host_fragment);         NavigationUI.setupActionBarWithNavController(this, navController, appBarConfiguration);         NavigationUI.setupWithNavController(navView, navController);          //Here is the error         buttonChangeFontColor = findViewById(R.id.button);          buttonChangeFontColor.setOnClickListener(new View.OnClickListener() {             @Override             public void onClick(View v) {                 //...             }         });     } }  My Error: E/AndroidRuntime: FATAL EXCEPTION: main     Process: com.christoph.memo, PID: 3672     java.lang.RuntimeException: Unable to start activity ComponentInfo{com.christoph.memo/com.christoph.memo.MainActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.widget.Button.setOnClickListener(android.view.View$OnClickListener)' on a null object reference         at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3270)         at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3409)         at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:83)         at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)

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


If I want to rhyme with a word like 'time' would 'overtime' or 'anytime' count as a rhyme with 'time', saying that 'anytime' and 'overtime' have the word 'time' in it. (This goes for any other words)

In other words, does rhyming work reflexively?  Do "potato" and "potato" rhyme?  Is the following (admittedly cumbersome) limerick valid?      An issue with rhymes confused me much  So I used the internet as a crutch  I went to a site  The Stack Exchange site  And   used it as my crutch