I'm getting null pointer reference error on CrimeFragment .  crimeFragment's onCreateView method :   @Override public View onCreateView(LayoutInflater inflater, ViewGroup container,                          Bundle savedInstanceState) {     View view =  inflater.inflate(R.layout.fragment_crime, container, false);     try {     Button submit = (Button) view.findViewById(R.id.submitButton);     submit.setOnClickListener(new View.OnClickListener() {         @Override         public void onClick(View view) {             Toast.makeText(view.getContext(), "Cant save yet!", Toast.LENGTH_SHORT).show();             EditText id = (EditText) view.findViewById(R.id.crimeID);             EditText des = (EditText) view.findViewById(R.id.crimeDesc);             Crime crime = new Crime();              String desS = des.getText().toString();             String idS = (id.getText().toString());             if(desS == null || idS == null){                 Toast.makeText(getContext(),"Blank fields !",Toast.LENGTH_SHORT).show();                 return;             }             crime.setId(Integer.parseInt(desS));             crime.setDesc(desS);             addCrime(crime);         }     }); }     catch(Exception e){         e.printStackTrace();     }     return view; }   I have read the fragment lifetime documentation & so have grabbed view components only after inflating them in OnCreateView. So why is it showing null object?  MainActivity class  :    @Override  protected void onCreate(Bundle savedInstanceState) {     super.onCreate(savedInstanceState);     setContentView(R.layout.activity_main);     FragmentManager fm = getSupportFragmentManager();     CrimeFragment frag = (CrimeFragment) fm.findFragmentById(R.id.main_container);     if(frag == null){         frag  = new CrimeFragment();         fm.beginTransaction()                 .add(R.id.main_container,frag)                 .commit();     }     List<Crime> crimeList = frag.getCrime();  }   any suggestions is most welcome.

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?


Prove the following using the intermediate value theorem:  $f$, $g$ are continuous on $[a,b]$, $f(a)< g(a)$ but $f(b) >g(b)$  Prove: $f(c)=g(c)$ for some $c \in (a,b)$   I am not sure if i am correct:   $g$ is continuous: using IVT $g(c)=j$,   $g(a)< j <g(b)$  , c belongs to (a,b)  $f$ is continuous: using IVT $f(c)=k$,   $f(a)< k < f(b)$ , therefore by the given inequality: $f(a)< j <f(b)$ Hence, by IVT $j= f(c)= g(c)$

Suppose $f$ and $g$ are continuous on $[a,b]$ and that $f(a) < g(a)$ but $f(b) > g(b)$.   Prove that $f(x) = g(x)$ for some $x \in [a,b]$.     I did try and actually did get as far as coming up with $f-g$. Would I set $h(x)= f(x)- g(x)$ and say $h(a) <x< h(b)$?


Suddenly the button for opening the toolbox is gone. I have searched really long already.  Do you have any idea how to get it back?

I'm sure there is a really simple explanation to this but haven't found any pointers on this forum or elsewhere. I seem to have lost the 'processing' menu from QGIS and can't figure out how/why!? Any ideas what I might have done to make this happen?  I'm running QGIS 2.8 built against GDAL 1.10 on Ubuntu 14.04.


how do we make obsidian in minecraft without lava? If there is another way, then please tell me. I have tried to find some, but no luck for me. If you know a seed or another way to make please tell.

I have looked everywhere for lava or obsidian in 0.7.1. I've looked all the way from top to bottom and all around, in about a 100 block diameter, but I can't find any. Where can I get some?


I know that the Hamilton's equations results from the Legendre transformation of the Lagrange equation.  It's also well-known that the Hamiltonian is equal to the energy of a system if the system is time independent but that is caused by the symmetry of $H$, not because of  the fact that the Lagrange function is given by the kinetic energy plus the potential energy. So is there a concret physical relationship between $H$ and $L$?

I would like to know the physical meaning of the , if there is any? I've used it in thermodynamics and classical mechanics and it seemed only a change of coordinates?


Sometimes, I often write numbers in LATEX as $69$ or so. Some other times, I write it plainly as 69. Is there any advantage of one over the other?

Should numbers inside the text be placed inside a math environment?   For example, if I am writing ...indent code by 4 spaces..., should I write it this way or ...indent code by $4$ spaces...?  Perhaps the output is the same but semantically they are not and maybe LaTeX can treat them differently in some cases. Which is the right one?   For instance, how does LaTeX treat the numbers in the counters it uses for numbering the sections or pages, etc? Does it treat them as numbers in a  Math environment or as numbers inside text?  Of course, if the output can never be different in any situation, then well, it just doesn't matter.


Say that six times fast... Why doesn't this compile in MSVC 2010?    class A { public:     void foo(int a, int b) { };     void foo(int a) { }; }; class B: public A { public:     void foo(int a, int b) { }; // <-- comment this out to compile };  int main(int argc, char* argv[]) {     B b;     b.foo(1); // <-- doesn't compile... shouldn't B just inherit this overload? }

Given the following example, why do I have to explicitly use the statement b->A::DoSomething() rather than just b->DoSomething()?  Shouldn't the compiler's overload resolution figure out which method I'm talking about?  I'm using Microsoft VS 2005. (Note: using virtual doesn't help in this case.)  class A {   public:     int DoSomething() {return 0;}; };  class B : public A {   public:     int DoSomething(int x) {return 1;}; };  int main() {   B* b = new B();   b->A::DoSomething();    //Why this?   //b->DoSomething();    //Why not this? (Gives compiler error.)   delete b;   return 0; }


when perform   $ sudo apt-get update  Err http://security.ubuntu.com trusty-security/main Sources             Connection failed [IP: 91.189.92.201 80] Err http://security.ubuntu.com trusty-security/restricted Sources                 Connection failed [IP: 91.189.91.13 80]

Occasionally, when I'm installing stuff, I get an error like the following:  Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation:  The following packages have unmet dependencies:  package1 : Depends: package2 (>= 1.8) but 1.7.5-1ubuntu1 is to be installed E: Unable to correct problems, you have held broken packages.   How can I resolve this?


I am trying delete a String that occurs 5 times in my List. This is what I've tried:  for(String obj : list1) {     if(new ArzList().countOccurrence(list1, obj ) == 5)     {         list2.add(obj);         list1.removeAll(Collections.singleton(obj));                     }    else{         list3.add(obj);         list1.removeAll(Collections.singleton(obj));    } }   But I get java.util.ConcurrentModificationException each time.   How do I solve it?

We all know you can't do the following because of ConcurrentModificationException:  for (Object i : l) {     if (condition(i)) {         l.remove(i);     } }   But this apparently works sometimes, but not always. Here's some specific code:  public static void main(String[] args) {     Collection<Integer> l = new ArrayList<>();      for (int i = 0; i < 10; ++i) {         l.add(4);         l.add(5);         l.add(6);     }      for (int i : l) {         if (i == 5) {             l.remove(i);         }     }      System.out.println(l); }   This, of course, results in:  Exception in thread "main" java.util.ConcurrentModificationException   Even though multiple threads aren't doing it. Anyway.  What's the best solution to this problem? How can I remove an item from the collection in a loop without throwing this exception?  I'm also using an arbitrary Collection here, not necessarily an ArrayList, so you can't rely on get.


I applied for a short stay visa at the french embassy. The plan was to stay in France for the whole, and I have applied with only France as the destination.  Now we are thinking of visiting other countries in the Schengen area. And I have found this in their FAQ    And I have also found this  stating that entry is allowed for "FRANCE (+1 TRANSIT SCHENGEN)"  Does this mean that I will get a visa for France only? And if so what are the possibilities of visting other schengen contries on such visa.

I have applied for a Schengen visa in the Consulate of Italy. I will be visiting for a 2 month period to attend a dance workshop. However, I plan to visit my boyfriend twice. He is studying in Germany currently and we made plans to meet up while I'm there. I will be visiting for a week or so both times. I did not put this in my itinerary. Will I still be able to visit?   Also, I just made some random hotel booking on booking.com in order to apply. Can I cancel those bookings and book an accommodation elsewhere if I want, once I get the visa?


Someone can help me?? $$ \lim_{(x,y) \to (0,0) } \frac{xy^3}{x^2+y^6}  $$

This is a problem occurs to me when I was trying to find the limit of a function with two variables(if only it exists). Please help.  When I have to show that the limit does not exist for some function. Then by showing along two paths have two different limits I can prove it since the functions with two variables have infinite number of directions of approach to the given point.   So selecting the paths, should I only take the linear ones or can I take non linear paths also?  As an example,consider the limit of $\frac{xy^3}{x^2+y^6}$ as $(x,y)$ goes to $(0,0)$ Then taking along $x$ axis I have the limit $0$. Can I take $y=x^{1/3}$ which gives me the limit $1/2$ ?  When I check the answer on some website it seems they haven't consider curved functions to find different limits.  Please explain. Where am I wrong?


In A New Hope Luke is told by the bartender at Mos Eisley that C3P0's kind were not served there    In Attack of the Clones while Anakin is taking Padme into hiding, they go into a bar and this time a droid bartender tells R2D2 (I think) to get out of the bar    Why is there such racism against droids in Star Wars bars?

When —the bartender at the Cantina at Mos Eisley spaceport in the first Star Wars—says:     “We don’t serve their kind here.”   In reference to C-3PO and R2-D2 entering the bar, it’s certainly a bit prejudicial, but are these commonly held views in this universe? We don’t see it happen anywhere else in the films but is it implied elsewhere?


Updated after several answers and comments, to clarify the requirements I have an Open Source library and am looking to implement a method that will check if an object is an instance of a given type.  That type needs to be specifiable as a parameter. It needs to work throughout hierarchies, and with both SObjects and Objects (although the latter could be handled with two different methods). So, for example:  Checking a Contact against the type 'Contact' would match. Checking a Contact against the type 'SObject' would match. Checking a Contact against the type 'Account' would not match. Checking an instance of a Class against that Class's type would match. Checking an instance of a Class against any of that Class's supertypes or interfaces would match. Checking an instance of a Class against 'Object' would match. Checking an instance of a Class against 'SObject' would not match.  Because of the requirement to be able to check within the class hierarchy, retrieving the type of an object and comparing it directly to a type cannot be the answer.  In that situation, checking Contact against SObject would fail, when Contact is an instance of an SObject. With instanceof, you can check if an object is of a particular type. For example: Sobject con = new Contact(); System.debug( con instanceOf Contact ); // true  Whereas the following won't even compile, because, as the compiler says: Contact con = new Contact(); System.debug( con instanceOf SObject );  Operation instanceof is always true since an instance of Contact is always an instance of SObject  It feels like what I am looking for is the ability to check the instance of an object against a dynamic type, for example, along the lines of: Sobject con = new Contact(); Type conType = Contact.class; System.debug( con instanceOf conType ); // true  The above doesn't work, but is there an incantation that does? Update There are some good answers already, but none quite hit the mark, and maybe this isn't possible in Apex (yet). The issue is that the method I want to write will form part of an Open Source library and so the solution needs to be bulletproof, and ideally work with objects of any type (ideally including primitives). It may be possible to implement a solution that includes several methods. E.g. public Boolean isInstanceOfSobject( SObjectType sobjectType )  and public Boolean isInstanceOfObject( Type objecttype )  But, as I say, it would need to be bulletproof and deal with namespaces, hierarchies and suchlike. For those interested in why: it would form part of Amoss (an Apex Mocking Framework):    And implement an 'instanceOf' parameter checker as per this issue:

Is it possible to get the Type of an Object (it's not an SObject)?  String s = 'test'; doSomething(s);  public static void doSomething(o Object) {     // need to find out if o is a string or an integer     type = IsThereAMethodToGetTheTypeOf(o) // ?     if(type='String') {         // do something for strings here ....     } else {         // do something else ....     } }   I think the Type class can't help me, because it has no way to get the type of an existing object instance, right? Any there any other way?  Since there is most likely no perfect solution possible within the current platform limitations, I posted an Idea on IdeaExchange here:   For SObject I have already this  public static string getType(SObject obj) {     if(obj==null) return '';     return obj.getSObjectType().getDescribe().getName()+''; }


I've got a script that's pulling a bunch of attributes and concatenating the information into a long string.  text_description = "Address: {}\n\n".format(dictADDR[key]) text_description += "{} Customers.".format(len(listCustomer)) if countPole == 0:     text_description += "No Poles\n" else:     text_description += "Poles:\n"     text_description += "  Pole Quantity: {}\n".format(countPole) (et cetera)   The goal is to include this string both in an emailed final report when the script finishes, and include it in a text element on a PDF map (displayed next to the parcel and an aerial map).  This works fine for the email, and gives something like:  Address:  1225 BICKLEY RD 0 Customers No Poles No Overhead Distribution   However, in the text element it ends up ignoring spacing and overlaps some text with other text (see image below).    Copy-pasting the contents of the text properties box, it appears to have the line breaks in the correct places:  Address:  1225 BICKLEY RD 0 Customers. No Poles No Electric Overhead Distribution  What's going wrong, and what should I change in either the text element or my code to fix it?

I ran across an issue the other day when I tried to use ArcPy's mapping module to edit rectangle text elements with newlines (\n) in an ArcMap document.  Here's what the output looked like:    Here's the code I used to generate that output.  The first column are rectangle text elements Text1, Text2, Text3 going down; the second column are "plain" text elements Text4, Text5, and Text6 going down.  import os import arcpy  HomeDir = r"C:\Desktop" arcpy.env.workspace = HomeDir  CurrentMXD = arcpy.mapping.MapDocument(r"C:\Desktop\TextTest.mxd") OutputFilename = r"C:\Desktop\TextTest.pdf" if os.path.exists(OutputFilename):     os.remove(OutputFilename)  for TextElement in arcpy.mapping.ListLayoutElements(CurrentMXD, "TEXT_ELEMENT"):     TextElementName = TextElement.name      String1 = "The quick brown fox jumped over the lazy dog.\nShe sells sea shells by the sea shore."     String2 = "The quick brown fox \njumped over the lazy dog.\nShe sells sea shells by the sea shore."     String3 = "The quick brown fox jumped \nover the lazy dog.\nShe sells sea shells by the sea shore."      if TextElementName == "Text1":         TextElement.text = String1     if TextElementName == "Text2":         TextElement.text = String2      if TextElementName == "Text3":         TextElement.text = String3     if TextElementName == "Text4":         TextElement.text = String1     if TextElementName == "Text5":         TextElement.text = String2     if TextElementName == "Text6":         TextElement.text = String3  arcpy.mapping.ExportToPDF(CurrentMXD, OutputFilename)   So far, it looks like the presence of the messed up text depends on whether the line is longer enough to wrap, and whether the line before the newline is longer than the line after the newline.  Any ideas about what could be going wrong?  Is there a workaround?  I could use plain text elements and worry about wrapping lines using Python, but I'm hoping I can figure something out.


I'm running kubuntu and have been using autokey successfully for years, but a while back a system update broke it. I originally tried to just wait it out and see if a fix would be pushed.   Now, 6 months later, I'm still unable to auto insert text using key command cues.  However, if I click on the autokey symbol in the system tray and select the phrase I'm trying to insert it works fine.  Running autokey-qt from the shell produces the following:  enter<class 'Xlib.protocol.request.QueryExtension'> <class 'Xlib.protocol.request.QueryExtension'> Exception in thread KeypressHandler-thread: Traceback (most recent call last):   File "/usr/lib/python2.7/threading.py", line 810, in __bootstrap_inner     self.run()   File "/usr/lib/python2.7/dist-packages/autokey/iomediator.py", line 204, in run     target.handle_keypress(rawKey, modifiers, key, windowName, windowClass)   File "/usr/lib/python2.7/dist-packages/autokey/service.py", line 179, in handle_keypress     currentInput, windowInfo, True)   File "/usr/lib/python2.7/dist-packages/autokey/service.py", line 304, in __checkTextMatches     if item.check_input(buffer, windowInfo):   File "/usr/lib/python2.7/dist-packages/autokey/model.py", line 735, in check_input     abbr = self._should_trigger_abbreviation(buffer)   File "/usr/lib/python2.7/dist-packages/autokey/model.py", line 134, in _should_trigger_abbreviation     if self.__checkInput(buffer, abbr):   File "/usr/lib/python2.7/dist-packages/autokey/model.py", line 147, in __checkInput     stringBefore, typedAbbr, stringAfter = self._partition_input(buffer, abbr)   File "/usr/lib/python2.7/dist-packages/autokey/model.py", line 194, in _partition_input     stringBefore, typedAbbr, stringAfter = currentString.rpartition(abbr) ValueError: empty separator   How can I get autokey to recognize text based cues again?

Per some suggestions on here and lifehacker, I began using autokey.  It worked great for a week, but as of today it now   hangs when I try to enter name new phrases. usually won't close when I push the 'x' in my window manger   and   no longer responds to my abbreviation phrases.   I've added a few phrases and rebooted since my last successful attempt at using it.  Another user reported a similar problem for the .  The results of running it from the command line seems to show some exception errors:  Exception in thread KeypressHandler-thread: Traceback (most recent call last):   File "/usr/lib/python2.7/threading.py", line 808, in __bootstrap_inner     self.run()   File "/usr/lib/python2.7/dist-packages/autokey/iomediator.py", line 202, in run     target.handle_keypress(rawKey, modifiers, key, windowName, windowClass)   File "/usr/lib/python2.7/dist-packages/autokey/service.py", line 179, in handle_keypress     currentInput, windowInfo, True)   File "/usr/lib/python2.7/dist-packages/autokey/service.py", line 304, in __checkTextMatches     if item.check_input(buffer, windowInfo):   File "/usr/lib/python2.7/dist-packages/autokey/model.py", line 732, in check_input     abbr = self._should_trigger_abbreviation(buffer)   File "/usr/lib/python2.7/dist-packages/autokey/model.py", line 131, in _should_trigger_abbreviation     if self.__checkInput(buffer, abbr):   File "/usr/lib/python2.7/dist-packages/autokey/model.py", line 144, in __checkInput     stringBefore, typedAbbr, stringAfter = self._partition_input(buffer, abbr)   File "/usr/lib/python2.7/dist-packages/autokey/model.py", line 191, in _partition_input     stringBefore, typedAbbr, stringAfter = currentString.rpartition(abbr) ValueError: empty separator     Any help would be appreciated.


Can we say that a continuous function on $\mathbb R$ of bounded variation is uniformely continuous?  I tried with $\sin (x^2)$ and confused with variation.....

It is known that if $f(x):R\to R$ is absolutely continuous on $[a,b]$, then it has bouded variation on $[a,b]$. Is it also true for uniformly continuous functions? And if not then what is an example?


I'm trying to install a WindowsXP 64 bits in Windows Virtual PC. Windows Virtual PC complains:     Attempting to load an x64 operating system, however this CPU is not   compatible with x64 mode. Please install a 32-bit x86 operating   system.   But the whole thing is running under a Windows 7 Enterprise 64 bits. How can this be? What coult it be the problem?

I'm running  on a Windows 7 (RTM) 64-bit host. When I create a new virtual machine and try to install 64-bit Windows 7 on that VM, I get "this CPU is not compatible with 64-bit mode."  Is there a way to create 64-bit virtual machines?


I think many are familiar with the famous line from Shakespeare:     Shall I compare thee to a summer's day? Thou art more lovely and more   temperate.   What I seek to do is keep the analogy but change the second sentence to an insult. I also want to keep the  style and a few words of the original phrasing so the parody is clear. However, if I use nearly all the original words from the second sentence, it sounds too contrived:     Shall I compare thee to a summer's day? Nay, thou art much less   lovely, let alone temperate.   Question: Can someone give me a suitable, slightly less contrived,  insult using "Thou art more lovely and more temperate" as inspiration?

I occasionally use "retarded" when chastising myself or other friends. I know it's not Politically Correct, but am I only allowed to say stupid? How long before we can't say that anymore?   Other words like "ignorant" don't work well because well, I don't like that word because it's misunderstood (even though it works well for how I say retarded . . for me it's like if you don't know something you should know).


I have following list:  cnames = [" green ", " blue ", " yellow ", " gray ", " pink ", " orange ", "purple ", " red ", "brown "]   How do I get 6 random and unique indexes representing a number between 0    and      len(cnames)     from that list?

Assume I have the following list:  foo = ['a', 'b', 'c', 'd', 'e']   What is the simplest way to retrieve an item at random from this list?


I know that 0 is an even function and an odd function. How can I prove f is both even and odd if and only if it is the constant 0 function

I woke up this morning and had this question in mind. Just curious if such function can exist.


I’m trying to find a book (teen SciFI I guess) I read probably in 1998ish. There was a girl living on a alien planet. Someone looked after her but not a parent. I think she had to wear a suit all the time. She had a pet dog type thing which dies (it gets attacked by another alien animal). She finds out she is a scarlet alien creature and she didn’t know! Any ideas? I think there is a human boy there who she makes friends with. She thinks she is a human and that she has to wear the suit to breathe but it is to hide her true identity.

I read a series of books written in English (possibly a trilogy) in the early 1980s and was hoping to find them again for my children. The details I remember are:   It was set on a planet and spanned many, many years over the course of the books There was a sort of 'housekeeper/protector' robot that featured in all of them but was slightly the worse for wear by the end One of the books had a young dark-skinned boy who made the hike up to the house where the robot was, and someone made reference to the fact that his dark skin protected him from the incredibly fierce sun found in the higher regions of the planet.


I have to read in a .csv file with data which has a newline character at the end of each object's data.  Below is an example of the file:  5201,Egestas LLC,Clear,NA,NA,408881,544329 5202,Elementum Sem Associates,Clear,NA,NA,426281,528325   I have been trying to use various getline(inFS, number, ',') statements, however, have been getting invalid conversion from 'void*' to 'char**' [-fpermission].  Is this because getline() can only take in strings?  Is there an easier or more specific way to read in .csv files?

Pretty self-explanatory, I tried google and got a lot of the dreaded expertsexchange, I searched here as well to no avail. An online tutorial or example would be best. Thanks guys.


I'm working on my university homework and i have faced this problem. What i need to accomplish is when the user inputs a metallic element of either zinc, iron, aluminum and sodium i want the program to return true.  When the element which is compared is true, the boolean still outputs false. Can you please identify the problem in this code?  class IonicCompound  public class IonicCompound {      public static void main(String args[]) {         Scanner input = new Scanner(System.in);         System.out.println("Please enter a metallic element: ");         String element1 = input.nextLine();         System.out.println("Please enter a non-metallic element: ");         String element2 = input.nextLine();         Elements element = new Elements(element1, element2);         element.isMetal(element.first);         if (element.isMetal(element.first) == true) {             System.out.println("It's a metallic element ");         } else {             System.out.println("It's not a metallic element ");         }     } }   class Elements  public class Elements {      public String first, second;      public Elements(String f, String s) {         first = f;         second = s;     }      public boolean isMetal(String ff) {         if (ff == "iron" || ff == "Iron" || ff == "aluminium" || ff == "Aluminium" || ff == "sodium" || ff == "Sodium" || ff == "zinc" || ff == "Zinc") {             return isMetal(ff) == true;         } else {             return false;         }     }      public String toString() {         String element = first + " " + second;         return element;     }

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


I want to create partition in ubuntu for root swap and home.... if i take, say 15GB of memory from windows disk management then how much should I assign for each of them(root,home and swap)?

I want to reinstall Ubuntu from scratch.   I have read ( and ) that it is recommended to have 3 partitions for the desktop installation: root, home and swap as having a separate home and root can simplify the process if you want to upgrade or reinstall Ubuntu (if you break something by mistake).  But there is no type of formula (that I can find) on how big each partition should be. I know this is somewhat dependant on what you plan to install. I want to have flexibility down the line to install new software without having to worry about shifting the partition sizes around.  Does anyone know of a formula or percentage breakdown that they have used to successfully calculate partition sizes?  i.e. x% of space will be allocated to the swap, y% of space to the root partition and z% of space to the home partition


For example , there are two files a.ppt and b.jpg .  And I can call a magic method to open them appropriately just like :  magic_method a.ppt magic_method b.jpg   And it open libreoffice writer and image viewer or something that fit the file type .  Is there any command or script for that?

Does the command line have a way to get a recommended list of programs used to open a particular file, based on the file type? For example, a .pdf file would have an open with... recommendation using the programs Evince and Document Viewer.   I use the command line for most things, but sometimes I forget the name of a program that I want to use to open a particular type of file.   BTW I am using Ubuntu 13.10.  pro-tip  Thanks to @slm 's selected answer below, I made the following bash script in a file called openwith.sh:  xdg-mime query default $(xdg-mime query filetype $1)   Add as an alias or execute directly as an openwith command.


From a General Relativity point of view Gravity is given as the result of spacetime curvature interacting with energy-mass density. To get to the Newtonian limit one needs to take   a) Non-relativistic speeds  b) Weak gravitational fields.   Now, I understand that to have a more complete understanding of the trajectory of Mercury, one needs to study it's interaction with Sun from a GR point of view. Then one concludes to the famous Advance of the Perihelion, for which I quote from from Wikipedia:  “     In 1859, the French mathematician and astronomer Urbain Le Verrier   reported that the slow precession of Mercury's orbit around the Sun   could not be completely explained by Newtonian mechanics and   perturbations by the known planets. He suggested, among possible   explanations, that another planet (or perhaps instead a series of   smaller 'corpuscules') might exist in an orbit even closer to the Sun   than that of Mercury, to account for this perturbation.[97] (Other   explanations considered included a slight oblateness of the Sun.) The   success of the search for Neptune based on its perturbations of the   orbit of Uranus led astronomers to place faith in this possible   explanation, and the hypothetical planet was named Vulcan, but no such   planet was ever found.[98] The perihelion precession of Mercury is   5,600 arcseconds (1.5556°) per century relative to Earth, or   574.10±0.65 arcseconds per century[99] relative to the inertial ICFR. Newtonian mechanics, taking into account all the effects from the   other planets, predicts a precession of 5,557 arcseconds (1.5436°) per   century.[99] In the early 20th century, Albert Einstein's general   theory of relativity provided the explanation for the observed   precession. The effect is small: just 42.98 arcseconds per century for   Mercury; it therefore requires a little over twelve million orbits for   a full excess turn. Similar, but much smaller, effects exist for other   Solar System bodies: 8.62 arcseconds per century for Venus, 3.84 for   Earth, 1.35 for Mars, and 10.05 for 1566 Icarus.”   Subject  What I would like to understand is this: One of the reason I heard in class for assuming dark-matter is that given the Newtonian relationship for the speed of the stars in function with the centrifugal force, we show that the galaxy has not enough mass to maintain it' s shape.  But, why in the first place use Newtonian mechanics and not GR. I understand that we are at the low speed limit, but what about the weak gravitational limit?  Question  So, is there a certain procedure from which we can show that the gravity interactions of the Galaxy do not need a GR approach? If we need GR to fully understand the trajectory of Mercury, how can it be that we don' t need GR for the shape of the Galaxy and the understanding of the reasons holding it together? Thanks.

If time travels slower nearer gravity wells, why can't the galaxy rotation speeds being faster on the outer edges than the inner areas be explained by relativity? What necessitates dark matter?


For any $x ∈ \mathbb{R}^n$ and $p ≥ 1$, define $$||x||_p = \left(\sum_{i=1}^n|x_i|^p\right)^{\frac1p},||x||_∞ = \underset{1≤i≤n}{\max}|x_i| $$   Show that $$ \underset{p→∞}{\lim} ||x||_p = ||x||_∞$$   I understand this in theory, that if $x_i < x_j$ then as they are both raised to the power of ∞ then $x_i$ will become arbitrarily small relative to $x_j$, and so their sum to the power of $\frac1∞$ is $\approx x_j$. But I don't know how to go about proving this formally.

If we are in a sequence space, then the $ l^{p} $-norm of the sequence $ \mathbf{x} = (x_{i})_{i \in \mathbb{N}} $ is $ \displaystyle \left( \sum_{i=1}^{\infty} |x_{i}|^{p} \right)^{1/p} $.  The $ l^{\infty} $-norm of $ \mathbf{x} $ is $ \displaystyle \sup_{i \in \mathbb{N}} |x_{i}| $.  Prove that the limit of the $ l^{p} $-norms is the $ l^{\infty} $-norm.  I saw an answer for $ L^{p} $-spaces, but I need one for $ l^{p} $-spaces. Besides, I didn’t really understand the $ L^{p} $-answer either.  Thanks for your help!


How can I vote on 600 questions but only 25% of them are on questions?  Did it originally mean "600 posts"?

There is a badge named Electorate which is going to be awarded on "Voted on 600 questions and 25% or more of total votes are on questions". Can somebody explain this to me?  Voted on 600 Question and 25% are on Question? is this  means   Voted on 600 Posts and 25% are on Question  Can't SO place some easy text or Definitions for average users?


How do I force \displaystyle to all instances inside fractions, superscripts, and subscripts throughout the entire document (including intext)?  Basically I am looking for something that effects   \frac{1}{\displaystyle \Big[1-\frac{q^{\displaystyle{2}}}{0.71}\Big]^{\displaystyle{2}}}   but without having to insert \displaystyle all over the code.  Is it also possible to retain \textstyle \subscriptstyle functionality to force the smaller type on certain occasions?

I am trying to mimic our institute's PPt-template for presentation foils using the beamer-class. The corporate quidelines prescribe the use of Helvetica as the main font. However, package helvet does not provide a good mathematical font. Therefore I want to replace it with the math font from the cmbright package:  \documentclass{beamer}  \usepackage{lmodern} \usepackage[T1]{fontenc}  %main font Helevtica \renewcommand{\familydefault}{\sfdefault} \usepackage{helvet}  %prevent beamer from meddling with math fonts \usefonttheme{professionalfonts}  %following lines borrowed from cmbright.sty \DeclareSymbolFont      {operators} {OT1}{cmbr}{m}{n} \DeclareSymbolFont        {letters} {OML}{cmbrm}{m}{it} \SetSymbolFont      {letters}{bold} {OML}{cmbrm}{b}{it} \DeclareSymbolFont        {symbols} {OMS}{cmbrs}{m}{n} \DeclareMathAlphabet{\mathit} {OT1}{cmbr}{m}{sl} \DeclareMathAlphabet{\mathbf} {OT1}{cmbr}{bx}{n} \DeclareMathAlphabet{\mathtt} {OT1}{cmtl}{m}{n} \DeclareMathAlphabet{\mathbold}{OML}{cmbrm}{b}{it} \DeclareMathSymbol{\alpha}{\mathalpha}{letters}{11} \DeclareMathSymbol{\beta}{\mathalpha}{letters}{12} \DeclareMathSymbol{\gamma}{\mathalpha}{letters}{13} \DeclareMathSymbol{\delta}{\mathalpha}{letters}{14} \DeclareMathSymbol{\epsilon}{\mathalpha}{letters}{15} \DeclareMathSymbol{\zeta}{\mathalpha}{letters}{16} \DeclareMathSymbol{\eta}{\mathalpha}{letters}{17} \DeclareMathSymbol{\theta}{\mathalpha}{letters}{18} \DeclareMathSymbol{\iota}{\mathalpha}{letters}{19} \DeclareMathSymbol{\kappa}{\mathalpha}{letters}{20} \DeclareMathSymbol{\lambda}{\mathalpha}{letters}{21} \DeclareMathSymbol{\mu}{\mathalpha}{letters}{22} \DeclareMathSymbol{\nu}{\mathalpha}{letters}{23} \DeclareMathSymbol{\xi}{\mathalpha}{letters}{24} \DeclareMathSymbol{\pi}{\mathalpha}{letters}{25} \DeclareMathSymbol{\rho}{\mathalpha}{letters}{26} \DeclareMathSymbol{\sigma}{\mathalpha}{letters}{27} \DeclareMathSymbol{\tau}{\mathalpha}{letters}{28} \DeclareMathSymbol{\upsilon}{\mathalpha}{letters}{29} \DeclareMathSymbol{\phi}{\mathalpha}{letters}{30} \DeclareMathSymbol{\chi}{\mathalpha}{letters}{31} \DeclareMathSymbol{\psi}{\mathalpha}{letters}{32} \DeclareMathSymbol{\omega}{\mathalpha}{letters}{33} \DeclareMathSymbol{\varepsilon}{\mathalpha}{letters}{34} \DeclareMathSymbol{\vartheta}{\mathalpha}{letters}{35} \DeclareMathSymbol{\varpi}{\mathalpha}{letters}{36} \DeclareMathSymbol{\varrho}{\mathalpha}{letters}{37} \DeclareMathSymbol{\varsigma}{\mathalpha}{letters}{38} \DeclareMathSymbol{\varphi}{\mathalpha}{letters}{39} \let\upDelta\Delta \let\upOmega\Omega \let\upGamma\Gamma \let\upTheta\Theta \let\upLambda\Lambda \let\upXi\Xi \let\upPi\Pi \let\upSigma\Sigma \let\upUpsilon\Upsilon \let\upPhi\Phi \let\upPsi\Psi  %doesn't seem to have an effect %\DeclareMathSizes{12}{12.5}{10}{10}  \begin{document} \begin{frame}  Some Math E$E$ \end{frame} \end{document}   This works quite well, except that the math letters are somewhat smaller than the normal Helvetica text. Is there a way to scale the fontsize, say by 1.1, if the typesetter is in math mode?


I have a function outputTblContents which contains  def outputTblContents ( path ):     rows = arcpy.SearchCursor(path, fields="alpha; beta")     for row in rows:         print("{0} => {1}").format(row.getValue("alpha"), row.getValue("beta"))   The function that called outputTblContents then tries to delete the folder that path is in, but is unable to because it’s still in use by the script. I guess arcpy.SearchCursor spawns it’s own thread. How do I wait for it to be finished so I can safely delete the shapefiles and clean up?  outputTblContents(pathToShpfile) shutil.rmtree(pathToTempDir)   Here is the error WindowsError: [Error 32] The process cannot access the file because it is being used by another process: '\\\\storage1\\gis\\dev\\temp\\ collated_a1.shp….sr.lock'

i am writing script which uses different Tools of arcgis and implementing different functionalities .. My script consists in different Functions running in an order. Each function is connected to each other , and works on layers and performs   functions like(update cursor, search cursor ) When function1 finishes execution funciton2 starts and works on the same layer on which first one was working.   The problem is here function2 generates wrong results or works wrong.  works wrong means if a loop is defined to 5 iterations it will runs more then 5 times. like 20, 30 times and generates different results of one value.  When i run each function separately it will works fine. but when i run function in one script it will create problems.  My findings of this are LOCKS which are creating the problem.  Sample Structure of my script:  import arcpy   import math   import sys     import traceback     from arcpy import env    class test:       def __init__(self, workSpace):          self.workSpace = workSpace        # Add Fields       def function1(self):             # Script               return;           # Generate Report       def function2(self):              # Script            rows = arcpy.SearchCursor(self.mapLayerFinal,"","","Shape_Area")           row = rows.next()           while row:                   area = row.Shape_Area                     print "function2"                         destination_cursor = arcpy.UpdateCursor(self.censusLayer, '"DISTRICT_ID" = '+ str(district_id))                   row1 = destination_cursor.next()                   while row1:                           row1.setValue("District_Area",area)                           destination_cursor.updateRow(row1)                            row1 = destination_cursor.next()                    row = rows.next()             return;        t = test(workSpace)   t.function1()   t2 = test(workSpace)   t2.function2()     NOTE: code is tested and working correct if each function is executed separately


defines a square pyramid number $a(n)$ as one that evaluates to $$\sum_{a=0}^n{a^2}=\frac{n(n+1)(2n+1)}6$$ The first several solutions are $${0, 1, 5, 14, 30, 55, 91, 140, 204, 285, 385, 506, 650, 819, 1015, 1240, 1496, 1785, 2109, 2470, 2870, 3311, 3795, 4324, 4900, 5525, 6201, 6930, 7714, 8555, 9455, 10416, 11440, 12529, 13685, 14910, 16206, 17575, 19019, 20540, 22140, 23821, 25585, 27434, 29370,...}$$  As you can see, the only solutions on this list for which $a(n)$ is itself a perfect square are when $n=0,a(n)=0$, $n=1,a(n)=1$, and $n=24,a(n)=4900$. In fact, the first comment on the OEIS page claims that these are the only such numbers in this sequence, a claim later confirmed in 2013 by Watson.   Is there a mathematical proof of this, beyond brute force guess-and-check?

This question comes from trying to see why 24 is the only non-trivial value of $n$ for which $$1^2+2^2+3^2+\cdots+n^2$$ is a perfect square. To this end, let $m,n \in \mathbb N$ be such that $1^2+2^2+3^2+\cdots+n^2 = m^2$, or $$n(n+1)(2n+1) = 6m^2.$$ When $n=24$ the left hand side is $24\times 25 \times 49$ and there are two things that make it work as a solution: $$7^2+1=2\times5^2$$ $$7^2-1=12\times2^2.$$ We can write these algebraically as $$x^2=2y^2-1$$ $$x^2=12z^2+1$$ and solve them simultaneously (with $x,y,z\in \mathbb N$).    These are instances of Pell's equation and each individually has an infinite number of solutions. How do we show there is only one (non-trivial) value of $x$ that is common to the solutions of both equations?


I've created a new database using the FULL recovery model. Now I am trying to take a log backup without first taking a full backup.  I'm aware that SQL Server won't allow us to do so, but I want to know why SQL Server is preventing it?  Below is the script I've used for testing purposes:  CREATE DATABASE TESTING GO BACKUP LOG TESTING TO DISK='G:\TESTING_LOG.TRN'

I have a SQL Server 2005 database using the full recovery model. If I execute the following commands:  ALTER DATABASE test SET RECOVERY SIMPLE; ALTER DATABASE test SET RECOVERY FULL;   or   BACKUP LOG test WITH  truncate_only;   Then try to run a log backup:  BACKUP LOG test TO  DISK = 'backupfile.bak'   I receive the error message:     BACKUP LOG cannot be performed because there is no current database backup.   Question:     How do I check that I will not be able to take a log backup, without running a backup log command?


LaTeX newcomer here. Working on a paper, and I'm trying to make my footnotes look more or less like this:    I got rid of the divider and increased the space between main text and footnote, but I have not been able to format the indentation and alignment properly. Does anyone have any ideas?   Thanks!

How can I have the following "footnote layout"?  Some Text Some Text Some Text Some Text² Some Text   2 FOOTNOTETEXT FOOTNOTETEXT FOOTNOTETEXT FOOTNOTETEXT FOOTNOTETEXT   FOOTNOTETEXT FOOTNOTETEXT FOOTNOTETEXT FOOTNOTETEXT FOOTNOTETEXT   My problem is that the footnote text starting with the second line is too far left.  \documentclass{article} \usepackage{blindtext}  \begin{document}     \blindtext\footnote{\blindtext} \end{document}


In zsh, when I enter which git it shows:  git: aliased to noglob git   How do I find out which git binary it actually invokes? (eg: /usr/bin/git vs ~/bin/git). Basically I want to bypass the aliases when I use which.

When looking for the path to an executable or checking what would happen if you enter a command name in a Unix shell, there's a plethora of different utilities (which, type, command, whence, where, whereis, whatis, hash, etc).  We often hear that which should be avoided. Why? What should we use instead?


Let $A,B,C$ be sets. Show that $A\subseteq C$ and $B\subseteq C$ if and only if $A\cup B \subseteq C$.  MY ATTEMPT  We shall prove that $A\cup B\subseteq C$ iff $A\subseteq C$ and $B\subseteq C$. Let us consider the implication ($\Rightarrow$) first. If $x\in A\cup B$, then $x\in A$ or $x\in B$. In both cases, $x\in C$, once $A\cup B \subseteq C$. Thus we conclude that $x\in C$ implies that $x\in A$ as well as $x\in C$ implies that $x\in B$. Therefore $A\subseteq C$ and $B\subseteq C$, as desired.  Conversely ($\Leftarrow$), if $x\in A\subseteq C$, then $x\in C$. Similarly, if $x\in B\subseteq C$, then $x\in C$. In other words, if $x\in A\cup B$, then $x\in C$, which means that $A\cup B\subseteq C$, as desired.  Could someone check if I am solving it correctly?

I know that this is valid because by thinking about it, you can see it's true, but I'm just not sure how I would go about actually proving it mathematically. I've kind of tried proof by contradiction, since that's what I use most of the time, but it doesn't seem to work.    In my mind, A ∪ B ⊆ C kind of just implies that A ⊆ C and B ⊆ C.


Using BSD sed;  How can I perform the following substitution?:    Before:  hello hello hello hello hello hello  After:  hello world hello hello hello hello  In other words; how can I replace only the Nth occurence of a pattern? (Or in this case; the 2nd occurrence of a pattern?)

How to replace the third occurrence of the string in the file using sed command. Example: Change only the third occurrence of is to us in the file. My input file contains: hai this is linux. hai this is unix. hai this is mac. hai this is unchanged.  The expected output is: hai this is linux. hai thus is unix. hai this us mac. hai this is unchanged.


Is there any way to get the actual SQL that is the result of preparing a statement when using the mysqli extension?    My problem: I am using prepared statements.  In all cases, they SHOULD update a record.  I am not catching any errors.  However, when I check for affected rows, there are none.  So, I want to see the actual SQL that would be executed as a result of the prepare statement.  Is there any way to do this?  I've check the mysqli reference docs, but they don't seem to have anything.

Possible Duplicate:          I'm using the mysqli extension in PHP and I'm wondering, is there possibly any way to see a prepared query as it will be executed on the server, e.g. The query is something like this  select * from table1 where id = ? and name = ?   but I want to see the query after the values are filled in, like this:  select * from table1 where id = 20 and name = "John"


In conversation, which is correct:      You mean the one with the guy who sells fruit?    or   Do you mean the one with the guy who sells fruit?   My ESL student has asked me why we don't always include the auxiliary verb, "do," in instances like this. Why is it ok to say "You mean...?" as a question in conversation.   Why don't we need the auxiliary verb before "you"?

When I learned English, my teachers told me that all questions must have an auxiliary verb at the beginning, just like Are you mad? or Is she playing? do.  But when watching some movies or talking with people who speak English, they just ask using things like You mad? and She’s playing?   Of course, the kind of intonation let me know they are asking a question, but why this happen?


I have the following code :      \begin{figure}[h]    \includegraphics[width=0.9\textwidth]{images/partie_2/module_S0_surf_10000}    \caption{\label{module_S0} $|S_0|=f(\epsilon,\lambda)$.}    \includegraphics[width=0.9\textwidth]{images/partie_2/argument_S0_surf_10000}    \caption{\label{arg_S0} $Arg(S_0)=f(\epsilon,\lambda)$. Blablabla).} \end{figure}  SOME TEXT HEEEEEEEEEEEEEEEEEEEEEEEEEEEEERE   My problem is that latex first right "SOME TEXT HEEEEEEEEEEEEEEEEEEEEEEEEEEEEERE" on a blank page and then he puts my figure on a blank page too. So I know it is not a problem of spacing because both my text and my figures are alone on their pages. Latex just dont write things in the same order as I wrote the code.  Could you explain me why it does this ?  Thanks

How to influence the position of float environments like figure and table in LaTeX?   This is a general question and should collect useful answers for all users. I hope we can use this as a reference


This question  is constantly editing the content of the question which is vandalizing and making the question null and void (and the answers too).  And because of these edits it's constantly making into the low-quality review queue.  What to do about it? Flag?

I've occasionally noticed an OP who will edit their own question and destroy it completely, always leaving some kind of graffiti-like scrawl in its place.  This seems to happen on low-quality questions by low-rep users, and the moment of self destruction tends to occur after the question is closed or otherwise devolves into a communication breakdown between the poster and the community.  Here are some examples:        It seems like the poster usually does this in anger (1st and 3rd example), or else is just confused about how to delete their question (2nd example).  My question is about how this should be handled. In the past I wasn't sure, so I always flagged for mod attention. However I notice the solution on all of these was to just do a rollback (I did this myself on the 2nd example after nothing happened). Is this a good enough approach, or should a flag be used?  What about with particularly obnoxious users like in the third example, where the guy came back to do it again?


I recently asked a question in here, and wanted to ask a new one, as it was very convoluted, and I now know what I need to know. I need to save multiple objects' location in XYZ as RGBA data on an image. The colors should match that of blender in metric, so if I move the object up 0.719 meters in blender, the color should be 0.719. Just like shown here.  Furthermore I need to save their rotation in quaternions as RGBA as well, different image though. I've found this script, but it doesn't do exactly as I need, could it be rewritten, or how would I go about it? Since I also need the data from multiple objects, saved in a string of pixels.  For a visual reprensentation of what I need to do, I need to place these track elements (shown in green outline) in a shape to form the belt for a tracked mashine. Each pixel corresponds to one element and it's position/rotation. So the number of pixels should match the number of objects.  The rest will then be handled by the shader in the game. I've included an original file from the game, if it helps.  Thanks.

I'm currently trying to extract textures from a binary file, and ideally I'd like to save each texture to a file or embed in the .blend file. However, before saving an image, I need to be able to create an image in memory from an array of pixel data.  The PIL library contains the kinds of functions I need to use, but it is not included with Blender. Is there anything similar to PIL in Blender? bpy.ops.image seems to be close to what I need, but lacks necessary pixel set/manipulation functions.


This code is very vital to my project. It refreshes items from a sql server that I have created. It does not load any of the items and gives me a Null Pointer Exception.  private void refreshItemsToInventoryList() {      // Get the items that weren't marked as completed and add them in the     // adapter      AsyncTask<Void, Void, Void> task = new AsyncTask<Void, Void, Void>(){         @Override         protected Void doInBackground(Void... params) {              try {                 final List<Item> results = refreshItemsFromInventoryTable();                  runOnUiThread(new Runnable() {                     @Override                     public void run() {                         mInventoryAdapter.clear();                          for (Item item : results) {                             mInventoryAdapter.add(item);                         }                     }                 });             } catch (final Exception e){                 Log.e("Error: ", e.getMessage());             }              return null;         }     };      runAsyncTask(task); }  /**  * Refresh the list with the items in the Inventory Table  */  @Nullable private List<Item> refreshItemsFromInventoryTable() throws ExecutionException, InterruptedException {      ResultSet rs;     List<Item> inventoryItems = null;     try {         String query = "SELECT * FROM Inventory; ";         Statement stmt = con.createStatement();         rs = stmt.executeQuery(query);          while (rs.next()){             inventoryItems.add(new Item(rs.getString("ItemDescription")));         }     }     catch (SQLException sql)     {         createAndShowDialog(sql.getMessage(), "Error");     }      return inventoryItems; }   This code is to create and add items to a list, but it unfortunately gives me a Null Pointer Exception.

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 tried doing:  $$n+5=d*x$$ $$n^2+7=d*y$$ for x and y when they are both integers. $$\frac{n+5}{x}=\frac{n^2+7}{y}$$ $$y(n+5)=x(n^2+7)$$  I am stuck here, does anyone know how to continue the proofing? Thanks

My attempt was suppose $\gcd (n+5, n^2+9) = d$ where $d$ is an integer, hence $d|n+5$ and $d|n^2+9$ but I don't know how could I rearrange this to make it $1$


So im trying to make a minecraft animation test with my world and i want really good lightning. The only problem is when i render in cycles none of my materials show up like they do in blender render.

So in my graduation from blender internal to cycles, I've been experiencing numerous problems. Now please bear with me, the answer is probably obvious but I'm new so cut me some slack.  This is how the model looks like in blender internal:    Now I transfer to cycles:      And I get this result:   The textures are there in the menu bar, but they will not show up no matter what I try.


I want my bash script to read parameters from config file. Here is what inside the script:  #!/bin/bash source /home/myscript/conf/config.conf  echo "$username"   and below is my config.conf:  username="jonas"   The output when I run the script:  [user@machinename bin]$ . thescript : No such file or directoryonfig.conf : command not found jonas   Here I am confused, though it successfully print "jonas", why is there error "No such file or directory" and "command not found"?  Am I doing something wrong?

I have this script to divide a file over a 100000 or even more in 50000 lines.  desc()                                                     {                                                       echo $1 $2|awk '{d=$1;}                                 BEGIN {a=1;b=0}                                            { f=d"0"a;                                                while ((getline x<d)>0)                                   { print x>>f".txt"                                        if (b++>=50000)                                            {                                                         close(f);b=0;a++;f=(a<10)?d"0"a:f=d""a                }                                                  }                                                   }                                                   END {print "Terminado ... ! "}'                         }                                                      if [ -f $1 ]; then                                              desc $1 $2                                      fi                                                        When I execute it I got this error message:  sh-3.2$ parte.sh pa.txt                                  : command not found                                      '/parte.sh: line 2: syntax error near unexpected token ` '/parte.sh: line 2: `desc()                              sh-3.2$                                                    Can anyone help to solve it?


My Blender is running Python 3.5.3. How would I change the python version to another one i.e Python 3.6.

When Blender is installed, it creates its own copy of Python 3.x. However, I prefer to code in Python 2.x. This makes it difficult for me to work with newer versions of Blender. I would like to know what to do so that Blender will instead use an external installation of Python 2.x, which I already have installed on my computer.  How do I make Blender recognize the other version of Python?


While in undergraduate years, abstract stuctures are very confusing since they arise without many motivations most of the times, and find their living ground later on. I would like to understand why noetherian rings are interesting.  Principal and euclidean rings are definitely useful to have arithmetic tools and notion generalizing those of the arithmetics of integers. What about noetherian rings? It often appears in arithmetic courses, however what allows them to do that other rings do not? What are the lost properties compared to a principal ring?   In one sentence: how to grasp the meaning and interest of noetherian rings (or other structures)?

I know they are important in abstract algebra, but why do people study them? Why are they so important to study? Do they make certain things easier to understand?


I like music. I like the music.   I know the difference between the previous two sentences is that 'the music' is specifically talking about a music.  Is there any more difference in meaning? Can you tell me some cases where the definite article isn't required?

I can’t for the life of me figure out where to use a and where to use the — and where there is no article at all. Is there a simple rule of thumb to memorize?   The standard rule you always hear:     “If a person knows which item you are talking about then use "the"   . . . doesn’t clear things up for me, as I have no idea whether or not they know.


There are several Programs, Files and Process that use the internet to share their status. They are using consuming too much bandwidth.  How can I stop them from using Internet Connection in Windows OS?

I have a 256 kbit/s Internet connection. Most often, I find that the browsing speed is too slow. I have to use  (SysInternals) to find out which program is accessing the Internet without my knowledge and terminate it. Previously I was using  to control Internet access by installed programs. But as it doesn't work for Windows 7, I'm left with no option.   Is there any other tool which serves the purpose?


I would like to pass some values from an activity to a fragment. Have seen a lot of answers but none resolved my issue  Activity  Bundle bundle1 = new Bundle();     bundle1.putString("baros",baros);     bundle1.putString("upsos",upsos);     bundle1.putString("sex",sex);     CalculatorFragment calculatorFragment = new CalculatorFragment();     calculatorFragment.setArguments(bundle1);   Fragment  @Override public View onCreateView(LayoutInflater inflater, ViewGroup container,                          Bundle savedInstanceState) {     // Inflate the layout for this fragment     View view =  inflater.inflate(R.layout.fragment_calculator, container, false);      apotelesma = view.findViewById(R.id.apotelesma);     Bundle bundle = this.getArguments();     String name = (String) bundle.get("sex");     apotelesma.setText(name);     return view;  }   java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.Object android.os.Bundle.get(java.lang.String)' on a null object reference  problem is here: String name = (String) bundle.get("sex");  thanks!


How can I relate the bandwidth required by a morse code signal over RF to:   the length of a dash, and the length of a dot the time between dots and dashes the speed of keying?   Are all applicable to the bandwidth of the channel?  Can I model this as a function?

If I am using a channel only for morse code (CW), with one frequency and interruptions for dots and dashes, is the necessary bandwidth of the channel twice the audio frequency of the tone used for CW?


I was trying to install java8 in my ubuntu 14.04 machine. I am getting the following errors. I have tried many solutions available in internet but the floowing error is repeating every time.  Oracle JDK 8 is NOT installed. dpkg: error processing package oracle-java8-installer (--configure):  subprocess installed post-installation script returned error exit status 1 dpkg: dependency problems prevent configuration of oracle-java8-set-default:  oracle-java8-set-default depends on oracle-java8-installer; however:   Package oracle-java8-installer is not configured yet.  dpkg: error processing package oracle-java8-set-default (--configure):  dependency problems - leaving unconfigured No apport report written because the error message indicates its a followup error from a previous failure.                                                                                Errors were encountered while processing:  oracle-java8-installer  oracle-java8-set-default E: Sub-process /usr/bin/dpkg returned an error code (1)   Thanks in advance..

I want to install Oracle's JRE and to update to the latest version with the Software Updater when they released. Is there a Ubuntu package that is provided by Canonical or Oracle?  Before release Java 7, I followed  to install Java 6.  But it doesn't work for Java 7. There is no package sun-java7-xxx. How can you install Java 7?


I have notice that every other circuit breaker in the panel is not working.I also notice after pulling the breakers that they all tested good using a continuity tester!! however inspecting the red wire the bus behind looks burned.The 220 on that line that feeds the washer only has partial power what can be done to fix the problem???

We have solar panels and mains power. Last night was very windy; we heard quite a few bangs from outside and thought it might be the wires getting knocked together. Woke up this morning and we have power to everything except the lights and our stove. We have a smart meter and it has no pulse light. What do you think could be the problem. Is it a main fuse coming into house before the meter?


Someone told me this is important to write: if (10 == a.get()) { }  instead of: if (a.get() == 10) { }  Because C++ use pass-by-value for first parameter of == and use pass-by-reference for second parameter. Is this right ? and where is mentioned in c++ standard ? Is order of objects important in conditional statements C++ ?

I noticed for a while now the following syntax in some of our code:  if( NULL == var){    //... }   or  if( 0 == var){   //... }   and similar things.  Can someone please explain why did the person who wrote this choose this notation instead of the common var == 0 way)?  Is it a matter of style, or does it somehow affect performance?


When I run  sudo apt-get update   I always get this output:  ...  E: Failed to fetch http://ppa.launchpad.net/q-quark/equalx/ubuntu/dists/xenial/main/source/Sources  404  Not Found E: Some index files failed to download. They have been ignored, or old ones used instead   How could I fix it?

PPA seems to be constantly offline. Whenever I use sudo apt-get update, this error is shown:  W: Failed to fetch http://ppa.launchpad.net/ 404  Not Found   How do I fix these errors?


It seems to me that numbers don't adds up: df -ah  /Filesystem      Size  Used Avail Use% Mounted on /dev/disk1s5    113G   11G   16G  41% / devfs           194K  194K     0 100% /dev /dev/disk1s1       -     -     -    - /System/Volumes/Data /dev/disk1s4    113G  3.1G   16G  17% /private/var/vm map auto_home      0     0     0    - /System/Volumes/Data/home  Looking at this it seems I should have almost 100GB free.... On the other side a disk map with Cleaner One shows me that I use 82.4 GB... It's macOS catalina. I'm confused

Every few days I get notices on my MacBook that it's running or run out of hard drive space. Curiously, restarting the computer will enable me to recover gigabytes of space (this past time, it was able to recover about 2.2GB). However, I can't identify anything in my personal activity that consumed that space.  It's possible that it's a rogue iTunes podcast or a huge software update that my Mac is automatically downloading - would either of these reclaim the space upon a restart?  One possibility that I can think of is that FileVault has some sort of disk leak, allocating but not freeing files. Does this make sense? Is there a tool that I can run to determine where this space is going? Assuming it is FileVault, should I try to disable it? What's the best way to turn of FileVault on a nearly full computer?


I'm trying to work out this limit: $$ \lim_{n \to \infty} \left(\frac{n^2 - 2n + 1}{n^2-4n+2}\right)^n = e^2 $$  I have managed to show that it is equal to: $$\lim_{n \to \infty}\left (1+\frac{2n-1}{n^2-4n+2}\right)^n$$ but I have no idea how to continue from here, help would be appreciated.

I cant use lhopital's rule here is my attempt:  Limit of $(\frac{n^{2}-2n+1}{n^{2}-4n+2})^{n}$ =$e^{\lim_{n\to \infty} n\times \ln(\frac{1 -2-n +\frac{1}{n^{2}}}{1 -\frac{4}{n} +\frac{2}{n^{2}}})}$ I got stuck here


So for example in a mall, Can I take pictures of people without their permission? Does that depend on wether they notice I take pictures or not? Also in Cafes and streets...all public places, I am not really sure about this. What are some general rules? What to avoid?  I am located in the United States, Kansas!

If one were to take a similar path as  in shooting candid street photography today, should they be concerned about laws or other realistic norms of today? I am wondering specifically in the US speaking broadly of all states. I am not looking for legal advice, but anything that one photographer to another would caution against as potentially being grey or obviously illegal.  Similar previous question:


For example, there is being written a big project on Drupal 8 by several developers. They use Git for team working.  The first developer is creating some node types and adding some test nodes. At the same time the second developer is creating some taxonomy vocabularies and adding several taxonomy terms.  At the same time the third developer is setting up search indexes for Search API.  After it they need to synchronize the database for continuing work.  I suppose that commiting, pushing and manually merging SQL dumps is not good idea.  Could you share your experience, how is the best way to synchronize the database after work ? Are there any good tools for it ?

Drupal 8, two versions of a site - dev and production.  How to move changes, especially changes in content from dev to production without destroying DB on production?  I know we have Features for configuration, but what about content?  Ideally, I would like to be able to add nodes, pages and edit existing ones, and then carry changes to the prod site, without destroying changes users created on the dev site - comments, new registrations and such.  What's the solution here? Export content to code?  Can someone give step-by-step on dev cycle?


When load the properties file I get a java.lang.NullPointerException  This is a simple java swing application, try to read the properties file with following code get java.lang.NullPointerException:  InputStream inputStream; Properties properties;  inputStream = new FileInputStream("C:/Config/config.properties"); properties.load(inputStream);

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?


This is the first time I add a question using the iOS app, so a good test.  I had like to suggest a feature that applies to both the iOS app and the mobile version of the website:  Can we allow to vote on comments? This is not possible yet.

I see numbers next to comments but I cannot seem to do anything with them, can we enable comment voting and flagging in iOS app?


I am wondering about the correct use of lesser/smaller in the following phrase:     This library has a smaller/lesser number of books than the National Library.   I did find  on nearly the same question, where one answer states: "As a general rule, 'smaller' is used for size, whereas 'lesser' is used for quantity." In this particular example, however, I am not quite sure how to approach this, as 'number' in this sentence refers to an amount, which you could argue has a size, and 'smaller/lesser number' as a whole only refers to a quantity.   To me, 'a smaller number' sounds better, but I am not a native speaker and I can't make out a clear reason for choosing one over the other.

I am confused as to some of the vocabulary that can be used to compare numbers and quantities, and would very much appreciate some clarification.   I suppose it is safe to say that 1 is smaller than 2.   Can I also say that 1 is less than 2, and if so, which form is preferable?   It seems that saying that 1 is lesser than 2 is uncommon - but is it incorrect?   Finally, -2 is clearly less than -1, but is it true that -2 is smaller than -1? (If I have 2$ of debt, then I would say that I have less money than if I had 1$ of debt, but I would also say that my debt was larger, not smaller).


Yesterday I have been implementing a small Python scripts that checks difference between two files (using difflib), printing the result if there is any, exiting with code 0 otherwise.  The precise method, difflib.unified_diff() is returning a generator on the diffs found. How can I test this generator to see if it needs to be printed? I tried using len(), sum() to see what was the size of this generator but then it is impossible to print it.  Sorry to ask such a silly question but I really don't see what is the good practice on that topic.  So far this is what I am doing  import difflib import sys  fromlines = open("A.csv").readlines() tolines = open("B.csv").readlines() diff = difflib.unified_diff(fromlines, tolines, n=0) if (len(list(diff))):     print("Differences found!")     # Recomputing the generator again: how stupid is that!     diff = difflib.unified_diff(fromlines, tolines, n=0)     sys.stdout.writelines(diff) else:     print("OK!")

Python provides a nice method for getting length of an eager iterable, len(x) that is. But I couldn't find anything similar for lazy iterables represented by generator comprehensions and functions. Of course, it is not hard to write something like:  def iterlen(x):   n = 0   try:     while True:       next(x)       n += 1   except StopIteration: pass   return n   But I can't get rid of a feeling that I'm reimplementing a bicycle.  (While I was typing the function, a thought struck my mind: maybe there really is no such function, because it "destroys" its argument. Not an issue for my case, though).  P.S.: concerning the first answers - yes, something like len(list(x)) would work too, but that drastically increases the usage of memory.  P.P.S.: re-checked... Disregard the P.S., seems I made a mistake while trying that, it works fine. Sorry for the trouble.


I'd like to add a "normal" space, where the length of the space is the same as the length of the space between the words you are reading right now.   How can I accomplish this?

I know that \: in LaTeX produces a space when rendered.  Are there any alternatives, because my LaTeX renderer doesn't support \: (it renders it as text), and there is no help / FAQ that I can find.


From my personal point of view, we cannot deduce that $NMNM=0$,but I can't find a counterexample.

Let $A$ and $B$ be $n\times n$ matrices such that $ABAB=0_{n\times n}$.  Can we conclude that  $BABA$ must be  $0_{n\times n}$?   I fail to give a counterexample when $n=2$， so I guess the answer is "yes"


Using a bash script, I'm having difficulty trying place one file into another based on a certain location.  ||bob ||mary ||david   destination:  ||urty ! comment ||gdfgrw ||fdfdf   So basically drop all of the contents of one file into (below the ! comment) header:  So the destination should look like this:   ||urty ! comment ||bob ||mary ||david ||gdfgrw ||fdfdf

I have one file that contains the following:  10.48.29.68 doggy 10.65.8.184 kitty 10.48.15.104 froggy   I need to insert the contents of this file into my hosts file after the line bc group in the hosts file.  The hostfile of the server already has hundreds of entries. Bc is a group here in our hosts file. I want code that reads the ip addresses and hostnames in my file above and put those entries in the hosts file below the heading bc group.  The new file above should be written in the hosts file after keyword bc group.  For example, if my hosts file contains these lines:  10.59.12.232 bc4 10.48.29.68 xy9 bc group 10.63.71.136 bc2 10.63.71.214 bc3   I need to convert the hosts file to this:  10.59.12.232 bc4 10.48.29.68 xy9 bc group 10.48.29.68 doggy 10.65.8.184 kitty 10.48.15.104 froggy 10.63.71.136 bc2 10.63.71.214 bc3   I need to append all of the lines from my first file after the line bc group in my hosts file, and then continue with the remaining lines in the hosts file.


I want to use Google Chrome and Google search instead of Bing when I search in Windows 10.   Google Chrome is launched when I click on web, but it's Bing search. (My default search engine on Google and Edge is )    I haven't found how to configure that.  Someone can help me ?

While Cortana is not available in my region, I can see the integrated web searchs in Windows 10's start search being super useful if they weren't Bing results.  I'd really like to be able to change the search engine used to DuckDuckGo, is there a way I can do that?


I have a file named backup.sh. I just want to take backup only html directory and its all sub directories and files. But I'm getting all the parent directory of html directories as well like var, www which is not required for me.  I'm pasting the code below:  #!/bin/bash #Purpose = Backup of Important Data DATE=$(date +"%d-%b-%Y") SRCDIR="/var/www/html" DESDIR="/media/HDD-01/html" FILENAME=html-$DATE.tar.gz  # Making backup with compress  tar -cpzf $DESDIR/$FILENAME $SRCDIR   I got this code from below link:    Can anyone suggest me how can I solved my problem?  Thanks in advance.

I am trying to create a graphical program for my script.  Inside the script I use tar to create a tar archive.  From the graphical program I get the full name of file that I want to create a tar archive.  tar -cvf temp.tar /home/username/dir1/dir2/selecteddir    My tar archive includes home, username, dir1, dir2 and selecteddir while i want tar to create archive only including selecteddir.


I was taught that the return at the end of main function is a signature to the program, which indicates wether or not the program completed sucessfully.  It seems like this idea does not hold for in micro-controllers, because you write a program in a while(1) loop , not even operating system like free RTOS.  Why, in such a case, would you return 0 at the end of main? Who or what recieves the return?

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


Given a potential $V$, how does one compute how shallow the potential can be such that it allows at least one bound state?

Previously I thought this is a universal theorem, for one can prove it in the one dimensional case using variational principal.   However, today I'm doing a homework considering a potential like this:$$V(r)=-V_0\quad(r<a)$$$$ V(r)=0\quad(r>a)$$ and found that there is no bound state when $V_0a^2<\pi^2\hbar^2/8m$.  So what's the condition that we have at least one bound state for 3D and 2D?


I'm currently playing with remote environments using rmi registry. My server is like this:   import java.rmi.registry.LocateRegistry; import java.rmi.registry.Registry;   public class Server {     public static void main(String args[]){         if(args.length");             System.exit(-1);         }              try{             Registry r=LocateRegistry.getRegistry();         MethodsImp methods=new MethodsImp();             //have the object to be remotely accessed so will bind it to the registry             System.out.println("Will register on "+args[0]);            r.rebind(args[0], methods);         }         catch(Exception e){             System.out.println("Something went wrong when registring the methods");             System.out.println(e.getMessage());             System.exit(-1);         }      }  }   When I run the program by:   java -classpath /home/outsider/Desktop/RIM/RIM_TP1_correct/src -Djava.rmi.server.codebase=file:/home/outsider/Desktop/RIM/RIM_TP1_correct/src/ Server regsiter_name   I get this:  Will register on regsiter_name Something went wrong when registring the methods null   For some reason when I used r.rebind it throws an exception which has the message null. Before trying to run the program I install the rmiregistry by doing   rmiregistry &  On the shell. I can't find out what I'm doing wrong. If anyone could help it would be great

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?


Is being a poor writer a serious impediment as a researcher? I mean if you're particularly bad at writing reports and always get bad feedback as a student for your reports, does that mean my research career would never take off? The question asks whether researchers working in teams are all required to contribute to composing the reports or can you get away with it if you compensate with other skills?

I am a PhD student (mid stage) and my work includes the use of mathematics. I try to learn as much as possible. I am facing a problem: I spent enough time on the mathematics required for my research, and according to my research supervisor I am good at understanding proofs, theorems, etc. at an intuitive level, but in writing I still have some work to do. Many times I try to write things and, although I think I am not that so bad, there is still a problem to be resolved.  Question: Is writing in research so very important? I have seen some research papers of some star people whose writing does seems to be very impressive to me (although I may be wrong).  Edit: Please note that I don't consider myself a star: that's why I am asking this question. I am trying my best to improve my writing skills and it has improved to some extent, but to me it appears that I may not get that much better at writing. Let me tell you a story: once during my PhD I worked with a professor other than my supervisor, and then we got some result so he ask me to write a paper. I took 4-5 days write a paper 8-9 pages long, then he told me that I wrote in a cryptic manner. (This happened in my first year.)


Evaluate $$f(x) = \int_0^{\pi/2}\frac{1}{(1+x^2)(1+\tan{x})}dx$$  My attempt: I could not apply any standard method known to me to solve this integration. The only way I thought of is expressing $\tan(x)$ as an infinite series and expanding into a polynomial. But this will introduce approximation errors.  $$f(x) = \int_0^{\pi/2}\frac{1}{(1+x^2)(x + \frac{x^3}{3}+\frac{2x^5}{15}+...)}dx$$ $$or, f(x) = \int_0^{\pi/2}{(1+x^2)^{-1}(x + \frac{x^3}{3}+\frac{2x^5}{15}+...)^{-1}}dx$$ Please let me know how to solve this problem.

Evaluate the following integral $$ \tag1\int_{0}^{\frac{\pi}{2}}\frac1{(1+x^2)(1+\tan x)}\,\mathrm dx $$    My Attempt:  Letting $x=\frac{\pi}{2}-x$ and using the property that  $$ \int_{0}^{a}f(x)\,\mathrm dx = \int_{0}^{a}f(a-x)\,\mathrm dx $$  we obtain  $$ \tag2\int_{0}^{\frac{\pi}{2}}\frac{\tan x}{\left(1+\left(\frac{\pi}{2}-x\right)^2\right)(1+\tan x)}\,\mathrm dx $$  Now, add equation $(1)$ and $(2)$. After that I do not understand how I can proceed further.


I looked around and seems like its not possible according to another post. As a workaround, i'm using a bunch of white images to act as the background color change. Any way to change the black color itself or a better workaround?

I would like to render an animation as a series of .png images with transparent backgrounds for use in a video. Is this possible?


Let $f$ be a continuous function from $[0,1] \rightarrow \mathbb{R}$.  I want to prove the following result, but I can't even start really. $$I \equiv \int_0^1 \int_0^1 x \wedge yf(x)f(y)dxdy \ge 0 $$ with equality holding if and only if $f(x) = 0 \quad \forall x \in [0,1]$.  I can obviously make the observation that $I = 2\int_{x \leq y} x f(x) f(y)dxdy$ but this is unhelpful.  Any hints/solutions would be massively appreciated, and I'm sorry to not really have any ideas so far on my own.  Thanks if you can help!

Let $f$ be a quadratically integrable function. Does the inequality  $$ \int_0^1\int_0^1 \min(s,t) f(s) f(t) \,\mathrm{d}s\,\mathrm{d}t \ge 0 $$  hold true? This is obviously related to . I thought about writing  $$2\int_0^1\int_0^t sf(s)f(t)\,\mathrm{d}s\,\mathrm{d}t=2\int_0^1f(t)\big(\int_0^t sf(s)\,\mathrm{d}s\big)\,\mathrm{d}t.$$  Does partial integration then lead to some conclusion?


For any positive real $ a, b, c$, show that $(a+b+c)^\alpha<a^\alpha+b^\alpha+c^\alpha,  0<\alpha<1$.  I can show that it works for special cases like $\alpha=1/p, p\in\mathbb{N}$... but I don't know how to generalize further...

Hy all! I'm having trouble finding a proof for the following problem:  Show that $a^x+b^x+c^x>(a+b+c)^x$, if $a,b,c>0$ and $0<x<1$ (over the real numbers).  This inequality has been torturing me for long hours the least. I couldn't find anything on Google. This kind of equation isn't made for search engines tbh.  Anyway, I really thinked about it a lot but didn't make any significant progress. It would be great to see a proof without the really high-end Mathematics. Any ideas to start with?


I successfully installed UBUNTU 12.04 on a pre installed windows 8 laptop, but when I try to boot windows 8 I receive next problem:   Error: Secure Boot forbids loading module from (hd0, gpt6)/boot/grup/ntfs.mod  Error: no such device: FEBE18858BE186605,  Error: unknown command 'drivemap'  Error: invalid EFI file path.  Press any key to continue...  I can only boot windows 8 properly when I use F12 and choose the special windows 8 boot manager.   Can somebody help me to solve this problem  Thanks

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


I'm trying to insert a \circ inside a minted block of code, to emit the following: g ∘ f:  \begin{minted}[escapeinside=||]{haskell} g |\circ| f \end{minted}   I was trying to follow the minted documentation, and attempted to do it inside a escapeinside, but without much success, I get an error:  <inserted text>                 $ l.2 \PYG{n+nf}{g} \PYG{esc}{\circ} \PYG{n}{f} ...   Am I holding it wrong? Is there a better way?

I am new to LaTeX and I am using it to write a report with several chapters (main page in which I include the other pages).  I got this error:   C:\Users\hussam\Desktop\thèse\latex\thèse\thèse.brf  ! Missing $ inserted.  <inserted text>                   $  l.52   without any other information.  thèse.brf is a totally white page. I looked at line 52 of all my documents but couldn't find any problem.


The paragraphs after "captionof" do not indent properly. Either comment out \usepackage{caption} or \captionof{figure}{figure} take the indentations back.  But I need the capt-of package and also caption package to redefine "labelsep" to be space other than colon. Is there an alternative way to do so.  Here is an example:  \documentclass{article}  \usepackage{capt-of} \usepackage{caption}  \begin{document} before caption before caption before caption before caption before caption before caption before caption before caption before caption before caption before caption before caption before caption before caption before caption before caption before caption before caption before caption before caption before caption before caption   \captionof{figure}{figure}  after caption after caption after caption after caption after caption after caption after caption after caption after caption after caption after caption after caption after caption after caption after caption after caption after caption after caption after caption after caption after caption after caption after caption after caption   after caption after caption after caption after caption after caption after caption after caption after caption after caption after caption after caption after caption after caption after caption after caption after caption after caption after caption after caption after caption after caption after caption after caption after caption  \end{document}

\documentclass{mwrep} \usepackage[font=small,compatibility=false]{caption} \usepackage[chapter]{minted} \usepackage{lipsum} \begin{document} \chapter{Test} \lipsum[2-3] \captionof{listing}{Caption of listing}  \lipsum[2-3] \end{document}   In the provided example, using of \captionof causes all paragraph indents to disappear (after \captionof). How can it be fixed?


I'm using a longtable for the nomenclature produced by the nomencl package. Here, the longtable serves as a tabluar replacement. Unfortunately, the usage confuses the totalcount package resulting in an uncorrect table count.  MWE:  \documentclass{report} \usepackage{longtable} \usepackage[figure,table]{totalcount}  \begin{document} \verb|\totaltables| is \totaltables, but should be 2.  \begin{table}One\caption{Table One}\end{table} % ONE \begin{table}Two\caption{Table Two}\end{table} % TWO  \begin{longtable}{cc} Long & Bla \end{longtable}  \end{document}   Result:

For reasons both complex and confusing, I would like to caption a longtable without incrementing the table counter in the process.  I want to have two consecutive longtable environments to be captioned with identical table numbers; i.e. one longtable captioned "Table x.y: Data Set (Part A)" and one captioned "Table x.y: Data Set (Part B)", with x.y being identical for both tables.  Apparently however, even \caption*{} command bumps table. I am a bit at a loss here.  Note: I know that the xtab package would enable me to have one long table with switches of headers and captions mid-table. However I got a (different) problem with that package, akin to  but sadly not solved by egreg's answer there; so this question should be considered longtable-only as xtab, supertabular etc. don't float my boat right now. :-(


Following some suggestions I used:  \DeclareFieldFormat{titlecase}{\MakeSentenceCase{#1}}   to SentenceCase the title.  However, only the name of the conference and not the actual title seems to be affected   A. C. Bahnsen, A. Stojanovic, D. Aouada, and B. Ottersten. “Cost sensitive credit card fraud detection using bayes minimum risk”. In: Proceedings - 2013 12th inter- national conference on machine learning and applications 1 (2013), pp. 333–338. A. C. Bahnsen, A. Stojanovic, D. Aouada, and B. Ottersten. “Cost sensitive credit card fraud detection using bayes minimum risk”. In: Proceedings - 2013 12th Inter- national conference on Machine Learning and applications 1 (2013), pp. 333–338.

Titles of articles I'm about to cite contain upper case letters and when using BibTeX it converts them to lower case ones. This happens only in the title and only the first letter conserves its case. For example, when I cite an article about HF, the reader won't know if it is about Hafnium (Hf) or fluorine acid (HF).  I know that I can fix it manually in the .bbl file but I would like to avoid it, or fix it automatically.


I had installed Windows on my machine and wanted to install Ubuntu alongside Windows in a dual boot. First I shrank my Windows C drive, and in options of the Ubuntu 20.10 installer I just chose "Installed in dual boot" (something like that). At the end of installation I received some errors, but Ubuntu was still able to boot and function normally. Then when I restarted it become like this:  Failed to Set MokListRT: Invalid Parameter Could not create mokListRT: Invalid Parameter Importing MOK states has failed: import_mok_state() failed : Invalid Parameter Continuing boot since secure mode is disabled_  I just want to know how to fix this error and enable my computer to dual boot. I checked if Windows files are still on disk, and they are.

I have a MacBook Pro and only use Ubuntu on it. I just upgraded from 18.04 to 20.04. Now when I start the computer it says: Failed to Set MokListRT: Invalid Parameter Could not create mokListRT: Invalid Parameter Importing MOK states has failed: import_mok_state() failed: Invalid Parameter Continuing boot since secure mode is disabled.  Does anyone know EXACTLY how I can fix this?? Step-by-step process I don't want to mess anything up trying to fix this.


I have been trying to understand this concept to identify on the best option to reduce temperature in my room. I have read few article which stated that glass is transparent to IR radiation. ie Beyond the range of UV light (wavelength >400 nm), the energy of visible and infrared light are not enough to excite the electrons and most of the incident light gets transmitted. Thus glass appears transparent to visible and infrared light.  However, contrary to it I saw few article which gave proof of IR imaging where a sunglass (worn by a person) appeared black; which indicates that IR radiation is absorbed in the glass. So which of these two is correct? Any anyone help me in understanding with logical reasoning and help me out for application of this concept to a real world problem.

Glass has low transmittance for infrared light. Does glass reflect or absorb infrared light? Greenhouses are able to reflect infrared as I understand it.


I need to upgrade ghostscript to version 9.15. I'm running 14.04LTS, which has version 9.10. I looked at some previous posts on this site, such as , but I couldn't find a general answer. I also tried downloading .deb package and installing via the software center, or compiling the source code, but both methods failed due to dependencies.   So my question is: how to install Ghostscript 9.15 on Ubuntu 14.04LTS?

First of all, I am well aware of this question: .  Unfortunately none of the answers worked. I can find deb files from . There, I am surprised to see that the last version of Ghostscript for Ubuntu 14.04 is version 9.10. When I download version 9.15 for Ubuntu 15.04, and I run it (as root), I get the error:     Error: dependency is not satisfiable libgs9   I checked (apt-get install libgs9) and I have the latest libgs9 installed. Also,  seems to confirm that last is version 9.10 for 14.04.  Does this mean it is not possible to upgrade Ghostscript?


Example:     [1] Do you have an English book?      [2] Have you an English book?    Which of the two sentences is correct in terms of language and use?

I've seen it on TV that a guy asking another man, "have you a map?"   If I were him, I would probably say, "do you have a map?"   I would like to know what grammatical rules it followed in this case.


My E: drive is missing 537gb of drive space and I haven't figured out why yet. I've reviewed a lot of pages and this isn't a dupe or resolved by standard means. See below for steps I've taken:   The E: drive is not the boot disk so no hibsys files Paging file is set to "No paging file". I have 64gb of Ram, Win10Pro, 64bit  I've unhidden all files and the total space for all files/folders is 121GB. Issue was on Win7 and after upgrading to Win10 it persists. I ran Defrag. No change. I ran error checking. No change. Recycle bins are empty. No unallocated drive space. No hidden partitions System Protection is and has been turned off for all drives. Cluster size should be fine and whatever the default is. I spot checked a few files on E: and they appear normal with Size and Size on disk being real close.  I've rebooted.   I just upgraded to Windows 10 in hopes that it would fix whatever win7 silliness was causing this but no luck. There are new tools in Win10 however. I'm looking at the Storage usage for the E: drive and it says 540gb are being used up by Other. When I expand Other, it shows a few folders that don't even total 4gb.  I have 204,040 files and 21,161 folders in E. Not sure if that plays a part in this or not.  Any ideas? Here's my disk info:

How can I visualize which folders and files are taking up all of the space on my hard drive?  I'm getting some conflicting reports on the size of hard drive contents. Namely what is and isn't there and what folders are actually using the space.   I need to know which of the files or folders the culprits behind all this hidden bloat. Also there should be a print option to get it on paper.


My textbook mentions that the universal law of gravitation cannot be proved. If so, then why is it called a 'law' and not a 'hypothesis'?

What is a , a , and what is the relationship among them?  I know this is a very basic question, so any reference to epistemology will be greatly appreciated :)


I'm wondering if it's possible to have a global error_page directive in nginx without redirecting (changing the URL in the browser's address bar).  I know this is possible by using a named location, but global error pages are declared in the http block, which doesn't allow location directives. I have a number of vhosts in my configuration and I'm trying to avoid adding this to current and all future vhosts.  I'm currently using nginx 1.3.0 if that makes a difference.

I have an nginx configuration with a whole bunch of server {} blocks. I want to share error pages between them all, but many of them have different document roots. I can use a configuration like  error_page   404              /404.html; error_page   500 502 503 504  /50x.html;   outside of the server blocks and it gets shared, but then I have to put those same documents in all the roots, or have rules like  location = /404.html {     root /srv/http/errors; } location = /50x.html {     root /srv/http/errors; }   in all my server blocks.  Is there a way to share these documents without repeating myself over and over or having many copies in the filesystem?


What's the difference between them, does the first one really run faster?  for (x in myArray) {     document.write(myArray[x] + "
") }  for (i=0; i<myArray.length; i++) {      document.write(myArray[i] + "
") }

Do you think there is a big difference in for...in and for loops? What kind of "for" do you prefer to use and why?  Let's say we have an array of associative arrays:  var myArray = [{'key': 'value'}, {'key': 'value1'}];   So we can iterate:  for (var i = 0; i < myArray.length; i++)   And:  for (var i in myArray)   I don't see a big difference. Are there any performance issues?


I am migrating my workflow to ubuntu from windows. I have a macbook pro at home and I really enjoy being able to use the workspaces feature on ubuntu to increase my productivity. As myself being someone that isn't very familiar with doing command line things and hasn't worked with linux a whole lot other than doing basic commands like cd, ls, rm, screen, and sudo. I was wondering what you think would be the best choice for a ubuntu version. I am looking for ease of use as well as stability. I spend most of my time working with eclipse, as well as writing documents.  On a side note, right now I have a pretty high end workstation, but I am using a crappy notebook 2.5 inch 1TB hard drive for my system. Would it be worth it to switch to a top of the line SSD, or would the difference not really be noticeable? How difficult would it be for a newcommer to setup the system with the os and important folders running on a SSD and then other folders for storage running on a HD.

What are the differences between an Ubuntu Long Term Support release (LTS) and a normal release?


I am a senior Siebel CRM developer having more than 8 years of working experience. Now, I am very keen and excited to learn Salesforce and get certified as soon as possible.   Please guide me where to start from scratch ?

Where should I start learning? There are various topics to learn like Objects, Classes, Apex, Visualforce, SOSL, SOQL, Triggers, etc. There are so many options out there to start learning. I couldn't decide what topic to learn first, and then step by step get proficiency in all aspects of Saleforce.


Why is the output for the following code 11,21,31 11,21,31 and not 10,20,30 10,20,30?  public class Tp {      public static void doChange(int a[])     {         for(int pos=0;pos<a.length;pos++)         {             a[pos]+=1;         }     }     public static void main(String args[])     {         int arr[]= {10,20,30};         doChange(arr);         for(int x:arr)         {             System.out.print(x+",");         }          System.out.println(arr[0]+" "+arr[1]+" "+arr[2]);     } }

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


let be   $$f(x)= 6xy-3x-2y+1 $$  Why does the diophantine equation $f(x,y)=0 $ has no solution in $ \mathbb{Z}^2$?  I have seen a few questions like this on this page..but still couldn't figure out what the trick is here..  appreciate any help!

Find one integer solution to the following Diophantine equation:   \begin{equation*} \\\forall \,x,y \in \mathbb{Z}\\ 6xy + x - y = 274 \end{equation*}   The resultat ist $x = 9$, $y = 5$ (Obtained with  )  I need to know a method that allows me to reach such a result. How can I calculate the value of these two variables in a Diophantine equation? For example: 6xy + x - y = 458