From my understanding, in 2020, the maximum an employee can contribute to their 401k is $19,500. The total contribution limit for an employee and employer combined in 2020 is $57,000. Now I understand that some companies have matching whether it's 25% or 50% or sometimes 100% but how do people reach that $57,000 limit? If I contribute the max to my 401k ($19,500), that means to reach the total contribution limit, the company must put in $57,000 - $19,500 = $37,500. Which means the company is almost contributing a 200% match? Is this correct? Do some companies actually match that much? The other thing I need clarified, is I read that the $19,500 is the max contribution that can be tax exempt. You are allowed to put after tax dollars in your 401k until the limit of $57,000 is reached. Is this true?

The 2014 employee contribution limit is $17,500.   The 2014 total contribution limit is $52,000.  (Provided they're not capped earlier based on low income.)  Meaning the IRS has left room for a ~$35,000 employer contribution, a 2:1 match with no limit.  This seems a bit excessive. I was able to find a survey which said the average company contribution in the top 30 plans was over $31,000, so apparently there are companies, and their employees, who are contributing to the max, but I think the average company match is much lower.  Why is the gap between employee and total limit so high?


How can Enum-like functionality (as provided in Java and other high level languages) be used in PHP? I know PHP doesn't allow you to create enums currently, but what's the closest one could get?

I know that PHP doesn't yet have native Enumerations. But I have become accustomed to them from the Java world. I would love to use enums as a way to give predefined values which IDEs' auto-completion features could understand. Constants do the trick, but there's the namespace collision problem and (or actually because) they're global. Arrays don't have the namespace problem, but they're too vague, they can be overwritten at runtime and IDEs rarely know how to autofill their keys without additional static analysis annotations or attributes. Are there any solutions/workarounds you commonly use? Does anyone recall whether the PHP guys have had any thoughts or decisions around enumerations?


I'm thinking the pictures on my website are too large and heavy. I was looking for the best resolution and quality to export my pictures. I found some information that says 72dpi is enough resolution for a website but I didn't find any information about the quality and size.   I would like to know what is the best resolution, size and quality to have a nice picture that is not too big.

I have two cameras, a 6mpix Panasonic FZ8, and 14mpix Canon A2200.  When I compare shots from two cameras, one of differences I notice is dpi number that camera reports in JPG info:   FZ8 reports dpi=72 A2200 reports dpi=180   What physical meaning can these numbers have? I am at loss for guesses.    I am fairly familiar with notion of dpi in scanning and printing. I can calculate density of pixels on the sensor of the camera. But then, the linear density of pixels on the sensor will be hundreds times larger than number above. So what, if anything, does it mean?


Can you please explain this with simple examples?    To me, their elements are same. Because if I divide $ k+m\Bbb{Z}$ by $ n$, then it gives any one of the elements of $ \Bbb{Z}_n$. So can I say  $\mathbb{Z}_n$ and $\mathbb{Z}/n\mathbb{Z}$ both are same? Or does it happen due to the fact that $\mathbb{Z}_n$ and $\mathbb{Z}/n\mathbb{Z}$ are isomorphic?     Also are their set structure same? (if not, then I suppose they are not same groups/rings.)   Thanks in advance.

In every Modern Algebra book I've read, I've seen that the groups $\mathbb{Z}/n\mathbb{Z}$ and $\mathbb{Z}_n$ are isomorphic, but not equal. I understand the difference between "isomorphic" and "equal," but this particular example raises a couple of questions for me.  I know the first group consists of cosets $k + n\mathbb{Z}$, and the second group consists of equivalence classes $[k]_n$, but isn't it true that $k + n\mathbb{Z} = [k]_n$ for every integer $k$? (They are both sets containing the same elements from $\mathbb{Z}$.) And if so, then can't we say that $\mathbb{Z}/n\mathbb{Z} = \mathbb{Z}_n$? Thanks in advance!


I've created a new save in Skyrim and now I want to increase my sneaking level as fast as possible.   What is the most efficient strategy for powerleveling sneaking as a new character?

I'm about to start the Thieves Guild quests, but as I'm playing a non-stealth character my Sneak skill is very, very poor at around 17. In preparation to joining the Thieves Guild I wanted to improve my Sneak skill, as I doubt I'll be able to do their quests at my current skill.  I tried to sneak around some people at dark, but I can only get the completely hidden status and the detected status. Once I enter the line of sight of someone I'm detected, I don't manage to get the half-open eye indicator.  When I'm fully hidden or detected, I don't seem to gain any skill points in Sneak, but with my current skill I never achieve the hidden-in-sight status that I need to gain more skill. Any idea on how to gain some easy Sneak skill points?


Can anybody explain?  <?php  $var = new stdClass(); $var->{1} = 1; $var->{2} = 2;  $test = (array) $var;  var_dump($test); var_dump(array_key_exists("2", $test));   It returns false. Is it expected result? OSX 10.10. PHP:5.5.14 Thanks!

I had this question earlier and it was concluded it was a bug in 5.2.5.  Well, it's still broken in 5.2.6, at least for me:  Please let me know if it is broken or works for you:  $obj = new stdClass(); $obj->{"foo"} = "bar"; $obj->{"0"} = "zero"; $arr = (array)$obj;  //foo -- bar //0 --    {error: undefined index} foreach ($arr as $key=>$value){     echo "$key -- " . $arr[$key] . "\n"; }   Any ways to "fix" the array after it has been cast from a stdClass?


Prove ${a}^{2}+{b}^{2}={c}^{2} \Rightarrow$ 3|ab  Not sure how to approach this, I considered the contrapositive $3\nmid ab \Rightarrow {a}^{2}+{b}^{2} \neq {c}^{2}$ and then using cases, where case 1 is $ab = 3q+1$ and case 2 is $ab = 3q+2$, but was not able to continue.  Thanks in advance for any help.

i would like to know how to prove that if $a^2+b^2=c^2$ then   a) $3|a$ or $3|b$  b) $5|a$ or $5|b$ or $5|c$  c) $4|a$ or $4|b$   Also that $a^2+b^2+c^2+1$ can't be divisible by 8  Thank you very much!


I am writing a book and wish to make the numbering in part I Roman while preserving the numbering style in the Arabic part II. I present as a minimal example below. If the "\renewcommand"s are commented out the numbering is as desired. After Part I is given Roman numbering the wished for nesting disappears. How can I preserve the original format?     \documentclass[10pt,oneside,usenames,dvipsnames]{book}        \setcounter{tocdepth}{2}     \setcounter{secnumdepth}{2}          \begin{document}     \tableofcontents     \renewcommand{\thechapter}{\Roman{chapter}}     \renewcommand {\thesection}{\Roman{section}}     \renewcommand {\thesubsection}{\Roman{subsection}}          \part{1}     \chapter{FIRST}     \section{First}     \subsection{first}               \renewcommand{\thechapter}{\arabic{chapter}}     \renewcommand {\thesection}{\arabic{section}}     \renewcommand {\thesubsection}{\arabic{subsection}}     \part{2}     \chapter{SECOND}     \section{Second}     Want this numbered as 2.1 which it is until Part I numbering is made Roman. It then appears as just 1. The section numbering style is not as wanted after a Roman Part I.     \subsection{second}     Want Numbering here to be 2.1.1 which it is until Part I numbering is made Roman. It appears as 1. The subsection is numbered but the style is wrong. How can I keep the 2.1.1 style of numbering with a Roman Part I?          \subsubsection{2nd}          Want no numbering here, which works with and without the Roman Part 1.          \end{document}

I want to have my sections numbered using Roman numerals. However, I can only get the section number to be a Roman numeral, not the subsection. Here is some code:  \renewcommand{\thesection}{\Roman{section}}  \renewcommand{\thesubsection}{\Roman{subsection}}   This will print, e.g. I. , whereas it should be I.I.  Commenting out the second line gives the result I.1, which is not demanded.


I'm trying to redirect my application from ajax call but it isn't working. Inspecting browser's NetWork i could see that the result is 200 - OK  but the view isn't changing.    $.ajax({   type: "GET",   url: "Index",   data: { codCliente: codCliente, numProcesso: numProcesso } });     public ActionResult Index(string codCliente = null, string numProcesso = null) {     return View(); }

How can I redirect the user from one page to another using jQuery or pure JavaScript?


I did my Masters in computer science but have no knowledge of any language properly, i want to become a salesforce developer, is it easy because i am network engineer but now i want to start my carrier with salesforce developer...please suggest me

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


How to get desired output in MS Excel? note that the outage duration is in mins  Start time  Outage Duration (in Mins)   DESIRED OUTPUT 3:12 AM                 60               4:12 AM 4:05 PM                125                6:10 PM

If I have a cell formatted as date+time in Excel, how can I add to this in terms of minutes? It would need to work whether I was adding 20 minutes, or 2,500 minutes.   So, for example if I had this spreadsheet, what formula could I put in B5 to get a result of 2013-09-22 09:10?    I tried using =B4+TIME(0,B3,0), but it gives 2013-09-21 09:10 which is a day off. It works fine though if B3 is less than a day's worth.


I'm having troble with this problem, I don´t know what to do, is for a final exam tomorrow.  Let $f:R^2\to R$ given by  $(y-x^2)(y-2x^2)$  a) Draw the sets $A=${$(x,y)$|$f(x,y)>0$}$\ and\ $$B=${$(x,y)$|$f(x,y)<0$}  b) Shows that for all $\vec u$=$(u_{1},u_{2})$ with ||$\vec u$||=$1$, the function: $g(t)=f(t\vec u$) has a local minimum in $t=0$  c) Shows that notwithstanding the foregoing, $\vec 0$ is not a local minimum of $f$

There is an exercise in my lists about those functions: $$f(x, y) = (y-3x^2)(y-x^2) = 3 x^4-4 x^2 y+y^2$$  $$g(t) = f(vt) = f(at, bt); a, b \in \mathbf{R}$$  It asks me to prove that $t = 0$ is a local minimum of $g$ for all $a, b \in \mathbf{R}$  I did it easily: $$g(t) = 3 a^4 t^4-4 a^2 t^2 b t+b^2 t^2$$ $$g'(t) = 2 b^2 t-12 a^2 b t^2+12 a^4 t^3$$ $$g''(t) = 2 b^2-24 a^2 b t+36 a^4 t^2$$  It is a critical point: $$g'(0) = 0; \forall a, b$$  Its increasing for all a, b: $$g''(0) = 2b^2 > 0; \forall b \ne 0$$ and $$b = 0 \implies g(t) = 3 a^4 t^4$$ which has only one minimum, at $0$, and no maximum  However, it also asks me to prove that $(0, 0)$ is not a local minimum of $f$.  How can this be possible? I mean, if $(0, 0)$ is a minimum over every straight line that passes through it, then, in this point, $f$ should be increasing in all directions, no?


I am trying to add 2 different background colors to the same css class.  .stepwizard-row:before {     top: 14px;     bottom: 0;     position: absolute;     content: " ";     width: 100%;     height: 4px;     background-color: #d6d6c2;     z-order: 0;  }   Is it possible to have one background color for the first 50%(Considering total width) and another background color to the  remaining? If it can`t be achived, can anyone suggest me a trick to achive this?

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


I have two shapefiles, one is polyline, one is points. I use points to split the polyline. How to record the FID of splited points(two end points each line) in the field of polyline.  First I use split tool  then I execute the following code to update the attribute table of polyline  import arcpy from arcpy import env env.overwriteOutput = True sj = r"in_memory\sj"  inPoints=r"Y:\Desktop\road\city\city_merge1.shp" inPL = r"Y:\Desktop\road\highway.shp" arcpy.MakeFeatureLayer_management(inPoints, "city_points") arcpy.MakeFeatureLayer_management(inPL, "road")  for i in range(0,500):     expr = " [FID] =" + str(i)      arcpy.SelectLayerByAttribute_management(inPL, "NEW_SELECTION", expr)     arcpy.SpatialJoin_analysis(inPL, inPoints,sj,"JOIN_ONE_TO_ONE","KEEP_COMMON")      ## update the attribute table of road, recording the FID of the city in the attribute table of the road

I have two shapefiles, Point and Polyline. I'm trying to populate my polyline layer with the point data ID (systemID) where the lines start to where they end; eg. create two columns (from and to). The lines already have flow direction assigned to them. I am using ArcHydro tools but Arcpy is also fine.  In ArcHydro I have tried using Attribute Tools > Generate From/To Nodes for lines but it creates values for To and From that are not from my point data. My other alternative was using Feature to Vertices and joining the result to my point data table to get the systemID. But then I would have to update the polyline layer as well. I am sure there is a easier way of doing it.  Note: not all the lines have points at the vertices, blank values are fine for them.


I have a Apex Class like below for handling the exception   public class updateCaseRecord {          @AuraEnabled     public static void updateCheck(String caseId, String Status){         String msg = '';         try         {         List<Case> records = [select id,Status from Case WHERE Id = :caseId];         for (Case record : records)         {              record.Status = 'Closed';         }                    update records;          }         catch(DmlException e)              {                for (Integer i = 0; i < e.getNumDml(); i++) {                     msg =+ e.getDmlMessage(i) +  '\n' ;                     System.debug('getDmlFieldNames=' + e.getDmlFieldNames(i));                    System.debug('getDmlMessage=' + e.getDmlMessage(i));                   }                 throw new AuraHandledException(msg);             }             catch(Exception e)             {             throw new AuraHandledException(e.getMessage());             }             finally { }           }      }   I wrote the test class like below where was able to throw the DML exception by breaking the validation rule and it works   @IsTest public class updateCaseRecordTest {     @IsTest static void testIsUpdateCheck() {       ...........      ...........      Test.startTest();          try         {            .............             // below Call to the method updateCheck() will fail due to the Validation error throws the DML Exception             Status4 = 'Close';             updateCaseRecord.updateCheck(newCase3.Id,Status4);          }                  catch(AuraHandledException e) {             System.assertEquals(e.getMessage(), e.getMessage());         }          Test.stopTest();        }}   But I cannot execute the Exception e catch block after running the test class I see like below     How to execute the other Catch block.

I am trying to write a test class for the Apex Class with try - catch block and this is my first time coding test classes. The Apex Class is like below which has trycatch   public class updateCaseRecord {          @AuraEnabled     public static void updateCheck(String caseId){         String msg = '';         try         {         List<Case> records = [select id,Status from Case WHERE Id = :caseId];         for (Case record : records)         {             record.Status = 'Closed';         }         update records;          }         catch(DmlException e)              {                for (Integer i = 0; i < e.getNumDml(); i++) {                     msg =+ e.getDmlMessage(i) +  '\n' ;                     System.debug('getDmlFieldNames=' + e.getDmlFieldNames(i));                    System.debug('getDmlMessage=' + e.getDmlMessage(i));                   }                 throw new AuraHandledException(msg);             }             catch(Exception e)             {             throw new AuraHandledException(e.getMessage());             }             finally { }           }}   And I wrote my test class like   @IsTest public class updateCaseRecordTest { @IsTest static void testIsUpdateCheck() {      ID parentRecType = '012U0000000PqA9IAK';     ID csRecType     = '012U0000000QGv4IAG';       Account pa = new Account(Name='Test Parent Account', recordTypeId=parentRecType);     insert pa;      Account testAccount = new Account(Name='test', Industry='Biotech',Territory__c='EUR',BillingCity='Test',BillingCountry='Germany',ParentId=pa.id);     insert testAccount;       Contact c = new Contact(LastName='Test',LeadSource='Customer Service',AccountId=testAccount.Id);     insert c;      Case newCase1 = new Case();     newCase1.Subject = 'testStatusClosed';     newCase1.Status = 'New';     newCase1.Category__c = 'Inquiry';     newCase1.Sub_Category__c = 'Other';     newCase1.AccountId = testAccount.Id;     newCase1.ContactId = c.id;     newCase1.recordTypeId=csRecType;     insert newCase1;       Test.startTest(); try     {     updateCaseRecord.updateCheck(newCase1.Id);     List<Case> lCases = [SELECT Id,Status,OwnerId FROM Case WHERE Id =: newCase1.Id];     System.assertEquals('Closed', lCases[0].Status);      System.assertEquals(UserInfo.getUserId(), lCases[0].OwnerId);     }      catch(DMLException e) {         System.assertEquals(e.getMessage(), e.getMessage());     }      Test.stopTest();    }}   I thought I captured the try catch but when I run the test class it has only 57% code coverage and shows like below    Following one of the answers here


Suppose there are several journals with the same impact factor. Is it better to submit my papers to one of them or each time I finished a manuscript it is better to submit to an equally good journal that I have not published in yet.  I am early in my career and I already published two papers in the same journal and I am going to finish my third paper, which potentially can be published in the same journal as my previous two papers.

Suppose one works in field X, and has say two or three manuscripts ready for journal submission. Journal A is a good fit for all the manuscripts, but journals B and C would be appropriate as well.  All else being equal, is there any benefit in having papers in different journals? Does it hurt to have all of your papers, or say a substantial amount of them, in the same journal A? For example, would it be a good idea to submit one to journal A, and the other one to journal B?  I could think of someone saying "I read journals B and C, but not A", so in this sense spreading your research in different journals would make sense. But maybe this is not so typical to begin with.


When I run my program, it gave an error as usual. When I looked back at the code, I found the error a bit strange. I put print in the code to analyze a variable and I saw something that was total nonsense. Somehow a variable lost a value but in the code it doesn't change! I will share a sample code but same story here:  def f(a):     a.remove(1)     return a  list1 = [1, 2, 3] print(f(list1)) print(list1)   in the first print you would expect an output as:     [2,3]   and in second print you would expect:     [1,2,3]   as it didn't change in the main code. Well it turns out the output is like this:   [2, 3] [2, 3]    In my program, I went nuts trying to solve it. I debugged it and I saw that the variable changes in a function similar to f(). I thought that since in a function the program would run in scope level, it wouldn't influence a global variable like list1. So is this a bug in python or should I avoid using methods in functions?  By the way, I solved the problem by editing like:  def f(a):     x = list(a)     x.remove(1)     return x  list1 = [1,2,3] print(f(list1)) print(list1)   for some reason x=a wasn't enough so I used x=list(a)

I'm trying to understand Python's approach to variable scope. In this example, why is f() able to alter the value of x, as perceived within main(), but not the value of n?  def f(n, x):     n = 2     x.append(4)     print('In f():', n, x)  def main():     n = 1     x = [0,1,2,3]     print('Before:', n, x)     f(n, x)     print('After: ', n, x)  main()   Output:  Before: 1 [0, 1, 2, 3] In f(): 2 [0, 1, 2, 3, 4] After:  1 [0, 1, 2, 3, 4]


Hey I just installed Ubuntu on my Laptop to learn Linux. What are the possible ways I can master it.

I've just started using Lubuntu 13.10. It's the first time I've ever used Linux.  Can any of you send me a tutorial-video for new users or explain the basics to me?


My Stack Overflow page displays like following.   I have logged out and logged in and also closed the browser and reopened it but still no change:

I seem to have clicked on something that changed my display preferences. The main site is now very minimalistic, with fewer controls and different fonts.  I want to change it back, but where is it?


I traded in my iPhone 4s for a 5s. I did not have time to transfer my photos at the store. My iPhone 5s says my iCloud is full and that the pictures are from my old phone. How do i get these photos out of the cloud and onto my iMac?

I have an iCloud account with about 800 photos stored in iCloud Photo Library. I’m trying to move them to a Mac and delete them from iCloud in order to clear up space.  I tried to connect my Mac to iCloud Photo Library by going into the Photos app’s preferences; however it then asks me to upgrade to a paid iCloud storage tier because I have over 5GB worth of local images that Photos wants to sync to iCloud.  So I don't think using the Photos app is going to work for offloading pictures to a Mac.  I then logged in to the Photos app at iCloud.com. I was able to select and download individual images, but it won’t let me select more than one at a time, so I can’t download them all in bulk. Selecting the first image, holding down the ⇧ shift key, then selecting the last image causes only the last image to be selected.  I could click on all 800 images while holding the ⌘ cmd key, but that’s obviously very tedious.  What’s the most efficient way to download images from iCloud Photo Library to a Mac that can’t connect to iCloud Photo Library without upgrading to a paid plan?


I have the following requirement: There are N public/private RSA key pairs. The encrypted data must be decryptable by any of the private keys alone, but not by any other key. For encryption, the server knows and may utilize all the public keys for encryption if the scheme requires so. Does such a scheme exists?

I'm pretty sure I understand how public/private key cryptography works. Anybody can encrypt a message using a well-known public key, but only the person who holds the private key can decrypt it.  My question concerns securely sending a message to multiple people. Say there are n public/private key pairs. Is there a way to encrypt a message using the n public keys such that any one of the private key holders can decrypt the message in its entirety, but nobody else can?  Further, unrelated to public/private key cryptography, is there any scheme where there are n shared keys such that anybody who knows the n keys can encrypt a message such that any one of the shared keys can decrypt the message in its entirety, but nobody else can?


$\newcommand{\adj}{\operatorname{adj}}\newcommand{\rank}{\operatorname{rank}}$If $\adj(A)$ denotes the classical adjoint and we are given that, for an $n \times n$ matrix $A$ over $\mathbb{R}$,  $$\rank(\adj(A)) = \begin{cases} n& \rank(A)=n\\1& \rank(A)=n-1\\0& \rank(A)<n-1\end{cases}$$  show that for $n \geq 2$   $\det(\adj(A)) = \det(A)^{n-1};$ $\adj(\adj(A)) = \det(A)^{n-2}A.$     The first is easy, actually. If $\rank(A) = n$, $\adj(A)A = \det(A)I$; taking determinants of both sides easily yields the result; if $\rank(A) < n$, $\det(A) = 0 = \det(\adj(A))$.

$\newcommand{\adj}{\operatorname{adj}}$Let $A\in \mathbb{M}_n$ ($n \geq\ 2$) be a regular matrix and $\adj(A)$ its adjoint. Prove that if A is regular then $\adj(\adj(A)) = (\det A)^{n-2} A$ (where $adj(adj(A))$ is the adjoint of $\adj(A)$).  For now, I know, or think I do, that $A^{-1} = \adj(A)/\det(A)$  from where we can see that $\adj(A) = A^{-1} \det(A)$  And that's all I know


I want to stop a user account from logging in after a specified time. I know how to do this on Windows, but I can't seem to find an a way to do this on Linux.

Access to our computer (not only to the internet) needs to be restricted for the accounts of my kids (7, 8) until they are old enough to manage this by themselves. Until then we need to be able to define the following:   the hours of the day when computing is o.k. (e.g. 5 - 9 pm) the days of the week when computing is not o.k. (e.g. mondays to fridays) the amount of time allowed per day (e.g. 2 hours)   In 11.10 all of the following that used to do the job don't work any more:   : for > 11.10 no more available through the ppa. : command line alternative, but from 11.10 removed from the repositories. : Looks great but repeatedly crashes to force restarting X-server. So we can't use or recommed this program at the moment.   Are there any other alternatives?


I am trying to record the sound output on my mac. Like if there was a meeting going on and I want to record what other people are speaking. Is there a way I can do this without having to record my screen for it. I am using macOS Big Sur 11.3.

Is there a way to either pipe the sound output of the computer to a file or record what the computer puts out? I know I could use a headphone to microphone cord, but I was hoping for a more elegant solution. Google doesn't give very good results.


The question goes as follows: Given a family where the number of children is a random variable $(\mu=1.8, \sigma=0.36)$, if one selects a child randomly, what’s the expected number of siblings the child has?  I stumbled upon this problem while reading Sheldon Ross’s a first course to probability as I’m an undergrad in Physics, still early in my studies, just entered my 2nd year and I’m trying to get a grasp on probability.   Any guide towards the solution will be deeply appreciated.   Thanks for the help in advance, Cheers!

The number of children in a family is a random variable $X$, where    $ \mathbb E(X) = 1.8 $ and $Var(X) = 0.36 $. If we randomly choose a child, which is the expected number of its siblings?      (it is given that the answer $> 0.8$)   Let the number of a child's siblings be a random variable $Y$, so we are looking for $ \mathbb E(Y) $.  If found that,  $$ \mathbb E(Y) = \sum_{k=0}^{\infty}k \; \mathbb P(Y=k) = \sum_{k=0}^{\infty}k \; \mathbb P(X=k+1) = $$ $$ = \sum_{k=0}^{\infty}k \; \mathbb P(X=k)-\sum_{k=0}^{\infty}\mathbb P(X=k) +\mathbb P(X=0)= \mathbb E(X)-1+\mathbb P(X=0) $$ which is indeed greater than $0.8$, if  $\; \mathbb P(X=0)>0$.  But, I don't know how to make use of the variance to find the final answer.  Thank you in advance


My Japanese friend asked me if the following is true.   Mr. Smith (typical way of calling someone in a formal situation)  Mr. John (signifies that you have a very close relationship by using the first name instead of their last name)  Mr. Smith John (when you want to use the entire name no matter what)  For me, Mr. Smith John sounds more formal than Mr. Smith, and although Mr. John sounds less formal compared to Mr. Smith, I can't say it means the relationship is very close.   What does everyone think about this? Maybe I'm wrong?

If you have to send an email to someone acquaintance and you only know the first name, would you address him/her as Mr. John or Ms. Jane? The intention is to sound as formal as possible. So, no 'Hello John/Jane'


On my mac, switch to next window is mapped to CMD + ´. This is a pain when you're using a browser and your focus in on an input field or textarea etc., because when you hit that combo, instead of switching to the next window it types in a ´.   I know you can change keyboard shortcuts from System Preferences but there's no option to change switch to next window (atleast that i could think of).   There exists a tool called KeyRemap4MacBook which you can use to remap single keys. It might be able to also remap keyboard shortcuts but i'm not sure about it.   So, any ideas?

I often use the Cmd+Tab shortcut to switch between different applications (for example: Xcode and Google Chrome), but is there a shortcut to switch between different windows of the same application (for example, from one window in Google Chrome, to another)?


Ive gotten through University Physics by freedman et al and I realised i really enjoy the calculus problems in them which involve integrating infinitismal element (moment of inertia, charged rods, shell theorem, etc). Can anyone recommend a book that places heavy emphasis on such infinitismal element calculus?

What are some good books for learning the concepts of Kinematics, Newton laws, 2D Motion of Object etc.?


This big question leads to the next question. What happened to Harry's grandparents? Lily's parents and James's parents are both absent from the story and we never knew what happened to them. Most people just assume that they all died because why else would Dumbledore send Harry to live with those evil Dursleys? But this question just left me thinking...

You'd think that as soon as Harry met someone who was friends with his dad, he'd have asked about his family.  Certainly Lupin or Sirius could have told him something of his family, given that they were James' closest friends, and Sirius was "always welcome at the Potters".  Obviously there's nothing in the books, but did J.K. Rowling ever explain why there was no mention of any living relative other than Aunt Petunia, or even what happened to Harry's grandparents?


How can I upgrade to php 7.1 from php 7.0 in ubuntu 16.04 ?  If I do a php -v I get this message:  PHP 7.0.8-0ubuntu0.16.04.3 (cli) ( NTS ) Copyright (c) 1997-2016 The PHP Group Zend Engine v3.0.0, Copyright (c) 1998-2016 Zend Technologies     with Zend OPcache v7.0.8-0ubuntu0.16.04.3, Copyright (c) 1999-2016, by Zend Technologies

I am trying to update to install PHP 5.5, 5.6 or 7.0 in Ubuntu 12.04/14.04/16.04 LTS, and I can only get PHP 5.3.10 for Ubuntu 12.04, PHP 5.5.9 for Ubuntu 14.04 or PHP 7.0.4 for Ubuntu 16.04 using official repositories (using apt-get).  I'm not really sure how to do a manual update – as I need:   to play around with the new(est) PHP features to install older PHP version due support in the software


id="+strength.cat_id+","+strength.sub_cat_id+"   the id will be like this id=4,20   $("#weakTable").on('click', '.skillTestRemider', function () { var skillTetCatAndSubCat = $(this).attr('id');   in this variable, i have a string like this 4,20  in this 4 is a category and 20 is a subcategory.  I want to split up as diff variables like shown below. how can I do that..?  var cat = 4 var subcat = 20

I have this string  'john smith~123 Street~Apt 4~New York~NY~12345'   Using JavaScript, what is the fastest way to parse this into  var name = "john smith"; var street= "123 Street"; //etc...


Is there some webpage with a collection of thousands of theses of undergraduates, graduates, and PhD students from all kinds of sciences and where they are freely accessible like on ArXiv or (mostly) adsabs.harvard.edu?

Is there a global/worldwide database of dissertations? If not, how can I access French, German, Italian, etc. dissertations online?


We know that the Gravitational force at which earth attracts moon is also equal to the force in which moon attracts earth as the distance and the G and the masses are same then why can't we say that moon attracts the earth ?

While learning about motion of centre of mass, I came across this statement online,      It is also more accurate to say that the Earth and Moon together revolve about their common center of mass.    I am not able to understand this. Can anyone please explain this statement?


When I try to play H.265 encoded videos on VLC Player 2.2.1 (WeatherMax) on Ubuntu 14.04, I get the following error:  Codec not supported: VLC could not decode the format "hevc" (MPEG-H Part2/HEVC (H.265))   I can play the same videos using other tools like the standard Videos player on Ubuntu and MP4Client from GPAC. Is there any additional libraries or plugin to install for VLC to play H.265 videos?

I have seen that the new  shows off H.265/HEVC playback, the successor of H.264. I wonder how I may get this support in Linux. Is there a need to install a codec specific for this format? How?


How would that be possible, and would I be able to access them from anywhere?

I am developing my first 2D game in Unity and I have come across what seems an important question.  How do I handle data between scenes?  There seems to be different answers to this:   Someone mention using , while other people told me this should be used to store other things like screen brightness and so on. Someone told me that the best way was to make sure to write everything into a savegame everytime that I changed scenes, and to make sure that when the new scene loads, get the info from the savegame again. This seemed to me wasteful in performance. Was I wrong? The other solution, which is the one I have implemented so far is to have a global game object that isn't destroyed between scenes, handling all the data between scenes. So when the game starts, I load a Start Scene where this object is loaded. After this ends, it loads the first real game scene, usually a main menu.   This is my implementation:  using UnityEngine; using UnityEngine.UI; using System.Collections;  public class GameController : MonoBehaviour {      // Make global     public static GameController Instance {         get;         set;     }      void Awake () {         DontDestroyOnLoad (transform.gameObject);         Instance = this;     }      void Start() {         //Load first game scene (probably main menu)         Application.LoadLevel(2);     }      // Data persisted between scenes     public int exp = 0;     public int armor = 0;     public int weapon = 0;     //... }   This object can be handled on my other classes like this:  private GameController gameController = GameController.Instance;   While this has worked so far, it presents me with one big problem: If I want to load directly a scene, let's say for instance the final level of the game, I can't load it directly, since that scene does not contain this global game object.  Am I handling this problem the wrong way? Are there better practices for this kind of challenge? I would love to hear your opinions, thoughts and suggestions on this issue.  Thanks


Text of the problem: A rectangle is inscribed in a semicircle and the radius is 1. The bas of the rectangle is x. Write an expression for the rectangle perimeter and determine the value of x that gives the highest possible perimeter. Also,, what is the highest perimeter?  Trigonometry is not to be used.  My Attempt:

Consider this image:   A rectangle is inscribed in a semicircle and the radius is 1. The bas of the rectangle is x. Write an expression for the rectangle perimeter and determine the value of x that gives the highest possible perimeter. Also, what is the highest perimeter? Well... I fooled around with the unit circle, but still no progress. I've found several instructions on how to find the area, but no luck with perimeter.  I've been trying to solve this one for days now, I have completely giving upp solving it by my self. If someone could provide me with both answers & solutions, I would be happier than a child in a candy store :)  Could any kind soul help me out? :)  EDIT:   Please read new update:


I've recently developed a small visualforce component that displays any object's child's __History records.  I have to make tests with the @IsTest(SeeAllData=true) because I can't retrieve the historical records in the own test execution context (I imagine because they have not yet been inserted?).  Well, the problem I have encountered is that when deploying to a Production environment sometimes the tests don't pass because the data that my queries bring isn't consistent. But, I can't actually make them consistent because the field Field can't be used as a filter with LIKE operand and NewValue and OldValue can't be used as filters either.  Is there any way to make my tests more consistent when working with _History records?  Thanks

I have some code that relies on field history tracking by querying the History for a custom object. This works fine, but it appears that the history records aren't created during the test so none of my tests will pass.


The bosses all seem to spawn at regular intervals throughout the match, however I always forget to look at the times when they do spawn. Is there a set time that each boss spawns in a match, or a set time between spawns?

After playing Junkenstein's Revenge a few times, I've started to notice a pattern in the order of events. Reaper spawns, then Roadhog, then Junkrat, then Reaper again, then Reaper again, then Mercy. Do these events happen at specific marks on the timer? Or do they happen a certain time after the previous boss was defeated? Additionally, are the tire spawns also scripted, or are they random?


I have follwing questions regarding English  What are the interrogative forms of the following statements   Twenty third CHOGM was held in Sri lanka.(Interrogator needs to know the number)(Please compare (What was held in Sri Lanka ?)Do we have to use any word like when, how, why,... Sam came 2nd in the race.(Interrogator needs to know the number)   Thanks  UB

I want to make a question having an answer as follows:     5 is the third prime number.   The bold part is the answer. How to phrase the question?


My system reported a S.M.A.R.T. error on the drive few days ago, Warning: Immediately back-up your data and replace your.  I backed up my data, and then tried to see what is the problem, using HDD regenerator 1.71 I found 80 bad sector at the first 5 Gigabyte of my drive ( 640 GB ), but when I choose scan an repair once it reach the 1st bad sector after 872 MB, the program stuck and regenerating ... and counting all sectors as bad sectors !  Is there a way to fix these sectors ? I'm having another windows at the last 50 GB of my drive and it's working normally, can I just delete the 1st partition (Make the 1st 5 GB unallocated) ? [the 1st partition is 50 GB and the windows on it is working good but slow and delays]

I already have Windows XP, During installing Ubuntu(dual boot) the disk drive just stuck up at one place and doesn't seem to move ahead.. Is there a disk bad sector mark utility that just marks these sectors so that the disk doesn't seek them later. I tried running Seagate Seatools on the drive but both the short test and long test fail even before they start even chkdsk /f/r doesn't seem to work as the system locks up at stage four.


I wanted to post this in case anyone else is going through what I am experiencing. I haven't done a lot of artwork in the past few years. I was trying to get back into a grove. But, I found that I was trying to do these big projects that I would always stop shortly after starting. (I do 3D projects in SketchUp and also do a lot of pencil and pen drawing. I sometimes use Paint.Net. I have started to work with Inkscape. Many years ago I took some college classes on Photoshop, Illustrator and some other graphic programs. Having worked as a board artist and having done a lot of pen and ink drawing in the past before there were computers, I really thought the Pen tool was the coolest thing ever. I still enjoy using it. )  OK - So...I was trying to get back to doing some creative work. I found a Zentangle book in the library just by chance. I flipped through it and saw some nice ink work. I took it home and tried it out. It got me going again. I am pretty sure that it was because you work with a small space (3.5" x 3.5") and go through a sequence of steps to get going. And, that's what it did: It got me going. I was able to actually finish some Zentangle projects. I took photos of some designs and I'm planning on reworking them in Inkscape. I am also going to try to do some bigger works. The more I do the little squares, the more I see that ideas are coming to me more easily. I don't really copy the ideas in the books. But, I do flip through them and try to modify some of the basic ideas.

Most designers hit a roadblock at one time or another.   Few designers get those "dream" projects where they are allowed to create anything and everything they want. In most cases we all have to adhere to some restrictions.   After dealing with similar restrictions repeatedly, it becomes very easy to get mired down in how the design problems have been previously solved rather than finding new solutions.   I'm familiar with mood boards, idea books, and the like. However, these all seem to basically take the user down the same previously traveled paths.  What specific steps should one take in order to break out of current mindsets and expand horizons to look at a project in a fresh, inventive manner?  Is there a processes you use to conceptualize something in a new way?


Let $f(x)\in \mathbb{Z}[x]$ be a non constant polynomial with integer coefficients. Show that as $a$ varies over the integers, the set of divisors of $f(a)$ includes infinitely many primes...  To be frank, I have no idea where to start...   Trivial case is when constant term of $f(x)$ is zero.  In case of $f(x)=x(a_nx^n+\cdots+a_1)$  we have $p$ divides $f(p)$ for all primes $p$...  Other than this i have no idea...  Please give only hints..

Let $f \in \mathbb{Z}[x]$ be non constant. How to prove that exists infinitely many primes such $f$ have root in $\mathbb{Z/_{(p)}}$. I spent much time, but with no benefits.


How can I change behavior in Ubuntu 18.04.There is no title bar with tabs disappeared in Firefox. There is no title bar for any option only i have is a firefox drop down tab with option to quit.

I am using Ubuntu 18.04. I realize with GNOME, or its extensions, I can do things like hide the title bar. However, I want to hide the title bar and still see the windows management icons like on Mac OS and Windows.   Is this possible?


In a fragment I am trying to set up a list view. In onCreateView() :  mFindFriendsOptionsListView = (ListView) view.findViewById(R.id.find_friends_list_view); mFindFriendsOptionsAdapter = new FindFriendsOptionsAdapter(mFindFriendOptionIconIds, mFindFriendOptionTitles, mFindFriendOptionDescription); mFindFriendsOptionsListView.setAdapter(mFindFriendsOptionsAdapter);   Here is the xml for the list view:  <ListView         android:id="@+id/find_friends_options_list_view"         android:layout_width="match_parent"         android:layout_height="wrap_content"         android:layout_marginBottom="32dp"         android:layout_alignParentTop="true"         android:divider="#999999"         android:dividerHeight="1dp"/>   Here is the list element xml file:  <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"               xmlns:tools="http://schemas.android.com/tools"               android:layout_width="match_parent"               android:layout_height="wrap_content">      <LinearLayout         android:layout_width="match_parent"         android:layout_height="wrap_content"         android:orientation="horizontal">          <ImageView             android:layout_width="60dp"             android:layout_height="60dp"             android:id="@+id/option_icon_image_view"             android:layout_marginRight="16dp"             android:layout_marginEnd="16dp"             android:layout_marginStart="16dp"             android:layout_marginLeft="16dp"/>          <LinearLayout             android:layout_width="wrap_content"             android:layout_height="wrap_content"             android:orientation="vertical"             android:layout_gravity="center_vertical">              <TextView                 android:layout_width="wrap_content"                 android:layout_height="wrap_content"                 android:id="@+id/option_title_text_view"                 tools:text="Contacts"                 android:textSize="18sp"                 android:layout_marginBottom="6dp"/>              <TextView                 android:layout_width="wrap_content"                 android:layout_height="wrap_content"                 android:id="@+id/option_description_text_view"                 tools:text="Upload contacts to be your friends"                 android:textSize="14sp"/>         </LinearLayout>      </LinearLayout>      <ImageView         android:layout_width="20dp"         android:layout_height="20dp"         android:id="@+id/arrow_image_view"         android:layout_centerVertical="true"         android:layout_alignParentRight="true"         android:layout_alignParentEnd="true"         android:layout_marginRight="8dp"         android:layout_marginEnd="8dp" />  </RelativeLayout>   Here is the stacktrace:  java.lang.NullPointerException: Attempt to invoke virtual method 'void android.widget.ListView.setAdapter(android.widget.ListAdapter)' on a null object reference     at com.hb.birthpay.fragment.FindFriendFragment.onCreateView(FindFriendFragment.java:66)   I have debugged and the field mFindFriendOptionsListView is null even though I set it using findViewById(). Why is the ListView field null and how do I fix this so that I no longer get a java.lang.NullPointerException?

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


I was wondering if there's a better way of getting the index of a substring than this method: s = 'alphabet' for i in s:     print(s.index(i))  The problem of the s.index(i) function is that it's returning the first appearance of i, meaning that the second 'a' would return the index 0 (but it's actually 4).

How do I access the index in a for loop like the following?  ints = [8, 23, 45, 12, 78] for i in ints:     print('item #{} = {}'.format(???, i))   I want to get this output:  item #1 = 8 item #2 = 23 item #3 = 45 item #4 = 12 item #5 = 78   When I loop through it using a for loop, how do I access the loop index, from 1 to 5 in this case?


Can you add information without asking a question? For example, I found a Firefox addon that lets you see the generated source of a page, but I don't want to add it to an answered question. Can I just start a "question" to get this information out there?

Often you have a question, you can't find the answer on Stack Overflow so you search for it (or think a bit more). Having found the answer you'd like to keep a record so you can find it again later.  Before Stack Overflow I would write a blog post so I could search for it later. Jeff and Joel, I think, specifically said SO is a good place to replace these blog posts. So what is the best etiquette for adding your answer?   Just ask the question, then post your answer immediately and let voting sort the answers out. This is okay, but it looks like you are just trying to generate reputation, and other people often don't vote or answer, and a lot of the SO information is lost. Provide the answer in the question and ask the question phrased as "is there a better answer". This allows others to gain reputation, and doesn't look so greedy but makes your answer harder to vote on. Post your question, let others answer it. If no-one puts the answer you already found, then add it an hour or so later. If someone else gets it then accept their answer (or the best one). This is more selfless with reputation, but makes other people do work you have already done which feels a bit lazy and a waste of everyone's time.   Or maybe there is another way?


Browser information:  Google Chrome. I try it in two different computers, both with  Version 34.0.1847.116.  Steps to reproduce:  When you go to your user profile, then to the responses tab, then to comments,  and then you select the text of a comment it would look as the Image 1 shows.   Site information:  I have only test it on Stackoverflow.com The URL would be something like this:  http://stackoverflow.com/users/<user-id-here>?tab=responses&sort=comments    Image1:

This is a very minor bug I know, but in anyone's profile page, on the Activity or Responses tab, text highlighting is messed up for the Comment and All subcategories. This only seems to happen only in Chrome. I am on Version 31.0.1650.63 (Win 7). It is visibly worse on multiple lines of text.     Steps to repro:   Go to any profile on any Stack Exchange site, and click on Activity tab. Go to All or Comment subcategories. Highlight text.   As a side effect, you can even temporarily dismember the head of all those poor characters. To do this, start from any line, drag mouse left or right, drag up and then back down.    I've bumped into bugs before that turned out to be Chrome problems, so maybe this is just Chrome doing its magic.


$ sudo add-apt-repository ppa:qucs [sudo] password for hsthakar:  Cannot add PPA: 'ppa:~qucs/ubuntu/ppa'. ERROR: '~qucs' user or team does not exist.  $ sudo apt-get install qucs Reading package lists... Done Building dependency tree        Reading state information... Done Package qucs is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source  E: Package 'qucs' has no installation candidate

Cannot add PPA: 'ppa:~darklin20/ubuntu/bomi'.     ERROR: '~darklin20' user or team does not exist.   Showing this message when suing this command:    sudo add-apt-repository ppa:darklin20/bomi   please help me.


Apologies for the rather ambiguous title, but I couldn't think of a better way to put it. In Python, I can initialize empty lists or other variables like:  >>> a, b, c = [[]] * 3 >>> d, e, f = [0] * 3   I noticed that if I initialize the empty lists like this, then they are all connected so when I do:  >>> a.append(3)   The element 3 is also appended to lists b and c.  What is the reason for this behavior? Also, what is this style of initialization called? Thanks.

I needed to create a list of lists in Python, so I typed the following: my_list = [[1] * 4] * 3  The list looked like this: [[1, 1, 1, 1], [1, 1, 1, 1], [1, 1, 1, 1]]    Then I changed one of the innermost values: my_list[0][0] = 5  Now my list looks like this: [[5, 1, 1, 1], [5, 1, 1, 1], [5, 1, 1, 1]]    which is not what I wanted or expected. Can someone please explain what's going on, and how to get around it?


Does lens pen actually work and solve the purpose for removing dust or finger print from lens?  How about the longevity of these pens?

I just got one of these for the first time, a lot of threads on here recommend them and they seem like a great idea. Bought a Nikon one from amazon for $8 and while I really like the brush it seems like the cleaner tool isn't really working.  I have a brand new lens that I used for a few days and after wiping off the dust I wanted to remove a little spec of water that had dried on it. When I use the cleaning tip end it didn't really do anything, so I fogged it up by breathing on the lens, still not much result but better. It seems like I was just using a micro fiber cloth without any cleaning solution. I tried breathing on it again and accidentally touched it with my lip (hehe) so now I had a larger mark to remove.   I kept using the cleaning pen, putting it into the cap and twisting to get the cleaning compound, and in the end I feel like it required way to much rubbing to get clean. And still when I look at in under a light at the right angle there are still spots where it seems the smudges were thinned out and wiped around until you couldn't see them anymore.  I also tried it some on my camera's LCD screen that had some big oily fingerprints and it was definitely just moving and spreading the prints around.  Should I be thrilled by this pen and see it remove fingerprints fairly effortlessly?


So, we have that for particles in a central potential, the wavefunction can be expressed as: $$\psi(\mathbf{x})=R(r)Y^m_l(\theta,\phi)$$  Explanation (not crucial in the question):      $Y^m_l(\theta,\phi)$ are spherical harmonics (functions associated to the eigenvalues of the orbital angular momentum $\mathbf{L}^2$ and one of the components of $\mathbf{L}$). And $u(r)=rR(r)$ satisfy the following form Schrödinger equation: $$Eu(r)=-\frac{\hbar^2}{2\mu}\frac{d^2u(r)}{dr^2}+\left[V(r)+\frac{l(l+1)\hbar^2}{2\mu r^2}\right]u(r)$$ Source: Weinberg, S. (2015). Lectures on Quantum Mechanics. Cambridge: Cambridge University Press. doi:10.1017/CBO9781316276105   My question is:     In this case what is the dimensionality of the space $\mathcal{H}$ of the solutions?   On the one hand, the solutions in the particular case of the Hydrogen atom are products of Laguerre polynomials and Spherical Harmonics, which can be identified using the quantum numbers $n, l, m$, thus the states are linear combinations of $\varphi^m_{n,l}$, a countable set:$$\psi=\sum_{n,l,m}C_{n,l,m}\varphi^m_{n,l}$$  On the other hand, as functions, the $\psi(\mathbf{x})$ can be thought of as linear combinations of the position basis $\delta(\mathbf{x})$, since there are as many $\delta(\mathbf{x})$ as there are $\mathbf{x}\in \mathbb{R}^3$, this set is uncountable: $$\psi=\int_{\mathbb{R}^3}d\mathbf{x}\:C(\mathbf{x})\delta(\mathbf{x})$$  This baffles me since on the one hand we have that the basis is countable ($\aleph_0$-dimensional) and on the other the basis appears to be uncountable ($\aleph_1$-dimensional*). Clearly they can't both be right.  *assuming that the continuum hypothesis holds.

Hm, this just occurred to me while answering another question:   If I write the Hamiltonian for a harmonic oscillator as $$H = \frac{p^2}{2m} + \frac{1}{2} m \omega^2 x^2$$ then wouldn't one set of possible basis states be the set of $\delta$-functions  $\psi_x = \delta(x)$, and that indicates that the size of my Hilbert space is that of $\mathbb{R}$.  On the other hand, we all know that we can diagonalize $H$ by going to the occupation number states, so the Hilbert space would be $|n\rangle, n \in \mathbb{N}_0$, so now the size of my Hilbert space is that of $\mathbb{N}$ instead.  Clearly they can't both be right, so where is the flaw in my logic?


how i can put an image over image? for e.g. a social image over header image.  code:

      i want to put it on the top-left.. any idea? background-image is a wrong idea, because my silder script uses divs and images..

I'm a beginner at rails programming, attempting to show many images on a page.  Some images are to lay on top of others.  To make it simple, say I want a blue square, with a red square in the upper right corner of the blue square (but not tight in the corner).  I am trying to avoid compositing (with ImageMagick and similar) due to performance issues.  I just want to position overlapping images relative to one another.  As a more difficult example, imagine an odometer placed inside a larger image.  For six digits, I would need to composite a million different images, or do it all on the fly, where all that is needed is to place the six images on top of the other one.


I would like to execute a command which produces text, but not have that text visible anywhere inside the document. Can we put the command inside a box, which clips other text, such as in the middle of the page? Normally, this would look ugly (a box text rendered on top of other text). Can we make the text invisible? That is, have a box smack dab in the middle of the page full of invisible text? Or what if we place the box of text outside of the page margins. That way, the text will be there, but not visible?

The following code works, although I have a feeling my \settowidth method of discarding the output is not how it should be done:  \documentclass{article} \newlength{\trashlength} \long\def\ignoreoutput#1{%  \settowidth{\trashlength}{#1}% } \long\def\command#1{  This \gdef\stuff{Stored: #1} shouldn't be here. } %% Should not raise Missing \begin{document} error here: %\ignoreoutput{\command} \begin{document}  % Should produce "nothing":  no\ignoreoutput{\command{Side %\par %%%%% this breaks everything.    effect!}}thing.   % Should output the text previously stored:  \ifx\stuff\undefined No side effect.  \else \stuff \fi \end{document}  When uncommenting the \par though, it breaks: with Paragraph ended before \@settodim was complete.  So how do I ignore commands that allow long input?


I am trying to forecast a very typical sales data. I have tried Arima, ETS, Holtwinters and even neural networks but I can't get a model with more than 40% accuracy [Absolute sum of(forecast-Actual)/Sum of Actual]. Can anyone suggest me how to proceed?  Here is the data

Imagine a standard machine-learning scenario:     You are confronted with a large multivariate dataset and you have a   pretty blurry understanding of it. What you need to do is to make   predictions about some variable based on what you have. As usual, you   clean the data, look at descriptive statistics, run some models,   cross-validate them etc., but after several attempts, going back and   forth and trying multiple models nothing seems to work and your   results are miserable. You can spend hours, days, or weeks on such a   problem...   The question is: when to stop? How do you know that your data actually is hopeless and all the fancy models wouldn't do you any more good than predicting the average outcome for all cases or some other trivial solution?  Of course, this is a forecastability issue, but as far as I know, it is hard to assess forecastability for multivariate data before trying something on it. Or am I wrong?   Disclaimer: this question was inspired by this one  that did not attract much attention. It would be nice to have detailed answer to such question for reference.


So, for a projective variety $X$ over, say, an algebraically closed field $\Bbbk$, being normal implies being regular in codimension one. However, the converse is not true, in addition you require an extension property. I am looking for an example of an $X$ which is regular in codimension one, but not normal.  By common lore, this can not be a curve or a surface in $\Bbb P^3$. I was hoping that maybe there is an example of a surface in $\Bbb P^4$. Beating around the bush less: I would like a small and explicit example if possible.

I am looking for an isolated non-normal singularity on an algebraic surface. One obvious example occurs to me: the union of two $2$-dimensional affine subspaces of $\mathbb{A}^4$ which meet in a point. But this seems like "cheating." Can someone provide an irreducible example?


Using integrals prove that if $\mu(X) = 1$, and $E_1, \dots, E_n$ are measurable such that $\mu(E_1) + \dots + \mu(E_n) > n - 1$, then $E_1 \cap \dots \cap E_n \neq \emptyset$.  I did a similar proof but without integrals:  If $\mu(A) + \mu(B) > 1$ and $\mu(X) = 1$ then $A \cap B$ can not be empty, because if it were, we'd have $\mu(A) + \mu(B) > 1 = \mu(X)$, but since $A \cup B \subset X$ then $\mu(A \cup B) = \mu(A) + \mu(B) - \mu(A \cup B) < 1 = \mu(X)$ which gives a contradiction.   I know that integral over a set $E \in \mathcal{F}$ such that $\mu(E) = 0$ is 0, but that leads me nowhere.

Question: Let $E_1,E_2,...,E_n$ be measurable subsets of $[0,1]$ with $$ \sum_{k=1}^n m(E_k)  > n-1.$$ Prove that $\bigcap_{k=1}^n E_k$ has positive measure.  This is one of the questions in graduate analysis past year paper. I think we need to assume that the intersection $\bigcap_{k=1}^n E_k$ is nonempty. Otherwise, the question is false. Anyway, let's assume that $\bigcap_{k=1}^n E_k \neq \emptyset.$ If $n=2,$ by inclusion-exclusion principle and assumption, $$m(E_1\cup E_2) + m(E_1 \cap E_2) = m(E_1) + m(E_2) > 2.$$ Since $E_1,E_2 \subseteq [0,1],$ by monotonicity of Lebesgue measure, $$m(E_1) \leq 1, m(E_2) \leq 1.$$ By finite subadditivity of Lebesgue measure, $$m(E_1 \cup E_2) \leq m(E_1) + m(E_2) \leq 2.$$ Hence, $$m(E_1 \cap E_2) > 2 - m(E_1 \cup E_2) \geq 0$$ Therefore, the intersection $\bigcap_{k=1}^n E_k$ has positive measure for $n=2.$ I try prove the general $n$ using induction, but it seems a bit long. Does there exist an efficient method to solve the question? EDIT: Actually I am looking for a direct proof instead of indirect proof or inductive proof. If a direct proof is not possible, then I will accept Marios's answer.


Whenever I open the portfolio page in Chrome of my website chrome throws the deceptive site ahead error.  Why am I getting this? It's not a phishing webpage.  IEEE-PESCE gallery page:  http://ieeepesce.com/portfolio.html

My site is: . It's build using Wordpress.  My lastest Post is: , after making this post for the last 5 days I'm getting The site ahead contains harmful programs problem.  Because of this I'm getting low traffic.  How do I resolve this issue?  But main site working fine.


I wonder how I can move items/folders using keyboard instead of drag and drop. Like sometimes I'm opening a folder and there is an item in it which I want to move it to another location but I don't want to open another finder window and drag and drop. I'm using macOS Sierra

My trackpad is broken so I can tap-to-click but i cannot drag and drop. This is really a problem when it comes to doing certain things.   Does anyone know how to program a sticky key to turn a click into a click-select that can then be dragged about?   I can't resize my browser or open window and I can't drag applications into the folder when installing etc.  free solutions only please.  A mid 2009 macbook-pro 13". 2.53 Ghz Intel Core 2 Due.   Running os lion (grudgingly).


Declaration inside bmd2fileio.h  class bmd2File {   public:     template <typename T>     void write(const T & t) const throw (bmd2Exception);   Definition inside bmd2fileio.cpp  #include "bmd2fileio.h"  ...  template <typename T> void bmd2File::write(const T & t) const throw (bmd2Exception) {   #ifdef _WIN32      LPDWORD lpNumberOfBytesWritten;     bool written = WriteFile(this->handle,                               t,                               sizeof(T),                               lpNumberOfBytesWritten,                               0);      if (!written)     {       printf("Not written.");     } else {       printf("Written.");     }    #else    #endif  }   The (failed) call inside main.cpp:  #include "bmd2fileio.h"  ...  const std::string data = "meow";  std::auto_ptr<bmd2File> myBmdFile(new bmd2File(fileName));  myBmdFile->write(data);   It won't link with the following error:  undefined reference to `bmd2File::write(std::string const&) const'   I thought that  would resolve to std::string such that the linker would find my function just fine... but not the case.  Doh!

Quote from :     The only portable way of using templates at the moment is to implement them in header files by using inline functions.   Why is this?  (Clarification: header files are not the only portable solution. But they are the most convenient portable solution.)


im using Alcatel Onetouch T10, i am interested in changing my OS to ubuntu. i find it so interesting, i just dont knnow how. hope you can help me.  my tab specs as folows:  Operating System: Android 4.0.3 Ice Cream Sandwich Application Processor: Rockchip RK2918 CPU: 1GHz Cortex A8 System Memory: 1 GB DDR3 Storage Capacity: 4 GB NAND Flash Wi-Fi: 802.11 b/g/n Audio & Video Play: Built-in audio chip, 1080P HD playback External Interface: Micro USB, Micro SD Battery: 3000 mAh, 3.7V Lithium Camera: Front camera 0.3Mpixel

With the announcement of the Ubuntu Phone OS I'd like to know what phone (and tablet) models are supported at this time.  Note from foss & Oli: We are making this the master question for all future "Will this work on <insert random tablet/phone/device here>?!" questions


I know that how to proof that the interval [a,b] is connected. But how to proof that a set A⊂ℝ is connected iff it is an interval.

As the topic, prove that Intervals are connected and only connected  in $\mathbb{R}$. I know what is the definition of connected set. But not sure how to prove that.


I'm about to start a campaign and I wish to play an Eldritch Knight/Wizard multiclass. I've read the chapter 6 part for spellcasting:     You determine    what spells you know and can    prepare for each class   individually, as if you were a   single-classed m em ber of    that class. If you are a ranger   4/w izard 3, for example,    you know three 1st-level ranger   spells based on your    levels in the ranger class.   Now, since in that peculiar case the spells are from the same spellcasting class (the wizard), can I learn spells of higher level, for which I have spell slots, even if my single class level could not permit it? For example: if I'm an EK-7/Wizard-3 (so with 4th level spell slots) can I learn 4th level spells?

If I multiclass into 2 or more classes/subclasses that can cast spells, how do I determine what spells I know or can prepare?  For instance, if I am playing a multiclassed character with 1 level in warlock, 2 levels in bard, and 3 levels in paladin, how do I determine which spells I know/have prepared?    Related:


If you have an html document that goes like this:

    and I give the "top" div a height of 40px, is there a way to give "rest" div the rest of the height of the body in css. I know it's possible in Javascript like this  function derest(){ var bodyheight = window.getComputedStyle(document.getElementsByTagName('body')[0], null).height;  bodyheight = bodyheight.substring(0, bodyheight.length - 2);  var topheight = window.getComputedStyle(document.getElementById('top'), null).height;  topheight = topheight.substring(0, topheight.length - 2);  restheight = bodyheight - topheight;  document.getElementById("rest").style.height = restheight;  }   but this takes a lot of time, so is there a better way to do this?

I am working on a web application where I want the content to fill the height of the entire screen.  The page has a header, which contains a logo, and account information. This could be an arbitrary height. I want the content div to fill the rest of the page to the bottom.  I have a header div and a content div. At the moment I am using a table for the layout like so:  CSS and HTML    #page {     height: 100%; width: 100% }  #tdcontent {     height: 100%; }  #content {     overflow: auto; /* or overflow: hidden; */ }

...

...

     The entire height of the page is filled, and no scrolling is required.  For anything inside the content div, setting top: 0; will put it right underneath the header. Sometimes the content will be a real table, with its height set to 100%. Putting header inside content will not allow this to work.  Is there a way to achieve the same effect without using the table?  Update:  Elements inside the content div will have heights set to percentages as well. So something at 100% inside the div will fill it to the bottom. As will two elements at 50%.  Update 2:  For instance, if the header takes up 20% of the screen's height, a table specified at 50% inside #content would take up 40% of the screen space. So far, wrapping the entire thing in a table is the only thing that works.


Let $f: [0,1] \rightarrow \mathbb R^2$ be of class $C^1$ with $f'(t)\neq (0,0)$. Why can't $f$ be a Peano-type curve, i.e. $f(I) \neq I\times I$?

I was asked this question recently in an interview. Why can't there be a a continuously differentiable map $f \colon I \to I \times I$, which is also surjective? In contrast to just continuous, where we have examples of space filling curves.  I have one proof which is direct via Sard's theorem. But the statement seems simple enough to have a proof using at most implicit (and inverse) function theorem.


What's the word for when I present a graph to support my point but it refutes it? I guess its shooting myself in the foot. But I want a better term.

Is there a witty turn of phrase that indicates one's performing an act that, in its doing, undermines, contravenes, or obviates itself?    relates to a similar idea, but I have it in my mind that there is a saying that describes this state of affairs. "Cutting off one's nose to spite one's face" is not quite what I'm going for because the act of cutting off the nose doesn't negate itself. I'm thinking more of a line speaking about someone who breaks the speed limit on his way to defend himself in traffic court, or wiping off a table with a dirty sponge.


I  have a coding question and I want to paste the code that I have written into my question.  I have seen several examples of such formatting, but I can't find how do I manage to do the same and there doesn't seem to be any answered questions like mine.   Problem:  Can't paste code into stack exchange and have it look like code in a code editor

How do I post text so that it is formatted as code?  What do I need to do so that my code shows up properly — not escaped or removed — when posted? And how to get the correct syntax highlighting?     For more information, see "" in the .


Given a completely black and white picture (so the only colors are black or white no shades of grays), there are a lot of different sizes circles on it (in black), what is a fast way to find the center coordinate of the circles and the sizes of the circles and store them as a Dictionary entry? When I mean fast I mean by if I were to call this circle finding function 10 or 20 times per second it wouldn't lag too much. Also I did some researching and found out that I could find the center of a circle or radius by taking three points on the circle, can that help?

I'm looking for a Java library for circle recognition in a supplied bitmap. My Java knowledge is too basic to implement eg. Hough transform efficiently (Java newbie).  Thanks!


I downloaded VirtualBox onto my Windows 7 machine after which I successfully downloaded Ubuntu v 14, which I updated to v.15. However, I find that Ubuntu runs very very slowly and that the @ sign does not seem to be recognized. Do I have to pay a yearly subscription to get Ubuntu to work optimally? If so to whom?

I'm using currently Ubuntu 12.04 LTS as a host machine, and I've virtualized three machines:   a Xubuntu 12.04 guest a Windows 7 guest a Ubuntu 12.10 guest   All the guests have the same VirtualBox default settings, but Ubuntu 12.10 is slower!  The installation took 1h 40 min! (Normally, it takes 40 minutes.) Now it is impossible to use it, and all operations are very, very slow.  I'm using VirtualBox version 4.2.4.  Any ideas?  Why is it slow? And how can I make it faster?


In my document, if I give last column (setted in para mode) as raggedright setting, then LaTeX produces some error, the code is follows:  \documentclass{book} \usepackage{array,rotating}  \begin{document}  \begin{table}[] \caption{Similarities/Differences Between Venture Capital and Angel Investing\label{tab1}} {\begin{tabular}{@{}p{9pc}>{\raggedright}p{16pc} >{\raggedright}p{16pc}@{}} \hline & {Venture Capital} & {Angel Investing} \\ \hline {Stage of Investment} & Invest in early growth and established companies that have typically have previously received founder, friends and family investment as well as angle investment. & Invest in seed and start-up companies that have previously received founder, friends, and family investment. \\ \hline \end{tabular}}{} \end{table}  \end{document}   Please suggest what went wrong and how to fix it.

I would like to create a table with some columns' width specified, while the text in those columns should be centered both horizontally and vertically. I found out that  \usepackage{array} \begin{tabular}{| c | c | m{5cm} |}   vertically centers the text in the last column, but justifies it horizontally (like text in normal paragraphs).  Update: With Jake's method, it seems both \\ and \hline cause an error. How to fix it?


I want to manually set my resolv.conf and have Ubuntu not automatically change it later.  How do I get Ubuntu to stop modifying resolv.conf?  I have already set "Automatic (DHCP) addresses only" in the network settings.

I have a Lenovo X200 laptop on which I am running Ubuntu 9.10. Recently, (I assume after some updating, but I really don't know) my ethernet port stopped working under Linux. A more tech/linux-savvy friend of mine was able to temporarily fix the problem by manually editing the resolv.conf file with the DNS servers he found through his connection. However, after rebooting, the problem came back and now I am looking for a more permanent solution.


Why is it that, when I use parseInt explicitly with the first argument, everything works as I expect, but with I straight up supply the parseInt function to map, it becomes like you can see in the picture?  I've read up a little bit on the second radix-argument of parseInt, and I suppose it has something to do with that. But I still don't understand what JS internally supplies to the parseInt function as the second argument when I don't explicitly do it myself. Does anyone know?

From the :  [1,4,9].map(Math.sqrt)   will yield:  [1,2,3]   Why then does this:  ['1','2','3'].map(parseInt)   yield this:  [1, NaN, NaN]   I have tested in Firefox 3.0.1 and Chrome 0.3 and just as a disclaimer, I know this is not cross-browser functionality (no IE).  I found out that the following will accomplish the desired effect. However, it still doesn’t explain the errant behavior of parseInt.  ['1','2','3'].map(function(i){return +i;}) // returns [1,2,3]


If each $a_n >0$ and $\sum a_n$ diverges, prove that $\sum a_n x^n \to +\infty$ as $x\to1^-$.  I found this question in Apostol. It can be compared to a result of Abel's theorem. What is the intuition behind this problem and how to solve this?  I saw this question in math stack exchange also:    but I did not understand its solution.So I am looking for an intuition behind this problem.  Can someone provide me with a better solution for the same problem?

Exericise 9.36: If each $a_n >0$ and $\sum a_n$ diverges, prove that $\sum a_n x^n \to +\infty$ as $x\to1^-$. (Assuming $\sum a_n x^n$ converges for $|x|<1$.   Here's what I tried:  Since $\sum a_n$ diverges, for $M>0$, $\exists N$ such that $\sum_{k=0}^N a_k >M.$ I want to show that for $M>0$, there exists $\delta$ such that, whenever $\delta<x<1$ implies that there exists $p$ such that $\sum_{k=0}^p a_k>M$.  I was reading  and I don't get how the "then by continuity" part implies (**) part. Could someone explain? Thanks!


if I will push brick in space like drawn on first picture, is it will fly to same direction? If so, if I have brick with weight 1kg, and I gave impulse with (1kg * 1m/s) * 1s, should I just move force vector to it centroid? Or I should somehow reduce it for rotation?  Also, if I will push same brick as drawn on second image, should I move force vector to centroid? Or it movement direction will be same as on first image?

If I push or hit an object in space (vacuum and no gravitation) in direction what is not going trough its centroid, will it rotate or move along in straight line?   I expect that on earth it will depend on what is less difficult for the object (rotation or linear movement). So the object will do some kind of combination of both movements (rotating and also moving along the direction of impulse or force).  But how could an object "decide" what to do in space, where is not resistance?


If $\gcd(a,b)=1$, $\gcd(a,y)=1$ and $\gcd(b,x)=1$ then prove that $ax+by$ is prime to $ab$.  I tried assuming Diophantine Equations for all the relations and representing everything in terms of $a$, but that didn't lead me anywhere. There must be an intuitive and elegant approach right?

I don't really know how to prove this, i suppose it must have something to do with the definition of greatest common divisor and Bézout's identity.  I looked at some other questions here and thought that i had to get to gcd(ma+nb,mn)=1 and that gcd(a,n)gcd(b,m)=1 too, but i'm not sure.


Let $S$ be a linearly independent subset of a finite dimensional space $V$.  Let $S_1 \subset S$, then prove that $S_1$ is linearly independent.   I have looked all through my textbook, but I have no idea how to solve this proof, or for that matter, even where to start.

Is the above statement true? If I have already proven that the set is linearly independent, is it automatically given that the subset is also linearly independent? If so, how would I go about showing that as a proof.


I am working through Griffith, and was confused by some of the restrictions he imposed on the potentials in introducing the Coulomb and Lorenz gauge.   It is easy to see that adding some arbitrary gradient field $\nabla\lambda$ to the vector potential and subtracting the derivative $\frac{\partial\lambda}{\partial t}$ from the scalar potential will not change the electric and magnetic fields. But following this introduction, he fixes the value of the divergence of A, not A itself, assuming at least without proof that there always exists a gradient field such that $\nabla\cdot\left(A+\nabla\lambda\right) = 0$. Is this always true? And furthermore, he never adds that $\nabla\lambda$ to any of the other occurrences of the vector potential in the equation, nor does he subtract the time derivative of the field from the scalar potential. If we're using the equation  $$\left(\nabla^2A -\mu_0\epsilon_0\frac{\partial^2 A}{\partial t^2}\right)-\nabla\left(\nabla\cdot A + \mu_0\epsilon_0\frac{\partial V}{\partial t}\right)=-\mu_0 J$$  To calculate the value of the vector potential, doesn't changing the value of A and the time dependence of V matter? Why are we not forced to solve for lambda?

If $B$ is magnetic field and $E$ electric Field, then $$B=\nabla\times A,$$ $$E= -\nabla V+\frac{\partial A}{\partial t}.$$ There is Gauge invariance for the transformation $$A'\rightarrow A+{\nabla L}$$ $$V'\rightarrow V-\frac{dL}{dt}.$$ Now, we can write:   (CG): the choice of a $L$ that implies $\nabla\cdot A=0$.   (LG): the choice of a $L$ that implies $\nabla \cdot A - \frac{1}{c^2} \frac{\partial V}{\partial t}=0$.   Now, I'm trying to mathematically prove that it's always possible to find such an $L$ satisfiying $CG$ or $LG$.


I wrote a code but it produces incorrect results!  Var   a,d:double;   c:currency;   b:integer; begin  b:=10;  c:=20.1;  a:=30.1;  d:=0;   d:=a-b-c;   Memo1.Lines.Add('a => '+FloatToStr(a));  Memo1.Lines.Add('b => '+FloatToStr(b));  Memo1.Lines.Add('c => '+FloatToStr(c));  Memo1.Lines.Add('d => '+FloatToStr(d)) end;   Result:  a => 30.1 b => 10 c => 20.1 d => 1.4210854715202E-15   Results should be ZERO! Is this compiler type convertion error?   Is there a way or another?!!

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


I am transferring from 8.10 to 10.10. I was wondering what is the difference between Ubuntu Software Centre and Synaptic Package Manager in 10.10? For what kinds of things do I need to go which?   Thanks!

What are the differences between apt-get, aptitude, and synaptic, and which one is the recommended choice for normal day-to-day package management?  This is a basic question, but I think it'd be good information to have on the site, and besides I am relatively new to Ubuntu so I could use an expert explanation.


In the following code a string is created in pool and then it is concat creating there additional string object. The final is "2cfalse" and is referred by a. Then in line 7, because of Strings' non-repeating nature, I think it does not create separate literal as "2cfalse" so the == operator must return true .. Why its not returning true..  class demo {     public static void main(String aaa[]) {         String a = "";         a += 2;         a += 'c';         a += false;         if (a == "2cfalse")             System.out.println(1);         if (a.equals("2cfalse"))             System.out.println(2);     } }

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


I wonder who lives outside of Middle-earth and what is their life like? What are the names of the continents? Is there a big good map of Arda?

There are a number of times in Lord of the Rings where the "east" is mentioned -- the pirate ships, the slave-driven farms. And of course all of the peoples subservient to Sauron who come to fight Gondor and the West. Are there any maps of the East of Middle-earth, and what is out there?


Lets be the following code:  int x; int *p = &x; int t[3];   Then sizeof returns:  sizeof(x) -> 4 sizeof(p) -> 8 sizeof(t) -> 12   I suppose that sizeof(t) is the result of 3 * sizeof(int). But as t is a pointer to his first element, its size should be sizeof(p).  Why sizeof(t) returns the size of the memory block which represents the array ?  Thanks.

First off, here is some code:  int main()  {     int days[] = {1,2,3,4,5};     int *ptr = days;     printf("%u\n", sizeof(days));     printf("%u\n", sizeof(ptr));      return 0; }   Is there a way to find out the size of the array that ptr is pointing to (instead of just giving its size, which is four bytes on a 32-bit system)?


I have noticed that my daily limit of flags. On the attached picture it says "66 remaining flags" but it was much less several of weeks ago (about 40+ or 50+)    Is is a feature (with amount of helpful flag growth, the flag daily limit grows ) or were there any limit changes on SO recently?  Update: That question has been answered here:

Looks like flagging has been affected by releases today. Are these intended effects?   Higher daily limits (appear doubled for me, flagging of posts limit also doubled).  Explained by Shog9 below. Soft comment deletion  - e.g. for "accept rate" obsolete comments - it does in fact work, but the immediate feedback is gone.  This is fixed now. Has the throttling rate changed?  Seems possible to repeated flag without waiting 5 seconds.  If it was broken, it isn't anymore. Old soft deletions that were neither categorised as "helpful" or "declined" have all become "helpful".   If limits have been updated, can we get the new formula published? Not changed, as confirmed by Shog9.


I want to update my Ubuntu version. but how I can update it?

I am currently using Ubuntu 10.04. I know there is a 10.10 release, but can I upgrade directly to 11.04? Could you walk me through the steps please?


I have installed IDM through wine. But cannot integrate it to chrome or firefox. I want the feature like popping up the download menu on websites like youtube and other video websites. To be specific I would like to use IDM as same as in Windows, Can anyone help me? Or please suggest any alternatives that has the features like IDM.  Thanks in advance

I want to use Internet Download Manager for downloading on Firefox. According to this  it can be done with the extension called Flashgot. But Flashgot does not work on new Firefox Quantum. However, I found  that can be used to interrupt browser's downloading jobs by redirecting these jobs to an external download manager like Internet Download Manager (IDM). But I don't know how to integrate IDM with this new extension. I wrote IDM's location (/.wine/drive_c/Program Files (x86)/Internet Download Manager/IDMan.exe) in the box that says "Path to the executable" but when I try to download something, an error is appearing.     The preference page of the extension        The error that is appearing while trying to download files     How can I make it work? Thanks beforehand!


I used YUMI to make a bootable USB stick and I used both 12.04 and 13.10 iso files. On booting my laptop, it displays the YUMI image and asks for the kernel image of my choice. When I choose 12.04 or 13.10, it says   Boot:    and after this there is no progress. What should I do?

I am trying to boot Ubuntu on my computer.  When I boot Ubuntu, it boots to a black screen.  How can I fix this? Table of Contents:


I have been thinking about a way to hinder DDos (Distributed Denial of Service) attacks (which seems to be a hot topic at the moment) by placing a signed Java Applet on the web site. This Java Applet should function as a web server so people viewing a web site could utilize their bandwidth to help others access the same web site. The Java Applet should not be included on the front page, but only if you clicked on a link like: "Help us against DDos attacks". Of course the first web page to get distributed to the web server, would be the front page, and just doing this should alleviate a lot. There are a lot of issues with this, which I simply lack the knowledge to solve.   Could this be utilized to help against DDos attacks? Would it be possible to do this in such a way that one can guarantee that the content that the distributed web servers sends out is the actual content of the page?    The distributed web servers could communicate with eachother, so they could organize themselves in hierarchies according to bandwidth etc.   There would need to be a central server to decide what content to present and which servers to utilize, but maybe it could be configured on only communicate with the Java applets so it would only accept incoming connections from certain IP addresses or something like that?  I believe that lots of people would keep this page running in the background to help out vulnerable web sites.  Please help me think outside the box on this issue, because there is a web site, I would really like to help out.

This is a  about DoS and DDoS mitigation.   I found a massive traffic spike on a website that I host today; I am getting thousands of connections a second and I see I'm using all 100Mbps of my available bandwidth.  Nobody can access my site because all the requests time out, and I can't even log into the server because SSH times out too!  This has happened a couple times before, and each time it's lasted a couple hours and gone away on its own.  Occasionally, my website has another distinct but related problem: my server's load average (which is usually around .25) rockets up to 20 or more and nobody can access my site just the same as the other case.  It also goes away after a few hours.  Restarting my server doesn't help; what can I do to make my site accessible again, and what is happening?  Relatedly, I found once that for a day or two, every time I started my service, it got a connection from a particular IP address and then crashed.  As soon as I started it up again, this happened again and it crashed again.  How is that similar, and what can I do about it?


I have a question regarding tension in a rope.  Consider a situation where two masses $A$ and $B$ are tied by a massless string on a horizontal plane with no friction.  Suppose we pull mass $A$ by a force $F$ then the string exerts a backward force on the block; assume $T$.  An equal amount of force is applied by the block on the string, which pulls the Block $B$ with force $T$.  The Block $B$ exerts a force backward on the string with magnitude $T$.  So far the argument seems good, but why do we stop here?  This backward force again pulls $A$ backward by the string.  The string is again pulled forward by $A$ by Newton's Third Law, which again results in the same process...Thus there are forces acting in infinite directionsbetween the boxes..?  Where is the problem in the argument?

According to Newton's third law of motion, for every action there an equal and opposite reaction.  If an object A applies a force (action) on an object B, object B applies an equal and opposite force (reaction) on object A. If we consider this reaction force as the action force applied by object B on object A, shouldn't there be a reaction force for every reaction force and hence infinite reaction forces?


I already stumbled over #!/usr/bin/env bash on numerous occasions and never questioned it. Now, I'm wondering what the purpose of wrapping the shell interpreter in an env command, i.e. why not just write #!/bin/bash, #!/bin/sh or whatever?

I notice that some scripts which I have acquired from others have the shebang #!/path/to/NAME while others (using the same tool, NAME) have the shebang #!/usr/bin/env NAME.  Both seem to work properly.  In tutorials (on Python, for example), there seems to be a suggestion that the latter shebang is better.  But, I don't quite understand why this is so.  I realize that, in order to use the latter shebang, NAME must be in the PATH whereas the first shebang does not have this restriction.  Also, it appears (to me) that the first would be the better shebang, since it specifies precisely where NAME is located.  So, in this case, if there are multiple versions of NAME (e.g., /usr/bin/NAME, /usr/local/bin/NAME), the first case specifies which to use.  My question is why is the first shebang preferred to the second one?


Is there a way to have a normally indented paragraph in the middle of an enumerate/itemize environment? Something more elegant that manually numbering the \items, or a clean way to tinker with counters? Here's what I mean: \documentclass{article} \begin{document} \begin{enumerate}     \item Numbered as One      \item Numbered as Two  It would be really cool to take a break from numbering and have a normally (further left) indented paragraph here.      \item Numbered as Three \end{enumerate} \end{document}

I'd like to be able to resume an enumerated list, continuing the old numbering, after some intervening text which should not be formatted like a list item.  Is there a nice way to do this?    In particular, I don't want to start a second list with a hard-coded initial counter value, because that will break if I change the number of items in the first list.


So lately I've been working on a minigame map with command blocks and I wanted to create a villager shop. However when I set up some custom trades whenever you traded with him it unlocked new random trades, I don't want this to happen is there a way to prevent this?  (Btw I know this similar has been asked before however the answers didn't quite help me so I decide to ask it myself :D )

When making a custom adventure map, usually you only want the trades you programmed into a villager to show up. By default, however, the game will try to spawn new trades when the last one is made. The classic way I'm seeing in tutorials to prevent new trades is to make the last trade untradeable; however, with the release of 1.7, a lot of the old item IDs that were unobtainable have been removed from the game altogether, and following the tutorial I have crashes the game when the trade interface is scrolled to the last trade.   So there's two parts to this question:   Is there a better way to prevent new trades with the 1.7 mechanics? Or with the snapshots of 1.8 mechanics? If not, what is a safe data ID to use to prevent the last trade from being a real trade as of 1.7?


I created a Live USB with Ubuntu of another os. How can I completely delete that Live USB info if it only shows some kb's of memory and can't access the files of that Live USB?

I have a 8 GB pendrive. I used to write raw data into the pendrive (without creating filesystem) using the dd command.    Today, when I inserted the pen drive, the I am unable to write anything on to it.  When I open gparted it is showing the total space on the pen drive as 500 MB. I am unable to create a new partition table or a partition on the pen drive now.   Here is the fdisk -l output.   Disk /dev/sdb: 0 MB, 512000 bytes 255 heads, 63 sectors/track, 0 cylinders, total 1000 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 4096 bytes I/O size (minimum/optimal): 4096 bytes / 4096 bytes Disk identifier: 0x00095df6   What's wrong with the pen drive? How can I recover the lost space?   Device Boot      Start         End      Blocks   Id  System   When I open gnome-disks, it shows the total space as 8 GB but when I try to create a new partition using it, it shows the following error:  Error creating partition on /dev/sdb: Command-line parted --align optimal --script "/dev/sdb" "mkpart primary ext2 1MiB 7969177599b"' exited with non-zero exit status 1: Error: The location 7969177599b is outside of the device /dev/sdb.  (udisks-error-quark, 0)


I've never been able to get a clear answer to this question.  For a long time, and at the advisement of a coworker, I've been doing this:  git fetch origin git pull origin <mybranch>   I've been told (and have seen) that git pull does not behave the same way if you do not first do git fetch. You don't get any remote changes.  But all I see online is that git pull is the equivalent of git fetch followed by git merge. If that were true, git pull would include git fetch, and I wouldn't need an explicit git fetch first, right? But that doesn't seem to be the case.  So what I'm looking for is some explicit documentation that describes the observed behavior of git pull. (I know I'll probably also get lots of advice to switch to git fetch → git merge; that's fine too, but I'm really interested in git pull.)

What are the differences between git pull and git fetch?


The  tag is used to create hyperlinks but in this age of jQuery and Ajax we are using it to load HTML into
s in the same page as the  tags.  That said, we set the href atribute as href="#", using or rather abusing the # character as a placeholder along with some undesirable side effects like the URL getting appended with the # character.  And if you leave the href attribute blank href = "", the link does not seem to work.  Is there anyway to do this in a cleaner way like showing some text or dummy function in the status bar of the browser when the user hovers over the link and yet make the link do what the programmer intended?  Here's my code.
    // List that is converted into a menu...
  HOTEL

  COUNTRY

  CITY

  // The jQuery to load content into another div with Ajax var loadUrl = "createHotel.php"; $("#loadHotel").click(function() {     $("#mainContent").html(ajax_load).load(loadUrl); });   // ajax function to load hotel ---> rooms page   var url_loadRooms = "viewRooms.php"; $("#createRooms").click(function() {     $("#mainContent").html(ajax_load).load(url_loadRooms); });   What else can I use instead of "#" to make my code neat..?

The following are two methods of building a link that has the sole purpose of running JavaScript code. Which is better, in terms of functionality, page load speed, validation purposes, etc.?    function myJsFunc() {     alert("myJsFunc"); } Run JavaScript Code     or    function myJsFunc() {     alert("myJsFunc"); }  Run JavaScript Code


The Battle Master fighter has access to a number of maneuvers that add a superiority die to the damage roll. For instance, the Trip Attack maneuver says (PHB, p. 74):     When you hit a creature with a weapon attack, you can expend one   superiority die to attempt to knock the target down. You add the   superiority die to the attack’s damage roll, and if the target is   Large or smaller, it must make a Strength saving throw. On a failed   save, you knock the target prone.   The Critical Hits rule states (PHB, p. 196):     When you score a critical hit, you get to roll extra dice for the   attack’s damage against the target. Roll all of the attack’s damage   dice twice and add them together. Then add any relevant modifiers as   normal. [...] If the attack involves other damage dice, such as from   the rogue’s Sneak Attack feature, you roll those dice twice as well.   During our game, the fighter PC rolled a critical hit. He then wanted to use a superiority die to use the Trip Attack maneuver to trip the enemy. Based on the above rules, is the damage from the superiority die also doubled?  I'm assuming the answer is yes based on the last statement in the Critical Hits section, but I wanted to confirm.

Certain damage kickers are put into effect at the attacker's option after it is determined that an attack is a hit. Examples include:   The Divine Smite of  and of  The Battle Master's Trip Attack The Combat Inspiration feature of the College of Valor bard Expending charges from several magic staves, including the , , and    The rules on a  seem pretty clear (PHB. 196):     Roll all of the attack’s damage dice twice and add them together.…      … If the attack involves other damage dice, such as from the rogue’s Sneak Attack feature, you roll those dice twice as well.   It seems clear that (a) the player decides to apply the kicker after seeing the die roll, and (b) "all of the attack's damage dice" includes the kicker. But this gives the player quite an advantage to choose to apply a damage kicker on a known critical hit, so I am seeking to confirm (or correct) my understanding.  Can the attacker wait to add optional damage dice until after seeing if the roll is a critical, ?


How can I attach a linux directory or file system to a win10 VM? This file system / directory is to be dynamically shared between several machines, both linux & win10. I can't use the physical /dev/sd?? address because they may change every time the host is booted.

Is it possible to use "Filesystem Passthrough" virtual hardware option inside virt-manager to share a folder on my Linux host with my Windows guest? I found some tutorials for how to do this with a Linux guest, but when I try this with my Windows guest I receive the following error message when attempting to start the VM:  Error starting domain: Unable to read from monitor: Connection reset by peer  Traceback (most recent call last):   File "/usr/share/virt-manager/virtManager/asyncjob.py", line 100, in cb_wrapper     callback(asyncjob, *args, **kwargs)   File "/usr/share/virt-manager/virtManager/asyncjob.py", line 122, in tmpcb     callback(*args, **kwargs)   File "/usr/share/virt-manager/virtManager/domain.py", line 1210, in startup     self._backend.create()   File "/usr/lib64/python2.7/site-packages/libvirt.py", line 698, in create     if ret == -1: raise libvirtError ('virDomainCreate() failed', dom=self) libvirtError: Unable to read from monitor: Connection reset by peer   I tried sourcing some documentation but all I could find was .