I have lines of equations that run over the boundary of the PDF, I would like them to fit in the PDF. However, this is what happens instead:   I have the code:  \documentclass[11pt,fleqn]{article} \setlength {\topmargin} {-.15in} \setlength {\textheight} {8.6in}  \usepackage{amsmath}    \usepackage{amssymb} \usepackage{amsthm}  \renewcommand{\labelenumii}{\theenumii.}  \newcommand{\mname}[1]{\mbox{\sf #1}} \newcommand{\pnote}[1]{{\langle \text{#1} \rangle}}  \begin{document}  \medskip  \noindent  \subsection*{Required Problems}  \begin{enumerate}    \item \textbf{[10 points]} Prove by weak induction that \[\sum^{n}_{i=0}i^2 = \frac{n(n+1)(2n +1)}{6}\] for all $n \in \mathbb{N}$.  \bigskip  \begin{proof} Let $P\,n \equiv \sum^{n}_{i=0}i^2 = \frac{n(n+1)(2n +1)}{6}$. Proving $P\,n$  for all $n \in \mathbb{N}$ by weak induction.  \emph{Base case}: $n = 0$.  \begin{align*} P\,0 & \equiv \sum_{i=0}^{0} {i}^2 = \frac{0(0+1)(2*0 +1)}{6} &  \pnote{definition of $P$}\\      & \equiv 0^2 = \frac{0(0+1)(2*0 +1)}{6} & \pnote{definition of $\sum_{i=m}^{n} f\,i$}\\      & \equiv 0 = \frac{0(1)(1)}{6} & \pnote{arithmetic}\\      & \equiv 0 = 0         & \pnote{arithmetic} \end{align*}  \emph{Induction step}: Assuming $P\,n$. Proving $P\,(n + 1)$.  \begin{flalign*} P\,(n+1) & \equiv \sum_{i=0}^{n + 1} {i}^2 = \frac{(n+1)(n+2)(2(n+1) +1)}{6} & \pnote{definition of $P$}\\          & \equiv {(n+1)}^2 + \sum_{i=0}^{n} {i}^2 = \frac{(n+1)(n+2)(2(n+1) +1)}{6} & \pnote{definition of $\sum_{i=m}^{n} f\,i$}\\          & \equiv {(n^2+2n+1)} + \sum_{i=0}^{n} {i}^2 =  \frac{(n^2+3n+2)(2n+3)}{6} & \pnote{arithmetic}\\          & \equiv {(n^2+2n+1)} + \sum_{i=0}^{n} {i}^2 =  \frac{(2n^3+9n^2+13n+6)}{6} & \pnote{arithmetic}\\           & \equiv {(n^2+2n+1)} + \frac{n(n+1)(2n +1)}{6} =  \frac{(2n^3+9n^2+13n+6)}{6} & \pnote{induction hypothesis}\\          & \equiv \frac{(6n^2+12n+6)}{6} + \frac{(n^2+n)(2n +1)}{6} =  \frac{(2n^3+9n^2+13n+6)}{6} & \pnote{arithmetic}\\          & \equiv \frac{(6n^2+12n+6+2n^3+n^2+2n^2+n)}{6} =  \frac{(2n^3+9n^2+13n+6)}{6} & \pnote{arithmetic}\\          & \equiv \frac{(2n^3+9n^2+13n+6)}{6} =  \frac{(2n^3+9n^2+13n+6)}{6} & \pnote{arithmetic}\\ \end{flalign*}  \end{proof}    \end{enumerate}   \end{document}   Please realize that I am a complete beginner to LaTeX.


Weird behaviour for radio buttons for ignored tag on localized sites

Switching mode for how the questions with ignored tags will be handled has weird visual behavior (blue circle size is too large) on localized sites, e.g. :        Seems this is happens due to the existence of the second line of option description.  Here is on MSE it looks valid:


How is it ensured, that parents of children attending wizarding schools in Harry Potter don't get into trouble for skipping regular school

As far as I'm informed, some amount of schooling is mandatory for children in the UK and many other civilized countries, and their parents could get into a lot of trouble, if the children did not attend the school.  How is it ensured that parents of children attending Hogwarts or other wizarding schools don't get into the same king of trouble, since their kids do not attend a regular "muggle" school?


\section*[toc]{normal section title} not working for me

for my thesis I want to have a section appear differently in the ToC than in the text.  After googling a bit, I found \section[short]{long} as a proposed answer, but this does not seem to work for me.  Here is a MnotWE:  \documentclass[12pt,a4paper,reqno]{amsbook} \usepackage{fontspec} \setmainfont[SlantedFont={Latin Modern Roman Slanted},          SmallCapsFont = {Latin Modern Roman Caps},          ]{Latin Modern Roman}    \usepackage[activate=true,nocompatibility},final,tracking=true,factor=1100,stretch=10,shrink=10]{microtype}  \usepackage[bindingoffset=1cm]{geometry} \usepackage{polyglossia} \setdefaultlanguage{english} \usepackage{csquotes}  \title{\textsc{Some Title}} \author{me}  \begin{document} \maketitle \frontmatter \tableofcontents \mainmatter  \part[toc part]{normal part} \section*[toc section]{normal section} some text  \end{document}   It just takes "toc part" as normal and as ToC heading for the \part command.  For the section I am interested in the starred version. Here the [toc section] part of the command seems to be completely ignored.  I use LuaLaTeX to build my document. Does anyone have a suggestion how to get a \section* appear with a different title in the ToC?


Are wireless mice still a no-no for gaming?

I remember when I tried a wireless mouse years back and it was horrible. It did not feel responsive enough in games. Should I consider buying a wireless mouse if it otherwise seems good?


Thanks in advance, I'm trying to create an if statement that will help me solve an issue. I want to be able to assign an ID for a button and if that ID matches the  "if statement id entered" it will run my script else it wont do nothing. i'v tried couple of things, but with no luck, I'm new to jQuery hope someone could give a hint,any other suggestion will be great ,cheers.  this is the script I want to run:  jQuery("#myId").append("");   this is what iv tried:  if($('a' == '#myId') {     jQuery("#myId").append(""); }     thanks to all


Do the predictions of a Random Forest model have a prediction interval?

If I run a randomForest model, I can then make predictions based on the model.  Is there a way to get a prediction interval of each of the predictions such that I know how "sure" the model is of its answer.  If this is possible is it simply based on the variability of the dependent variable for the whole model or will it have wider and narrower intervals depending on the particular decision tree that was followed for a particular prediction?


ON an American street, but IN a British one. Do the twain ever meet?

In the United States, we say that someone lives on a street, whereas I've noticed that British people say in. For instance:     Bubba lives on Washington Street.   Colin lives in Cavendish Avenue.   I believe we both would use at when a number is given. For instance:     Bubba lives at 16 Washington Street.   Colin lives at 7 Cavendish Avenue.   I don't think it matters if it's a road, avenue, street, circle, or lane — as far as I know, in America, we always live on a street. Does it vary in British English, or is it always in? If it varies, what are the rules?


Do STL maps initialize primitive types on insert?

I have a std::map like this:  map<wstring,int> Scores;   It stores names of players and scores. When someone gets a score I would simply do:  Scores[wstrPlayerName]++;   When there is no element in the map with the key wstrPlayerName it will create one, but does it initialize to zero or null before the increment or is it left undefined?  Should I test if the element exists every time before increment?  I just wondered because I thought primitive-type things are always undefined when created.  If I write something like:  int i; i++;   The compiler warns me that i is undefined and when I run the program it is usually not zero.


Travel to US while working for US business

I am a NZ citizen living in Mexico.  I travel regularly to the US (usually just for visiting friends or for shopping).  I have been asked to work for a new US company, either as a remote/foreign employee or as a contractor.    However, due to my regular travel to the US, and due to my proximity the potential to even do short work trips (1-2 weeks), I am concerned that I may cross over what is allowed on my B1/B2 US Visa.  According to @dlanod's answer to , the B1 Visa allows for meetings, contract negotiations, training, and conferences, but I don't know whether I would also be allowed to actually visit the offices with my laptop and work for a week (while my family probably sight-sees).  With my B1 Visa am I legally OK to do work in the US for a US based company as a foreign-based employee?  Or as a foreign-based contractor?    If relevant, the main reason to work at the offices for a week or two would be because this would enable us to conduct working meetings, so perhaps this fits under "consult with business associates"?


How do I do a "good" code dump for a comprehensive example?

I came across a  where a comprehensive example would be very useful. So I wrote an example program showing one way to solve their problem.  My problem is that when I was done creating it, and testing to make sure it worked, it was over 400 lines in 18 files. My example included source code, header files, and scripts for building the example in a variety of circumstances.   It's a working and tested, so it's of huge value to illustrate the tricky solution, but because it's all there, my response was huge! Is there a better way of posting my code dump?  Edit:  I guess there isn't a current "best way" to include a large chunk of code, so I made this a feature request and tried to add some ideas.  Perhaps code entries that are longer then a certain number of lines, or ones that have been specifically marked could initially be displayed as "collapsed", and someone could expand them if they want to see them?  Or maybe, like attaching images, users with enough reputation could attach an archive of files. They could be displayed as "attached code" (initially collapsed also).  Some problems have simple answers that unfortunately touch disproportionately large parts of the program, or can be solved in slightly different ways depending on the environment. I feel that stackoverflow needs a way of capturing these large solutions. Sometimes, they're large chunks of code. In my case, the code was small, but there were many files.  Using github or a similar code repository is great, but we risk linkrot (even for big guys like github) and loose the community editing, commenting, and voting abilities.  I understand the problems that could come from with people dumping whole "I can't get this to work" packages, but surely we already have a solution for that in moderation.  Edit again:  I'm starting to see that this may have been already addressed in posts like    , and    If you feel this a dupe, I'm open to having it "closed as already addressed"


Create a static class function that takes an infinite number of arguments

I am trying to create a function that takes an arbitary number of strings and then outputs them all on a single line. I want this function to be a static member function of my Utils class.  Utils::output("I","am","a","sentence"); // --console-output--> I am a sentence   Here's what I've attempted:  Utils.h:  class Utils{ public:     template<typename First, typename ... Strings>     static void output(First arg, const Strings&... rest); };   Utils.cpp:  void Utils::output() {     std::cout<<std::endl; }  template<typename First, typename ... Strings> void Utils::output(First arg, const Strings&... rest){     std::cout<<arg<<" ";     outputs(rest...); }   main.cpp:  int main() {     Utils::output("I","am","a","sentence");     return 0; }   My project is currently not even compiling! I am getting this error:  error LNK2019: unresolved external symbol "public: static void __cdecl Utils::output<char const *,char [3],char [2],char [9]>( referenced in function _main First.exe : fatal error LNK1120: 1 unresolved externals


I press F12 repeatedly to select boot device.    AHCI controller:     Hard disk   Other boot devices:     floppy CD LAN continue booting         I followed  box and the commands of vbox users to add it. but is plop boot manager compulsory?  I have guest-additions and virtualbox-extension pack installed and even my san disk lists in the settings menu -> USB .


trigger ServiceReporttoSA on ServiceReport (after insert) {      for (ServiceReport SR: Trigger.new) {        ServiceAppointment SA = [select Id FROM ServiceAppointment WHERE ID         =:SR.parentId];        SA.servicereportCompleted__c = true;        update SA;        } }   Test Class  @isTest public class TestServiceReporttoSA {      @isTest static  void TestSR(){         //Test data         Account a = new Account(Name = 'testAccountSA',                             BillingPostalCode = '83059',                             BillingCountry = 'Deutschland');         insert a;           Contact c = new Contact(FirstName = 'TESTOS',                            LastName = 'TEstmann',                            AccountId = a.id);         insert c;          Product2 e =new Product2 (Name = 'Top AG', VK_netto__c = 250,                         created_by__c = 'bla');         insert e;          Pricebookentry f = [Select Id From PriceBookEntry where Product2Id = :e.Id and PriceBook2Id= :Test.getStandardPricebookId()];             f = new Pricebookentry (Id = f.Id,                                      UnitPrice = 250,                                     usestandardprice = false,                                     isactive = true);         update f;          Opportunity g = new Opportunity (Name = 'testOpp',                                         AccountId = a.Id,                                         Amount = 250,                                         StageName = 'new',                                         CloseDate = date.today(),                                         Category__c = 'Sonstige',                                          created_by__c = 'bla');             insert g;             update a;          OpportunityLineItem h = new OpportunityLineItem ( OpportunityId = g.Id,                                                         Quantity = 1,                                                         TotalPrice = 250,                                                         PricebookentryId = f.Id);             insert h;           Case cas = new Case (AccountId = a.Id,                             STATUS = 'New',                             Origin = 'Homepage',                             created_by__c = 'bla');             insert cas;          WorkOrder WO = new WorkOrder (AccountId = a.Id,                                      CaseId = cas.Id);             insert WO;          ServiceAppointment SA = new ServiceAppointment (Case__c = cas.Id,                                                         ParentRecordId = WO.Id);             insert SA;      //System.AssertEquals(a.Id, g.AccountID);     //     //      //SR = TestSR.createServiceReport();      //ServiceReport SR = new ServiceReport (ServiceReport = SR.ID, parentid = SA.Id);       System.AssertEquals( );     } }   Can someone help me to add a Service Report for this test class?


Consider the formula F =∀x∃y∃z (¬(x=y)∧¬P(x,y)∧¬(x=z)∧P(x,z)) Let n ≥ 3 be a natural number. Find a universe U with n elements (i.e., |U | = n) and a predicate P : $U^{2}$ → {0,1} such that F is true. The Universe and the predicate P have to be defined in terms of n, but how would a universe and a predicate look like that satisfy the above formula?


How to concatenate strings of a string field in a PostgreSQL 'group by' query?

I am looking for a way to concatenate the strings of a field within a group by query. So for example, I have a table:  ID   COMPANY_ID   EMPLOYEE 1    1            Anna 2    1            Bill 3    2            Carol 4    2            Dave   and I wanted to group by company_id to get something like:  COMPANY_ID   EMPLOYEE 1            Anna, Bill 2            Carol, Dave   There is a built-in function in mySQL to do this


If $z_1,z_2,z_3,z_4 \in \mathbb{C}$ satisfy $z_1 + z_2 + z_3 + z_4  =  0$ and $|z_1|^2 + |z_2|^2 + |z_3|^2 + |z_4|^2 = 1$, then the least value of $|z_1 - z_2|^2 + |z_1 - z_4|^2 + |z_2 - z_3|^2 + |z_3 -  z_4|^2$ is $2$.   I solved this by taking two of the values to be $\frac{1}{2}$ and other two as $-\frac{1}{2}$. But I couldn't prove this in an efficient manner.


I enter the value textbox. How to stop when a user enters the wrong (entered value is not number) consecutive 3 times or total error is 5. I using C#.


I am implementing callback functions in this way:  typedef void (*callback)()   Its works fine and i can pass arguments to such callbacks:  void Call(int X){    printf("Input: %d", X); } void PrintSomething(callback F){    printf("Something");    F(10); }   But i can not shake the feeling that I am doing something wrong. Is my method memory safe ? Is any other good method for implementing callbackfunctions with parrameters ?


if statement throws an exception "org.openqa.selenium.NoSuchElementException"

There is a requirement to check the link "Show All" on page. If It is displayed on page click on that link to expand all the sites on page, then search and click on "Edit Site" button that is starting with eCommerce text and If the link "Show All" is not displayed on the page, just look for "Edit Site" button that is starting with eCommerce text and click on it.   I wrote below code for it but It is not working as expected. The if else clause causes org.openqa.selenium.NoSuchElementException exception. I am sure that I am making some mistake in if else statement. I am new on selenium, Please help me. Thank you.   if (GetData.ShowAll.isDisplayed()) {          System.out.println("Show All button is displayed");          Click("Please click Show All button",GetData.ShowAll);          Click("Please click Edit Site button for eCommerce Platinium",GetData.EditSite1);       }  else if  (!GetData.ShowAll.isDisplayed())      System.out.println("Show All button is not displayed");      Click("Please click Edit Site button for eCommerce Platinium",GetData.EditSite1); }


How many ways can the 10 chairs be distributed?

I have a question about the basic counting problem.  Situation : There are 50 people and 10 chairs in the room. Among them, 5 chairs are already assigned the special 5 people of the 50 people. In this situation, how many ways can the 10 chairs be distributed? (each chair is not distinguishable)  My answer : I thought that 45 x 44 x 43 x 42 x 41, since 5 chairs are already assigned. So, except for 5 people who have their chairs, among 45 people, we can distribute the left 5 chairs to them.  Is this correct?  Any comments would be helpful to me. Thanks.


How do I perform actions on a huge Illustrator document that is taking very long to process?

I'm trying to separate my complex Illustrator artwork by colors but the file is very large (303mb) which is making it difficult for the program to perform each action. Even just selecting all of the expanded elements in the document (so I can trim them) is taking over an hour (it says 'not responding' in the header but I'm still waiting). To reduce the file size a bit, I've used VectorFirstAid to get rid of unnecessary points. However, performing each action is still taking way too long and I'm wondering if there is another way I can do these actions quicker. As of now, all of the elements are expanded and merged under one layer. I am trying to select all of the elements so I can trim them and separate the whole thing by colors.


Why is the Association Bonus ignored when trying to answer a protected question?

I registered on  only to post an answer to .  However, since it's a protected question, I am not allowed to answer it. (I found this info from ).  Worth to mention, I can comment on the above question, just not post an answer.  I was under the impression that the whole point of association bonus was to bypass such limits, so why isn't that the case for answering protected questions?


Do multiple Eternal Thirst give a creature multiple copies of the same triggered ability?

If I have a creature with two copies of  on it, and a creature my opponent control dies, do I get one or two +1/+1 counters?


How to add an image with transparent background to a textured wall?

I want to upload an image with transparent background to a textured wall. How do I do this? My image is a hieroglyphic inscription, which has a transparent background edited in Adobe Photoshop. The wall is a mesh that has a Sandstone Texture added onto it. I want to add my image on top of this wall, without taking away the wall's texture. Pretty much like a graffiti. The issue I have is this: when I add my image to Blender, the background isn't transparent, as it should be. How should I proceed?


Ubuntu 14.04 on hp pavillion dm4 will not connect to the internet

The computer originally had windows 7 on it then I installed ubuntu. Once the setup was complete I tried to connect to the internet and it will not connect to my home network.


Is it possible to launch applications like Chrome from the terminal?

I want to launch applications like the web browser using the terminal. What commands do I use?


how do I move Ubuntu from the desk and save it to my harddrive?

I have a 4TB hard drive but I don't know how to put Ubuntu on my hard drive.


I am struggling to add a header with a colored headsepline to my header.  I have tried to add a command like this:  \setheadsepline{\color{1blue}}   But instead of the colored line I got the whole text blue. I know it's probably an easier fix, but I just can't find it. I want to have the same color on the header line, as I have on the Titlepage.  Sample:  \documentclass[a4paper,12pt,titlepage]{scrartcl}  \usepackage[left=2.5cm, right=2cm]{geometry}  \usepackage[ngerman]{babel} \usepackage[utf8]{inputenc} \usepackage{fontenc}  \usepackage{microtype} %Spacing \usepackage{graphicx} \usepackage[dvipsnames]{xcolor}  %\usepackage{hyperref} \usepackage{url} \urlstyle{same}  \usepackage{caption}  \usepackage{float}  \usepackage{setspace}  %Titlepage \colorlet{1blue}{RoyalBlue!65}  %NewCommand HRule for Titlepage \newcommand{\HRule}{\textcolor{1blue}{\rule{\textwidth}{0.5mm}}}  %Header \usepackage[automark, headsepline]{scrpage2} \pagestyle{scrheadings} \setheadsepline{\color{1blue}} \ihead{} \chead{} %\ohead{\includegraphics[width=2.5cm]{Bilder/krutec-logo-m.png}} \ifoot{} \cfoot{} \ofoot{\pagemark}  \begin{document}  Minimal example  \end{document}


Scanner causing null pointer exception, but a hard coded string does not?

I'm working on an assignment that is teaching us to follow the factory patter. To do this I coded up some very basic classes and sub classes with only a few integer fields. After doing so I tried to see if I could successfully instantiate those sub-classes and get their fields. It worked fine when I passed a string that had been hard coded into the program, but when I tried to pass in user input via Scanner I got back a null pointer Exception. I cant figure out why, what would cause this? Here is my main method:  public static void main(String args[]) {     VehicleFactory vf = new VehicleFactory();     VehicleClass vc = null;     Scanner sc = new Scanner(System.in);     String type = null;       //this works     type = "car";     vc = vf.createVehicle(type);     System.out.println(vc.getEngineAmt());      //this throws and exception      //I even did a string cmp between sc.nextLine() and "car" for my sanity     //And the reurn was 0     vc = vf.createVehicle(sc.nextLine());     System.out.println(vc.getEngineAmt());      sc.close();  }     public class VehicleClass {  private int WheelAmt = 0; private int EngineAmt = 0;   public int getWheelAmt() {     return WheelAmt; } public void setWheelAmt(int wheelAmt) {     WheelAmt = wheelAmt; } public int getEngineAmt() {     return EngineAmt; } public void setEngineAmt(int engineAmt) {     EngineAmt = engineAmt; }     public class VehicleFactory {      public VehicleClass createVehicle(String type){          VehicleClass createdVehicle = null;          System.out.println(type);          if(type == "car")         {             createdVehicle = new Car();         }else if(type == "boat")         {             createdVehicle  = new Boat();         }else if(type == "plane"){             createdVehicle = new Plane();         }           return createdVehicle;     }  }


Restore open applications, documents, and window state

When working on a project, I generally have a couple of Explorer windows open to relevant folders and a couple of applications (e.g. Eclipse and a form development tool) open to specific project-related documents.  There's a lot of value in that context, and I'd like to find a way to save a set of open apps under a project name, then restore that state at a later date.    Thus far all of the utilities I've found are virtual desktop products that don't save/restore state.  I'm specifically looking for something that will run the applications I had running, open the documents I had open, and position the windows as they were.  I'm amazed that such a seemingly simple concept as "Save my workspace state" doesn't seem to be available.  I'm on Windows 7.  Any suggestions?


Missing possessive ('s) in a phrase where I expected its use

I came upon this phrase in a Hilary Mantel's novel (Wolf Hall): "John Williamson is needed in the Cromwell business"  Why is the possessive form not being used for "Cromwell business".


markdown can't handle tags with asterisks

On the main site, you can (for example) ignore tags using this notation [tag:foo*], which will ignore stuff tagged as  but also .  The nice markdown highlighter for tags seems to have a problem with asterisks, though -- as you can see in this post.  I would have expected them to be highlighted the same way as they are on the front page.


Why is the mol a fundamental physical quantity?

I am starting to study physics in detail and as I read about physical quantities, I was puzzled why mol (amount of substance) is taken as a physical quantity.  A physical quantity is any quantity which we can measure and has a unit associated with it. But a mol represents the amount of substance by telling the number of particles (atoms, molecules, ions, etc.) present. So it is a pure number and numbers are dimensionless. So mol should not be considered a physical quantity.  Also, fundamental physical quantities should be independent of each other. I am wondering whether mass and mol are independent. This is so as they surely affect each other as we can evidently see while calculating the number of moles and using the mass of that sample for calculation.  So how is the mol a fundamental physical quantity and independent of mass?


The following image illustrates what am looking for:    Essentially I want the numbering to occur as shown above but using the multicol and enumitem package. But when I try it by using the following code:  \documentclass{article} \usepackage{amsmath,amssymb} \usepackage{enumitem,multicol} \begin{document} \begin{enumerate} \item Evaluate each of the following if $x$ is a non-zero real number.     \begin{multicols}{2}     \begin{enumerate}[itemsep=1cm]% The item sep is my choice here.     \item $\dfrac{|x|}{x}$     \item $\dfrac{x}{|x|}$     \item $\dfrac{|-x|}{-x}$     \item $|x|-|-x|$     \end{enumerate}      \end{multicols} \end{enumerate} \end{document}   I get:    Essentially, I want the (b) to be where the (c) is. I know this has been done but I can't seem to find it.


Article use in "She is a/the of two children."

I am confused by seeing the definite article in sentences like "She is the mother of x" where x has not been mentioned yet. For example, "She lives in Pittsburgh and is the mother of two daughters and two stepdaughters." and many other examples found by .  Is the indefinite article acceptable here at all?  How is it different from "She is a teacher?" where we generally use the indefinite article? Is it a more general use case and how can I recognize it and avoid mistakes?


In our setup we have a network of 6 to 8 computer with no one of them having password and it logs straight on with operator user id. I want control these systems remotely but due to no password it does not allow me to do so.  I can get into one computer by team viewer but try to do RDP but it is not working.  Any alternate solution as we cannot assign password to our system.   Thanks in advance.


Our users are split into 2 types, people buying our Sport products online and people enquiring about our Industrial products to buy offline. Roughly split 95% Sport and 5% Industry.  Up until now, we use a splash screen style homepage (which also has content for SEO) and then re-direct later once we know which type of user they are. This first page is often a barrier in getting users through to the e-commerce part of the site, they get stuck on the homepage, but there’s also frustration because they can’t get back to the homepage because of the re-direct. People often use the homepage as a quicker way to navigate to the shop.  During the re-design, based on our data, the initial approach was to take people straight to Sport that has traditional navigation with an option to switch to Industry.  This approach was rejected by the company, in favor to give Industry more prominence, and so the 50/50 splash screen is a requirement. I've tested the splash screen on people during the design process and the results were conclusive in favor of a solution without the splash screen.  A compromise, (whilst we're in the build and should be easier to implement than building the splash) was to use a modal overlay when a user lands on the website for the first time. Whilst I struggle with modal overlays, I wondered whether this is a better solution. SEO isn’t lost because the page is rich in content and the path to the shop is clearer.  Just wondering if anyone has come across something like this before? Any input would really help.


Ubuntu 14.04.3 screen shuts down after boot. Problem with NVIDIA. How to set NOMODESET from GRUB

I have ubuntu 14.04.3 installed on my new machine equipped with an nvidia geforce 970.  Not to mention the pains I had in installing nvidia.352, last night I made a simple update and shut down. However, this morning I had the black screen login page instead of the graphical. There was a problem with nvidia I figured. So I tried to downgrade to an older version. It didn't help. Last thing I did was to purge nvidia. After reboot, however, this time I don't even get the black login page. Instead, the screen shuts down and there is nothing I can do.  I tried with recovery mode through GRUB. However, no matter which one of the options I choose, I always get the same problem. The screen shuts down and I have to reboot manually. So no terminal, no login, just the system boot settings.  After a fair amount of search, I found out that there is an issue with a concept called nomodeset which has to be set through grub. As  suggests, I searched for the line starting with linux and ending with quiet splash to add nomodeset there. However, what I have is this:  linux   /boot/vmlinuz-3.19.0-33-generic root=UUID=f40f49f8-a44b-4709-b79b-0873ca3c3b72 ro /   So there is no quiet splash to add nomodeset to. However, if I anyway try to add either nomodeset or nomodeset quiet splash in the end of the line and then reboot, it halts and I need to reboot manually.  So my question is: Is there anyway that I can have at least an access to a terminal by modifying GRUB?   At this moment I need to have a terminal to try to recover my files if possible and then maybe install nvidi again.


How can you thumbnail an uploaded image on Stack Overflow?


Lagrange with Higher Derivatives (Ostrogradsky instability)

In class our teacher told us that, if a Lagrangian contain $\ddot{q_i}$ (i.e., $L(q_i, \dot{q_i}, \ddot{q_i}, t)$) the energy will be unbounded from below and it can take any lower values (in other words be unstable). In this type of systems can we show that the energy is conserved ? Or in such system does energy conservation is applicable ?


Can't upgrade due to low disk space on /boot

I try to do do-release-upgrade but then I get:       Not enough free disk space      The upgrade has aborted. The upgrade needs a total of 25.7 M free   space on disk '/boot'. Please free at least an additional 25.7 M of   disk space on '/boot'. Empty your trash and remove temporary packages   of former installations using 'sudo apt-get clean'.   Output of df:                      237251272 214797108  10402504  96% / udev                    488120         4    488116   1% /dev tmpfs                   198676       668    198008   1% /run none                      5120         0      5120   0% /run/lock none                    496684         0    496684   0% /run/shm /dev/sda1               233191    225867         0 100% /boot   How come there is no space left on boot? Here's the output of ls -as /boot:  total 221839     4 .     4 ..   645 abi-2.6.32-34-generic-pae   698 abi-2.6.35-30-generic-pae   727 abi-2.6.38-12-generic-pae   727 abi-3.0.0-12-generic-pae   727 abi-3.0.0-13-generic-pae   727 abi-3.0.0-14-generic-pae   727 abi-3.0.0-15-generic-pae   727 abi-3.0.0-16-generic-pae   727 abi-3.0.0-17-generic-pae   727 abi-3.0.0-19-generic-pae   761 abi-3.0.0-20-generic-pae   115 config-2.6.32-34-generic-pae   128 config-2.6.35-30-generic-pae   136 config-2.6.38-12-generic-pae   140 config-3.0.0-12-generic-pae   140 config-3.0.0-13-generic-pae   140 config-3.0.0-14-generic-pae   140 config-3.0.0-15-generic-pae   140 config-3.0.0-16-generic-pae   140 config-3.0.0-17-generic-pae   140 config-3.0.0-19-generic-pae   140 config-3.0.0-20-generic-pae     5 grub 10773 initrd.img-2.6.32-34-generic-pae 13619 initrd.img-2.6.35-30-generic-pae 15365 initrd.img-2.6.38-12-generic-pae 16481 initrd.img-3.0.0-12-generic-pae 16487 initrd.img-3.0.0-13-generic-pae 16501 initrd.img-3.0.0-14-generic-pae 16476 initrd.img-3.0.0-15-generic-pae 16481 initrd.img-3.0.0-16-generic-pae 16478 initrd.img-3.0.0-17-generic-pae    12 lost+found   174 memtest86+.bin   176 memtest86+_multiboot.bin  1700 System.map-2.6.32-34-generic-pae  1841 System.map-2.6.35-30-generic-pae  2115 System.map-2.6.38-12-generic-pae  2141 System.map-3.0.0-12-generic-pae  2141 System.map-3.0.0-13-generic-pae  2143 System.map-3.0.0-14-generic-pae  2146 System.map-3.0.0-15-generic-pae  2147 System.map-3.0.0-16-generic-pae  2147 System.map-3.0.0-17-generic-pae  2148 System.map-3.0.0-19-generic-pae  2149 System.map-3.0.0-20-generic-pae     2 vmcoreinfo-2.6.32-34-generic-pae     2 vmcoreinfo-2.6.35-30-generic-pae     2 vmcoreinfo-2.6.38-12-generic-pae     2 vmcoreinfo-3.0.0-12-generic-pae     2 vmcoreinfo-3.0.0-13-generic-pae     2 vmcoreinfo-3.0.0-14-generic-pae     2 vmcoreinfo-3.0.0-15-generic-pae     2 vmcoreinfo-3.0.0-16-generic-pae     2 vmcoreinfo-3.0.0-17-generic-pae     2 vmcoreinfo-3.0.0-19-generic-pae     2 vmcoreinfo-3.0.0-20-generic-pae  4092 vmlinuz-2.6.32-34-generic-pae  4347 vmlinuz-2.6.35-30-generic-pae  4567 vmlinuz-2.6.38-12-generic-pae  4675 vmlinuz-3.0.0-12-generic-pae  4676 vmlinuz-3.0.0-13-generic-pae  4681 vmlinuz-3.0.0-14-generic-pae  4698 vmlinuz-3.0.0-15-generic-pae  4700 vmlinuz-3.0.0-16-generic-pae  4700 vmlinuz-3.0.0-17-generic-pae  4703 vmlinuz-3.0.0-19-generic-pae  4705 vmlinuz-3.0.0-20-generic-pae   Output of uname -a:   Linux kitsch 3.0.0-17-generic-pae #30-Ubuntu SMP Thu Mar 8 17:53:35 UTC 2012 i686 i686 i386 GNU/Linux


Why is the word 'hash' associated with the '#' character?

The '#' symbol has many names, but hash is the one that confuses me. I know the etymology of the word 'hash', but how did it become associated with that character?


Blue icon with question mark - what does it mean?

The SQL Server instance is accessible and seems to be fine.     Microsoft SQL Server 2016 (SP1-CU2) (KB4013106) - 13.0.4422.0 (X64)   Mar  6 2017 14:18:16   Copyright (c) Microsoft Corporation  Enterprise   Edition (64-bit) on Windows Server 2012 R2 Standard 6.3  (Build   9600: ) (Hypervisor)   But what does the white question mark mean?  these icons dont go away when I refresh. I am sysadmin inside sql server and outside I am administrator on that box.      Another thing I noticed, you can see on the picture below. These are 2 different Management Studio sessions.  On the top one, I am logged in as myself, DBA and sysadmin,  on the second one I use Management Studio with run as a different user and I use a domain account that I use for the replication, which is not sysadmin.  The second one has the blue icon in this and other servers as well, whilst mine is the normal green one.


Has Imgur stopped giving direct file links to images uploaded?  I can't see a direct file link to this image:     (I know that the Stack Exchange website still integrates with Imgur, and gets a direct link, but I'm not asking about that.)


Proof that $\omega^\omega$ is completely metrizable and second countable

I have almost solved the following problem but am stuck at the very end, can you help me finish it? Thank you for your help.       Let $n<\omega$ and $t\in {}^n\omega$. We define $U_t=\{s\in {}^\omega\omega : t\subseteq s\}$. The family   $\mathcal B=\{U_t : t\in\bigcup {}^n\omega\}$ is a basis for a topology $\tau$ on ${}^\omega\omega$. This means that a set $X$   is in $\tau$ if and only if $X$ is a union of elements of $\mathcal B$.      EXERCISE 50 (PG): Show that $\langle {}^\omega\omega,\tau \rangle$ is a second countable completely metrizable space. Hint:    For $r,s\in {}^\omega\omega$ such that $r\ne s$, the $\varrho(r,s)=1/\min\{n : r(n)\ne s(n)\}$. Moreover, let $\varrho(r,r)=0$.    Show that $\varrho$ is a complete metric on ${}^\omega\omega$ that induces the topology $\tau$.     (i) Second countable: the set of $n$-tuples is countable since it is a finite union of countable sets.  (ii) complete with respect to $$ d(f,g) = \frac{1}{\min \{n \mid f(n) \neq g(n) \}}$$ Let $f_k$ be a Cauchy sequence. This means that the index at which $f_k, f_i$ differ gets larger as $i,k$ get larger. Let $f(n)$ denote the pointwise limit, that is, $\lim_{k \to \infty} f_k(n)$. Then $f(n) \in \omega$ for every $n$ since $f_k(n)$ is eventually constant. Hence $f \in \omega^\omega$.  (iii) $d$ induces the same topolgy as $U_t$:  $\tau_t \subset \tau_d$: Let $s \in U_t$. Then $B(s, \frac{1}{n+1})$ is an open ball contained in $U_t$ hence $U_t$ is open in $\tau_d$.  $\tau_t \supset \tau_d$: Let $B(s, \frac{1}{k})$ be an open balls. If $k < n$, $s \in U_s \subset B(s, \frac{1}{k})$. But if $k \ge n$ then I'm stuck. The ball $B(s, \frac{1}{k})$ consists of all sequences that agree with $s$ on the first $k$ coordinates. So it is quite small. How do I make the $U_t$ small enough to fit in this ball? I have thought of intersection but since I'm only allowed to do finite intersections I don't see what to do.


javascript onsubmit without submit button, by enter via keyboard

I have this piece of html code:  <form id="cambia_stato" method="get" action=""> <input type="text" name="stato" id="frase_stato" value="" onclick="this.value='';" onblur="setMessaggio()" maxlength="255" /> </form>   and I want to check the value of the "stato" field on submit. I tried two ways:  using onsubmit is not triggered by pressing the Enter key:  <!-- nothing happens with the following --> <form id="cambia_stato" method="get" action="" onsubmit="myFunc()">    So I tried checking the input each time a key is pressed, changing the input attributes adding a onkeypressed event:   <!-- nothing happens with the following --> <input type="text" name="stato" id="frase_stato" value="" onclick="this.value='';" onblur="setMessaggio()" maxlength="255" onkeypressed="myFunc()" />   For now, the function myFunc() is defined as follow:  function myFunc () {     alert('test'); }   Am I going wrong somewhere or do I need a submit button?


error: file '/boot/grub/i386-pc/normal.mod' not found

I have xubuntu in a computer at the moment, but I want to put Windows 7 on it. So when I try to boot either Windows 7 or Windows XP, I get this error.  What is going on? Why do I get Ubuntu error when trying to put up Windows?


This question:       Is a great question and has 71 up-votes to boot, but has unfortunately been marked with the wrong answer.  The correct answer quite rightly has 60 up-votes, to the marked answer's 11.  Why can't the community over-rule the person who asked the question in cases like this?


General topology exercise (equivalent condition for simple connectivity)

Let $X$ be a pathwise-connected topological space. Prove that $X$ is simply connected iff every continuous $f:S^1\to X$ can be extended to a continuous function $g:D^2\to X$.  How can I use the fact that there is an identification mapping between $[0,1]\times [0,1]$ and $D^2$ which collapses three of the four sides to a point?  Thank you


I have 24 accounts, how can I delete them all in one go?

Is there a way to delete all stack exchange accounts at the same time?  I also want to remove all traces of my posts on the site. Is that possible?   Will I have to delete all of my posts manually?  Can I use the stack exchange API for this?


what is the signature of this matrix:  $\begin{pmatrix} -3&0&-1 \\0&-3&0 \\ -1&0&-1 \end{pmatrix}$ ?  I tried calculating them without eigenvalues; this should be done via using Gauß, right?  However, I don't see a way to get the signature by using simultaneously raw and line-transformations.. ?


What is the use of this USB (mini-B) cable that has a forked connection?

What is the use of this USB (mini-B) cable that forks to a "black" and "red" connection:    The cable was included with some product. I'm pretty sure it was a camera (which I no longer have and never used). So, my guess was always that you could get faster transfer rate if both the red and black ends are plugged into the laptop. But that sounds crazy. Is that technically possible? If not, why have a forked connection?


TikZ graphdrawing library in ConTeXt throws error

Consider the following example:  \usemodule[tikz] \usetikzlibrary[graphs,graphdrawing] \starttext     \starttikzpicture         \graph { A -> B };     \stoptikzpicture \stoptext   While it works in LaTeX (with the patch from  applied), it does throw an error  when loading the TikZ library in ConTeXt:  lua error       > lua error on line 1127 in file /usr/local/texlive/2018/texmf-dist/tex/generic/pgf/graphdrawing/tex/pgflibrarygraphdrawing.code.tex:  ...live/2018/texmf-dist/tex/context/base/mkiv/l-sandbox.lua:180: module 'pgf.gd.control' not found:         no field package.preload['pgf.gd.control']         no file '/usr/local/share/lua/5.2/pgf/gd/control.lua'         no file '/usr/local/share/lua/5.2/pgf/gd/control/init.lua'         no file '/usr/local/lib/lua/5.2/pgf/gd/control.lua'         no file '/usr/local/lib/lua/5.2/pgf/gd/control/init.lua'         no file './pgf/gd/control.lua'         no file '/usr/local/lib/lua/5.2/pgf/gd/control.so'         no file '/usr/local/lib/lua/5.2/loadall.so'         no file './pgf/gd/control.so'         no file '/usr/local/lib/lua/5.2/pgf.so'         no file '/usr/local/lib/lua/5.2/loadall.so'         no file './pgf.so' stack traceback:         [C]: in function 'requiem'         ...live/2018/texmf-dist/tex/context/base/mkiv/l-sandbox.lua:180: in function <...live/2018/texmf-dist/tex/context/base/mkiv/l-sandbox.lua:165>         (...tail calls...)         ...neric/pgf/graphdrawing/lua/pgf/gd/control/Sublayouts.lua:41: in main chunk         [C]: in function 'requiem'         ...live/2018/texmf-dist/tex/context/base/mkiv/l-sandbox.lua:180: in function <...live/2018/texmf-dist/tex/context/base/mkiv/l-sandbox.lua:165>         (...tail calls...)         ...graphdrawing/lua/pgf/gd/interface/InterfaceToDisplay.lua:45: in main chunk         [C]: in function 'requiem'         ...live/2018/texmf-dist/tex/context/base/mkiv/l-sandbox.lua:180: in function <...live/2018/texmf-dist/tex/context/base/mkiv/l-sandbox.lua:165>         (...tail calls...)         [ctxlua]:1: in main chunk  1117     } 1118     } 1119      1120      1121     % 1122     % Ok, fire up the system by creating the binding! 1123     % 1124     \directlua{ 1125       require 'pgf.gd.interface.InterfaceToDisplay'  1126       pgf.gd.interface.InterfaceToDisplay.bind(require 'pgf.gd.bindings.BindingToPGF') 1127 >>  }  1128      1129      1130      1131     % 1132     % Special setup for keys that are declared by the above libraries, but 1133     % that have a special meaning on the display layer. 1134     % 1135      1136     \pgfkeys{/graph drawing/nodes behind edges/.append code=\csname pgf@gd@nodes@behind@edges#1\endcsname} 1137     \pgfkeys{/graph drawing/nodes behind edges/.default=true}   Question: How to solve that (applying the same patch as in LaTeX does not help)?


Intuitive explanation for dividing by $n-1$ when calculating standard deviation?

I was asked today in class why you divide the sum of square error by $n-1$ instead of with $n$, when calculating the standard deviation.  I said I am not going to answer it in class (since I didn't wanna go into unbiased estimators), but later I wondered - is there an intuitive explanation for this?!


I have a very simple page with an Iframe of a different web page inside it. The main page looks like this:  <button type="button" id="btnStart">   Start Simulation </button>

   And assuming that this is the main content of the webpage inside the iframe:  <form>   <select name="level">     <option val=1>One</option>     <option val=2>Two</option>     <option val=3>Three</option>     <option val=4>Four</option>   </select>   <button type="submit">Go</submit> </form>   Is it possible with jquery on the main page to select 'One' then click Go and after 3 sec, select Two then Go and then 3 sec, select Three then Go. Each page when Go is click has the same form elements so clicking through each select option should be doable? If so, how can I do it? I hope you understand my question if you need more details please comment.


How to turn off stack protector in linux kernel easily?

I wrote a simple module for the Linux Kernel and it has a stack buffer overflow vulnerability. I want to exploit the module, but I have to turn off the stack protector in the kernel first. How could I do this quickly and simply?   Is it required to compile the kernel every time?   Is there any other way to turn off stack protection in a module of the Linux Kernel (without compiling the kernel)?


Prove that $\lim_{u\to \infty}{\frac{u^m}{e^u}}=0$

I'm trying to prove that $\lim_{u\to \infty}{\frac{u^m}{e^u}}=0$ for any integer $m$. I tried using the Ratio Test For Limits to prove that the limit converges to $0$ for all real values of $m$, and therefore it must converge to $0$ for all integer values of $m$ since $\mathbb{Z} \subset \mathbb{R}$. However, using the Ratio Test only seems to complicate things. Is there a better way to show this?  Additionally, I need to prove that $\lim_{x\to 0^+}{x\log x}=0$ by setting $u=-\log x$ and using the above limit. So far, I have done the following:  $$\lim_{-\log x\to \infty}{\frac{(-\log x)^m}{e^{-\log x}}}=\lim_{x\to 0^+}x{(-\log x)^m}$$  but I don't know where to go from here. Also, I cannot use  L'Hopital's rule, since I haven't covered it in lectures. Thanks in advance.


Can any species produce a Force-Sensitive?

Given that , I wonder if every intelligent biological species is capable of producing beings that are Force-Sensitive?   Or are there some species characteristics that can make it 100% impossible for them ever to produce a Force-sensitive individual.  NOTE: Let's exclude - if they exist in EU - things like random new-species-creating mutations - e.g. the individual should be 100% the same species, able to interbreed.


When we ask the day of the week, can we use "What's the day today?" instead of "What day is it today?" Is it a common phrase?


How can I create a /dev/null-like "blackhole" directory?

I would like to create a "/dev/null" directory (or a "blackhole" directory) such that any files written to it are not really written, but just disappear.   I have an application that writes out large temporary files to a directory. I have no control over the name of the files and I don't really care about the content of these files. I could write a script that periodically clobbers these files, but the files are written out very quickly and fill my disk. I'm looking for something cleverer. I want the application to "think" that it is writing out these files, when in fact, the writes are just being discarded at the other end.  Also see  old related thread.


If steady current flows in a metallic conductor of non uniform cross section area then why is current constant?

If area is not uniform then how can current be constant? What happens to current density, electric field, drift speed? Are they constant?


First, the question I have is very similar to  question, but I hope it doesn't get closed as duplicate since I'm stuck nevertheless.  I'm trying to algebraically prove that an open interval is an open set. If I sketch it, as suggested by @rschwieb in the other question, then it seems quite obvious that this is indeed true. But I would like to be able to show it algebraically and after having looked at various sources found on the internet, I have decided to ask it here.  For definiteness, let us consider: \begin{equation} (c,d) = \{ x \in \mathbb{R} \mid c < x < d \} \end{equation} Furthermore, let $a \in (c,d)$, and recall that the $\epsilon$-neighborhood of $a$ is the set: \begin{equation} V_\epsilon (a) = \{ x \in \mathbb{R} \mid |x-a| < \epsilon \}  \end{equation} Now, if we take \begin{equation} \epsilon = \mathrm{min} \{ a-c,d-a \} \end{equation} then $a-\epsilon \geq c$ and $a+\epsilon \leq d$. Up until here I understand everything. But then I don't understand how we can conclude that $V_\epsilon (a) \subseteq (c,d)$? I'm sorry if this conclusion is really obvious (which it probably is), but for some reason I can't wrap my brain around it. Any help is much appreciated.


Connecting Extra USB HID Device to VMware Workstation VM Automatically on Startup

How can I connect an extra HID device (for example, an extra mouse and keyboard unifier) at VM startup for Windows 10 guest? I'm using VMware Workstation 15.0.3 on Windows 10 host machine.  I can connect non-HID USB devices like USB pen automatically to VM and VM remembers it at every start and don't connect it to host machine.  However, I cannot find an easy solution for a HID device. PC have its own mouse and keyboard. Extra HID devices will be used for guest only.  How can I do it ? Thanks.


Storing online high scores in open-source games

I'm wondering how this is typically done at a high level. Please correct me if I'm wrong, but from what I understand, normally you could have some sort of validation. But if you have access to the source code, anyone could see how to send data to the server (or make your own server for that reason). Is there a viable solution for this?


How to create a "running" (= non-list) bibliography?

I want to create a "running" bibliography. That means that each entry do not start at a new line after a carriage return, but is simply separated from the previous one with a symbol I want to chose (e.g. | or ♦) and runs on the same line (see example below). I am using BibLaTeX (and thus biber) with style=authoryear.    Question: Is there already a bibstyle that could create this output?  N.B.: I know this is far from optimal in terms of readability/usefulness and shall break several rules of how to build a good bibliography. But, you know, I might have a rebel instinct sometimes (-;    If needed here is a MWEB  \documentclass{scrartcl}     \PassOptionsToPackage{backend=biber, citestyle=authoryear, natbib=true}{biblatex}     \usepackage{biblatex}     \usepackage{filecontents}      \begin{filecontents}{jobname.bib}         @BOOK{Dummy1,             author    = "John Doe",             title     = "The Book without Title",             publisher = "Dummy Publisher",             year      = "2016"         },         @ARTICLE {Dummy2,             author  = "Erika Musterman",             title   = "How to be everywhere?",             journal = "Even in newspaper",             year    = "1984"         }     \end{filecontents}      \addbibresource{jobname.bib}  \begin{document}     Some text \citet{Dummy1}. And even more content \citep{Dummy2}.      \printbibliography \end{document}


In the following question I am trying to find the Taylor series for,  $$f(x)=x^3\sin(x^2)$$  centered at $x=0$.  My first thought was to find the Taylor series for $\sin x$ then derive it to get my series I wanted but I am not quite sure how to do that.   I worked out the Taylor series for $f(x)=\sin(x)$ centered at $x=0$ and got,  $f(x)=\sin x, f(0)=0$ $f'(x)=\cos x, f'(0)=1$ $f"(x)=-\sin x, f''(0)=0$ $f'''(x)=-\cos x, f'''(0)=-1$ $f''''(x)=\sin x, f''''(0)=0$  So the Taylor series for $\sin x$ centered at $x=0$ is,  $\sum_{n=0}^{\infty}(-1)^n\frac{x^{2n+1}}{(2n+1)!}=x-\frac{x^3}{3!}+\frac{x^5}{5!}-\frac{x^7}{7!}...$  But how do I use this to find the Taylor series for $f(x)=x^3\sin(x^2)$


Should I upgrade to the latest Linux Kernel?

I am not asking how to do it, but if it is recommended and what is the concern about it.   I have recently seen that the 4.16 Kernel release was at its end of life and that users were urged to upgrade to 4.17. So I checked my version, and I am currently using the Linux 4.15.0-23-generic Kernel on my up-to-date Ubuntu 18.04...  Is this normal? Why is that this way? Is Ubuntu using an out of date kernel? Should I upgrade manually?  I clarify that there are similar questions, but those I found on this forum did not answer my question at all, so I ask again. I do not consider this a duplicate.  Thank you in advance.


Variance is the squared difference - why not to the 3, or 4 instead?

So there is  about  why variance  is squared.   And the answer seems to be "because we get to do groovy maths when it is squared". Ok, that's cool, I can dig.  However, I'm sitting reading some financial maths stuff, and a lot of the equations on pricing and risk are based on variance. It doesn't seem to be the best basis for, you know, pricing exotic vehicles that are worth in the millions (or billions) that a formula for variance is used "because the maths is better".    To make a point  then, why not have the variance be from the cubed, abs cubed, or the 4th power (or even a negative power)?   eg (apologies, I don't know Latex)  Sum 1/N * |(x - mean)^3|   OR  Sum 1/N * (x - mean)^4   Would using variance-to-a-different power measurably alter pricings/valuations if the equations still used variance as usual (but the variance was calculated with the different power)?  Is there a reason why we stopped  at "power of 2", and are there any implications of using a variance concocted from a different (higher or lower) power?


Finite-dimensional subspace normed vector space is closed

I know that probably this question has already been answered, but I'd like to present my attempt of solution.  Let $(E,\|\cdot\|)$ be a normed vector space and let $F\subseteq E$ be a finite-dimensional subspace. Suppose that $\dim_{\mathbb{R}} F=n$.  First of all I proved the following lemma.  Lemma 1 Every finite-dimensional normed vector space is complete.  Then, I noticed that $(F,\|\cdot\|_{F})$ is a finite-dimensional normed vector space, where $\|\cdot\|_{F}$ is the induced norm. So, $F$ is complete by Lemma 1.   Lemma 2 If  $(E,\|\cdot\|)$ is a normed vector space such that $\dim_{\mathbb{R}}{E}=n$, then $E$ is algebraically and topologically isomorphic to $\mathbb{R}^{n}$.  By Lemma 2, I can view $F$ as a complete subspace of $\mathbb{R}^n$ and, since $\mathbb{R}^n$ is itself complete, I can conclude that $F$ is closed. Here I used the fact that every complete subspace of a complete space is closed.  Is there something wrong?


Looking for an encyclopedia of alien ships from 70s or early 80s

We had a large-format hardcover book growing up (in the US in English) that contained illustrations and fictional snippets about alien spacecraft.  It would have been published in the late 70s or early 80s.  The text with each picture contained information regarding the ship like engine manufacturer and other various specs.  I remember the pictures being very well drawn.  Does this sound familiar to anyone?


I am using different STLs to make a special creature.  For example: I have a panther STL, but only want to use the head for my project, and then just the wings from another STL, etc.  Is there an easy way to separate the parts I need?  I have looked through some other Q&A and found some things that are close, but I have yet to find the best solution.  Thanks


Elegant Proof that $m | xn \implies \frac{m}{(m,n)} | x$

I have a proof that shows $m | xn \implies \frac{m}{(m,n)} | x$ which leans heavily on prime factorizations. Is there a more straightforward proof? Edit With this question, I was looking for a proof that didn't involve Euclid's lemma (which is almost immediately equivalent to what is to be proved) or prime factorization. I think this question is worth keeping up if only for the answer below which establishes the result using Bezout's identity. None of the answers in the other post approach it this way.


How do you approach resolution independence in raster based graphics content?

Those games that are not fortunate enough to run on a locked platform spec, like handhelds, need to run across various resolution formats and aspect ratios.   In a 3D game you might have a HUD or menu GUI based on raster graphics, and in a 2D game you might have a bunch of quads which are vessels for sprites.   So my question is, how do you approach designing and operating content across various resolutions and aspect ratio? Let's assume you have a sprite character that is 300x400 pixels sprite and surrounded by a level made of tiles. On different resolutions/aspect ratios you'd see a different FOV altogether. Or if you have a HUD or a GUI menu, you'd want to keep some stuff at same positions and of same size relative to the screen. Yet, graphics source is raster bitmaps, not vector.   Obviously, problem has been addressed numerous times. I'm interested to hear abut various approaches that worked for you so far. Do you keep an arbitrary dimension agnostic 'pixel' unit that you magically transform into needed dimensions via formula based on res and aspect ratio or other approaches?  edit:  So, conclusion is to enumerate your aspect ratios. Lowest combination of aspect:resolution is the one you design important stuff into. A safe area if you will. Same aspect ratios, but higher resolutions are simple scaling issues. Art content is designed for highest resolution. Larger aspect ratios simply show more of level/FOV with information presented which is not critical as is the one in safe area. .


I'm hoping someone recognizes this short story I read as a boy. The story was about a robotic eyeball that rolled around on a beach until it found a hand. The two parts joined up and wiggled around until they found a leg. They joined the leg and hopped around. That is all I can remember. I would like to know the ending. Does anyone remember this short story or know where it came from?


Searching for single record in JSON data (Android app)

So, in my app, I am retrieving JSON data and parsing it. RIght now, it is displaying every record on a textView like this  Name: Eric Email: Eric.com  Name: Greg Email: Greg@Greg.com  .................. etc  Code:    //parse json data  try {    String s = "";    JSONArray jArray = new JSONArray(result);     for(int i=0; i<jArray.length();i++){        JSONObject json = jArray.getJSONObject(i);         s = s +                 "Name : "+json.getString("Name")+"\n"+                "Email : "+json.getString("Email")+"\n\n";    }     resultView.setText(s);   I want to be able to search and display only a single record, e.g. Eric's record. How could I do this? I tried this adding if (json.getString("Name") == "Eric") { } like this:  //parse json data  try {    String s = "";    JSONArray jArray = new JSONArray(result);     for(int i=0; i<jArray.length();i++){        JSONObject json = jArray.getJSONObject(i);            if (json.getString("Name") == "Eric) { //added if statement        s = s +                 "Name : "+json.getString("Name")+"\n"+                "Email : "+json.getString("Email")+"\n\n";                }    }     resultView.setText(s);   but it doesn't display anything, then. Any ideas on how I can search for a single person's record in JSON? Thanks!


Do the rules for combining magical effects apply to non-spell effects?

In the chapter on Spellcasting, there is a section called . However, despite the seeming generality of the title, the text of this section only talks about magical effects from spells:     The effects of different spells add together while the durations of those spells overlap. The effects of the same spell cast multiple times don't combine, however. Instead, the most potent effect--such as the highest bonus--from those castings applies while their durations overlap, or the most recent effect applies if the castings are equally potent and their durations overlap.   It makes sense that this section would only talk about spells, since it is in the chapter about spellcasting. However, this seems to leave ambiguous the question of how magical effects from sources other than spells combine. Such an issue could arise, for example, if two different items (or two of the same item) grant a bonus to attack rolls, or a bonus to the same saving throw.  Is there a published rule or official ruling that governs how non-spell magical effects combine?  (This question was inspired by  about the interaction between +X magical ammunition and Oil of Sharpness, and could be considered a generalization of that question.)


What is the best strategy to mine diamonds in Minecraft?

Diamonds are the best material in the Minecraft. There are many ways to mine diamonds, but which one is the best and most efficient one? If someone can tell me the time it takes, the tools used, the sequence etc, it would help me a lot.


I'm trying to set up a UI system. Say I have a text object 'text' which is visible onscreen. I want to change it with a button press using a script such that the text box's previous string is replaced with a new string held in a string variable 'chat'.  using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI;  public class textchange : MonoBehaviour {  public Text text; //the text box gameobject is dragged into this  public string chat; //the chat string is filled elsewhere  void Awake() {  }  void Update() { (if button press logic here) { text.text = chat; } }  }   What I expect is for the text to dynamically change, but what happens is absolutely nothing, the gameobject does not have its text component rewritten. What gives?


After upgrading to Ubuntu 18.04.1 LTS all my .desktop launchers went "Untrusted", and I have to "re-trust" them manually.  While many other posts (e.g. ) say to use the command in terminal:  gio set YOURFILE.desktop "metadata::trusted" yes   I wanted to do this for all my .desktop files in my directory.


What is the function of if __name__ == '__main__'?

If I execute the codes below without  if name == 'main', nothing is printed on the screen. That is, if name == 'main' seems to be essential. What is the function of if name == 'main'?  # if __name__ =='__main__':        # main()   def input_celsius_value():     value = float(input("input celsius for converting it to fahrenheit : "))     return value  def convert_celsius_fahrenheit(celsius_value):     fahrenheit_value = ((9/5)*celsius_value)+32     return fahrenheit_value  def print_fahrenheit_value(celsius_value, fahrenheit_value) :     print("celsius temperature : %f" %celsius_value)     print("fahrenheit temperature : %f" %fahrenheit_value)  def main():     print("This program converts celsius to fahrenheit")     print("============================")     celsius_value = input_celsius_value()     fahrenheit_value = convert_celsius_fahrenheit(celsius_value)     print_fahrenheit_value(celsius_value, fahrenheit_value)     print("===========================")     print("This program ended")   if __name__ == '__main__':        main()


I am new to C++.  What is the difference between including the c++ header files using "" and <>  I am trying to use some of the header files form an open source library. All header files in that library are included using <>. Now when I do the same in my header file, its failing at compile time.


This is almost surely an Arzela-Ascoli question, since it comes from an old exam of which such problems are quite common. Unfortunately, I can't seem to get it though.  $\{ f_n \}$ is a sequence of functions $[0,1] \to \mathbb{R}$ satisfying $|f_n'(x)| \leq \frac{1 + |\ln (x)|}{\sqrt{x}}$ and $-10 \leq \int_0^1 f_n(x) dx \leq 10$ for every $n$. The question is to show the existence of a uniformly convergent subsequence.  In these kinds of situations, the bounds given usually turn into something nice  to force uniform boundedness. Maybe I could hope to establish equicontinuity using the integral somehow, but I'm not told that the $f_n$ are always positive, so the absolute values would probably screw things up anyway.  Is it an easy problem I'm missing or is this totally the wrong track? If so, what's the right track?


Prove $(A\cup C=B\cup C)\implies(A\mathbin{\Delta} B\subseteq C)$

My full problem is: Suppose $A$, $B$, and $C$ are sets. Prove: $A\mathbin{\Delta}B \subseteq C\text{ iff }A\cup C=B\cup C$.  I've proved my case one, which is that $(A\mathbin{\Delta} B\subseteq C)\implies (A\cup C=B\cup C)$, but I've been trying and trying to prove the second case and I keep having difficulties. I've tried to start with assuming that there is an arbitrary $x$ that is in $(A\cap B)$ to get a contradiction, which hasn't worked so far. Any guidance would be wonderful.


In my PC,  the @ and " need to be interchanged on keyboard. As they are printed according to that in the key board.  Please advice.  Thanks


How do I use a lambda expression to get an attribute of a property of a type?

There is a static method with which I get a property attribute of a specific type: public static class TypeUtils {     public static TAttr GetAttribute<TAttr, TEntity>(             Expression<Func<TEntity, object>> argumentFunc)         where TAttr : Attribute     {         string propertyName = GetMemberInfo(argumentFunc).Member.Name;          return typeof(TEntity)             .GetProperty(propertyName,                 BindingFlags.Public | BindingFlags.Instance)             ?.GetCustomAttributes(typeof(TAttr), false)             .Cast<TAttr>().FirstOrDefault();     }      private static MemberExpression GetMemberInfo(Expression method)     {         if (method is not LambdaExpression lambda)         {             throw new ArgumentNullException(nameof(method));         }          MemberExpression memberExpr = null;          if (lambda.Body.NodeType == ExpressionType.Convert)         {             memberExpr = ((UnaryExpression)lambda.Body)                          .Operand as MemberExpression;         }         else if (lambda.Body.NodeType == ExpressionType.MemberAccess)         {             memberExpr = lambda.Body as MemberExpression;         }          return memberExpr                ?? throw new ArgumentException(null, nameof(method));     } }  // method is used like this var attr = TypeUtils.GetAttribute<DisplayNameAttribute, Person>(p => p.Id);  Is it possible to change this method to a type extension method? I would to use it like this: var attr = typeof(Person).GetAttribute<DisplayNameAttribute>(p => p.Id);   UPDATE Most likely, I poorly formulated my question. I know what extension methods are and how they are created. The question here is how to create an extension method for a type based on an existing method, but not pass it the Person type as a second generic type. At the moment, everything that I was able to implement on my own is shown in the listing below. As you can see, we are essentially repeating ourselves, since when implementing an extension, the type is implicitly passed as a parameter to the method, but we explicitly specify it again. In this case, I do not see the advantages of this approach and it is better to use the existing solution then. How to implement an extension so that you don't need to pass a type to it? public static TAttr GetAttribute<TAttr, TEntity>(this Type type, Expression<Func<TEntity, object>> argumentFunc)     where TAttr : Attribute {     MemberExpression memberExpression = getMemberInfo(argumentFunc);     string propertyName = memberExpression.Member.Name;      return type         .GetProperty(propertyName, BindingFlags.Public | BindingFlags.Instance)         ?.GetCustomAttributes(typeof(T), false)         .Cast<T>().ToList(); }  // then can i use this extensions like so typeof(Person).GetAttribute<DisplayNameAttribute, Person>(p => p.Id);


Should answers to bad-code questions be downvoted?

Let us assume that someone posted a question about allocating a 2D array in C++, his code doesn't compile because he has errors in it. Now after you read the question, you see that he should use std::vector becuase it's better and more recommended in his case. But he's asking about arrays and not vectors.  Now let's say someone posts an answer that solves his problem (with an explanation), but std::vector is not mentioned in the answer (as OP wasn't asking about vectors).  Should this answer be downvoted because it doesn't suggest a better solution? Or it's fine because it solves OP answer?


Regular expression for multiple lines in a web service response

I would like to capture a part of the response I am receiving as part of webservice call using regex. Here is the response I am receiving and I am interested to capture the status of just ContactMessageTransport queue.   Status of the queue is being sent in the line:  <pogo:Status>Started</pogo:Status>    and queue name in the line:  <pogo:Name>ContactMessageTransport</pogo:Name>   I used <pogo:Name>ContactMessageTransport[\w\W]*Started<\/pogo:Status> and its getting the status of other queue as well which I am not interested. I am finding it hard to match just the few lines. Can you please help?     <getAllMessageQueueInfoResponse xmlns="http:abcd.com/MessageQueueAnalyticsAPI">      <return>         <Entry xmlns:pogo="http://example.com/com/integration/services/messagequeueanalyticsservice">            <pogo:AckCount>0</pogo:AckCount>            <pogo:DestinationID>0</pogo:DestinationID>            <pogo:ErrorCount>25</pogo:ErrorCount>            <pogo:ID>67</pogo:ID>            <pogo:Latest>2017-11-28T00:00:00-05:00</pogo:Latest>            <pogo:Name>ContactMessageTransport</pogo:Name>            <pogo:NotAckCount>0</pogo:NotAckCount>            <pogo:Oldest>2017-11-28T00:00:00-05:00</pogo:Oldest>            <pogo:RetryableErrorCount>31</pogo:RetryableErrorCount>            <pogo:SkippedCount>0</pogo:SkippedCount>            <pogo:Status>Started</pogo:Status>            <pogo:UnsentCount>212</pogo:UnsentCount>         </Entry>         <Entry xmlns:pogo="http://example.com/com/integration/services/messagequeueanalyticsservice">            <pogo:AckCount>0</pogo:AckCount>            <pogo:DestinationID>0</pogo:DestinationID>            <pogo:ErrorCount>0</pogo:ErrorCount>            <pogo:ID>65</pogo:ID>            <pogo:Latest>2018-03-17T00:00:00-04:00</pogo:Latest>            <pogo:Name>Email</pogo:Name>            <pogo:NotAckCount>0</pogo:NotAckCount>            <pogo:Oldest>2018-03-17T00:00:00-04:00</pogo:Oldest>            <pogo:RetryableErrorCount>4</pogo:RetryableErrorCount>            <pogo:SkippedCount>0</pogo:SkippedCount>            <pogo:Status>Started</pogo:Status>            <pogo:UnsentCount>0</pogo:UnsentCount>         </Entry>


Proving a limit using the formal definition of a limit

Prove by using the formal definition of limit that:   $\displaystyle\lim_{x\to \infty  }\dfrac{1}{x^4 + x^2 + 5} = 0$  Can anyone please lend a hand here?


Is the colon :, when used in slices in Python, called anything special? Other than, say, the slightly medicinal sounding "colon operator"?  x = s[:5]     # ^ this character


$$\int^1_{0}\frac{\ln (x+1)}{x^2+1}dx$$  I'm having trouble solving this one.   I tried trigonometric subst. but that doesn't get me far:$$\int^1_{0}\frac{\ ln (tan\theta+1)}{\sec^2\theta}\sec^2\theta dx$$  After this if I u-subst. using integration by parts, I just end up undoing the trig subst.  And I've tried multiplying by $\frac{2}{2}$ to get it to the form:  $$\int^1_{0} \frac{1}{2} \frac{\ln (x+1)^2}{x^2+1}dx$$  and I couldn't think of anything after that.  Did I miss something? And does anyone have any other ideas? Thanks.


Routing sound in Windows 7 to separate devices

When I'm running games through Steam (for example Skyrim), I like to use my Razer USB headset and I would like to have devices such as Google Chrome or VLC etc. playing through my speakers at the same time.  Is there a way to set specific applications in Windows 7 to different output devices?   My current set-up allows everything through either the USB or through the speakers (setting them as default audio device),  I am running Windows 7 64 Ultimate and would love it if someone could come up with a solution for this speaker problem.


How many USB-C monitors can I connect to a MacBook Pro (13-inch, 2020, Four Thunderbolt 3 ports)?

I would like to connect at least two USB-C monitors, but maybe 3 if possible. Firstly, should it work? Secondly, will it work well in terms of performance? I mostly need the monitors for text editing and web browsing (not video editing or gaming).


What are Exceptions to javascript's Object pass by reference?

Consider the Two Snippets     const sayMyName = wizard => {   wizard.name = 'Shazam'; }  let boy = { name: 'Billy' };  sayMyName(boy);  console.log(boy.name);     Since We know that objects in js are passed by reference hence a reference to boy object is assigned a property with value 'Shazam'. Since Object at the stored Reference is changed hence boy's name is changed to 'Shazam'.    const sayMyName = wizard => {   wizard = { name: 'Shazam' }; }  let boy = { name: 'Billy' };  sayMyName(boy);  console.log(boy.name);     Considering above case Here When Boy is passed in sayMyName function why it is behaving as pass by value and boy.name still return 'billy' ?


Why does Nautilus' search function jam directory navigation?

In Ubuntu 18.04, I do this:    Super-E to open Nautilus Click on Home Type a letter of a desired directory, e.g. d if I want to go to Documents.  I then try to mouse-click on Documents. But at this point, Nautilus is jammed for three minutes until eventually I get a popup notification that "Search for d is ready."   My user home has only 52 directories and 22 other files.  I think that the entire subtree of my user-home is being searched for that letter d. How do I avoid that? I do wish I could use that d keypress to go to the right part of the directory listing.


Self-contained book about complex systems and non-linear dynamics

I am a student at the 2nd year of a B.Sc. in Biotechnology. I started reading some papers about complex systems and nonlinear dynamics applied to economy, biology of course, climate model etc... I would like to study theme better so i need a textbook from which i can start. I toke a calculus course and i am going to study multivariate calculus and linear algebra next months (self study). The question is: can anyone tell me about a book which is self-contained, about complex systems and nonlinear dynamics (even with applications)? I mean: a book that has some preliminaries about linear algebra or whatever i need to study these disciplines.


Let $R=R_1 \bigoplus R_2$ be the external direct sum of two rings $R_1$ and $R_2$ and let $G$ be an arbitrary group. Is the group ring $RG \cong R_1G \bigoplus R_2G $? Using this, can we extend it for $R=R_1 \bigoplus R_2 \bigoplus R_3$ ?   I have used the natural map and proved it is well defined. How to show it is a homomorphism and further it is one-one and onto?


In how many steps is it necessary to construct the Borel $\sigma$-algebra?

We only consider Borel sets on $\mathbb R$. As we know, the Borel $\sigma$-algebra is constructed transfinitely as follows:   Let $B_0=\mathcal T$ be the set of open sets on $\mathbb R$; If $\alpha$ is a limit ordinal, $B_\alpha=\bigcup_{\beta<\alpha}B_\beta$; Otherwise, let $\beta=\alpha-1$, and $B_\alpha=(B_\beta)_{\delta\sigma}$, where $A_\delta$ denotes the collection of countable intersections of sets in $A$, and $A_{\delta\sigma}$ denotes the collection of countable unions of sets in $A_\delta$; Let $\mathcal B=B_{\omega_1}$ where $\omega_1$ is the smallest uncountable ordinal, then $\mathcal B$ is the Borel $\sigma$-algebra.   However, I wonder whether $\omega_1$ is the smallest ordinal $\alpha$ such that $B_\alpha=\mathcal B$, i.e. the minimal step to finish the process. As we know, $((0,1)\cap\mathbb Q)\cup([2,3]\setminus\mathbb Q)$ is a Borel set which is neither $F_\sigma$ nor $G_\delta$.  Any idea? Thanks!


Showing a generalized version of the Hölder inequality for $L^{p}$ spaces

Let $(X,\mathcal{M},\mu)$ be a measurable space, $1<p_{k}<\infty$ for $k=1,2,\ldots,N$ with $\sum_{k=1}^{N}\frac{1}{p_{k}}=1$ and $f_{k}\in L^{p_{k}}(\mu)$ for $k=1,\ldots,N$.  Show that $$\left\|f_{1}f_{2}\cdots f_{N}\right\|_{1}\leq \|f_{1}\|_{p_{1}}\|f_{2}\|_{p_{2}}\cdots\|f_{N}\|_{p_{N}}.$$  Remark: I tried to use the Holder inequality with $p=p_{1} $ and $q=\frac{1}{\sum_{k=2}^{\infty}\frac{1}{p_{k}}}$, but when I try to continue the process, it becomes complicated until I think that this is not the way.


Dual boot of Ubuntu and Windows 7 from separate drives

My PC dual boots Ubuntu and Windows 7. Ubuntu was installed into a small partition of only 88 GB and i want at least 500 GB for Ubuntu. The boot drive has a   Windows partition of 200 GB a program partition of 630 GB and an Ubuntu partition of 88 GB.    Can I reinstall Ubuntu and resize it?    If not, can I install Ubuntu on my other 2 TB drive and still dual boot easily? Is it just to partition to not let Ubuntu to take up all the space on the 2 TB drive on installation? If so, how?  Disk /dev/sda: 1,8 TiB, 2000398934016 byte, 3907029168 sektorer Disketikettstyp: dos Diskidentifierare: 0x7893b811  Enhet      Start     Början     Slutet   Sektorer Storlek Id Typ /dev/sda1              2048 2708940799 2708938752    1,3T  7 HPFS/NTFS/exFAT /dev/sda2        2708940800 3907028991 1198088192  571,3G 83 Linux   Disk /dev/sdb: 931,5 GiB, 1000204886016 byte, 1953525168 sektorer Disketikettstyp: dos Diskidentifierare: 0x96aeb6b8  Enhet      Start     Början     Slutet   Sektorer Storlek Id Typ    /dev/sdb1  *           2048     206847     204800    100M  7 HPFS/NTFS/exFAT    /dev/sdb2            206848  409602047  409395200  195,2G  7 HPFS/NTFS/exFAT    /dev/sdb3         409602048 1743804415 1334202368  636,2G  7 HPFS/NTFS/exFAT     /dev/sdb4        1743806462 1953523711  209717250    100G  5 Utökad     /dev/sdb5        1743806464 1928364031  184557568     88G 83 Linux    /dev/sdb6        1928366080 1953523711   25157632     12G 82 Linux växling / Solaris      Disk /dev/sdc: 57,7 GiB, 61907927040 byte, 120913920 sektorer Disketikettstyp: dos Diskidentifierare: 0x5a2b4c5e  Disk /dev/mapper/cryptswap1: 1,8 GiB, 1872232448 byte, 3656704 sektorer  Disk /dev/mapper/cryptswap2: 12 GiB, 12880183296 byte, 25156608 sektorer   I have already made a new ext4 partition,  mounted it in /mnt, and started copying the /home directory with sudo rsync -avx /home/ /mnt (didn't think you were going to help me this much) but the drive doesn't show up?  output of lsblk  (loop and ROM devices removed)  NAME           MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINT sda              8:0    0   1,8T  0 disk   ├─sda1           8:1    0   1,3T  0 part   ├─sda2           8:2    0 569,6G  0 part  /mnt └─sda3           8:3    0   1,8G  0 part     └─cryptswap1 253:0    0   1,8G  0 crypt [SWAP] sdb              8:16   0 931,5G  0 disk   ├─sdb1           8:17   0   100M  0 part   ├─sdb2           8:18   0 195,2G  0 part   ├─sdb3           8:19   0 636,2G  0 part   ├─sdb5           8:21   0    88G  0 part  / └─sdb6           8:22   0    12G  0 part     └─cryptswap2 253:1    0    12G  0 crypt [SWAP] sdc              8:32   1  57,7G  0 disk


I'm looking at this table that suggests a 0.5mm2 cable could withstand 720W at 3A.    At the same time I used a cable size calculator online to determine the size of cable I would need to use for a 12V60A which is also 720W and it gave me 8mm2 as the result.  And thinking about it, it does make sense as current is a measure of electrons per unit time, being physical objects (not quite but I come from a programming background so that also makes sense to me) the more they are the more space they would need to move through. But where is the voltage in the equation, if we imagine voltage being the strength with which the electrons are moving it would also make sense to need a stronger conductor the higher the voltage and it doesn't seem to be the case? Is conductor cross section determined solely by amperage? Could a 0.5mm2 cable carry 3A at any voltage?  Quite a bunch of questions I posed there but I hope you get where my curiosity is coming from.


I have a curiosity, something that I was never given an explanation to and I have to ask for some kind of clarification to get a better understanding.  From the title of my post, it may seem a little odd, but here is what I want to know about.  I know there are several words such as "hand towel" or like the above example "dish drying mat" and the thing is that I have a friend who also knows English but I don't understand why she keeps insisting to write in this way: "Hands towel" or "dishes drying mat". While it's true that in our language it implies the plural (which we would literary translates like for example: Towel for hands), I keep telling her that in English it doesn't sound right and it she doesn't have to necessary write the respective word in plural, just because it's like that in our language.  I don't know how can I explain further but perhaps there are rules in other languages when it comes to the use of singular and plural but I would require an explanation for it, if there is any. I'm sorry if I didn't explain properly, but this was brought up several times by this friend of mine and it just seems so strange the way she would write those words and similar others in that manner and it makes me cringe whenever I read her translations of stuff that we do.


How do I access the terminal without logging in to the desktop?

Using  to install Oracle Java I accidentally restarted on Step 10 and now I can't get past the login screen. I'm wondering if there is a way to access terminal without logging in and finish the last 4 steps? After I try to sign in it takes me right back to the sign in screen.


Books for learning non parametric Bayesian model

Having studied parametric Bayesian statistics during the two last years, I plan to begin to self-study non parametric Bayesian model during this summer and look for recommendations. I would like the book(s) to cover both the theoritical aspects and the practical ones (with implementation, examples of models ...) Thanks for your recommendations.


Java 8, first processing of a list is slower than the subsequent processing

I'm runnning some tests (very basic, nothing fancy) in order to check performance on Java 8 streams and lambdas. Using an ArrayList of 10 million POJOS, all I want to do is get the average value of a BigDecimal field. In order to take more than one sample, I run the process five times, and to my surprise the first of those five runs is extremely slower than the rest. I'm getting values like 0.38 seconds the first time, and 0.04 seconds on the other four. This is 10x faster!!! I also did the same test using old school for(Pojo p : pojos) with similar results. Why is this happening, and how can I take advantage of it? The code I'm using is:  for (int i = 0; i < 5; i++) {     long init = System.nanoTime();     BigDecimal sum = lista.parallelStream().map(x -> x.getCosto()).reduce(BigDecimal.ZERO, BigDecimal::add);     BigDecimal avg = sum.divide(BigDecimal.valueOf(registros));     long end = System.nanoTime();     System.out.println("End of processing: " + avg + " in "             + ((end - init) / 1000000000.0) + " seconds."); }


How to use OPENJSON or a compatible equivalent in SQL Server 2014?

I currently have the stored procedure shown below working for SQL Server 2017, but I cannot figure out a way to make it work on SQL Server 2014 or find a compatible equivalent.  The current error I get is as follows:     Incorrect syntax near the keyword 'WITH'.      Incorrect syntax near the keyword 'with'. If this statement is a common table expression, an xmlnamespaces clause or a change tracking context clause, the previous statement must be terminated with a semicolon.   My code:  CREATE PROCEDURE ProcedureName      @submissionID INT AS     DECLARE @submission_FormDefn AS INT     DECLARE @Defn_json AS NVARCHAR(MAX)     DECLARE @Subm_json AS NVARCHAR(MAX)       SELECT           @Subm_json = [jsonPost],           @submission_FormDefn = [FormDefn_Id]      FROM          form_submissions      WHERE         id = @submissionID       SET @Defn_json = (SELECT [data]                         FROM form_defns                         WHERE id = @submission_FormDefn)       SELECT           dd.name, dd.label, dd.type, V.VALUE       FROM          [dbo].[form_submissions_VALUES] V      INNER JOIN           OPENJSON(@Defn_json) WITH (name varchar(MAX) '$.name',                                     label varchar(MAX) '$.label',                                     type varchar(MAX) '$.type') dd ON V.field = dd.name      WHERE            type IN ('one', 'two', 'three')           AND v.FormSubmission_Id = @submissionID GO


I am in the process of writing (down) our companies coding standards for Delphi programming, so what would anyone suggest to have as a basis, anything that you would recommend to use / not use ?


Why do animals yawn? What is the biology behind it?

We yawn whenever we are tired and body needs rest. Why does the mouth open wide and a large volume of oxygen is inhaled?


Categorical variables sklearn random forest

I'm a bit confused with the use of Random Forest in Sklearn in case we have categorical variables.  I've read this article stating that one hot encoding affects performance negatively when using Decision Tree-based methods.     I'm facing this exact problem with a dataset. I have a high number of features with continuous values and three other categorical features that I know are highly correlated with the target variable. However when I use mutual_info_classif and RandomForest these categorical variables are considered not important. I have tried keeping them as categorical variables but as far as I know, sklearn implementation can't handle categorical variables. I've also one-hot encoded them but then I'm facing the problem explained in the link.  What are the options left?. Should I just change the library used for Random Forest?. Maybe change to another model that can be used more efffectively with one hot encoding like SVM?


Calculating a non complex integral using complex theory

Show that $$\int_{0}^{\infty}\frac{cosh(ax)}{cosh(x)}dx= \frac{\pi}{2cos(\frac{\pi a}{2})}, |a|<1$$ We want to compare it to a complex function. Then let C be a rectangle with vertices $z=\pm R, z= \pi i \pm R$, so that when $R \rightarrow \infty$ we will be able to reach $\pm \infty$. This is what I have done so far: $$\frac{cosh(ax)}{cosh(x)}=\frac{cos(iaz)}{cos(iz)}=\frac{e^{-az}+e^{az}}{e^{-z}+e^{z}}$$ I don't know if I am not using the right comparison of a complex function or what, but once I get here, I am not sure how to find the zeros (poles) of the denominator so that I can plug it into the residue equation. Am I jumping ahead or am I not comparing it to the right complex function? Any help will be appreciated!


How to fix the size of a third bracket in the multiline equation using the line break?

Equation:  \documentclass[12pt]{article} \usepackage{mathtools} \begin{document}     \begin{eqnarray}     \langle\pi_n|\hat{H}^{ab}|\pi_m\rangle & =& \Delta_{nm} g\int d^3x|\Psi_p(x-r_m)|^2\left\{|\phi_0(x)|^2+     \sum_{q=1}^{N}\left[\hat{b}_q\left(a\phi_0^*(x)-a\phi_0(x)\right)\right.\right.\\     & & +\left.\left. \phi*a*a*a-\phi^*_0(x)v^*_q(x)\right]\right\}     \end{eqnarray} \end{document}   The third bracket at the end of the equation is of different size than the earlier bracket used in the first line.


what can you call from the attribute node?

I know you can call density or flame for example from the attribute node. I was wondering what else you can write in the name slot. And maybe a bit of explanation of the attribute node.    thanks in advance guys! :)


Passing world as parameter results nullpointer

I'm trying to create new enemies from their own class. I try to pass World from another class as parameter however when trying to add new body to world it results a nullpointer. Here's the constructor from Enemy-class  public Enemy(float x, float y, World world){     enemyTexture = new Texture(Gdx.files.internal("ball.bmp"));     BodyDef myBodyDef = new BodyDef();     myBodyDef.type = BodyDef.BodyType.DynamicBody;     myBodyDef.position.set(x, y);      FixtureDef enemyFixtureDef = new FixtureDef();     enemyFixtureDef.density     = 1.5f;     enemyFixtureDef.restitution = 0.1f;     enemyFixtureDef.friction    = 0.5f;      CircleShape circleshape = new CircleShape();     circleshape.setRadius(enemyRadius);      enemyFixtureDef.shape = circleshape;     enemyBody = world.createBody(myBodyDef);     enemyBody.setUserData("enemy");     enemyBody.createFixture(enemyFixtureDef); }


What can I do to populate an empty village?

I’m playing unmodded Minecraft on the xbox 360, in survival mode. I have explored the entire map, and found 1 village. The last villager died. What can I do to get villagers back?


Why does multiplying two fractional Doubles and converting the result to a String result in extraneous zeroes?

var d1 = 0.124 * 0.12456 // 0.01544544 var s1 = String(d1)      // 0.015445440000000001  var d2 = 0.01544544      // 0.01544544 var s2 = String(d2)      // 0.01544544  Why does converting the product of two fractional Doubles to a String result in extraneous zeroes (ending with 1) in the fractional portion of the result, but converting a fractional Double explicitly to a String does not? And how can I remove the extraneous portion from the result?


I have some problems with my Bluetooth headset. It works fine if I connect it when Ubuntu runs via an installation medium in trial mode. After installation, it is not possible to connect it anymore. It works fine with my Android phone and with another Windows computer. Does anybody have an idea how to fix this?  Best regards


CUDA error: out of mem aloc result line 855. Does anyone experience the same issue?

Hey guys i recently bought a razer laptop with rtx 2080 to improve my renders. But everytime i start rendering i get this error. CUDA error: out of mem aloc result line 855. Does anyone experience the same issue ?


My first proof employing strong induction / complete induction (very simple number theory). Please mark/grade.

What do you think about my first proof employing strong induction? What mark/grade would you give me?    Theorem  Every natural number greater than 1 is a product of one or more primes.  Proof  First, introducing a predicate $P$ over $\mathbb{N}$, we rephrase the theorem as follows.         $$\forall n \in \{2, 3, \dots \}, \, P(n)   \quad \text{where} \quad   P(n) \, := \, n \text{ is a product of one or more primes}$$         We prove the theorem by strong induction; we induct on $n$.  Basis  We have $P(n)$ for $n = 2$, since $2$ is a product of one prime, namely $2$.  Inductive step  Below, we show that for all             $n \in \{2, 3, \dots \}$,             $$P(2) \land \dots \land P(n - 1) \land P(n) \Rightarrow P(n + 1)\text{.}$$  Let $k \in \{2, 3, \dots \}$.             We assume that $P(2) \land \dots \land P(k - 1) \land P(k)$ is true.             In the following, we use this assumption to show that $P(k + 1)$ is true.  We consider $k + 1$.             There are two cases: It is prime or not.             Obviously, the cases are exhaustive.             We consider the cases separately;             in each consideration, we conclude that $P(k + 1)$ is true.             In so doing, we conclude the inductive step for all cases.  Case 1:     Obviously, $k + 1$ is a product of one prime, namely $k + 1$.             Thus $P(k + 1)$ is true.  Case 2:     As $k + 1$ is not prime, by definition,             it may be represented as a product of at least two natural numbers             that are greater than $1$. Thus there are $i, j \in \{2, \dots, k - 1, k\}$ such that $ij = k + 1$.             By the induction hypothesis, $P(i)$ and $P(j)$ are true.             Hence, we can easily see that the product $\,ij\,$ is a product of primes.             Thus $P(ij)$ is true. (Thus $P(k + 1)$ is true.)  By the basis, the inductive step, and the method of strong induction;         $P(n)$ is true for all $n \in \{2, 3, \dots \}$.


Sketch: How to change all shades of a color to another color?

I have an image that I downloaded online:   As you can see it's not just monotone. I would like to change all shades of the red to shades of a different color (Imagine the red liquid was purple instead of red)  Is this possible in Sketch?   Sorry I'm a programmer, so this is kinda outta my realm of expertise. I'm using a Mac.


Keyboard shortcuts in terminal in Ubuntu 16, 18 and 20

I used to alt-space x to toggle a terminal window between maximize (fullscreen) and unmaximize. This was in Ubuntu 16. But in Ubuntu 18 and 20 this doesn't work anymore. Is there some settings/preferences I'm not aware of to enable this or some other keyboard shortcut?


how can I know the number of tokens in a bash variable (whitespace-separated tokens) - or at least, wether it is one or there are more.


Total combinations from a variable set of lists using itertools

I am using python and I believe the problem below can be solved using itertools but if there is another method please let me know.  If I have a variable set of lists (for illustration purposes let it be 3) and each contains a variable set of elements (elements could be strings, integers, lists).  An example:                            [a,b,c]   [d,e,f]   [g,h,i]   How can I create (and access) all the total possible combinations (as a list preferably) choosing just one from each set?  i.e.   [a,d,g]  [a,d,h]  [a,d,i]  [a,e,g]  ... (and so on)  Order does not matter so for the output I do not want [a,d,g] and [d,a,g] both to show, just [a,d,g].  If my question is not clear please let me know.   Also, if it helps we can consider all elements to be simple strings or integers but I would like a solution that takes in count the fact that the number of lists and the number of elements in each list is variable.


How to Align the search and placeholder in same row?

Will someone please help     <form action="#" class="search-bar">                 <div>                     <button type="submit" name="Submit" id="submit"><img src="/search.png" alt="Search"                             height="35px"></button>                     <input type="text" placeholder="Search" id="search">                  </div>              </form>


I am trying to find number of runs of a script but its always 2 even though only one running.  sh 11.sh 1  11.sh already running,exiting..   here is code.  ps -ef | grep -v grep | grep -c "$0" if [[ `ps -ef | grep -v grep | grep -c "$0"` -gt "1" ]]; then             `echo " $0 already running,exiting.."` fi


This is Pinter $10.G.5$     Let:      $a \in G$      $\text{ord}(a) = n$      Prove: $\text{ord}(a^m) = \frac{\text{lcm}(m,n)}{m}$      Use $10.G.3$ and $10.G.4$ to prove this.   Here is $10.G.3$:     Let $l$ be the least common multiple of $m$ and $n$. Let $l/m = k$. Explain why $(a^m)^k = e$.   Here is $10.G.4$:     Prove: If $(a^m)^t = e$, then $n$ is a factor of $mt$. (Thus, $mt$ is a   common multiple of $m$ and $n$.)      Conclude that:    $l = mk \leq mt$   OK, let's begin.  By $10.G.3$:  $$ (a^m)^{\text{lcm}(m,n)/m} = e    \tag{5} $$  If $\text{lcm(m,n)}/m$ is the lowest number such that (5) is true, then:  $$ \text{ord}(a^m) = \text{lcm}(m,n)/m    \tag{9} $$  Let's assume that there is a number   $$ q < \text{lcm}(m,n)/m    \tag{7} $$  such that:  $$ (a^m)^q = e \tag{6} $$  By $10.G.4$ with (6):  $$ n \ \big|\ mq $$  $$ l \lt mq $$  $$ \text{lcm}(m,n) \leq mq $$  Isolate q:  $$ \text{lcm}(m,n)/m \leq q    \tag{8} $$  (8) contradicts assumption (7).  So (9) must be true.    That's how I approached it. If anyone notices any issues, I'd be happy to know about them.  Even if it is considered correct, do you feel there is a better way?


Can a monk use a flurry of blows after committing the attack with heavy/two-handed weapons?     Immediately after you take the Attack action on your   turn, you can spend 1 ki point to make two unarmed   strikes as a bonus action.


Why does the sky look blue rather than violet?

Sky looks blue because because our eyes are sensitive to blue colour. But when viewed through a camera why don't we see violet of the sky even though we can see violet colour of other pictures taken from the camera?


When is it appropriate to create an entity instead of a new content type?

What is the benefit to creating new entity types over just building a new content type?    It seems a bit overkill to do all of the custom coding that is required to create a new entity when you have all of the CRUD and Views functionality already built into content types.


Sending an sms message from twilio using python

I have created a basic program following twilios tutorial on sending sms messages to phones. I want to know how to send a message every 5 minutes or on a timer. Looking for something very basic.  from twilio.rest import Client   account_sid = 'sid' auth_token = 'token' client = Client(account_sid, auth_token)  message = client.messages \ .create(     body='Test',     from_='+twilionumber',     to='+mynumber' )  print(message.sid)


How do I get rid of these huge black holes that are getting randomly generated in my minecraft world

I just went on to my minecraft world and in the middle of a underwater structure that I had built with no issues yesterday was a huge hole. I can't place block or even go into it. Several of these appeared and they even started to occur on land. Also I have the Mo' Creatures mod and alot of the rays and dolphins are spawning around these areas.  /EbQF7.jpg