I am using  abort() method when constructing an error response in REST. The example given has a named argument message  def abort_if_todo_doesnt_exist(todo_id):     if todo_id not in TODOS:         abort(404, message="Todo {} doesn't exist".format(todo_id))   The output is   {     "message": "Todo asd doesn't exist. You have requested this URI [/todos/asd] but did you mean /todos/<todo_id> or /todos ?" }   In my scenario, I already have a custom exception type  class InvalidParameter(Exception):     status_code = 400      def __init__(self, message, status_code=None, resource=None,                 field=None, code=None, stack_trace=None):         Exception.__init__(self)         self.message = message         if status_code is not None:             self.status_code = status_code         self.resource = resource         self.field = field         self.code = code         self.stack_trace = stack_trace      def to_dict(self):         rv = {}         error = {}         rv['message'] = self.message         error['resource'] = self.resource         error['field'] = self.field         error['code'] = self.code         error['stack_trace'] = self.stack_trace         rv['error'] = error         return rv   and a specific structure of JSON response for errors:  {     "message": "Project name 'GGO' already exist.",     "error": {         "resource": "Project",         "field": "project_name",         "code": "already_exists",         "stack_trace": "(psycopg2.IntegrityError) duplicate key value violates unique ..."     } }   Problem Code  I have to use two named arguments  except InvalidParameter as err:     abort(err.status_code,                  message=err.to_dict()['message'],                  error=err.to_dict()['error'])   When I use this     except InvalidParameter as err:         abort(err.status_code, err.to_dict())  I get the error   TypeError: abort() takes 1 positional argument but 2 were given // Werkzeug Debugger   How can I pass the entire err dict as a parameter?

I'd like to call a function in python using a dictionary.  Here is some code:  d = dict(param='test')  def f(param):     print(param)  f(d)   This prints {'param': 'test'} but I'd like it to just print test.  I'd like it to work similarly for more parameters:  d = dict(p1=1, p2=2) def f2(p1, p2):     print(p1, p2) f2(d)   Is this possible?


I want to know how to answer negative questions. For example, take the following example:  Q: "Aren't you supposed to be there at 7? You don't have time." A: "No, I can make it on time."  Someone told me that my response above is wrong, and that I should answer with:  A: "Yes, (I am.) I can make it on time."  or  A: "No, I'm not supposed to be there at 7."  Can you explain for me which one sounds normal to native English speakers?

I faced a problem to answer a negative question, for example, when someone asks you:      Don't you have any money?   It's a yes/no question but how should one answer the question without ambiguity?  When you answer "yes", does it mean "yes, I don't have any money"? or the other way "Yes, I do have money"? the questioner may think you are agreeing to the negative, that yes, you do not have any money.  I know it's better to answer with "on the contrary" but is it possible to answer yes or no?


I have been learning English for a long time, but still don't understand about the when/while difference and their usage.  When can I use "while"?

He left the house _ I was still sleeping   Would this sentence be better completed with when or with while?


I am solving a limit and am stuck with finding the common denominator. This is the limit that I have:  $$\lim_{x \to 1} \left( \frac{1}{1-x} - \frac{3}{1-x^3} \right)$$  Since $x \to 1$, the limit is $\frac{1}0 - \frac{3}0$ - or $\infty - \infty$.  So, I think the next thing I need to do is find the common denominator and continue from there on.   I would very much appreciate an answer. Thank you all and have a nice day.

How does one evaluate the following limit? $$\lim_{x \to 1} \left(\frac{23}{1-x^{23}}-\frac{11}{1-x^{11}} \right)$$ The answer is $6$.  How does one justify this answer?  Edit: So it really was just combine the fraction and use L'hopital's rule twice (because function and its first derivative are of indeterminate form at $x=1$). This problem is more straightforward than it seems at first.


Let $R$ be a commutative ring with unity.  Call $R$ a *-ring if the intersection of all non-zero ideals of $R$ is non-zero.  Note that we consider $R$ itself an ideal.  If $R$ is an integral domain that is a *-ring, show that $R$ is a field.  My idea was to show that a maximal ideal $I$ is the zero ideal, but I'm not really getting anywhere.  Doesn't seem like too hard of a problem, so any hints would be amazing.

Let $D$ be a domain which is not a field. If there exists $b \in D - \{0\}$ such that for all $a \in D - \{0\}$, $a|b$, then is it true that $b = 0$?   This is certainly true if one has a UFD with infinitely many irreducibles (that are not associates) or a Jacobson domain which is not a field (or more generally a domain where the intersection of all non-zero prime ideals is the zero ideal), but I can't seem to be able to prove this for a domain in general or find a counterexample.  If this statement is false for an arbitrary domain, then is there some additional weak hypothesis on the domain which makes the above statement true?   I was actually trying to answer a question asked yesterday on MSE, which was the following:  If $D$ is a domain which is not a field and $Q = Frac(D)$, then $Hom_D(Q,D) = \{0\}$. Note that if $\varphi$ is any such $D$-linear map, then for all $a \in D- \{0\}$, $a\varphi(1/a) = \varphi(a/a) = \varphi(1)$. Thus, I get for all $a \in D - \{0\}$, $a|\varphi(1)$, and I want to conclude that $\varphi(1) = 0$, but cannot.


Dose there a function $f: \mathbb{R} \to \mathbb{R}$ satisfying  $f(a+b) = f(a)+f(b)\quad\forall a,b\in\mathbb{R}$ But not of the form $f(x)= \lambda x$ ?  Such $f$ must necessarily be discontinuous

The  asks about functions $f \colon \mathbb R \to \mathbb R$ such that $$f(x+y)=f(x)+f(y).$$ It is a very well-known functional equation, which appears in various areas of mathematics ranging from exercises in freshman classes to constructing useful counterexamples for some advanced questions. Solutions of this equation are often called . Also a few other equations related to this equation are often studied. (Equations which can be easily transformed to Cauchy functional equation or can be solved by using similar methods.) Is there some overview of basic facts about Cauchy equation and related functional equations - preferably available online?


Suppose that $f$ is one-to-one and continuous on [$a,b$]. Prove that $f$ is either strictly increasing or strictly decreasing on [$a,b$].

I would like to prove the statement in the title.  Proof: We prove that if $f$ is not strictly decreasing, then it must be strictly increasing. So suppose $x < y$.  And that's pretty much how far I got.  Help will be appreciated.


Let be $H$ Hilbert space and $M\subset H$. $M=M^{\perp\perp}$ if and only if $M$ subspace of $H$.   Does anyone know to prove this?

Let $X$ be a subspace of a Hilbert space $H$.  prove:  $X$ is closed iff $X =( X^\perp)^\perp$   I do not know how to proceed. any hints would be appreciated.  thanks.  $X^\perp = ${ $y \in H$:$\langle x,y\rangle = 0 \forall x \in  X\}$.


I run the following command:     sudo chown -R :NewGroup /usr <--- I changed the assigned Group not the owner   Then, I get the following error:   sudo: /usr/bin/sudo must be owned by uid 0 and have the setuid bit set   Does anyone know how to fix this?

I accidently ran  sudo chmod 755 -R /   instead of  sudo chmod 755 -R ./   I stopped it after few seconds, but now there is some problems such as  sudo: must be setuid root   How can I revert permissions back?


Find primitive element of $Q(\xi, \sqrt[6]{5})$, where $\xi^3 = -1 \neq - \xi$. Find Galois group of this extension and describe it`s subfields.   First of all, finding primitive element. The only idea I have is take $\gamma, \gamma^2, \gamma^3$, where $\gamma \in Q(\xi, \sqrt[6]{5})$ and try to derive $\xi$ and $\sqrt[6]{5}$ from this linear system.  I know what is Galois group, but not understand how I can build it in this case.

I have some problems with this exercise. I don't know if it can be done. Consider the polynomial $ x^n - a \in \mathbb{Q} $ Can I compute the Galois group of this over $\mathbb{Q}$? Maybe having a nice "basis.  The splitting field is given by $\mathbb{Q}(\zeta_n,\alpha)$ , where $\zeta_n$ is a primitive root of unity , and $\alpha$ is some number such that $\alpha^n = a $. Well first of all, I want a $\underline{"good basis"}$ for the splitting field. In the sense that the minimal polynomials, of the adjoined elements, are different (in this case the computation of the galois group is very simple).  For example one easy case, it's when $a>0$, then $(a)^{\frac{1}{n}} \in \mathbb{R}$ , so clearly the minimal polynomial of $(a)^{\frac{1}{n}} , \zeta_n$ are distincs, and I'm done. If $n$ is odd then , it's also easy, since one root it's also real, for example $x^3-3 $, the real root is $ \root 3 \of { - 3}  =  - \root 3 \of 3  $ , so I can consider the splitting field as $\mathbb{Q}(-\root 3 \of 3 , \zeta_3 )=\mathbb{Q}(\root 3 \of 3 , \zeta_3 )$. The difficult case is when $n$ is even and $a<0$ , for example  $x^8+20$ or $x^4+20$ in some cases as in the second, there are particular cases since there exist algorithms for the Galois group of quartics, but in general. It can be done?  $\underline{Remark}$ I'm searching a $\underline{"good basis"}$ for the splitting field. In the sense that the minimal polynomials, of the adjoined elements, are different since in this case the computation of the galois group is very simple.


Apex class  public class Controller_Apex{     @AuraEnabled     Public static string callApexmtd(){         return 'Amit kumar';     }  }   component  <aura:component controller="Controller_Apex">     <aura:attribute name="Result" type="string" />     <lightning:button label="submit" onclick="{!c.show}" />  </aura:component>   controller  ({     show : function(component, event, helper) {         var abc=component.get("c.callApexmtd");         abc.setcallback(this,function(response)         {         var state=response.getstate();         console.log('state :' + state);         if(state === 'success'){             var result=response.getreturnvalue();             console.log('result' + result);             component.set("v.result",result);         }         });     $A.enqueueAction(abc); } })   Application  <aura:application extends="force.slds" >     <c:component_apex />  </aura:application>   Error     This page has an error. You might just need to refresh it. Action   failed: Capita_one:component_apex$controller$show [abc.setcallback is   not a function] Failing descriptor:   {Capita_one:component_apex$controller$show}

I'm trying to set an attribute inside the init method as .  Component  <aura:component implements="flexipage:availableForAllPageTypes" access="global" >      <aura:handler name="init" value="{!this}" action="{!c.doInit}"/>      <aura:attribute name="canCreateRecord" type="Boolean" default="false" />       {!v.canCreateRecord} <!-- outputs - false -->  </aura:component>      Controller  ({     doInit: function(cmp){             cmp.set("v.CanCreateRecord",  true );                             } })   When I output {!v.CanCreateRecord} inside the view, I get the default value of 'false'.     According to , the attribute should be set inside the init function before it is rendered. However, it's not happening in my case. What could I be missing?


Scenario:   Open a program that is starting slowly Not wait for it to open, and switch to other window/task. For e.g. selecting some files in a directory to delete While I am working focused on other task (selecting files) that program, after a few seconds, opens and covers everything   The desired behavior:  Do not open on top of all windows and distract me while I am working on other task, instead display a notification in side panel so I will open that window when I'll want (when I'll finish my current task)     What happens instead:  That program doesn't care what I am doing at the moment, it just opens rude in my face and covers everything.    This looks like a very minor problem, but it happens to me almost every day and already started to annoy me.

Here is a quesion that has been bugging me. You know how you can set up a program to run on start up right?  Well, how can i tell it to start minimized, like you would do in windows?   TeamViewer starts open, but I need it minimized, and Tray-it just doesn't seem as elegant of a way to do it.


I've purchased a HMI running on a stripped down Linux (C compiler missing). I connected the HMI to my network and I'm able to acces it by powershell. What I'm trying to achieve is to write data to this RS232 port(i think ttys0) and monitor the incoming data in my powershell. I'm a noob with Linux tho, hope someone can help!  Thanks in advance

On Linux, I want to send a command string (i.e. some data) to a serial port (containing control characters), and listen to the response (which also usually might contain control characters).   How can I do this as simplest as possible on Linux? An example is appreciated!


I have an external HDD that appears to be broken. Cannot be opened in Windows nor in Ubuntu (it is a NTFS file system). On Windows I have run (two times now) the command chkdsk. There it identifies certain memory segments which are unreadable. I thought that it would 'flag' these, and avoid them while trying to read in the HDD.  But after I ran that program, Windows was still unable to open it. So either I am wrong, or my disk is beyond repair.  Assuming that I am wrong, I turned to Ubuntu to see if gparted or fsck could be of any help. The 'check' function in gparted gave me an error... and not much additional information.  First checking where the partition is, running lsblk gives   sdb      8:16   0 298,1G  0 disk  └─sdb1   8:17   0 298,1G  0 part    Moving on to fsck, I ran the following command  root@...# fsck /dev/sdb1 -y fsck from util-linux 2.31.1   Nothing more. So that was quite strange. Therefore I tried the whole disk and not one partition. This gave  root@...# fsck /dev/sdb -y fsck from util-linux 2.31.1 e2fsck 1.44.1 (24-Mar-2018) ext2fs_open2: Bad magic number in super-block fsck.ext2: Superblock invalid, trying backup blocks... fsck.ext2: Bad magic number in super-block while trying to open /dev/sdb  The superblock could not be read or does not describe a valid ext2/ext3/ext4 filesystem.  If the device is valid and it really contains an ext2/ext3/ext4 filesystem (and not swap or ufs or something else), then the superblock is corrupt, and you might try running e2fsck with an alternate superblock:     e2fsck -b 8193 <device>  or     e2fsck -b 32768 <device>  Found a dos partition table in /dev/sdb   Thus the stated error is   fsck.ext2: Bad magic number in super-block while trying to open /dev/sdb   Since I am sure (thanks to gparted) that I am dealing with an ntfs file system, and not ext[0-9].. I think that the proposed solution (running ef2fsck is not applicable to me.  I don't know how to continue from here. I believe if certain memory segments can be avoided to read in.. I think I can retrieve some data from it. But I don't know how to do this.

MY NTFS Partition has gotten corrupt somehow (it's a relic from the days when I had Windows installed).     I'm putting the debug output of fdisk and blkid .  At the same time, any OS is unable to mount my root partition, which is located next to my NTFS partition. I'm not sure if this has anything to do with it, though. I get the following error while trying to mount my root partition (sda5)  mount: wrong fs type, bad option, bad superblock on /dev/sda5,        missing codepage or helper program, or other error        In some cases useful info is found in syslog - try        dmesg | tail  or so  ubuntu@ubuntu:~$ dmesg | tail [ 1019.726530] Descriptor sense data with sense descriptors (in hex): [ 1019.726533]         72 03 11 04 00 00 00 0c 00 0a 80 00 00 00 00 00  [ 1019.726551]         1a 3e ed 92  [ 1019.726558] sd 0:0:0:0: [sda]  Add. Sense: Unrecovered read error - auto reallocate failed [ 1019.726568] sd 0:0:0:0: [sda] CDB: Read(10): 28 00 1a 3e ed 40 00 01 00 00 [ 1019.726584] end_request: I/O error, dev sda, sector 440331666 [ 1019.726602] JBD: Failed to read block at offset 462 [ 1019.726609] ata1: EH complete [ 1019.726612] JBD: recovery failed [ 1019.726617] EXT4-fs (sda5): error loading journal   When I open gparted (using live CD), I get an exclamation next to my NTFS drive which states   Is there a way to run chkdsk without using windows ?  My attempt to run fsck results in the following :  ubuntu@ubuntu:~$ sudo fsck /dev/sda fsck from util-linux-ng 2.17.2 e2fsck 1.41.14 (22-Dec-2010) fsck.ext2: Superblock invalid, trying backup blocks... fsck.ext2: Bad magic number in super-block while trying to open /dev/sda  The superblock could not be read or does not describe a correct ext2 filesystem.  If the device is valid and it really contains an ext2 filesystem (and not swap or ufs or something else), then the superblock is corrupt, and you might try running e2fsck with an alternate superblock:     e2fsck -b 8193 <device>   Update: I was able to fix the NTFS partition running chkdsk off Hiren's BootCD, but it seems that the superblock problem still remains.  Update 2: Fixed superblock issue using e2fsck -c /dev/sda5


I need to pull my 2.79 projects into version 2.9(and up). When I try to open (a copy) only a few objects show up. The collections window shows all parts and they are enabled for viewing (eyeball icon), if I click on one of them its name appears in the viewport but the object is nowhere to be seen nor is the object origin dot. How can I get these files into 2.90 ready to work with?

Whenever I open a blend file that's from 2.79 in 2.8, all of the hidden objects from the blend file are grayed out but I can't unhide them. But other times layers from 2.79 that become collections are having the same problem of being grayed out even though they're not hidden in 2.79. Is this just a bug? I cant find an answer for it anywhere online. They do appear in the render, just not in the viewport window


I'm a beginner at c. I learnt that goto statement can be used to get out of all nested loops at a time. I also learnt that it is not so  preferred in C. However, I use it frequently because I think it helps a lot, and sometimes, it's much easier than the common alternatives. Here is a little program in which I used goto statement to correct the user's mistake instead of using a loop. So, my question is : Should I really stop using it?  #include <stdio.h> #include <stdlib.h>  int main() {     /*A program to store a number in 4 bits only !*/     printf("Enter x then z :\n");     int x, y;     Start:     scanf("%d %d", &x, &y);     if((x > 15) || (y > 15) || (x < 0) || (y < 0))     {         printf("Wrong numbers! : 0<= x,y <=15\n");         printf("Enter the numbers again : \n");         goto Start;     }     char z;     x<<= 4;     z = x + y;     printf("z = %d", z);     return 0; }

Everyone is aware of Dijkstra's  (also  .html transcript and  .pdf) and there has been a formidable push since that time to eschew the goto statement whenever possible. While it's possible to use goto to produce unmaintainable, sprawling code, it nevertheless remains in . Even the advanced  control structure in Scheme can be described as a sophisticated goto.  What circumstances warrant the use of goto? When is it best to avoid?  As a followup question: C provides a pair of functions, setjmp and longjmp, that provide the ability to goto not just within the current stack frame but within any of the calling frames. Should these be considered as dangerous as goto? More dangerous?    Dijkstra himself regretted that title, for which he was not responsible. At the end of  (also  .pdf) he wrote:     Finally a short story for the record.   In 1968, the Communications of the ACM   published a text of mine under the   title "The goto statement considered   harmful", which in later years would   be most frequently referenced,   regrettably, however, often by authors   who had seen no more of it than its   title, which became a cornerstone of   my fame by becoming a template: we   would see all sorts of articles under   the title "X considered harmful" for   almost any X, including one titled   "Dijkstra considered harmful". But   what had happened? I had submitted a   paper under the title "A case against   the goto statement", which, in order   to speed up its publication, the   editor had changed into a "letter to   the Editor", and in the process he had   given it a new title of his own   invention! The editor was Niklaus   Wirth.   A well thought out classic paper about this topic, to be matched to that of Dijkstra, is , by Donald E. Knuth. Reading both helps to reestablish context and a non-dogmatic understanding of the subject. In this paper, Dijkstra's opinion on this case is reported and is even more strong:     Donald E. Knuth: I believe that by presenting such a   view I am not in fact disagreeing   sharply with Dijkstra's ideas, since   he recently wrote the following:   "Please don't fall into the trap of   believing that I am terribly   dogmatical about [the go to   statement]. I have the uncomfortable   feeling that others are making a   religion out of it, as if the   conceptual problems of programming   could be solved by a single trick, by   a simple form of coding discipline!"


I've got an html form that is being validated using . The form has 3 submit buttons. Each submit button causes the page to do something a little different. I'd like for one of the three submit buttons to just submit the form and completely ignore the validation routine I've built using the jQuery validation plugin. Is this possible?  Thanks

I have a form with multiple fields that I'm validating (some with methods added for custom validation) with Jörn Zaeffere's excellent jQuery Validation plugin. How do you circumvent validation with specified submit controls (in other words, fire validation with some submit inputs, but do not fire validation with others)? This would be similar to ValidationGroups with standard ASP.NET validator controls.  My situation:  It's with ASP.NET WebForms, but you can ignore that if you wish. However, I am using the validation more as a "recommendation": in other words, when the form is submitted, validation fires but instead of a "required" message displaying, a "recommendation" shows that says something along the line of "you missed the following fields.... do you wish to proceed anyways?" At that point in the error container there's another submit button now visible that can be pressed which would ignore the validation and submit anyways. How to circumvent the forms .validate() for this button control and still post?  The Buy and Sell a House sample at  allows for this in order to hit the previous links, but it does so through creating custom methods and adding it to the validator. I would prefer to not have to create custom methods duplicating functionality already in the validation plugin.  The following is a shortened version of the immediately applicable script that I've got right now:  var container = $("#<%= Form.ClientID %> div.validationSuggestion");  $('#<%= Form.ClientID %>').validate({               errorContainer: container,     errorLabelContainer: $("ul",container),     rules: {         <%= YesNo.UniqueID %>: { required: true },         <%= ShortText.UniqueID %>: { required: true } // etc.      },     messages: {         <%= YesNo.UniqueID %>: 'A message.',         <%= ShortText.UniqueID %>: 'Another message.' // etc.     },     highlight: function(element, errorClass) {         $(element).addClass(errorClass);         $(element.form).find("label[for=" + element.id + "]").addClass(errorClass);         $(element.form).find("label[for=" + element.id + "]").removeClass("valid");     },     unhighlight: function(element, errorClass) {         $(element).removeClass(errorClass);         $(element.form).find("label[for=" + element.id + "]").removeClass(errorClass);         $(element.form).find("label[for=" + element.id + "]").addClass("valid");     },     wrapper: 'li' });


I want to use memory mapping files for data that I read only once. Currently I am using: FILE * f = fopen("data.dat", "rb");  fseek(f, 0L, SEEK_END); size_t fileSize = ftell(f); fseek(f, 0L, SEEK_SET);  char * buffer = new char[fileSize]; fread(buffer, sizeof(char), fileSize, f); fclose(f);  //operate with buffer for (size_t i = 0; i < fileSize; i++){    //... }  I wanted to use mmap and operate directly on mapped buffer. However, I have found in Apple doc about mmap that there is:  You should not use file mapping in the following situations:  You want to read a file sequentially from start to finish only once.   Why? If I use fread there is more "logic", plus I am creating new array, that is also not for free.

POSIX environments provide at least two ways of accessing files.  There's the standard system calls open(), read(), write(), and friends, but there's also the option of using mmap() to map the file into virtual memory.  When is it preferable to use one over the other?  What're their individual advantages that merit including two interfaces?


I am trying to do an assignment that is due tomorrow. I have gotten the code to compile but it will not run. I'm including the code. The methods established must stay. I am extremely grateful to anyone who can help.   import java.util.Scanner;  import java.util.Random;   public class NimGame {      public static int remaining; //the number of objects remaining in the game.     public static Scanner keyboardInput; //for getting user input from the terminal.      /**         When run, your main method should allow a user to play a simple version of Nim from the terminal.         You should at least implement the methods provided here as described in the assignment guidelines.     **/     public static void main(String[] args){     System.out.println("Please enter a starting number.");     remaining = keyboardInput.nextInt();     while(remaining>0){         int cMove=getComputerMove(remaining);         System.out.println("The computer takes away"+cMove);         remaining-=cMove;         System.out.println("Now there are"+remaining+" left");         if(remaining<=0){             System.out.println("The computer takes this game.");             return;         }         System.out.println("Please pick a number 1 or 2");         int hMove=getHumanMove(remaining);         remaining-=hMove;         System.out.println("Now there are"+remaining+" left");         if(remaining<=0){             System.out.println("Congratulations you win.");             return;         }         }     }         /**         Returns a number of objects for the computer to remove on its turn.          At a minimum, this should remove the last object if only one remains, and         otherwise it should randomly pick between removing one or two objects.          (update this documentation with details about the version you actually implement.)      */     public static int getComputerMove(int remaining)     {          Random comp = new Random();             int computerMove = comp.nextInt((2-1)+1)+1;         return computerMove;      }      /**         Returns a number of objects for the player to remove on its turn.          Use the Scanner parameter to get user input, but verify that the user can only select one or two objects to be removed.         (update this documentation with details about the version you actually implement.)      */     public static int getHumanMove(int remaining)     {         System.out.println("Please enter a one or two.");         int HumanMove = keyboardInput.nextInt();          return HumanMove;      }      /**         Returns whether or not the game is over, and print the winner to the terminal.      */     public static boolean isWin(int remaining)     {         return false;      }      }   The code will display the message "please enter a starting number" but then the error code Exception in thread "main" java.lang.NullPointerException at NimGame.main(NimGame.java:27) will appear.

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?


System monitor in Kubuntu can filter running processes so that I can choose Program only choice so my question is how can I get the same results by commands ?

How can I see which application and what processes are running recently after the login using terminal command.


This is probably a beginner question, but it's always been throwing me off about LaTeX, especially because when I'm showing new people the basics, I can't explain why that is.  So the question is: Why does \large have to be wrapped inside {} to not make everything after it become large as well? When I type \large{Some text} it doesn't mean at all what one might expect ({Some text} isn't an argument apparently). For commands like \textbf it works the way I'm used to for most commands: Without braces, it just affects the next token, with curlies, it affects that whole argument inside the curlies and nothing beyond that.  Is there a term for these kinds of commands? I don't recall having seen very many others that behave like this.

I've always been confused by the differences in behavior of font commands.  For example, we have \mathrm{} and \texttt{}, which can be used like this: \texttt{hello} world.  And then we have \it and \bf which must be used as {\it hello} world. If one uses \it{hello} world, both words are italicized.  Internally, what is the difference here? And was this difference a conscious design decision? If so, why?


This particular question was asked in my algebra quiz and I was unable to think of what result I should use to prove this statement.  Let $G$ be a finite abelian group and $a,b \in  G$ with $|a|=m$ and $|b|=n$. Then prove that there always exists an element of $G$ whose order $= \text{lcm}(m,n)$  I proved that there always exists an element whose order divides $\text{lcm} (m,n)$. If $\gcd (m,n) = 1$ then $|ab|=\text{lcm}(m,n)$ .But how to prove it in case when $\gcd(m,n)>1$? Which result should I use?

How can I prove that if $G$ is an Abelian group with elements $a$ and $b$ with orders $m$ and $n$, respectively, then $G$ contains an element whose order is the least common multiple of $m$ and $n$?  It's an exercise from Hungerford's book, but it's not homework. I could not solve it when I take the course on groups and I think it should be easy. There is a hint that says to first prove when $m$ and $n$ are coprimes. I did this part. But I have no idea how to solve the general case.  Thanks.


I'm looking to place exactly 750 filled circles in a random array within a circular shape, essentially a static version of    I've considered scatter graphs (but that seems as painful as manually placing each circle), the transform effect and blend tools (but these seem linear, or require going along, rather within a path). I wonder whether I need to script this, but I've never done that before so would love it if you could step out exactly how I should go about this?   One user has suggested making a custom brush, however this does not allow me to specify an exact number of circles (I need to be sure there are 750). One thing I didn't mention earlier is that I want to select and alter the colour of 162 of the circles once they've been drawn, so they need to remain editable.

How can I make a logo in Adobe Illustrator like the AntiParticle logo below, from ?   It is a large number circles of different, varying sizes, which form the shape of a text character.


Sometimes, you ask a question and you are lucky enough to get an answer in one or two minutes. I don't understand why I have to wait for 15 minutes before I can accept the answer if it solves my problem. To be honest, the most annoying part about this is having to keep an extra tab open in my browser for 15 minutes until I can accept it.   Now, according to , "they're accepting the first answer that comes along without considering all their options."  This is not always true. Now, on a website such as stackoverflow (I'm only posting it on the stackoverflow meta because meta.stackexchange redirects here so I'm assuming it's the "general" meta) there is a good reason for this timer. However, on a website such as superuser, where a lot of problems are of broken things, if people offer a solution that fixes their issue, there's no point in waiting 15 minutes, their problem has been fixed and their question has been answered.

I keep on seeing a fair number of questions (such as ) which get marked as answered within 5-10 minutes of being posted. Sometimes the questions like this are insanely popular and actually see some proper discussion, however often I see questions have few views and only 1 answer. The trouble with these questions is that very few people have scrutinised the answer for correctness, or possibly a better solution. I always make a point of not accepting my answers until a day or so has passed — would it not be a good idea to put a short (1 hour or so) time limit on accepting answers on new questions with few views or votes, or perhaps just an additional confirmation dialog, something along the lines of:  Your question is new and not many people have had a chance to look at it yet.  Are you sure you don't want to wait to see if anyone else has a better suggestion?


Why do we use double hyphen in tar --anchored and single hyphen in tar -b?  I mean to say why some command line options have single hyphen (-) while some others have double (--)?  Also a git example:  git commit --amend git commit -a

Where did the convention of using single dashes for letters and doubles dashes for words come from and why is continued to be used?  For example if I type in ls --help, you see:    -a, --all                  do not ignore entries starting with .   -A, --almost-all           do not list implied . and ..       --author               with -l, print the author of each file   -b, --escape               print octal escapes for nongraphic characters       --block-size=SIZE      use SIZE-byte blocks   -B, --ignore-backups       do not list implied entries ending with ~ ...   I tried googling - and -- convention even with quotes with little success.


What exactly went wrong with the below method?  Here, in the same circuit I am getting a different value for the current in the mid wire only by rearranging the circuit.    I was trying to solve this unbalanced  and found that the current (\$i\$) in the mid wire (in image 1) is 3 A. This result was achieved by using the node voltage method.  Then I rearranged the same circuit to the form shown in the second image.    And at this point I flipped the right half of the circuit so as to obtain the equal resistors on the same side.    Now I again rearranged the circuit as shown.    Here, the final circuit is a balanced Wheatstone bridge and thus the current (\$i\$) must be 0 A.  So clearly something went wrong in there.  I posted  before this one just to make sure that there is no mistake in rearranging the circuit in the way I have done.  The mid wire is a complete connected wire. The gap in the mid wire near the arrow was inevitable.

I was trying to solve this unbalanced Wheatstone bridge and found that the current $i$ in the mid wire is 9A .This result was achieved by using node voltage method.    Then I rearranged the same circuit to the form shown in the second image.  and at this point I flipped the right half of the circuit so as to obtain the equal resistors on the same side.    now I again rearranged the circuit as shown.    Here, the final circuit  is a balanced Wheatstone bridge and thus the current i must be 0.  So clearly something went wrong in there.  I saw a post  before this one just to make sure that there is no mistake in rearranging the circuit in the way I have done.   It was answered by the user PhillipWood as being correct and was unfortunately put on hold.  So can someone please point out what exactly went wrong with the above method.


I have a function in my JavaScript/JQuery that populates a form on $(document).ready.  $(document).ready(function build_item_table() {     for (var x = 1; x <= 20; x++) {         $('#item_table tbody').append("
");         $('#item_table tbody').append("<select id=\"item_" + x + "_budget\" name=\"item_" + x + "_budget\" class=\"item_budget\" width=\"110px\"><option>Loading...</option></select>	");         $('#item_table tbody').append("<input type=\"text\" id=\"item_" + x + "_code\" name=\"item_" + x + "_code\" class=\"code_textbox\" size=\"20\">	");         $('#item_table tbody').append("<input type=\"text\" id=\"item_" + x + "_description\" name=\"item_" + x + "_description\" class=\"desc_textbox\" size=\"83\">	");         $('#item_table tbody').append("<input type=\"text\" id=\"item_" + x + "_quantity\" name=\"item_" + x + "_quantity\" class=\"cost_textbox\" size=\"7\" value=\"0\" required>	");         $('#item_table tbody').append("$&nbsp;<input type=\"text\" id=\"item_" + x + "_unit\" name=\"item_ " + x + "_unit\" class=\"qty_textbox\" size=\"10\" value=\"0.00\" required>	");         $('#item_table tbody').append("$&nbsp;<input type=\"text\" id=\"item_" + x + "_total\" name=\"item_" + x + "_total\" class=\"cost_textbox\" size=\"10\" value=\"0.00\" required>	");         $('#item_table tbody').append("
");     } });   However, I want to validate the some of the text inputs via this function (btw, I take no credit for this function since I found it on here from this great community):  $('.cost_textbox').keypress(function(eve) {   if ((eve.which != 46 || $(this).val().indexOf('.') != -1) && (eve.which < 48 || eve.which > 57) || (eve.which == 46 && $(this).caret().start == 0) ) {     eve.preventDefault();   }  // this part is when left part of number is deleted and leaves a . in the leftmost position. For example, 33.25, then 33 is deleted $('.cost_textbox').keyup(function(eve) {   if($(this).val().indexOf('.') == 0) {         $(this).val($(this).val().substring(1));   }  }); });   This works for the Input Textboxes generated in the HTML code, but not to the ones appended in JavaScript. How do I fix this? Thanks in advance.

I have a bit of code where I am looping through all the select boxes on a page and binding a .hover event to them to do a bit of twiddling with their width on mouse on/off.  This happens on page ready and works just fine.  The problem I have is that any select boxes I add via Ajax or DOM after the initial loop won't have the event bound.  I have found this plugin (), but before I add another 5k to my pages with a plugin, I want to see if anyone knows a way to do this, either with jQuery directly or by another option.


I have been looking for a device to connect printer, smartcard, etc. to two PCs at the same time. I've heard that there'd be a file corruption issue, but maybe they worked out a workaround. Unfortunately my search turned out empty why I am now here.  Right now I am working with a hub which has to switch control over devices. Is there a switch-less alternative? Ideally not costly.  Thanks in advance!

I want to share a printer to two computers sitting next to each other. Now I plug in the USB printer cable when one wants to print. Is there a cheap and better solution which allows two computers to access this printer (maybe not at the same time)?  I know that I can buy a new router with print-server capability but I already have a working wireless router-modem. My friend told me too that I can just plug the printer in one machine and share it over network, but then I have to boot that PC up before the other can access the printer. That's a little bit inconvenient to me.  Then I came up with this solution by myself. A normal USB hub has one plug and many receptacles. Instead I want the exact reverse, (at least) one receptacle for my printer and many plugs for many computers, but I have found none of such thing in any stores. Have you seen one?  Can you think of other solutions? Thanks.


I have a question - is it acceptable to write a sentence "If I would have won lottery, I would buy a car!"? Is it even correct? Thank you very much!

I watched a (Hollywood?) film the other day where a character visiting his just-hospitalised wife (who it seems will actually survive) says "If I would have lost you [I don't know what I'd do]".  I'd always thought this was an error made by non-native speakers (I myself would only expect "If I had lost you"), but there was nothing to suggest that in the movie. Is it a regionalism?  EDIT: Actually, that wasn't true about only expecting "If I had lost you". I'd have been perfectly happy with "If I'd have lost you", so long as I didn't think too hard about what was being elided. I'd usually elide "have" there to just a schwa (neutral vowel) anyway, and think no more about it.


How would I achieve this matrix in latex:   I am having trouble putting the S,R,C on the top and right respectively.

I would like to create a matrix with rows and columns being labeled. I would like the matrix elements to be right aligned, the row labels being displayed to the right of the matrix, and the column labels above the matrix. I tried:  \documentclass{article}  \usepackage[T1]{fontenc} \usepackage[american,ngerman]{babel}  \begin{document} % does work: $\bordermatrix{%  & 1 & 2 \cr 1 & x1 & x2 \cr 2 & x3 & x423 \cr 3 & x5 & x6 }$ % does not work (see error below): % $\bordermatrix*{% %   x1&x2&1\cr %   x3&x4&2\cr %   x5&x6&3\cr %   1&2 6 }$ \end{document}  % ERROR: Misplaced alignment tab character &.  % --- TeX said --- % l.17   x1& %           x2&1\cr % --- HELP --- % The special character &, which should be used only to separate items % in an array or tabular environment, appeared in ordinary text. You % probably meant to type \&.   To get at least the row labels displayed at the correct side of the matrix, I wanted to use the starred version of \bordermatrix, but that did not work (as opposed to given in Voss's mathmode guide). Also, the matrix entries are not right aligned. How can I create such a matrix? Is there a way to do this with amsmath?  UPDATE  Thanks to the link by Werner, a minimal example is this:  \documentclass{article} \usepackage{blkarray} \newcommand{\matindex}[1]{\mbox{\scriptsize#1}} \begin{document} \[   A=\begin{blockarray}{rrl}     \matindex{1} & \matindex{2} & \\     \begin{block}{(rr)l}       \,100 & b\phantom{\,} & \matindex{row 1} \\       2 & 12 & \matindex{row 2} \\       e & f &  \matindex{ABDC} \\     \end{block}   \end{blockarray} \] \end{document}   It's just a quick hack to get a bit more horizontal space between the parentheses and the matrix entries.


On my Nokia Lumia smartphone I switched from mobile StackOverflow to full site.  How can I switch back? I cant find a link or button or some setting for that.

Possible Duplicate:          A few days ago, I was navigating through programmers.se, wandering around.  Suddenly, while the bus was making me do some weird touching on the screen, I turned to the desktop version of the website.  I have not found a single way to turn back to the mobile version. Appending ?mobile=true to the URL didn't do anything.  I do not want to clear the cookies, I'm using them on other websites and it's a pain to write on the phone. Also, there is no way to delete cookies for a single site on my Android.  So, is there any clean way to go back to the mobile version?


Besides price and size, what difference are there between a 1TB SATA 3.5" and 2.5" HDD?  Are there pro/cons in regards to noise/through put/response time/robustness?

What does the 2.5"/3.5" value indicate? The thickness?  I want one of my friends to buy 1TB hard disk for me. I know I want a 1TB capacity and 7200rpm, but don't know how to choose between 2.5" and 3.5"; I am worried that the 3.5" drive may be physically too big.  Also, aside from the measurements, are there any other differences that may cause compatibility or usability concerns?


Does existence of Eigendecomposition of a matrix imply that it is invertible? That is, does the existence of n independent eigenvectors of a matrix imply that the matrix is invertible? If so, what is the reasoning behind eigenvectors and invertibility being connected? It seems intuitively wrong based on what I've learnt.   For instance, suppose A has n independent eigenvectors. Then the eigendecomposition exists:   $$A = PDP^{-1}$$  Then A is invertible?  EDIT: link to another question on this topic:

For any matrix $A$, $AA^T$ is symmetric, and thereby diagonalizable (Spectral Theorem). This implies that $AA^T$ has n linearly independent eigenvectors and therefore full rank.  Does this imply that for any matrix $A$, $AA^T$ is always invertible ? I know there is something wrong here because from the above chain we can conclude that a symmetric matrix is always invertible, which is definitely not true.  Could someone please point out where I am going wrong?


Hi below I represented the structure of my current datagridview, the last field of the datagriview has a checkbox what I have to do is retrieve the id of the row corresponds when the check is made is true, how can I do to do this?  DataGridView Structure:      MyId | My Value | checkbox

DataGridView.CellContentClick is not firing if I mouse click a DataGridViewCheckBoxCell very fast. How can I solve this? I need to know when CheckBox's check state changes


says that     The xmlns:fx attribute is always required and specifies the fx namespace.   but what exactly is the fx namespace?  And what values qualify for this attribute?

This is something that I always find a bit hard to explain to others:  Why do XML namespaces exist?  When should we use them and when should we not? What are the common pitfalls when working with namespaces in XML?   Also, how do they relate to XML schemas? Should XSD schemas always be associated with a namespace?


My doubts are.....  What is a simple compressible system?  Why can't I use two dependent intensive properties to specify the thermodynamic state.  Why can't I use extensive property like total volume to specify the thermodynamic state?

According to the , the state of a simple compressible system is completely specified by two independent intensive properties. My doubts are...  What is a simple compressible system and how does it differ from other systems? Why cant we use two dependent intensive properties to specify the state? What is the problem if someone uses extensive property like total volume to specify the state of a system?


There are several statements in an existing project that includes ? and :.  I would like to understand what do they mean, and in the following statements, if they can be explained.  loginID = rawLoginID.Contains("\\") ? rawLoginID : domain + "\\" + rawLoginID;  string orgUnitCode = row[ORG_UNIT_CODE] != null                      ? row[ORG_UNIT_CODE].ToString()                      : string.Empty;  loginID = loginID.Contains("\\") ? loginID : domain + "\\" + loginID;   The syntax that I am not sure are ? :  Thank you.

Please demonstrate how the ternary operator works with a regular if/else block. Example:  Boolean isValueBig = value > 100 ? true : false;     Exact Duplicate:


I have one background image which has a nice funky red sparkly light design which I am using on all of the webpages, and I have a 2nd funky background I want to use on a the final page. This site is within a Wordpress template. The first red funky background is on all the pages, the final page I want to have the 2nd background image (more gold elements in it) on top of the standard background so that the first background kinda acts like a boarder and just spills to the next page break. Can someone provide an example of this code in html and css? You can use any two images of your choice as long as both fill up most of the screen with the one on top only a little smaller.

Is it possible to have two background images?  For instance, I'd like to have one image repeat across the top (repeat-x), and another repeat across the entire page (repeat), where the one across the entire page is behind the one which repeats across the top.  I've found that I can achieve the desired effect for two background images by setting the background of html and body:  html {     background: url(images/bg.png); }  body {     background: url(images/bgtop.png) repeat-x; }   Is this "good" CSS?  Is there a better method?  And what if I wanted three or more background images?


Situation:  I am sitting in my class and seeing that magnetic pin is falling off the board down on the floor! Now I’d like to describe what just happened!      The magnetic pin have fallen from the board!   or     The magnetic pin fell off the board!   Which one I need to use and why?

Sometimes I feel difficulty telling the difference between simple past and present perfect.  Given a picture like this:    which one is correct between these two? Or in what sense are they different?  A. He fell off his motorcycle.  B. He has fallen off his motorcycle.


The question is simple. I have created a class named "handler" and within its constructor it contains a parameter for "c", a JComponent. When this constructor is called on a certain JComponent, preferably a JPanel, an oval is drawn at the mouse's current coordinates. This is the source code:  import javax.swing.*; import java.awt.*; import java.awt.event.MouseEvent; import java.awt.event.MouseListener; import java.awt.event.MouseMotionListener;  public class Handler implements MouseListener, MouseMotionListener {  Graphics g;  public Handler() {}  public Handler(JComponent c) {      if (c instanceof JPanel) {         g = c.getGraphics();         g.drawOval(mx, my, 5, 5);     }      if (c != null) {         c.addMouseListener(this);         c.addMouseMotionListener(this);     } }  int mx, my;   public void mouseClicked(MouseEvent e) {     mx = e.getX();     my = e.getY(); }  public void mousePressed(MouseEvent e) {     mx = e.getX();     my = e.getY(); }  public void mouseReleased(MouseEvent e) {     mx = e.getX();     my = e.getY(); }  public void mouseExited(MouseEvent e) {}  public void mouseEntered(MouseEvent e) {}  public void mouseMoved(MouseEvent e) {     mx = e.getX();     my = e.getY(); }  public void mouseDragged(MouseEvent e) {} }   However, this error is thrown:   Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException   Do you guys have any idea about this? If so, please post a solution.  Edit 1 I've done something new. This is my entire new code:  import javax.swing.*; import java.awt.*;  public class Handler extends JPanel {     int mx = MouseInfo.getPointerInfo().getLocation().x;    int my = MouseInfo.getPointerInfo().getLocation().y;   public Handler(BorderLayout bl) {     this.setLayout(bl); }  public void paintComponent(Graphics g23) {     Graphics2D g2 = (Graphics2D) g23;     g2.drawOval(mx, my, 30, 30);     } }   I've reworked the code greatly. Now, it extends JPanel and serves as a replacement to JPanel. So instead of instantiating a new JPanel, I'd call Handler's constructor. It also implements paintComponent, yet the oval still isn't being drawn. It yields no errors, however.

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


I have a Lenovo Edge 15, of which I installed Ubuntu on (removed Windows).  I have to access the BIOS. However, the F12 key won't open it, and the Lenovo logo won't even display. Instead, it goes directly to Ubuntu asking me for my password to decrypt the system.  I need help accessing BIOS  EDIT: It seems the BIOS itself maybe messed up. When I press F2, I get a black screen, and it stays there until reboot

I have a laptop with Ubuntu installed as the only OS. I also have a USB stick with a Windows 7 installation on it. I want to install Windows from the USB stick on my laptop but when I try to restart the laptop to get access to BIOS, I can't seem to find the command for it, its like it skips everything and just says Ubuntu and then takes me to the login screen.  How do I change the boot priority to USB in Ubuntu?


In most fora, there seems to be a reasonably kind and tolerant atmosphere, but I have seen several times on Stack Overflow, that people appear to almost 'gang up' to punish answers, for reasons that very often seem very petty - like here:    where a user, 'Rishabh Jhalani', has given an essentially correct answer, but is voted down for a very minor thing. I have experienced this myself, and while it doesn't cause me sleepless nights, it does tend to discourage me from engaging with the community. After all, I made an effort, however small, to contribute something - for free - in good faith.   I would like to see a reduction in this sort of behaviour, so I suppose there are two questions: Should we try to discourage this sort of small-mindedness? And, if so, how? I can imagine a scheme, where you can't down-vote, unless you also provide a comment, or a scheme, where a user's total up- and down-votes are tallied and visible to the community. What do people think?

Before you disagree with me with a downvote, or just want to be funny, please hear me out. From the :  The upvote privilege comes first because that's what you should focus on: pushing great content to the top. Downvoting should be reserved for extreme cases. It's not meant as a substitute for communication and editing.  I have honestly never seen a downvote reserved for an extreme case. The process is usually 1) downvote post if it's bad and don't comment. (Not much of a process, is it?) As you stay on the site longer and longer, you develop a carelessness towards downvotes (as I have), but for new users, it's really discouraging.  question inspired me to [ask balpha to] make , which is a list of users with 1 rep who have the  badge. That's the closest I could get to new users who deleted their own posts after downvotes came in. Don't get me wrong, I know the argument about being nice to new users very well, but I still believe it to be an issue. And since , users are much more inclined to go the lazy route and downvote bad questions. No alternative measures (see below) are taken, for the most part. Personally, I leave a comment and don't downvote until the asker shows no interest in fixing their post. The only other measure taken to discourage downvotes (on answers) is the -1 rep punishment to the downvoter, which is absolutely meaningless and inconsequential anyways. How are we supposed to educate new users when we don't teach them what to do, don't direct them to the FAQ, and discourage them with downvotes right off the bat?  Instead of voting down: If the post is spammy or offensive — flag it. If the question is duplicate or off-topic — flag it for moderator attention. If something is wrong, please leave a comment or edit the post to correct it.  We claim to discourage downvoting, yet I see answers like  that encourage us to downvote first and ask questions later when a question is simply unclear or effortless. It's just an awful chain reaction. A new user comes to the site asking a question, but that doesn't work out too well, so they get downvotes, delete the question in shame, and don't get the help they deserve as a fellow writer of code and programmer. Strip away the quality of the site for a moment: the core functionality of this site, and the only reason I and a lot of other users are (still) on it, is to receive and give help to/from others. I enjoy making sure fellow programmers get the answer they need, because this site has helped me get mine when I needed them. Quality can still be maintained if content is fixed rather than downvoted more often. So can we stop discouraging new users from continuing to use this site and actually start to discourage downvoting? I think we need to encourage effort towards teaching and helping new users understand the system and why their post is bad rather than slapping them in the face with downvotes that they don't know how to interpret anyways. I'm leaving ways we can do this up to others. My first thought was to increase the punishment for downvoting answers and to no longer make question downvotes free, but those wouldn't be well-received, judging by the history of similar suggestions. .


I wanted to ask a question about my forum. I wanted to know if a repeated question is asked daily over the course of a year with multiple users asking the same thing or answering the same thing. For example “yes, it would be healthy to eat vegetables daily.” If this has been said 50 times on my forum would it be considered duplicate content ?   Can multiple users sign up and post repeated questions through the year pertaining to the same topic. For example “how much water should I drink?”

This is a general, community wiki question regarding duplicate content.  If your question was closed as a duplicate of this question and you feel that the information provided here does not provide a sufficient answer, please open a discussion on .     What does Google consider to be duplicate content? Will the way I am presenting my content result in a duplicate content penalty? How can I avoid having my site's content treated as duplicate content?


I have understood that is impossible to use dd or cat for copy all data of a partition to another partition with differences in sizes, Is this statement correct?, example  2 HDD, the first /dev/sdd1 (100gb), and used 30gb and the second /dev/sdc1 (50gb), and haven't data  Surely I cant use:  cat /dev/sdd1 >/dev/sdc1   why? Because sdd1 has partition of 100gb and sdc1 has limit of 50gb    Is it true? what should I use for copying?  could I use (Assuming that hdds are mounted):   cp -avr /mnt/sdd1/* /mnt/sdc1/   Is it correct to use cp? someone know to alternative to cp  EDIT: In case of cant mount hdd because linux not recognized partition, what could I do? Continue with this new question in:   Note: I don't talking about of recovery tools like ddrescue  Thank you very much.

When I plug in a removable 1TB USB disk in my laptop, the operations led keeps blinking for a while and then you can hear the servo mechanism resetting with a short "tack".  I'd like to recover the data.    I believe there might be some way to get the data through low level IOs.    What I believe is that the mounting process assumes the disk is OK and I should prevent this before using ddrescue or something similar.  Does anybody have a solution to this problem?


I read on one site that you can make constant variables in JavaScript like:  const x = 20;   but on another site I read that you can't. So I am confused now what is it now?  Also in Visual Studio 2010 when I write const it underlines it in the JavaScript file and shows syntax error.

Is there a way to use constants in JavaScript?  If not, what's the common practice for specifying variables that are used as constants?


Google Chrome allows to view the browsing history. Is there any way to display a more complete timestamp i.e. having the hour, minute and second instead of having just the date?

Google Chrome's history search is somewhat … less powerful than I'd like it to be.    Examples:  These are some annoyances I've found while trying to work with the Chrome search.   Searching for superuser.com returns results from stackoverflow.com too. Searching for site:superuser.com does not work at all. "phrase queries" seem to work fine, but they're not indicated. Searching for hashify.me returns 3 results, none of those actually from , whereas searching for hashify returns hundreds of URLs I visited on this site.     What I need:   Is there any way to specify advanced search options there?  Which operators or types of queries can I use to search in Google Chrome? If not, can I use some other method to search my history more efficiently?   The Chrome help does not mention anything related.


I had a laptop with windows and ubuntu on it on 2 different partitions. Then the laptop stopped working due to issues not related to this question.  I took out the hard drive and put it into an external enclosure to get the data. When I connect it to my other Windows machine, it detects all the other partitions except the Ubuntu one.  What to do? I would love to be able to extract data from Ubuntu.  PS - If recovering data is not possible then can I at least format it to get the space back so I can use the hard disk as an external HDD?

I have two questions on ext4:   Is there currently a way to mount an ext4 partition in Windows (XP/Vista/7) to get basic read support? If not, are there any plans to support this someday?


I have a lamb roast in the freezer ( uncooked) that I put there at Christma, will this still be  "good"?  thank you, Claudia

How do I know if a given food or ingredient I have is still good, or if I should discard it?  How can I best preserve a food or ingredient?     This broad question is intended as a "general reference" question to quickly answer many how long will food keep for? questions. Please feel free to edit this question to expand and clarify as needed.


Related:   A while ago, I ran into an interesting conflict in a game that got me thinking.  I was playing in a party with a Knight/Paladin and three other characters. The Paladin was playing what essentially amounted to a wandering freelance cop, bringing justice wherever they found injustice, while the rest of the party was following along for the promise of gold rewards. Everyone, players and DM, was happy with this arrangement, as it brought regular sandbox style quests and good money.  The problem began when we ran into a deliberately grey moral situation presented by the DM. A drow entered a human village and was immediately captured and thrown in holding before public execution. The party discovered the drow was a thief, and the Paladin wished for the drow to be brought to proper justice for this, without the extreme of hanging "because drow". The paladin makes a deal with the drow: they'll free him from execution if he surrenders to whatever local laws did to thieves. Drow agrees, paladin convinces local law, drow pleads innocent of all charges, local law lets him go due to lack of evidence. Paladin is upset.  Up until now, the rest of the party has been with the Paladin, helping in endeavors and generally agreeing with the course of action. This changes when the Paladin decides to go after the drow, talking about capturing him and hauling him off to the "Drow Town he came from" for whatever justice they choose (Paladin is in character not knowing how drow or their cities work). The rest of the party protests, saying it's probably several weeks' journey, but the Paladin is dead set and will not be convinced. Eventually the party begrudgingly agrees to follow, they catch up to the drow who resists arrest, and they mostly-accidentally kill him. It's bittersweet, but everyone is more or less okay with this resolution.  After the session, the player of the paladin explained the behavior sort of like this:     My character's major arc and theme is that he believes justice is a black and white, simple thing that he can recognise and deal with. In reality, justice rarely is, and I appreciate being given a situation that allowed us to explore that. My plan for the character is for him to slowly realise this complexity, and rely more and more on the wisdom of Bahamut to tell him what to do. I'll figure out how to take his development from there when we get there.   Where is the line between roleplaying a naive, stubborn character undergoing development and being a problem player? How can we portray internal character conflict and personal flaws without ending up in "My Guy"?  Clearly there are instances in which playing a flaw or ignorance like this is acceptable, otherwise we would all be playing Mary-Sue characters.

I've been reading forum posts and blogs who mention "my guy" syndrome as a specific type of difficult player, but I can't seem to find a solid definition for the term. Can someone explain this particular kind of problem player to me? How do you deal with this kind of problem?


I installed Ubuntu on an HP WiFi-only PC. After Installation The OS does not find the WiFi device. This is my maiden voyage with Ubuntu. I suspect that I did something wrong.

I'm having serious problems installing the Broadcom drivers for Ubuntu. It worked perfectly on my previous version, but now, it is impossible.   What are the steps to install Broadcom wireless drivers for a BCM43xx card?  I'm a user with no advance knowledge in Linux, so I would need clear explanations on how to make, compile, etc.    lspci -vnn | grep Network showed:   Broadcom Corporation BCM4322 802.11a/b/g/n Wireless LAN Controller [14e4:432b]      iwconfig showed:  lo        no wireless extensions. eth0      no wireless extensions.   NOTE: Answer below is updated every time new information is added and confirmed working.


I have some raw, commercially packed and frozen frogs legs that I thawed overnight in the fridge about 4-5 days ago. I noticed a lot of pinkish liquid inside the packaging. Is it still safe to eat these? They seem to smell fine. I've looked online but couldn't find much information.  and   Thanks.


I'm relatively new to the SE forums and it occurred to me that when I setup my account I used my work Gmail account for authentication.  I have no plans of leaving my job at this point but if I ever do I would prefer not to lose my SE accounts as well.  I've looked for a way to change the Google account I use for my SE auth but so far I haven't found anything.  Does anyone know if such a thing is possible?

I no longer use the service that I originally used to register, and would like to change the service I use to log in, or at least add a second account.  Is this possible? How do I change my login provider or associate a backup method to log in?     For more information, see "" in the .


I have Indian passport and USA H1 valid visa, will be travelling US and my itinerary is Mumbai – Munich – Frankfurt – San Francisco. This route has two stops in Germany, Munich – Frankfurt is German domestic flight. I am not sure if I would need a Schengen or Transit Visa. I was going through few German and Indian consulate visa website but I am not able to get the correct info, specially below two statements are confusing. Could you please help me with this?    In these five airports in Germany you can stay at the International Transit Area without a visa: 1.  Cologne/Bonn 2.  Düsseldorf 3.  Frankfurt/Main 4.  Hamburg  5.  Munich  Airport transit privilege does not apply in the following cases and you will need to get a visitor visa if: You are transiting through two or more airports in the Schengen Countries

I found many related questions on this site but I am still not sure about the rules. How can I decide if I need a visa to transit? Schengen members as of May 2021 are as follows:  Austria Belgium Czech Republic Denmark (excluding Greenland and the Faroe Islands - but an open border with the Schengen Area is maintained) Estonia Finland France (excluding overseas departments and collectivities) Germany Greece Hungary Iceland Italy Latvia Liechtenstein Lithuania Luxembourg Malta Netherlands (excluding Aruba, Curaçao, Sint Maarten and the Caribbean Netherlands) Norway (excluding Svalbard) Poland Portugal Slovakia Slovenia Spain (except Ceuta and Melilla) Sweden Switzerland


I read somewhere, I think in a loading screen tip, that the weight of your armour negatively affects your stealth when sneaking. How much does it affect it? I'm playing a stealthy sniper type character, and I'm trying to figure out whether I'm okay to use the heavier armour I'm finding, or whether I should switch back to some lighter armour.

Does the type of armor matter? I know that Power Armor has a negative impact on stealth but I haven't really found anything substantial about other armors. Will I be detected more often when wearing metal armor than leather?


Can I disguise myself with the armor of a guard I just killed, or do they always know who I am? Could I pass as a hold guard and get away with anything I want?

So I've killed off some well equipped Imperials, looted their bodies and want to equip their armor.  Does the game take into consideration that I look like an Imperial when I interact with pro-Imperial or anti-Imperial characters going forward?


I need to get the number of rows of a query (so I can paginate results).  As I'm learning codeigniter (and OO php) I wanted to try and chain a ->num_rows() to the query, but it doesn't work:  //this works: $data['count'] = count($this->events->findEvents($data['date'], $data['keyword']));  //the following doesn't work and generates // Fatal Error: Call to a member function num_rows() on a non-object $data['count2'] = $this->events->findEvents($data['date'], $data['keyword'])->num_rows();   the model returns an array of objects, and I think this is the reason why I can't use a method on it.   function findEvents($date, $keyword, $limit = NULL, $offset = NULL) {     $data = array();      $this->db->select('events.*, venues.*, events.venue AS venue_id');     $this->db->join('venues', 'events.venue = venues.id');      if ($date)     {         $this->db->where('date', $date);     }      if ($keyword)     {         $this->db->like('events.description', $keyword);         $this->db->or_like('venues.description', $keyword);         $this->db->or_like('band', $keyword);         $this->db->or_like('venues.venue', $keyword);         $this->db->or_like('genre', $keyword);     }      $this->db->order_by('date', 'DESC');     $this->db->order_by('events.priority', 'DESC');      $this->db->limit($limit, $offset); //for pagination purposes     $Q = $this->db->get('events');     if ($Q->num_rows() > 0)     {         foreach ($Q->result() as $row)         {             $data[] = $row;         }     }      $Q->free_result();     return $data; }      Is there anything that i can do to be able to use it? EG, instead of $data[] = $row; I should use another (OO) syntax?

So I'm refactoring my code to implement more OOP.  I set up a class to hold page attributes.  class PageAtrributes  {   private $db_connection;   private $page_title;      public function __construct($db_connection)      {         $this->db_connection = $db_connection;         $this->page_title = '';     }      public function get_page_title()     {         return $this->page_title;     }      public function set_page_title($page_title)     {         $this->page_title = $page_title;     } }   Later on I call the set_page_title() function like so  function page_properties($objPortal) {         $objPage->set_page_title($myrow['title']); }   When I do I receive the error message:     Call to a member function set_page_title() on a non-object   So what am I missing?


The recipe for Emerald Staff says I need Tungsten. Isn't silver supposed to be interchangeable with tungsten? Why should I have to re-make my world just to get a metal...

As of 1.2, some features are mutually exclusive between worlds.  In the case of ores at least, .  However, a  gives you the chance for a  (and the upgraded Sweetheart Necklace) which does not seem to have an equivalent version in the Corruption.    What items, if any, are truly mutually exclusive in function between worlds?


In Blender 2.7 you could achieve it like that:   In Blender 2.8, when I create a cylinder for example I see the window to change the parameters of the primitive but I can't interact with it.

Sometimes when adding an object to the scene I see that all options (on toolbar or in window after pressing F6) are disabled. Can anyone tell me when can this happen? What is causing it and how to revert it - make it enabled again. It worked for me when I restarted Blender and reloaded the scene. However I would really like to know what can cause it?


I have imported this file before an it has worked but not this time. I have pressed Numpad . and that just zooms me into here the picture below. I am not in local view.Last time it worked it had imported absolutely huge bugs scaling it down doesn't seem to work. thanks for your help!

I try to import .obj files from this project:  - the files contain Polygon Mesh Data.  When I import the obj file into blender, the outliner shows a new mesh added, but nothing is visible in the 3D viewport:      Any help will be appreciated.


I have qtsixa installed but it is no longer of use to me. I didn't use apt-get so I can't remove it using that. any way to remove it?

Hey all I downloaded this file () but can't seem to be able to uninstall it. I tried looking online as well as the README file but there is only instruction for installing, not uninstalling the package.   Attempted solutions:  sudo apt-get remove laptop_mode   returned   E: Unable to locate package laptop_mode   but when I type in laptop_mode I do get   Unhandled kernel version: 3.13 ('uname -r' = '3.13.0-32-generic')   Is there any way I can uninstall laptop-mode-tools?


I am on Ubuntu 18.04. I was trying to transfer files using my pendrive , which I previously used to install Ubuntu on my laptop. But later formatted using Android phone.   When I was trying to transfer files (some videos) it got stuck, so I removed the pendrive from USB slot. And then tried to format it using Android phone.   But now the phone could not format it. And when inserted in Ubuntu it showed :  Unable to access "device" error mounting /dev/sdb2 at media/pc_name/pendrive_name : wrong fs type, bad option, bad superblock on /dev/sdb2, missing codepage or helper program , or other error.    How can I repair my USB?

In Windows there is a straightforward "Format" option in a flash drive's right-click pop-up menu. Where's that in Ubuntu?


Can someone please help me to install Incrond on my Ubuntu server, I tried all possible ways as I found on the web but nothing works.  sudo apt-get install incron  Reading package lists... Done Building dependency tree        Reading state information... Done E: Unable to locate package incrond   I need to install the file system watcher for some of my automization scripts to work.  Thank you in advance.  Info: Yes the solution was the universe repository but in my case I wasn't aware which repository is responsible for incron, so it will be helpful to keep it separate.

How do I get to the Universe Repository in supported versions of Ubuntu?


I followed the  and got a      SIGNATURE VERIFICATION FAILED!   error when trying to launch the program. So I re-inputted this in command line:   gpg --homedir "$HOME/.local/share/torbrowser/gnupg_homedir/" --refresh-keys --keyserver pgp.mit.edu    (I highlighted it differently this time and the terminal result came out more successfully[?]) then relaunched Tor, now it's stuck at 0% on      Downloading and installing Tor Browser for the first time.   I'm now trying to launch Tor but when I click the program nothing happens.

In Ubuntu 13.04 I used to use the ppa:upubuntu-com/tor64  PPA to install the 64-bit Tor Browser Bundle. However, in Ubuntu 13.10 it doesn't work anymore. How do I install the Tor Browser Bundle in Ubuntu?


I would like to know which font is used by Publications Mathématiques de l'IHÉS. For example  in this paper:    Or perhaps the right question is which style they used?  Thanks for answering and helping.

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


I have a Debian Wheezy server with several websites with separate domains. Some of these websites uses Wordpress and in turn uses PHP's mail function to send mail.  I installed "sendmail" to be able for the server to send mail from PHP. We use Google Apps for our customers, so no need to setup a regular mail server.  Now the server is blacklisted at www.spamhaus.org and get this message:  This IP address is HELO'ing as "localhost.localdomain" which violates the relevant standards (specifically: RFC5321).   I have tried to follow the instructions on these websites with no luck:    Can you please help me figure out how to configure the server?  File: /etc/hosts  # nameserver config # IPv4 127.0.0.1 somedomain.dk xxx.xxx.xxx.xxx server.somedomain.dk bigby # # IPv6 ::1     ip6-localhost ip6-loopback xxxx::0 ip6-localnet xxxx::0 ip6-mcastprefix xxxx::1 ip6-allnodes xxxx::2 ip6-allrouters xxxx::3 ip6-allhosts xxxx:xxx:xxx:xxxx::2  Debian-76-wheezy-64-minimal   File: /etc/hostname  bigby   somedomain.dk is a made up domain. In reality another domain name I have on this server along with other domains.  bigby is also a made up name. It is also something else in reality.

How do you specify the FQDN (Host and Domain Name) that a mail server presents itself as in HELO/EHLO when sending outgoing email with sendmail?


This might be a bit of a meta-mathematical question (if there is such a thing as meta-mathematics) but it confuses me slightly.   I think of multiplication (whether rightly or wrongly) as recursive adding. For example, $2 \times 4$ is just adding 2 four times i.e $+2 +2 +2 +2 = 8$.   I think of multiplying negative numerals e.g $2 \times -4$ as subtracting 2 four times i.e $-2 -2 -2 -2 = -8$. Unfortunately this analogy seems to break down when multiplying to negative numbers e.g $-2 \times -4$. I don't understand how $-2 \times -4$ can result in $+8$.   What is the reason behind this, if any? Is my analogy incorrect? Is there a flaw in my fundamental understanding of multiplication?

Someone recently asked me why a negative $\times$ a negative is positive, and why a negative $\times$ a positive is negative, etc.  I went ahead and gave them a proof by contradiction like so:  Assume $(-x) \cdot (-y) = -xy$  Then divide both sides by $(-x)$ and you get $(-y) = y$  Since we have a contradiction, then our first assumption must be incorrect.  I'm guessing I did something wrong here. Since the conclusion of $(-x) \cdot (-y) = (xy)$ is hard to derive from what I wrote.  Is there a better way to explain this?  Is my proof incorrect?  Also, what would be an intuitive way to explain the negation concept, if there is one?


Can't get into my account can't remember password and don't have email account and phone # on account

I have an old Facebook account that I created, uploaded a couple of photos and simply ignored (i.e. no friends added). Now, I can't remember the email address associated with the account and I don't remember the password either. How can I find out which email address I had associated with that account?  P.S. I have created a new Facebook account and my picture can be used to identify me (if I can get someone at Facebook to take a look). Other than that, I'm willing to have that old account deleted altogether if recovery isn't possible.  Is there a way to resolve this issue?


Maybe someone can help me with the following problem. The problem is that i'm trying to add new photo album(with jQuery) and after adding- to show new album i'm reloading DIV with jQuery .load function  $($classid).load('..')   Everything is working fine, except that after reloading function like folder hovering (where bar with buttons appear - delete,etc..on hover) just don't work. It looks like after DIV reloading jquery is dissabled and it need's to be called out again to run all functions.  I'v tryed to add this code   <script>             $.getScript("/data/sys.js" ); // item hovering functions styling etc..             $.getScript("/data/late.js" ); //for button clicks  </script>   at reload DIV'S Content.. Everything worked fine except that when I try to add new photo album at next album adding it multiply's added folder count.. so when i add one there show's up one, at next click there is two new folders..  I'v tryed alot and I cant figure out how to stop this or do it in diffrent way.. here is late.js file that is responsible for new folder adding..   Thanks in advance..

I have a bit of code where I am looping through all the select boxes on a page and binding a .hover event to them to do a bit of twiddling with their width on mouse on/off.  This happens on page ready and works just fine.  The problem I have is that any select boxes I add via Ajax or DOM after the initial loop won't have the event bound.  I have found this plugin (), but before I add another 5k to my pages with a plugin, I want to see if anyone knows a way to do this, either with jQuery directly or by another option.


Could someone tell me which   is correct? is there an alternative?  Thank you.     You are at Stack exchange site.      You are in Stack exchange site.      You are on Stack exchange site.   I checked this page  and I think the correct is in.  in because you are inside a site/place.

Would this look natural:     StackExchange is a helluva site! I found out about this site at Facebook.    Or should we use the preposition on:     StackExchange is a helluva site! I found out about this site on Facebook.    Or are both okay?   (Inspired by a )


can you guys show me the most considerable differences between the meaning/usage of excuse me and I'm sorry?

Is it ok to say 'sorry' where you otherwise would use 'excuse me'?  Example: "Sorry, but could you show me the way to the next train station?"


Hi I am doing an ipa and was wondering if 14 days in the primary is to long before racking to a secondary for dry hopping. I see others saying 7 days in the primary then 14 days in the secondary.

The conventional wisdom in homebrewing has been challenged in recent years.  This wisdom held that a beer should be transferred from the primary fermentation vessel to a secondary one after 7-10 days.  In recent years, many homebrewers have advocated for leaving the beer in primary until packaging, rather than racking to a secondary fermenter.    What are the advantages and disadvantages of the two methods? Are there limits to how long a beer should remain in primary, in the long primary scenario?


When flagging a post as off-topic I can choose that "This question belongs on another site in the Stack Exchange Network". From there I can choose one of 5 sites (meta, superuser, tex, dba, sharepoint).  It is not clear to me why you can choose superuser, since one level up you can already flag this question to be better asked at the superuser-site.  But what I am missing most is the ability to choose another site like e.g. math.superuser.com (or other Stack Exchange sites). Are there any plans to broaden the list or is the omission intentional?

TL;DR: Give the belongs on another site in the SE network option to normal users too, generating a moderator flag.    Often questions are posted on the wrong site on the Stack Exchange network (for volume reasons, most often at Stack Overflow). Then they need to be closed as off-topic, and optionally migrated to a better site.  The "close as off-topic" (or "flag as off-topic", if you don't yet have closing rights) dialog has up to five migration targets (the most likely migrations) build in, and if at least four of the five closers agree on one of them, the question will get migrated there.  Moderators see in this dialog actually one more option:   belongs on another site in the Stack Exchange network   together with a text field which allows selecting a site by its name.    This option can be used to migrate a question to any site. We are normally using this only if it is either a really clear case that the question is on-topic at the target site, or we have asked a moderator of the target site. (Or a moderator of the target site has flagged the question at our site.)  Normal users don't have this option: They can only flag/vote to close as "off-topic", and use the "flag for moderator attention" general reason, and input a reason in the free-form text field:    Most of my flags in the last months on Stack Overflow are actually of this type (mostly for Crypto.SE and TeX.SE).  My feature proposal (actually, three of them)   Add this belongs to another site option to the GUI for normal users, too. Make this generate a normal "off-topic" close vote (if the user has close-voting rights, of course), together with a canned flag for moderators attention (which will be visible in the 10k mod tools).  (So such a vote will not generate a migration by itself, even if five users have the same idea.)  This should also be a possible flag option on questions which already are closed as off-topic. On the moderator side, make it a tiny bit easier to decide about the migrations, and make them happen:   Show in the flag list if a moderator of the target site flagged for migration (these are "good" and need not be checked, other than for off-topic-ness on the source site). (E.g. show a diamond beside the name?) If a question was flagged this way for migration, add the target site as an option to the moderator's close-dialog (so no searching is necessary). (Allow migrating questions which are already closed as off-topic, without reopening.)    Related:  - Waffles' answer says such a search box was intentionally omitted so people don't have to do the hard work. So now moderators have to do this hard work instead (for cases other than the five ones listed). I'm not sure this is really better.


Suppose I have four normal r.v (X,Y,W,Z) and the variance-covariance matrix is know. If I create a new r.v J=aX+bY (a and b are scalar), what is the new variance-covariance matrix? Thank you

Let $X,A,B,C,D$ be time-series variables and the covariance between any two pairs of these are known.  Suppose we want to find $\textrm{cov}(X,aA + bB + cC + dD)$, where $a,b,c,d$ are constants.  Is there any way of doing this without expanding out $E[(X-E[X])(aA+......)]$?


Suppose the $GCD$ of integers $a$, $b$, and $c$ is 1 when taken in pairs, i.e., they are relatively prime.  Prove that $GCD(ab,c)=1$.    Any hints would be appreciated.

Prove that if $\gcd(a,c)=1$ and $\gcd(b,c)=1$ then $\gcd(ab,c)=1$. My attempt is let $\gcd(ab,c)=d$. Since $d \mid ab$ and $d \mid c$ , $d \mid (abt+cs)$ for some integers $s$ and $t$. Then by definition of divisibility, we have $$abt+cs=dk$$ for some integers $k$. Then I got stuck here.


Which preposition should I use for metro station at or in?      "I was today at the metro station"      "I was today in the metro station"   As far as I know normally metro stations are mostly deep underground and I'm not sure if I'm in or at.

I am really confused.  Which preposition is correct?     She is in/at the park.   They are in/at the park.   I am in/at the park.   Should I use in or at in these sentences?


Almost all sites Help Center page follows this order at Asking section:   What topics can I ask about here?  What types of questions should I avoid asking? .... etc.   But I found that some sites have different order. For example, see that for . Beta sites have often different order as follows:   What types of questions should I avoid asking?  What does it mean if a question is "closed" or "on hold"?  What topics can I ask about here?    However, some beta sites have order as explained first. If we consider for meta that it is because of on-topic is under construction, then after decided, it also sometimes not followed to same. For example,  has 2nd mentioned order whereas  has 1st mentioned order though both have defined on-topics.

On a lot of sites, the first section of the Help Center looks like this:    When I go to a site's help center it's almost always to find out what's on-topic there, because I'm considering asking or migrating a question.  Leading with what not to ask seems odd to me, and I suspect that to someone not already familiar with SE it could be a little off-putting.  It's not always like this, though; here on MSE we get this, which I've seen on some other sites too:    That ordering makes a lot more sense to me.  It's also consistent with the tour.  (Maybe "how do I ask a good question?" should also be "above the fold", in the top five somewhere.)  Why the difference?  Can we either make the order consistent across the network and more logical, or give users or moderators the ability to change the order on their sites?


I get an error like this after successfully selecting a PDF file. Anyone know how to solve it? 2021-06-09 09:02:17.638 7277-7277/team.getherfolg.capstone E/AndroidRuntime: FATAL EXCEPTION: main     Process: team.getherfolg.capstone, PID: 7277     java.lang.RuntimeException: Failure delivering result ResultInfo{who=null, request=1, result=-1, data=Intent { dat=content://com.android.providers.downloads.documents/document/3964 flg=0x1 }} to activity {team.getherfolg.capstone/team.getherfolg.capstone.ui.pdfpreview.PDFPreviewActivity}: java.lang.NullPointerException         at android.app.ActivityThread.deliverResults(ActivityThread.java:5237)         at android.app.ActivityThread.handleSendResult(ActivityThread.java:5278)         at android.app.servertransaction.ActivityResultItem.execute(ActivityResultItem.java:51)     Caused by: java.lang.NullPointerException         at team.getherfolg.capstone.ui.pdfpreview.PDFPreviewActivity.displayFromFile(PDFPreviewActivity.kt:172)         at team.getherfolg.capstone.ui.pdfpreview.PDFPreviewActivity.onActivityResult(PDFPreviewActivity.kt:150)         at android.app.Activity.dispatchActivityResult(Activity.java:8294)  This is for line code 172 (Starting from pdfView!!) private fun displayFromFile(file: File) {     val uri = Uri.fromFile(File(file.absolutePath))     pdfFileName = getFileName(uri)      pdfView!!.fromFile(file)         .defaultPage(pageNumber)         .onPageChange(this)         .enableAnnotationRendering(true)         .onLoad(this)         .scrollHandle(DefaultScrollHandle(this))         .spacing(10)         .onPageError(this)         .load() }  This is for line code 150 (Starting from displayFromFile(file)) override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {         super.onActivityResult(requestCode, resultCode, data)          if (requestCode == FILE_PICKER_REQUEST_CODE && resultCode == RESULT_OK && data != null) {             val path: String = data.data.toString()             val file = File(path)              displayFromFile(file)              Log.d("Path: ", path)             pdfPath = path             Toast.makeText(this, "Picked file: $path", Toast.LENGTH_LONG).show()         }     }

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?


the answer to this question seems to be on the tip of my tongue but I can't seem to find it.   I'm looking for a word that defines the act of "stripping down to the basics"  For example, if I'm talking with a friend and he says running a business is complex and I respond by saying, "You just have to focus on generating sales, reducing overhead, etc"  Now, the act of me "taking something complex and explaining it in simpler form" is the word I'm looking for.   I'm aware of phrases like gross oversimplification but I feel like there is a word that literally means the act of taking something complex and making it simple.   The first couple words that came to me were rudimentary, primitive, but is there anything else I'm missing?

What is the word that is used to describe the oversimplification or non-academic discussion of a complex issue?   Typically, I'm looking for a word like pedantic, or puerile, except that the word covers the fact that the discussion is particularly non-academic. I know that such a word exists since I have used it before, but it has skipped my mind.


I have a requirement at work for a WPF stock-ticker-like application.  I was thinking of using this as a starting point:   But the one thing it does not do is dock to the top of the desktop window - AND - push down any other windows, maximized or otherwise. This app must own a small bit of vertical real estate at the top of the screen, full width. I scoured WPF posts, but cannot find an example. I've seen a third party solution, so I know it's possible. Window.Topmost almost achieves this behavior, but just covers/obscures anything under it. Any suggestions?  The image below demonstrates the current behavior. The WPF window sits on top of VS, which is problem.

Is there any complete guidance on doing AppBar docking (such as locking to the screen edge) in WPF? I understand there are InterOp calls that need to be made, but I'm looking for either a proof of concept based on a simple WPF form, or a componentized version that can be consumed.  Related resources:


Im using QGIS 2.2.0 and when I want to measure the distance on a map, the units are in degrees instead of meters. I have tried this :  Right click on layer -> "Save as..." -> CRS: Selected CRS (WGS84)  but nothing has happened.   Does anyone have any ideas?

I am running QGIS 1.7.0 on windows, and I donwloaded a shapefile of .  This file appears to be in the WGS 84 coordinate system, and when I open it in QGIS the unit of measure is degrees.  I tried re-projecting the file into the NAD 83 coordinate system, and saving it as a new shapefile, but when I open the new file it still displays a ruler in degrees.  If I try to make a buffer, it interprets buffer distance as degrees.  Assuming I'm starting with a shapefile from TIGER, what's the best way to convert my unit of measure from degrees to meters?    For posterity, it seems like the following workflow make sense when dealing with US census TIGER shapefiles:           Open it in QGIS     Click the Settings menu and select project properties     Select a projected coordinate system, like NAD83 / UTM zone 19N     Click the box Enable 'on the fly' CRS transformation     Click ok     Click the 'zoom full' button (one of the magnifying glasses)


During GoF in the Harry Potter series, Profesor Moody       (who is actually Barty Crouch Jr. using Polyjuice Potion)    teaches the kids in his class about unforgivable curses, but then goes into it in detail about them and how they are pronounced, how they work and even how to resist some, like the Imperius curse. He even went as far as saying     "Earn you a one-way ticket to Azkaban. Correct. The Ministry says you are too young to see what these curses do. I say different! You need to know what you're up against. You need to be prepared..."         He also has them practice resisting the imperius curse      "The Imperius curse can be fought, and I’ll be teaching you how, but it takes real strength of character, and not everyone’s got it. Better avoid being hit with it…"   It would seem that teaching students spells to protect themselves from the ambush that you're a major contributor in is not the best plan. That's like arming an enemy country with a missile defense system just before your about to attack them with a missile. And i know that some might say that that he didn't think that Harry would be able to defeat the dark lord anyway but still, why not just teach the 4th year Defense Against the Dark Arts textbook information and be over with it?

I just finished The Goblet of Fire for the fourth time, but this time I read it while watching out for "Professor Moody"s behavior during school. One piece that stands out is the Defense Against the Dark Arts lesson where Barty Crouch Jr. shows all of the students the Unforgiveable Curses.   This alone wouldn't be weird, as we know it was important that Barty played the eccentric/paranoid character of Mad-Eye well. However, he makes it a point during the lesson to continue using the Imperius Curse on Harry until Harry can resist it. Ignoring the fact that Harry learned to resist one of the most dangerous curses in the magical world in an hour-long class (Aurors should sign up for that, huh?) - what possible motivation would Barty have to teach/train Harry Potter how to resist a very useful Dark spell? Voldemort, later in the same book, even tries to use the Imperius Curse on Harry and can't (one would assume this is due to the earlier training).   The argument of "fitting in" doesn't seem to apply here, as merely demonstrating the curses at all was already straining the limits of Mad Eye's eccentric reputation; plus he only repeatedly targeted Harry. He could just as easily have not aroused suspicion by showing them the curses, or Imperius-ing all of the students equally. The only thing Barty accomplished was strengthening Harry's chances against Voldemort.  There's also the possibility that he simply hated the boy who defeated his master, and as such, wanted to torture him. But in that case, why not "teach them to resist/experience" the Cruciatus Curse? It has just as flimsy of an excuse (i.e. "showing them how it works") but with far more effective results. Furthermore, making a student jump on top of a desk would hardly qualify as torture, even someone as loony as Barty.


What is the exact value of 3.199 E +01 ? Does it mean $3.199\times10^1$??  I get confused with the notation.

I often find this at the bottom of pages.  Page generated in 0.00013899803161621  Sometimes, I come across  Page generated in 9.0122222900391E-5  What does that time mean? I tried searching Wikipedia for E and maths but found the . My guess is E stand for Exponential and -5 is the power it is raised to. And the displayed time is a really small number. But that doesn't make sense when compared to the other time in the question. 0.00013899803161621 is bigger than 9.0122222900391E-5. If it means x times $10^{-5}$, then 9.0122222900391E-5 will be 0.000090122222900391 which is smaller than 0.00013899803161621. What does E stand for?


Does a square matrix always commute with its transpose? which means If M is a square matrix, then $M^TM=MM^T$? I just couldn't give a counterexample.

If a matrix is symmetric or skew-symmetric it commutes in the obvious way with its transpose. (For symmetric: $SS^T=S^2$ and $S^TS =S^2$)  The less obvious is the case of commutativity  for orthogonal matrix but such matrix also commutes with its transpose because $RR^T=RR^{-1}= I= R^{-1}R=R^TR$.  Questions:   Are there  other cases when a matrix commutes with its transpose ?    What is the general property of such matrix which allows it to commute with its transpose ?