I am not able to assign a particular C# script to a game object. When I try to do so, I get this error as shown below Only the script I have is different.  In brief, just like the error above I am getting it as Can't Add Script Component 'AIWaypointNetwork' because the script class cannot be found. Make sure that there are no compile errors and that the file name and the class name match And when I try to create a script component, I get the warning Associated Script cannot be loaded. Please fix compile errors and assign a valid script. Here is a screenshot of the situation.  As far as I know, I don't see anything wrong with the script and it's pretty simple too. using System.Collections; using System.Collections.Generic; using UnityEngine;  public class AIWaypointNetwork : MonoBehaviour {     public List<Transform> Waypoints = new List<Transform>(); }  The unity version that I am using right now is Version 2020.1.11f1 Personal. And I have not faced these types of errors before. Based on my search, I see that I would probably have to reimport assets over again. How do we do that in this version of unity? Is there something else I am missing here?

I keep getting the following error when i try to drag and drop a script to my gameobject:    I have made sure that both my Script name and the class name is : Soldier as you can see:  public class Soldier : MonoBehaviour {     public int Rank; }   So my question is what have i done wrong?


The plural of mouse is mice, and the plural of louse is lice. Why is the plural form of house not hice?   According to , the word house is already longer in the language, just as mouse and louse, so it is not because it is a foreign word (loanword).   This question was marked to be a duplicate of  and , but it is actually a duplicate of neither since they handle different words, and also different causes.

Why is it that the plural of goose is geese but the plural of moose is moose? The same goes for mouse and house. Mouse becomes mice, yet house becomes houses.


How can I prove that any regular surface with non zero mean curvature is orientable?  UPDATE: The surface is embedded in $\mathbb{R}^3$.

Let $M$ be a surface in $\Bbb R^3$ with non-zero mean curvature for every point. How could I  show that this implies that $M$ is orientable? By our definition, orientable means that an unitary, normal vector can be defined continuously for every point in the surface.  This is a homework question, so just hints would be appreciated :)


I have a sharepoint 2013 list. When the user clicks on edit this list to open it in  a datasheet view...after making changes when clicked on stop ,the data should be saved and redirect to another page. Is this possible?   Thanks in advance

What is the best way to add redirect function into the save button on a newform in SharePoint 2013.  When the user create a list item, he/she should be redirected to another form. Is it possible to get and parse the new generated item ID?  Start - Newform URL:   End - Editform URL:   Thanks


A sample dataset would be:  ArrayList<String> a = new ArrayList<String>();     a.add("5");     a.add("10.5a");     a.add("4");     a.add("4c");     a.add("4a");     a.add("10.6a");     a.add("3");   I'm looking for the output to be in the format of [3, 4, 4a, 4c, 5, 10.5a, 10.6a].  Java's sorting function (Collections.sort(a);) sorts the data set to [10.5a, 10.6a, 3, 4, 4a, 4c, 5].  So, I need a way to split the value of the number from the letter, and sort first by number(4 before 10) then by letter with a number coming before a number-letter (4 before 4a).  The main way this is different from other questions on stackoverflow is that there is no separator between the numeric and alphabetic characters- the strings cannot be split at a specific character.  The  returns [3, 4, 4a, 4c, 5, 10.6a, 10a, 10b]- the 10.6a should come after 10a.  Solved  In the first few lines, change the first int from 48 to 46, which accepts the "-" and "." characters as digits when separating the numbers from letters. It also makes it so numbers can now have decimals and be negative with the caveat that if your data uses .'s or -'s as non-numerical characters it will mess up the results.  public class AlphanumComparator implements Comparator<String> {     private final boolean isDigit(char ch)     {         return ch >= 46 && ch <= 57;

I need to write a Java Comparator class that compares Strings, however with one twist.  If the two strings it is comparing are the same at the beginning and end of the string are the same, and the middle part that differs is an integer, then compare based on the numeric values of those integers.  For example, I want the following strings to end up in order they're shown:   aaa bbb 3 ccc bbb 12 ccc ccc 11 ddd eee 3 ddd jpeg2000 eee eee 12 ddd jpeg2000 eee   As you can see, there might be other integers in the string, so I can't just use regular expressions to break out any integer.  I'm thinking of just walking the strings from the beginning until I find a bit that doesn't match, then walking in from the end until I find a bit that doesn't match, and then comparing the bit in the middle to the regular expression "[0-9]+", and if it compares, then doing a numeric comparison, otherwise doing a lexical comparison.  Is there a better way?  Update I don't think I can guarantee that the other numbers in the string, the ones that may match, don't have spaces around them, or that the ones that differ do have spaces.


I have been studying enumerative combinatorics using the book by George Martin: Counting: the art of enumerative combinatorics. I would like to continue learning the subject, but the problem is that I have found with two types of books: either they're too problem-approached (Chen and Koh: Principles and techniques in combinatorics), or rather too technical (Stanley: Enumerative combinatorics vol. 1). I am looking for an applied approach (but if it is mathematically oriented it is nice also). It would be nice if they have correct answers (I have been dissapointed by such good books like Charalambos: Enumerative combinatorics, or Tucker: Applied combinatorics which contain a bunch of errata).   EDIT:  Found this:

I'm currently attending a somewhat disorganized seminar on combinatorics that follows no textbook. So far we have covered the orbit-stabilizer theorem, some recursion, and we're heading into the Möbius inversion formula.   Can anyone suggest a text that approaches combinatorics at this level for a 2nd-3rd year undergrad who already knows some algebra and the more basic combinatorics like combinations, permutations, stars-and-bars, generating functions? Most introductory combinatorics books I've found are more suited to a discrete math class and cover stuff which I already know. I'm looking for something to supplement this lecture. Thank you.


I run dkimproxy to sign outbound email and verify inbound email.  Since a while, I am experiencing the following permanent problem. The dkimproxy service is unable to query the DNS. Each and every message I receive gets the following header set (in my example I am example.org and sender example.biz)  Authentication-Results: mail.example.org; dkim=invalid (public key: DNS query timeout for api._domainkey.example.biz at /usr/lib/perl5/vendor_perl/5.18.1/Mail/DKIM/DNS.pm line 156, line 643.) header.i=@example.biz; dkim=invalid (public key: DNS query timeout for api._domainkey.example.biz at /usr/lib/perl5/vendor_perl/5.18.1/Mail/DKIM/DNS.pm line 156, line 643.) header.i=@example.biz   The error is permanent. If I log in via SSH and try to use nslookup to get the TXT record from the remote DNS I can successfully read it.  How can I fix the above problem?  [Edit] my problem doesn't fall into this , because in that question the DKIM check seems to be done by SpamAssassin. I check DKIM with dkimproxy

I run my own mail server on an Azure Linux VM with Postfix. Since I was under heavy spam attack I reinforced my mail server security measures.  Without going into the security things, today I noticed something particularly unusual.  Postfix was not getting mail from some well known domains. Only some  #  /var/log/mail postfix/smtpd[40702]: NOQUEUE: reject: RCPT from xxxx.ing.net[xx.xx.xx.xx]: 451 4.3.5 <prvs=2022b5a257=xxxxx@ing.com>: Sender address rejected: Server configuration problem; from=<xxxxxxx@ing.com> to=<xxxxxxxxxx> proto=ESMTP helo=<xxxx.ing.net>  # /var/log/warn postfix/smtpd[32944]: warning: problem talking to server private/spf-policy: Connection timed out   What I dumbly did was to ping for SPF record on ing.com / ing.net  From my Windows box nslookup   ing.com Server:  [8.8.8.8] Address:  8.8.8.8  Risposta da un server non autorevole: ing.com text =          "MS=ms77059065" ing.com text =          "v=spf1 include:_spf.ing.net ip4:91.209.197.6 ip4:89.20.160.55 ip4:78.136.53.254 ip4:95.138.135.251 ip4:92.52.81.2 ip4:146.148.26.249 ip4:83.231.160.132 ip4:83.231.160.128/26 ip4:212.187.169.64/26"         " include:_spf_mx.solvinity.com include:mailplus.nl ip4:24.157.48.85 ip4:141.155.214.85 ip4:160.34.64.28 ip4:192.254.112.185 ip4:118.127.87.207 ip4:128.242.118.200 ip4:62.73.172.35 ip4:83.217.248.35 ip4:91.209.197.7 -all" ing.com text =          "adobe-idp-site-verification=8b81f7b92ccac0b65bab7d47f9fcecaeda6f04ac870b79133d8ac54be7b53534" ing.com text =   From the email server box nslookup  > nslookup > set type=txt > ing.com ;; Truncated, retrying in TCP mode.   From mail server box setting the DNS server to 8.8.8.8 returns the same SPF payload.  Question is: what is causing this issue with TXT DNS resolution in Azure VM? Before blindly changing the system DNS settings, I would like to understand the error and its cause, and why happening only on Azure default DNS


I have data which is coming from a sql query which has lots of joins and conditions attached to it, now there are few columns where i want to bring the values of those columns as comma separated so it should not duplicate the row i do not get if i had to write all joins in it and use stuff to get that values. or how can i use it, do i need to create a temporary table to it, need some advice and if possible a practical example will help

I'm trying to migrate a MySQL-based app over to Microsoft SQL Server 2005 (not by choice, but that's life).  In the original app, we used almost entirely ANSI-SQL compliant statements, with one significant exception -- we used MySQL's group_concat function fairly frequently.  group_concat, by the way, does this: given a table of, say, employee names and projects...  SELECT empName, projID FROM project_members;   returns:  ANDY   |  A100 ANDY   |  B391 ANDY   |  X010 TOM    |  A100 TOM    |  A510   ... and here's what you get with group_concat:  SELECT      empName, group_concat(projID SEPARATOR ' / ')  FROM      project_members  GROUP BY      empName;   returns:  ANDY   |  A100 / B391 / X010 TOM    |  A100 / A510   So what I'd like to know is: Is it possible to write, say, a user-defined function in SQL Server which emulates the functionality of group_concat?   I have almost no experience using UDFs, stored procedures, or anything like that, just straight-up SQL, so please err on the side of too much explanation :)


I wrote:     the associated organizations must act urgently in introducing a new word for a foreign word before it has been widespread / becomes widespread / has become widespread / would been widespread / had been widespread / would have been widespread / would become widespread   I guess I'm speaking an imaginary situation "before an imaginary word is widespread" (after the act have completely happened) or maybe it's just a fact. Do I need "would"?   Anyway, which tenses I mentioned are correct or more idiomatic?

I am not sure if we can use the present for future events. I know we can use the historical present for past event, but I am not sure if we can use the present for future events.  Here's an example sentence where the present is used for future events:     You should ask God "What is the meaning of life" when he judges your   soul.   Is judges being in the present tense ok in this case?


I met several times the term "socket", so I looked it up on different sites, but each of them required too much knowledge in order to understand the explanation.  What I read were things like:   sockets fall into the same category as pipes and name pipes sockets offer some kind of two-way communication sockets are used in inter-process communication sockets are sometimes mentioned with regard to networks   I do not really get the big picture, what is the very purpose of a socket. Could you explain it maybe in terms that would not require too much technical knowledge (like C language)?

Could someone explain to me what a socket is? I see it in many acronyms in context of SSL, etc.  Also, why is it called a socket? Is it purely because it was what a name they invented? Or was it the first name they came up with?


I got this error with the listings package (v 1.5c). Should I install the language manually?  ! Package Listings Error: Couldn't load requested language.  See the Listings package documentation for explanation. Type  H <return>  for immediate help.  ...                                                l.161 ...{lstlisting}[language=json,firstnumber=1]   This is my TeX version running on Mac OSX 10.9.5.  TeX 3.14159265 (TeX Live 2014) kpathsea version 6.2.0

I was wondering if there is a good way for JSON files to be listed with the listings package.  The only language definition I could come up with, is this:  \lstdefinelanguage{json} {     morestring=[b]",     morestring=[d]' }   Now, this highlights the strings used in JSON files, but the important syntactical things in JSON are the curly braces, the square brackets, commas, and colons. I have sadly no Idea how I could make them be highlighted in a different manner. I tried adding { and } as identifier or as keywords, but it didn't work.  I'd really like to make listed JSON files appear nicer, since on a project I need to document I'd really need it. Also, I couldn't find a JSON definition for that on the internet, anywhere else.  On a more general thought: can I highlight all numerals with listings?


I have a Canon 60D, bought it back in 2013. Use it quite a while, but in past two-three years, I lost interest in photography. I will be going on a long trip this summer and would like to take a decent camera with me. Is Canon 60D still a decent one or I will be missing on features and upgrades comparing to the latest versions?  In terms of lenses I own Tamron 24-70 2.8 And Canon 100 2.8 Macro.

As the question says, when should I upgrade my camera body? In particular, if I have a low- to mid-range body (A DSLR such as a Nikon D3200 or Nikon D5100, or Canon SL1 or T5, or a mirrorless camera such as a Panasonic GH3 or an Olympus E-PL6). How do I know when I need to upgrade?  I have a complement of "kit" lenses, such as an 18-55mm f3.5-5.6 and a 55-200mm f4-5.6. Maybe I've even added a 50mm 1.8 to the kit. Flash is only for indoors (right?) and I usually shoot outside, so that means I don't need an external flash.  I shoot photos of my family and friends whether out at the park or having a picnic, my kids sports practices and games, vacation photos, as well as some landscapes, flowers, and whatever else catches my eye. Pretty familiar territory. I'm not a professional and don't intend to become one.


It seems that $\{e\}, \{e,s\}, \{e,rs\}, \{e,r^2s\},...,\{e,r^{n-1}s\}, \{e,r,r^2,...,r^{n-1}\}, D_n$ are always subgroups of $D_n$. Especially when $n$ is odd, these seem to be the only subgroups. But when n is even, say $n=4$, then there are also $\{e,s,r^2,r^2s\}$ and $\{e,rs,r^2,r^3s\}$. It makes me wonder, is there a general formula/algorithm for finding all subgroups of $D_n$ when $n$ is even?


I installed Ubuntu 14.04.2, a fresh install. Additional Drivers won't install the AMD flgrx proprietary drivers. I clicked on the radio button, pressed apply changes, and then the button just goes back to open source Xorg driver.   It works on 14.10, but on that version it will not let me enter my encrypted password (works in 14.04). If I type password on 14.10 it does not populate the field. It just shows up at the top in plain text.   Any ideas how to get flgrx in 14.04 or get encryption working in 14.10?

I am planning on doing a fresh install of Ubuntu and want to know what is the correct way to install ATI Catalyst Video Driver?      There are multiple valid answers for this question spanning over several versions of Ubuntu. For your convenience an index of each below:


I have a registration form on a website. I'm using a pretty standard php form to send the form submission to me via email. I'm using a formhook to also insert those form entries into a mysql database. The only problem I have is when someone tries to include single or double quotes in a field. For instance one field asks for verbiage for the back of a t-shirt. Some people just seem to want to add quotes to their verbiage. This causes the information to not be inserted into the database. I'm somewhat new to sql and have been reading up on escaping quotes but still not grasping the solution. See my form below .. this is the formhook that inserts the information into the database. Is there a statement I can add to the php code that will allow both single and double quotes? Thank you!  $con=mysql_connect($hostname,$username,$password); if(! $con) { die('Connection Failed'.mysql_error()); }  mysql_select_db($database,$con); //if submit is not blanked i.e. it is clicked. {  $sql="insert into sponsors2015(realname, sponsorname, email, phone, shirtnameverbiage, platinum_2500, gold_2000, silver_1500, bronze_1000, beverage_500, longdrive_200, closest_to_pin_200, par3_150, hole_100) values('".$_REQUEST['realname']."', '".$_REQUEST['sponsorname']."', '".$_REQUEST['email']."', '".$_REQUEST['phone']."', '".$_REQUEST['shirtnameverbiage']."', '".$_REQUEST['platinum_2500']."', '".$_REQUEST['gold_2000']."', '".$_REQUEST['silver_1500']."', '".$_REQUEST['bronze_1000']."', '".$_REQUEST['beverage_500']."', '".$_REQUEST['longdrive_200']."', '".$_REQUEST['closest_to_pin_200']."', '".$_REQUEST['par3_150']."', '".$_REQUEST['hole_100']."')";  $res=mysql_query($sql); if($res)  { Echo header('Location: sponsor-registration-success.php'); } Else { Echo header('Location: sponsor-registration-problem.php'); }  }

If user input is inserted without modification into an SQL query, then the application becomes vulnerable to , like in the following example:  $unsafe_variable = $_POST['user_input'];   mysql_query("INSERT INTO `table` (`column`) VALUES ('$unsafe_variable')");   That's because the user can input something like value'); DROP TABLE table;--, and the query becomes:  INSERT INTO `table` (`column`) VALUES('value'); DROP TABLE table;--')   What can be done to prevent this from happening?


Web pages can be very long. When I save it as PDF, chrome splits it to multiple pages. Is there a way to create a single page PDF with custom page width/length?  I need it to be a PDF in order to insert as attachment in wiki pages I’m maintaining.

I am trying to convert  to a single-page, 19 x 13 pdf file.  I am running Firefox under Ubuntu and trying to use the Print To File option, but it is splitting the web page into multiple pages.   Is there a way to get the page into a single-page pdf with the given dimensions?  Edit: I already tried setting the page dimensions to 19 x 13 using custom page size.  The only noticeable effect is that each page now has more whitespace, but the page is still split across multiple pages.  Also, I already saw the answer suggesting the  plugin, which works, but I prefer a pdf because it is more scalable.


I have this path of one of my images:  \includegraphics[trim=0cm 0cm 0cm  0cm,clip,scale=.40]{Figures/Simulation_C_044 _023_4_21kV.pdf}   When I compile the code, it shows me that there is an error in the line of the path. When I changed the name of the figure with other name, it works fine.  Do you have any idea of solving this problem as I don't prefer to change the file names.

I want to import graphics into my main input file using the macro \includegraphics. It does not work if the filename contains spaces.   also discusses this subject, but there is no solution there.  My compilation routine is latex->dvips->ps2pdf (because of PSTricks).


Why are "magnetic field lines" called "lines of force" when they are actually  perpendicular to direction of force (Lorentz force,cross product)?    It makes sense to call "field lines" as "lines of force" in case of fields like gravitational, electrostatic, etc., but not in magnetic force it seems to me.

What's the difference between magnetic field and electric field lines?  Does $d\vec B$ point in the direction you would experience a force if you were a moving charged particle at that point? I know for a fact the electric field and electrostatic force are parallel, but since $F = q\ \vec v \times \vec B$ for magnetic forces. Does that actually mean though that if, say, in the following graphic:    Where the dot is a wire going in and out of the page, that the $d\vec B$ vectors are not showing how a moving charged particle will move in the field?   Basically, I feel justified in thinking electric field lines communicate how a test charge will move at any given point in space.  How can I juxtapose this with magnetic field lines>


The following packages have unmet dependencies:  gstreamer1.0-libav: Depends: libavcodec-extra-54 (>= 6:9.13) but 6:9.18-0ubuntu0.14.04.1 is to be installed                     Depends: libavformat54 (>= 6:9.1-1) but 6:9.18-0ubuntu0.14.04.1 is to be installed                     Depends: libavutil52 (>= 6:9.1-1) but 6:9.18-0ubuntu0.14.04.1 is to be installed                     Depends: libc6 (>= 2.14) but 2.19-0ubuntu6.9 is to be installed                     Depends: libglib2.0-0 (>= 2.37.3) but 2.40.2-0ubuntu1 is to be installed

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


I made a function using jQuery and Ajax to append info from a separate PHP file to another file. Lets call the destination file "Homepage" and the file containing the data "Template".  So i use this function:  var box = $('#infoPageContainer'),     close = $('.arrow');  btn1.click( function(){     event.preventDefault();     if( box.hasClass( 'active' )){         box.removeClass( 'active' );         box.css( "width", "0%" );          $('#placeholder1').fadeOut(600);          setTimeout(function(){             $('#placeholder1').html("");         },1000);      } else {          box.addClass('active');         box.css( "width", "100%" );          $.ajax({             url: 'template/parts/Template.php',             success: function(data){                 $('#placeholder1').html(data).fadeIn(600);             },              beforeSend: function(){                 $('#placeholder1').html("loading").fadeIn(600);             }         });     } });   To append this data:

Veldopstellingen

Dit is de titel

Lorem ipsum dolor sit amet, consectetuer adipiscing elit.

     As you can see I use a switch that checks for an 'Active' class and runs the respective function. What I want however, is the function removing the appended data to be triggered by a button that is appended (Img with Arrow class). So like this:  close.click( function(){     event.preventDefault();     box.removeClass( 'active' );     box.css( "width", "0%" );      $('#placeholder1').fadeOut(600);      setTimeout(function(){         $('#placeholder1').html("");     },1000); });   But when I do so, nothing happens even tho the function does work when I don't use an appended object as trigger. What should I do?

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


I am running python 3.0 and need to make a permutation from a list of 7 numbers in that list, but I am not finding any decent sample code or guide to create all the permutations.   Could someone please put some sample code as to how I would make and be able to print all the permutations.

How do you generate all the permutations of a list in Python, independently of the type of elements in that list?  For example:  permutations([]) []  permutations([1]) [1]  permutations([1, 2]) [1, 2] [2, 1]  permutations([1, 2, 3]) [1, 2, 3] [1, 3, 2] [2, 1, 3] [2, 3, 1] [3, 1, 2] [3, 2, 1]


Cantor's construction of $\aleph_1$ is to notice that all ordinals constructed after $\omega$ are countable, take the union of all countable ordinals, and then show that this union can not be countable. However, in ZFC the union can only be taken over a set. I can see how to relate countable ordinals to elements of $2^{\aleph_0}$ proving that their collection is a set by specification, but that requires the power set axiom. The "slicker" modern way, declaring $\aleph_1$ to be the least uncountable cardinal, already presupposes the existence of uncountable cardinals. That's even worse since in addition to power set one needs choice to prove that $2^{\aleph_0}$ is an aleph, and then it is greater by the diagonal argument.  It wouldn't surprise me that some voodoo with collection or replacemnt schemas does the trick, but then my question is what does it translate to in "naive" terms of Cantor? What reason do we have for the collection of countable ordinals to be a set (without invoking formulas in the first order logic and definable functions)? If power set isn't required why can't Cantor's argument be reproduced to create inaccessible cardinals by noticing that all cardinals produced after $\aleph_0$ are, by construction, accessible?

Assume $M$ is a set, in which all axioms of $ZF - P + (V=L)$ hold. Does then $M$ believe that there exists an uncountable ordinal? I mean, why should the class of all countable ordinal numbers be a set?


The (right-) censoring of likelihood function is defined as:  $$     L(\theta) = \prod_{i=1}^m f(x_i;\theta) \cdot \prod_{i=m+1}^n P_{\theta}(X_j>a) $$  where observations $x_i$, $i=1,...,m$ have known values and for $m+1,...,n$ the values are unknown.  I would like to know, how has this been derived? I.e. why is this the definition for censoring?

My dependent variable shown below doesn't fit any stock distribution that I know of.  Linear regression produces somewhat non-normal, right-skewed residuals that relate to predicted Y in an odd way (2nd plot).  Any suggestions for transformations or other ways to obtain most valid results and best predictive accuracy?  If possible I'd like to avoid clumsy categorizing into, say, 5 values (e.g., 0, lo%, med%, hi%, 1).


In trying to understand the y values of a normal distribution plot I use this code: %reset -f  import numpy as np from scipy.stats import norm import matplotlib.pyplot as plt  data = [10,10,20,40,50,60,70,80,90,100]  # Fit a normal distribution to the data: mu, std = norm.fit(data)  # Plot the histogram. plt.hist(data, bins=10, density=True, alpha=0.6, color='g')  # Plot the PDF. xmin, xmax = plt.xlim() x = np.linspace(xmin, xmax, 100) p = norm.pdf(x, mu, std) plt.plot(x, p, 'k', linewidth=2) title = "Fit results: mu = %.2f,  std = %.2f" % (mu, std) plt.title(title)  plt.show()  to generate this plot:  The data is the age in years of people in a group: [10,10,20,40,50,60,70,80,90,100] How to interpret the y values of the generated pdf plot? For instance, how should the bar with play approx equal to 0.027 be interpreted? I've read various posts such as :  But can't find information that details an interpretation of the y axis values of the plot. Is 0.027 the probability the age is in the range from 0 to approx 20 ?

On the , there is this line:      $p(\mathrm{height}|\mathrm{male}) = 1.5789$ (A probability distribution over 1 is OK. It is the area under the bell curve that is equal to 1.)    How can a value $>1$ be OK? I thought all probability values were expressed in the range $0 \leq p \leq 1$. Furthermore, given that it is possible to have such a value, how is that value obtained in the example shown on the page?


I'm sorry for the silly question, but I have a doubt. Given two positive real numbers $x,y$ and taking $0<r<1$, is it true that  $$ (x+y)^r \le x^r+y^r? $$  In all the examples I considered, this turns out to be true. Moreover, to try to give a proof, does it suffices to prove that the function $f(z)=(1+z)^r-1-z^r$ is non-positive when $z \in (0,1]$ (i.e. taking $x>y$ and dividing by $x$?

How to prove for $s<1$$$|a+b|^s\le|a|^s+|b|^s$$ I tried to prove $|a+b|\le (|a|^s+|b|^s)^{\frac{1}{s}}$, but $\frac{1}{s}$ may not be integer, so I do not know how to expand it if it is not integer.  Is it the right way to prove it by trying to expand it using binomial expansion? How to prove it?  Thanks!


I'm having a similar problem to the following post .  The model is built with Deep Neural Network library in Matlab by Masayuki Tanaka. The library is designed for classification. However, I've managed to change the last layer's transfer function to linear, so that the Deep Belief Network performs regression instead. I'm pretty sure the feed-forward and back propagation is performed correctly.  The model has 2 inputs, 4 hidden layers with 500, 200, 100, 10 units per layer, respectively, and 1 output. The activation of the hidden layers are sigmoid  The data is simply a sin function generated by matlab's sind, you may consider the input as a time series where the 2 features are sin value at t1 and sin value at t2, and I would like to predict sin value at t3  inputdata = [sind(1:1000); sind(2:1001)]; //1000*2 matrix outputdata = [sind(3:1002)]; //1000*1 matrix   By default, inuptdata is between -1 and 1, and not 0 to 1, I'm assuming the DBN is fine with it. Note that I'm not interested in testing the data with LSTM yet, but with DBN instead.  I would appreciate a hint on what I may be doing wrong, as the model always outputs the mean 0.50 - 0.55. I've tested with fewer layers, and it seemed to predict correctly, but with more than 3 or 4 layers, the model predicts the mean (constant value).  Could it be because of some large/small values of hidden layers when back propagating? I'm really lost, I spent so much time on this..  Thank you for your time.

I'm training a neural network but the training loss doesn't decrease. How can I fix this?  I'm not asking about overfitting or regularization. I'm asking about how to solve the problem where my network's performance doesn't improve on the training set.    This question is intentionally general so that other questions about how to train a neural network can be closed as a duplicate of this one, with the attitude that "if you give a man a fish you feed him for a day, but if you teach a man to fish, you can feed him for the rest of his life." See this Meta thread for a discussion:   If your neural network does not generalize well, see:


Which sentence is more grammatically correct:     Jack’s predilection toward competitive sports resulted in him becoming a great tennis player.   or     Jack's predilection toward competitive sports resulted in his becoming a great tennis player.

I assume that the following sentences are grammatically correct:   He resents your being more popular than he is. Most of the members paid their dues without my asking them. They objected to the youngest girl's being given the command position. What do you think about his buying such an expensive car? We were all sorry about Jane's losing her parents like that.   I'm still getting used to this possessive gerund structure. It sounded so weird to me at first. Is the structure used in both formal and informal contexts? Are there any alternative structures that result in the same meaning and are more frequently used? (Examples taken from )


I wouldn't be surprised if this has already been asked, but I couldn't find it anywhere.  I know that you don't gain or lose rep for questions or answers that you set to community wiki.  But does it cost you rep to downvote someone else's cw post?

Some questions and answers are marked Community Wiki and are owned by a community wiki user:  (In fact, this very question is one of them)  Why have Community Wiki posts? How do Community Wiki posts work? How does a post become a Community Wiki post? How can the Community Wiki status be removed from a post? How can I find Community Wiki posts?


On a Chrome or other Chromium browser (Brave, Kiwi..) on Android When I click "add to home screen" from the Brave/Chrome menu, on some sites the icon that is added does not open website but instead opens a custom app created for the website (so called "PWA"). I want to create a simple website link that opens the website in a browser (so I can use search / see the url from the address bar and so on). How can I do that with Brave or Chrome?

I'm using Chrome and Firefox on Android 10. I need to add a link to my home screen and I can't find a way to add the specific link. I know that I can do the following:  Go to the URL Tap the overflow (3-dot) menu Add to home screen  However, if I navigate to a specific URL within some sites, like Weather Underground () and follow the above process, it doesn't add the specific URL, it adds www.wunderground.com and doesn't seem to give me any way to edit that URL to reference the specific subpage (e.g. www.wunderground.com/my/specific/url). Why, and how to solve this?


I have been trying to install Ubuntu 12.04 on my system since tomorrow, I know there newer versions of Ubuntu available, but still I want to install this version only.  I'm repeatedly getting the same error when I try to install Ubuntu on my system. I checked the md5 hash of the ISO file i downloaded but it is correct. I'm installing Ubuntu from my USB drive.  Please help me out, I need an OS to be installed on my PC. Because I don't have one.

I tried to use the usb-creator.exe from Ubuntu 10.10 desktop i386 ISO image and it does create an USB stick that doesn't boot. When I try to boot from it I get:     Operating System not found.   I try to do this from Windows 7 x64. I'm not looking to create a live Ubuntu media, only an installation USB disk.  I repeated the process several times and I even tried to reformat the USB drive (FAT32), no success yet.  The USB stick is a 8GB one.


I tried installing any script from the Package Manager of latest version of MikTeX but when you try any script, the package manager crashes. I have tried it with and without the admin mode. Moreover, I tried it on different Windows 7 systems, but didn't work on any.  Do you guys also currently experiencing it with MikTeX 2.9?  Thank you.

Whenever I try to install some package from MiKTeX Package Manager, the packet manager crashes. Why would this be happening?  Problem signature:  Problem Event Name: APPCRASH Application Name:   mpm_mfc.exe Application Version:    2.9.4196.0 Application Timestamp:  4e3327b8 Fault Module Name:  MiKTeX209-core.dll Fault Module Version:   2.9.4792.0 Fault Module Timestamp: 511beb86 Exception Code: c0000005 Exception Offset:   0008b354 OS Version: 6.1.7601.2.1.0.256.48 Locale ID:  1033 Additional Information 1:   0a9e Additional Information 2:   0a9e372d3b4ad19135b953a78882e789 Additional Information 3:   0a9e Additional Information 4:   0a9e372d3b4ad19135b953a78882e789


I have a freshly installed Ubuntu 16.04 and I don't have the ON/OFF button in the gnome extensions site. I have no horizontal ribbons. Everything is installed as far as i know. Do you have any ideas about this?

How do I install GNOME Shell extensions?  Is it possible to update, remove and manage the extensions?


This problem and the regular aspect ratios for non-Meta emails were tested in both Chrome and Firefox on my Mac.    So I got this email about Meta automatically, and the aspect ratio is very, very off:    This problem only applies to Meta emails, that I know of;  , , and  don't have this problem.

The logo of the site where the bounty question is asked appears to be distorted in comparison to the text, when reading the mail:        Same issue in landscape orientation.


Let's say there exists a stock X that I believe will soon embark on a general downward trend. I am interested in shorting X and decide to sell some quantity of X.  I see my short position as being a long term view of the stock. This is not generally the case where one holds a short position in a stock.  I understand that if my view of the stock also become the general market view of the same stock that there may be many people wanting to hold short positions of X. How would this affect me?  To summarize:   Is there a time limit by which I need to cover a short position? If the answer to the above is no, what are the downsides to holding a short position for a longer time frame?

If I short sell stocks of a company but do not close my position by buying them back, what will happen? I realize it is a bad thing, but what exactly? I will need to pay a penalty?


When people use plural nouns after the word "there's", for example:     There's too many numbers.   it makes me a bit frustrated. I try to correct it by using "There are," but it still happens sometimes to me (the "there's" situation). Do you think that there are is the correct usage option?  People usually use there's, as I said.

It seems I put a   Bounty assigned by outside party, two lengthy, reference-citing answers, one "-1" (awarded the bounty), one "-2", two others scored "0" and "-2" respectively, the answers suggesting one or the other is correct, 73 comments and no consensus so far - and me, as the asker, lost without a clue what to think of the answers anymore -  this is no longer "Learners' Level" question, so I thought I'd bring it here and hear what the experts have to say.    Original question:  Plurality of verb depending on plurality of list elements  An edit was suggested to my sentence.     There was were an orange, some grapes, two apples and a small pile of cherries on the plate.   In my native language plurality of the verb always follows plurality of the first element on the list. There were an orange,... sounds awkward to me, no matter what follows up. My simple solution was reordering:     There were some grapes, an orange, two apples and a small pile of cherries on the plate.   But that's not the first time I faced this situation and I'd like to know what the rules of grammar say about that - was my editor overzealous or am I trying to copy rules of my language that don't apply in English?    Someone linked a  for negatives, where the situation is more clear-cut ("There is no..."). Same applies to connection with "or" apparently, per accepted answer there. Still, nothing for "and".  It seems there is a consensus that in that if the verb goes after the list, it will be plural.     an orange, some grapes, two apples and a small pile of cherries were on the plate.   There doesn't seem to be clear consensus for:     On the plate { was | were } an orange, some grapes, two apples and a small pile of cherries   Adding more to the confusion is the abbreviated form: "There's"     One last note. In North America, at least, there is a widespread use of using a singular form like "there is" and "there was", without regard for the subject item or items, and this "there is" is often shortened to "there's":           There's three apples on the table!      Could you please clarify this mess?


For this question I'm talking about things like flaming/ flaming burst or icy burst/ frost brand, shocking burst, brilliant energy, thundering, and so on.   I'm excluding properties that deal with alignment issues, harm a specific type of creature, dance/ defend, increases distance, returns it to you if thrown, etc.   Also, I'm wanting to know how these interact with the item's price (for instance some will say +3 price, so does that mean that it counts as a +3 weapon, even if it doesn't state it does?)    RAW is good, but tested houserules work just as well.

If I wanted my party's spellcaster to enhance/enchant a weapon or piece of armor, is there a limit to the number enhancements it can have on it? I haven't read anywhere that there is a limit, but putting an unlimited number on them seems OP. I also remember the game Neverwinter Nights 2 limited you to 4, but it didn't follow the rules 100%.


I have a C: drive where I have Windows 7 64 bit installed and I used to have a D: drive on which I installed Paint.NET. This D: drive doesn't exist any longer. When I go to Control Panel\Programs\Programs and Features I still see the entry for Paint.NET, but I get an error after attempting to uninstall it: "The folder path contains an invalid character." I'm assuming that his is the result of the D: drive not existing any longer.    The reason I'm asking this question is because I get a fatal error when trying to install the newest version of Paint.NET.    How can I uninstall the registry entries (and other residual files) of the previous instance of Paint.NET without using any untrusted 3rd party tool?

Could anyone tell me how to uninstall programs that their installation had a problem and therefore their uninstall doesn't work?  I removed all their references in the registry and their folder on the hdd but still don't know how to get rid of them completely from Add/Remove Programs list.  Thanks


Let n $\in \mathbb{N}$. Is there a field K such that $\overline{K}$/ K is a extension of degree n?  Here $\overline{K}$ implies algebraic closure.  (Note that for n = 2 we have K = $\mathbb{R}$).

Let $\mathbb R$ be the field of real numbers. Its algebraic closure, the field $\mathbb C$, is a finite extension of $\mathbb R$, which has degree 2.   Are there other examples of fields (not algebraic closed) such that its algebraic closure is a finite extension?


For example if somebody becomes president they are surely feeling happy, but at the same time probably anxious. Is there one word for that?

I've been trying to think of an adjective that expresses having two (or perhaps more) conflicting emotions or opinions simultaneously. Can anyone think of one?


I 'm trying to install latest nvidia drivers (352) but it doesn't work. I tryed following:  sudo add-apt-repository ppa:xorg-edgers/ppa sudo apt-get update sudo apt-get install nvidia-352   When I tipe the last command I get  Reading package lists... Done Building dependency tree  Reading state information... Done Unable to locate package nvidia-352   What I'm doing wrong? Why xorg edgers doesn't work

Having found a lot of different questions on Ask Ubuntu regarding NVIDIA graphics drivers installation generating various issues and problems on Ubuntu systems - I do want to know:    What do Ubuntu users have to care about when installing the NVIDIA graphics drivers?    Explanation:  Being aware that this topic already has many good questions and answers it actually always stays up-to-date. One example : Many new notebooks come with hybrid graphics and Optimus support so they depend on proprietary NVIDIA drivers being installed to function properly but most of all existing posts point to  which doesn't provide the drivers anymore since ubuntu  was introduced, so many old answers are mostly obsolete or wrong.


[tl;dr] Why is apache redirecting https that has gone through rewrite engine to http  I have a site that is redirecting some pages (only ones that have been through rewrites) from https to http.   Including rewrite log on the ssl config does not show anything, no rewrite etc.  the redirect is happening before it gets to php, so there cant be any header() calls doing it. I have checked anyway and its not the case. (its in house software, simple 4 file php app)  Searching google is tricky, as all I can find is tutorials on redirecting http->https :(  version  Server Version: Apache/2.2.22 (Debian) PHP/5.5.14-1~dotdeb.1 mod_ssl/2.2.22 OpenSSL/1.0.1e Server Built: Jun 16 2014 03:51:14   Apache config below, remove actual ips etc.  <VirtualHost <ip>:80>     ServerName <domain>.co.uk      DocumentRoot <root>     php_value include_path .:<root>/include     php_value auto_prepend_file <root>/include/header.php     php_value auto_append_file <root>/include/footer.php      Include <path>/secure.rewrite.conf     Include <path>/rewrite.conf </VirtualHost>  <VirtualHost <ip>:443>     ServerName <domain>.co.uk      DocumentRoot <root>     php_value include_path .:<root>/include     php_value auto_prepend_file <root>/include/header.php     php_value auto_append_file <root>/include/footer.php      Include <path>/rewrite.conf      Include <path>ssl.conf      SSLCertificateKeyFile   <cert>.key     SSLCertificateFile      <cert>.crt     SSLCertificateChainFile <cert>.ca-bundle </VirtualHost>   secure.rewrite.conf  RewriteEngine On RewriteCond %{SERVER_PORT} ^80 RewriteRule ^/login https://%{HTTP_HOST}%{REQUEST_URI} [L,R]   rewrite.conf  RewriteRule ^/dir/forgot_password/(.*)                            /dir/forgot_details.php?hash=$1                  [L,QSA] RewriteRule ^/dir/forgot_password                                 /dir/forgot_details.php                          [L,QSA] RewriteRule ^/dir/login                                           /dir/login.php                                   [L,QSA] RewriteRule ^/dir/logout                                          /dir/login.php?logout=1                          [L,QSA] RewriteRule ^/dir/settings                                        /dir/settings.php                                [L,QSA] RewriteRule ^/dir/(PO|EC)\.([A-Za-z0-9\.]+)/despatchnote/print    /dir/despatch_note.php?encore_id=$1\.$2&print=1  [L,QSA] RewriteRule ^/dir/(PO|EC)\.([A-Za-z0-9\.]+)/despatchnote          /dir/despatch_note.php?encore_id=$1\.$2          [L,QSA] RewriteRule ^/dir/(PO|EC)\.([A-Za-z0-9\.]+)/print                 /dir/view.php?encore_id=$1\.$2&print=1           [L,QSA] RewriteRule ^/dir/(PO|EC)\.([A-Za-z0-9\.]+)/action                /dir/view.php?encore_id=$1\.$2&action=1          [L,QSA] RewriteRule ^/dir/(PO|EC)\.([A-Za-z0-9\.]+)                       /dir/view.php?encore_id=$1\.$2                   [L,QSA] RewriteCond %{DOCUMENT_ROOT}%{REQUEST_FILENAME} !-d RewriteCond %{DOCUMENT_ROOT}%{REQUEST_FILENAME} !-f RewriteRule ^ <root>/webroot/index.php [L]   ssl.conf  SSLEngine on <Directory /public/*/htdocs>     SSLRequireSSL </Directory> SSLProtocol         all -SSLv2 -SSLv3 SSLCipherSuite      "EECDH+ECDSA+AESGCM EECDH+aRSA+AESGCM EECDH+ECDSA+SHA384 EECDH+ECDSA+SHA256 EECDH+aRSA+SHA384 EECDH+aRSA+SHA256 EECDH+aRSA+RC4 EECDH EDH+aRSA 3DES RC4 !aNULL !eNULL !LOW !MD5 !EXP !PSK !SRP !DSS +3DES 3DES +RC4 RC4" SSLHonorCipherOrder on SSLCompression      off

This is a  about Apache's mod_rewrite.   Changing a request URL or redirecting users to a different URL than the one they originally requested is done using mod_rewrite. This includes such things as:   Changing HTTP to HTTPS (or the other way around) Changing a request to a page which no longer exist to a new replacement. Modifying a URL format (such as ?id=3433 to /id/3433 ) Presenting a different page based on the browser, based on the referrer, based on anything possible under the moon and sun. Anything you want to mess around with URL   Everything You Ever Wanted to Know about Mod_Rewrite Rules but Were Afraid to Ask!  How can I become an expert at writing mod_rewrite rules?   What is the fundamental format and structure of mod_rewrite rules? What form/flavor of regular expressions do I need to have a solid grasp of? What are the most common mistakes/pitfalls when writing rewrite rules? What is a good method for testing and verifying mod_rewrite rules? Are there SEO or performance implications of mod_rewrite rules I should be aware of? Are there common situations where mod_rewrite might seem like the right tool for the job but isn't? What are some common examples?   A place to test your rules  The  web site is a great place to play around with your rules and test them. It even shows the debug output so you can see what matched and what did not.


I am currently working on a function that takes the sum of different values in a multidimensional array. I have the following code:    cidSum() {     for(let arr in this._cid) {       console.log(this._cid[arr][1]);       this._cidSum += this._cid[arr][1];       console.log(this._cidSum);     }   }   Initial values of this._cid and this._cidSum:  this._cidSum = 0; this._cid = [["PENNY", 1.01], ["NICKEL", 2.05], ["DIME", 3.1], ["QUARTER", 4.25], ["ONE", 90], ["FIVE", 55], ["TEN", 20], ["TWENTY", 60], ["ONE HUNDRED", 100]];   The results of the console logs where the first line is always the amount to be summed and the next line the new value after taking the sum.  1.01 1.01 2.05 3.0599999999999996 3.1 6.16 4.25 10.41 90 100.41 55 155.41 20 175.41 60 235.41 100 335.40999999999997   My problem is with 3.0599999999999996 and 335.40999999999997.   1) What is causing these numbers to deviate from one or two decimals as they are always summed by one or two decimals?   2) Is there an efficient way to solve this (currently I would use math.round).  Thank you for your help, Tom

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


I want to specify voltage across the electrolytic capacitor in Orcad but there seems to be no way to this.  I'm using C_elect part and the panel to choose the value is below:      I've tried this formats but none of them worked: 1u 16 1uF 16V

I have a polarized capacitor like below. it's 1uF and 16V.   the schematic in Orcad is like this:      How can I specify that 16V voltage?


Assume the following model is the beginning of a car-like thing.    Now we want to begin adding the windows and roof. I want them to form a nice smooth curve on the edges, and came up with the following solution:  I create a bezier curve, align it as good as i can with the help of orthographic camera. then i extruded it to get the following:    After that I convert the curve to a mesh, join it with the car mesh and run "merge vertices by distance" to join the "alignment points". This looks so messy and it actually is. Now i have much n-gons, and it only gets a bigger mess when i add the missing faces.   How can I do such things in a better way? What is best practice here?

I need to round the edges of this object.  The bottom edges are going to be rounded in conjunction with another object, so, I guess, this should be left out right now.  I tried using the bevel tool (and a bevel modifier) on an edge (series of Blender edges), but I got the problems you see on the images. When selecting all edges, the bevel doesn't know any limit and isn't applied symmetrically.  When selecting only the edges shown (or only the other ones), I can't proceed with the rest of the bevel, and strange little artifacts appear.  FYI: The top surface is derived from an icosphere.    Without the subdivision shown above, a stair comes into existence (bad):    Whole object:


Determinant of the following $n \times n$ matrix: $$\begin{pmatrix} 2\cos \theta& 1 & 0 & \ldots & \ldots & 0 \\ 1 & 2\cos \theta & 1 & \ddots & & \vdots \\ 0 & 1& 2\cos \theta & \ddots & \ddots & \vdots \\ \vdots & \ddots & \ddots & \ddots & \ddots & 0  \\ \vdots &  & \ddots & \ddots & 2\cos \theta & 1 \\ 0 & \ldots & \ldots & 0 & 1 & 2\cos \theta\\ \end{pmatrix}.$$  Letting given matrix determinant as $D_n$, I find a relation $D_n-2\cos \theta D_{n-1}+D_{n-2}=0$, but after that how  I calculate $D_n?$ Please help.

How to show that the determinant of the following $(n\times n)$ matrix  $$\begin{pmatrix} 5 & 2 & 0 & 0 & 0 & \cdots & 0 \\ 2 & 5 & 2 & 0 & 0 & \cdots & 0 \\ 0 & 2 & 5 & 2 & 0 & \cdots & 0 \\ \vdots & \vdots& \vdots& \vdots & \vdots & \vdots & \vdots \\ 0 & \cdots & \cdots & 0 & 2 & 5 & 2 \\ 0 & \cdots & \cdots & \cdots & \cdots & 2 & 5 \end{pmatrix}$$  is equal to $\frac13(4^{n+1}-1)$?    More generally:     How does one compute the determinant of the following  (where the three diagonals are constant)?      $$M_n(a,b,c) = \begin{pmatrix} a & b & 0 & 0 & 0 & \cdots & 0 \\ c & a & b & 0 & 0 & \cdots & 0 \\ 0 & c & a & b & 0 & \cdots & 0 \\ \vdots & \vdots& \vdots& \vdots & \vdots& \vdots & \vdots \\ 0 & \cdots & \cdots & 0 & c & a & b \\ 0 & \cdots & \cdots & \cdots & \cdots & c & a \end{pmatrix}$$      Here $a,b,c$ can be taken to be real numbers, or complex numbers.   In other words, the matrix $M_n(a,b,c) = (m_{ij})_{1 \le i,j \le n}$ is such that $$m_{ij} = \begin{cases} a & i = j, \\ b & i = j - 1, \\ c & i = j + 1, \\ 0 & \text{otherwise.} \end{cases}$$  There does not seem to be an easy pattern to use induction: the matrix is not a diagonal  of the type $M = \bigl(\begin{smallmatrix} A & C \\ 0 & B \end{smallmatrix}\bigr)$ (where we could use $\det(M) = \det(A) \det(B)$ for the induction step), and there are no lines or columns with only one nonzero entry, so  gets complicated quickly.  Is there a general pattern that one could use? Or is the answer only known on a case-by-case basis? It's possible to compute the determinant by hand for small $n$:  $$\begin{align} \det(M_1(a,b,c)) & = \begin{vmatrix} a \end{vmatrix} = a  \\ \det(M_2(a,b,c)) & = \begin{vmatrix} a & b \\ c & a \end{vmatrix} = a^2 - bc \\ \det(M_3(a,b,c)) & = \begin{vmatrix} a & b & 0 \\ c & a & b \\ 0 & c & a \end{vmatrix} = a^3 - 2abc \end{align}$$  But there is no readily apparent pattern and the computation becomes very difficult when $n$ gets large.


I have a fairly straightforward question about defining exponentiation in rings: Given any element $a \in R$ of any ring $R$, what is $a^0$ defined as? Is it the additive identity or the multiplicative identity (if it exists)? In the context of groups we define $a^0 = e$ for whatever the identity of that one operation is. But in the context of rings, $a^n$ would refer to the ring product, so I would assume $a^0$ to be the multiplicative identity, but this doesn't always exist. Is there any convention, or is it simply left undefined/context dependent? Edit: In regards to being a duplicate of the $0^0$ question, I had already read through both the question and some answers, but I thought this was a 'fairly separate' question. In particular, this is about rings in general, and while there is a relationship, most of the discussion in the other question pertains explicitly to $\mathbb{R}$. For example discussion of non-integer powers, and limits as a motivating value for the definition, and the fact $\mathbb{R}$ has unity.

I have been a witness to many a discussion about numbers to the power of zero, but I have never really been sold on any claims or explanations.  This is a three part question, the parts are as follows...    1) Why does $n^{0}=1$ when $n\neq 0$?  How does that get defined?  2) What is $0^{0}$?  Is it undefined?  If so, why does it not equal 1?  3) What is the equation that defines exponents?  I can easily write a small program to do it (see below), but what about in equation format?    I just want a little discussion about numbers to the power of zero, for some clarification.    Code for Exponents: (pseudo-code/Ruby)  def int find_exp (int x, int n){     int total = 1;     n.times{total*=x}     return total; }


Why does this give me september 30 rather than oct 1?    var dob = new Date("1999-10-01") console.log(dob.toString())

I have a web page with three dropdowns for day, month and year. If I use the JavaScript Date constructor that takes numbers, then I get a Date object for my current timezone:  new Date(xiYear, xiMonth, xiDate)   Give the correct date, but it thinks that date is GMT+01:00 due to daylight savings time.  The problem here is that I then pass this Date to an Ajax method and when the date is deserialised on the server it has been converted to GMT and so lost an hour which moves the day back by one. Now I could just pass the day, month, and year individually into the Ajax method, but it seems that there ought to be a better way.  The accepted answer pointed me in the right direction, however just using setUTCHours() by itself changed:  Apr 5th 00:00 GMT+01:00    to  Apr 4th 23:00 GMT+01:00   I then also had to set the UTC date, month and year to end up with  Apr 5th 01:00 GMT+01:00   which is what I wanted.


QUESTION :  Let $a,b$ be positive integers such that $a\mid b^2 , b^2\mid a^3 , a^3\mid b^4 \ldots$.....so on, then prove that $a=b$  This is what I tried: Say $a≠b$ rather than $a>b≥1$ $$\exists k :a^{k-1}>b^k$$ Then: $$a^{k-1}>b^k$$ $$\left(\frac{a}{b}\right)^k>a$$ $$k>\log_{\left(\frac{a}{b}\right)}a$$ I am struck after this. I don't know what to do next (even I don't know what I have done is right or wrong). What to do next?  I apologise for asking a same question which exist  but I didn't understand that(due to limit).

The following is a well known problem   If $a|b^2; b^2|a^3; a^3|b^4; ....$ then $a=b$.  I started with $a$ is a prime $p$ and the conclusion immediately holds.  So I was comparing powers of primes but can't get anything useful.  Please help.


I am trying to call a future method from my scheduled apex but it is giving this error message   Scheduled class  global class Scheduledbacthfuture Implements Schedulable{  public Interface IScheduleDispached{     void execute(SchedulableContext sc); }  global void execute(SchedulableContext sc){     Type targetType = Type.forName('HANDLERNAME');     if(targetType != null){         IScheduleDispached obj = (IScheduleDispached)targetType.newInstance();         obj.execute(sc);     } } }   Handler   public class HANDLERNAME implements Scheduledbacthfuture.IScheduleDispached             {    public void execute(SchedulableContext sc)    {     //Call your Future Method Here    List<User> newusers = [Select Id,CFS_Activation_Date__c from user where (Profile.Name='CTCT Solution Provider (Login Based)'OR Profile.Name='CTCT Solution Provider (Named)')AND lmscons__Cornerstone_ID__c=NULL AND lmscons__CFS_Status__c='Not CFS user'];      if(newusers.size()>0)     System.debug(newusers.size()+' new users found will give them license in a sometime');     if(newusers.size()>0)    {     UserHandler.convertListToSet(newusers);   // lmscons.ConsumerUserWebservice.CreateConsumerUsers(newusers, false);     }   }    }      FATAL_ERROR System.CalloutException: Callout from scheduled Apex not   supported.

i have created a schedulable class which has to trigger a batch job. The run method for the batch class will get list of data to process from a webservice callout. Now, i got the exception below. Any suggestions please.     System.CalloutException: Callout from scheduled Apex not supported.   global class scheduledDeltaBatchable implements Schedulable {    global void execute(SchedulableContext sc) {     ID batchprocessid = BatchUpsertSAPCustomerMasterBPSync.run(SAPServices.GetSAPCustomerMasterBPSync('Delta'));    } }


Well, as a Webdeveloper, german language sucks.  I have a from. In the head, there is at the first place:  <meta charset="utf-8">   I also checked the header. The following is set:  Content-Type:text/html; charset=UTF-8   In php.ini my default-charset is:  default_charset="utf-8"   The problem is in HTML/PHP because when I write Umlauts (äöü) directly in the database, PHP gets the right string, when I var_dump it. On the other side when I fill out the textarea and send the form, the var_dump for the POST-Parameter has everytime 2 questionmarks instead of the Umlauts.  ä -> ??   How can I fix it?

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


Also duplicate of      Basically, what I am trying to do is :  struct A {     virtual ~A() {}     virtual int bar() = 0; };  struct B {     int bar() {return 1;} };  struct C {     int bar() {return 2;} };   struct D {     template <class T>     static int foo() {         T a;         return a.bar();     } };   template<class T, class U> int callFoo() {     return T::foo<U> (); ///error: expected primary-expression before '>' token }   int main(int argc, char** argv) {         std::cout << D::foo<B>() << std::endl; //This works of course         std::cout << D::foo<C>() << std::endl; //This works of course         std::cout << callFoo<D,B>() << std::endl;         std::cout << callFoo<D,C>() << std::endl;     }   How can I call a templated static method of a class which is parameter template of my function?

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


I've built a website were I can enter data into an SQL database using php. The problem is when the user enter's an apostrophe the function crashes (SQL reasons). I think a work around would be to sanitise the script or use majic quotes in my php function (which I've attached at the end). I'm new to php and totally lost if this is the correct approach. If any one can point me in the right direction I'd really appreciate it. Allan  PHP function;      function insert_wisha($wisherID, $description, $duedate, $Location, $Time, $Price, $Details) {     $description = $this->real_escape_string($description);     if ($this->format_date_for_sql($duedate) == null) {         $this->query("INSERT INTO wishes (wisher_id, description, Location, Time, Price, Details)" .                 " VALUES (" . $wisherID . ", '" . $description . "' ,'" . $Location . "', '" . $Time . "' , '" . $Price . "', '" . $Details . "')");     } else         $this->query("INSERT INTO wishes (wisher_id, description, due_date, Location, Time, Price, Details)" .                 " VALUES (" . $wisherID . ", '" . $description . "', "                 . $this->format_date_for_sql($duedate) . ", '" . $Location . "', '" . $Time . "', '" . $Price . "','" . $Details . "')"); }

If user input is inserted without modification into an SQL query, then the application becomes vulnerable to , like in the following example:  $unsafe_variable = $_POST['user_input'];   mysql_query("INSERT INTO `table` (`column`) VALUES ('$unsafe_variable')");   That's because the user can input something like value'); DROP TABLE table;--, and the query becomes:  INSERT INTO `table` (`column`) VALUES('value'); DROP TABLE table;--')   What can be done to prevent this from happening?


Currently I am studying time series  MA(q) $$X_t -\mu= \epsilon_t + \theta_1\epsilon_{t-1} + \theta_2 \epsilon_{t-2} + ... + \theta_q \epsilon_q$$ where $\theta_1,...,\theta_q$ are parameters and $\epsilon_t$ is a white noise with mean $0$ and constant variance.  I have been puzzling on how to compute $\epsilon_t.$ Are they just residuals?  This  illustrated how to compute $\epsilon_t$ in $MA(1)$ model. But I do not see how the same technique can be carried forward to $MA(q)$ model.

This is a basic question on Box-Jenkins MA models. As I understand, an MA model is basically a linear regression of time-series values $Y$ against previous error terms $e_t,..., e_{t-n}$. That is, the observation $Y$ is first regressed against its previous values $Y_{t-1}, ..., Y_{t-n}$ and then one or more $Y - \hat{Y}$ values are used as the error terms for the MA model.  But how are the error terms calculated in an ARIMA(0, 0, 2) model? If the MA model is used without an autoregressive part and thus no estimated value, how can I possibly have an error term?


My 2-year-old son is eating small black stones when he is playing outside. We were really shocked he considered those as "chips", and he tries to bite the stones and swallows them very often. Now we are not allowing him to play outside because we were really scared whether it will hurt his stomach.   Could any one please let us know how to stop this habit? How can we make him understand a "stone" is different from what he is thinking, and he's not allowed to eat it?

My 1.5-year-old has recently started putting small stones (the size of hazelnuts) in her mouth when we are outdoors, which of course can be very dangerous.   I have tried everything I could think of to prevent any unfortunate accidents:    reacted quickly to take the stone out with a finger - it worked the first few times, but now she keeps her mouth tight and tries to escape (which in turn worries me because she could accidentally choke while she struggles) in a serious tone told her to spit the stone in normal voice tone told her that mommy doesn't want her to put stones in her mouth asked her if she was hungry and offered her something to eat (the idea being: you put stuff in your mouth if you want to eat them) tried to distract her / ignore her action   She sees it as a game and laughs and runs around with the stone in her mouth. This happens almost every time we are outdoors playing, which is every day. If I do manage to take the stone out, she would put in another one 30 seconds later.   My question is: how to best handle this situation? Both in terms of prevention (if possible), and once she has the stone in her mouth.  Note: she is generally not putting other things in her mouth that are not edible. Before this "stone game", she had a "let's taste the sand" phase, which was far less dangerous.


I will be travelling from Katmandu to Istanbul with a 5 hour stopover in Delhi is a transit visa required.I have British passport and will not be leaving international airport.

I have read a lot on this subject on the Lonely Planet forum and it looks like the staff on ground can transfer your bags through the Delhi airport if you have a connecting flight without you having to go out to check them in again and therefore needing a visa. I refer of course to the situation when you go with 2 different airlines, because otherwise the luggage is transfered automatically.  I posted a  and mentioned it briefly there, however I think this subject deserves a separate question and a detailed answer.  Does it depend on the type on an airline? I have read that Jet is no problem, what about AirIndia and IndiGo? And what about the incoming flight to Delhi from Europe or USA, do they all can hand over you luggage to the Indian airlines and pick it up again on the way home? Do you have to contact them before and explain your situation? Or check in your luggage directly to your desired destination?


It is defined as $i^2 = -1$ then we can say $i=\pm \sqrt{-1}$  Then is true that $i$ can be equal to $ -\sqrt{-1}$

So I am about halfway through complex analysis (using Churchill amd Brown's book) right now.  I began thinking some more about the nature and behavior of $i$ and ran into some confusion.  I have seen the definition of $i$ in two different forms; $i = \sqrt{-1} $ and $i^2 = -1$.  Now I know that these two statements are not equivalent, so I am confused as to which is the 'correct' definition.  I see quite frequently that the first form is a common mistake, but then again Wolfram Math World says otherwise.  So my questions are:   What is the 'correct' definition of $i$ and why?  Or are both definitions correct and you can view the first one as a principal branch? It seems that if we are treating $i$ as the number with the property $i^2 = -1$, it is implied that we are treating $i$ as a concept and not necessarily as a "quantity"? If we are indeed treating $i$ as a concept rather than a "quantity", how would things such as $i^i$ and other equations/expressions involving $i$ be viewed?  How would such an equation have value if we treat $i$ like a concept?   I've checked around on the various imaginary number posts on this site, so please don't mark this as a duplicate.  My questions are different than those that have already been asked.


Aragorn is a Dunedain and Arwen is an Elf who has the power of immortality. Will their kids have the power of immortality ?

Elrond (who was 50% Elven) lived well over 6,000 years before departing Middle-earth. Because of his distant Elven lineage Aragorn lived over 200 years before he died. As a 3/4 Elf Arwen was immortal and lived for 2901 years before dying of grief (after the death of Aragon). Their son Eldarion would have been at least 37.5% elven. Should he expect his lifespan to be somewhere between Arwen's and Aragorn's? Or does he have enough Elven blood to live forever?


Are there any alternatives for Visual Studio on Ubuntu? I searched on Google and I could not find anything.

I have been developing in the windows space with Visual Studio for a while now with work, but I have also been using Ubuntu for a while and am keen to get into some software development for linux.  I should also note. I am not looking for .NET and I am aware of mono. I am also familiar with c++ development and some python, so the language isn't so much relevant as the "all in one" aspect.  I was interested to know if there is a useful all in one code/debug/design(gui) IDE similar to something like Visual Studio but for linux?


It is clear that if a frictional force must exist on an object that rolls without slipping, it must a static frictional force because the contact point of the object with the ground does not move.  I know that if a ball rolls on a flat surface, once it begins rolling without slipping, the frictional force is 0. I am confused, however, about the case when a ball rolls down a ramp. For the condition of rolling without slipping to hold, there must be a frictional force on the ball up the ramp. I am confused about where this frictional force comes from if the part of the ball touching the ramp isn't actually moving. It doesn't seem to make physical sense because from the ramp's perspective, it is touching a stationary object and thus there shouldn't be a frictional force.   Help??

Suppose a wheel is rolling smoothly on a horizontal plane i.e., it is rolling without slipping.  Now let's take the two cases of the horizontal plane:   It has friction It is frictionless   In the first case, as of my knowledge friction doesn't come into play when there is no slipping. So, will the wheel roll forever? If it comes to rest is the answer friction? If not what brings it to rest?  In the second case, there is no friction. So, here also will the wheel roll forever? And if it comes to rest what brings it to rest?


This is a question I picked up from Royden's.     Let $f$ be an increasing function on an open interval $I$. For $x_0\in I$ show that $f$ is continuous at $x_0$ if and only if there there exists two sequences {$a_n$}, {$b_n$} in $I$ such that $\forall n$, $a_n<x_0<b_n$, $\lim_{n\to \infty}[f(b_n)-f(a_n)]=0$   This is my attempt for the forward implication. Suppose $f$ continuous at $x_0$ and that for each pairs of  sequences {$a_n$}, {$b_n$} in $I$, $\lim_{n\to \infty}[f(b_n)-f(a_n)]\neq 0$. Then there exists some $\epsilon>0$ such that for each $N\in \mathbb{N}$ , there exists a $n>N$ such that $|f(b_n)-f(a_n)|\geq \epsilon$.  Also, there exists a $\delta_1>0$ such that $|f(b_n)-f(x_0)|<{\epsilon\over 2}$ and there exists a $\delta_2>0$ such that $|f(a_n)-f(x_0)|<{\epsilon\over 2}$ whenever $|b_n-x_0|<\delta_1$ and $|a_n-x_0|<\delta_2$. Notice that $$|f(b_n)-f(a_n)|=|f(b_n)-f(x_0)+f(x_0)-f(a_n)|\leq |f(b_n)-f(x_0)|+|f(x_0)-f(a_n)|<\epsilon$$ whenever  $|b_n-x_0|<\delta$ and $|a_n-x_0|<\delta$ where $\delta=$max{$\delta_1,\delta_2$}. We have arrived at a contradiction. Is this idea correct?

I want to show that if $f:(a,b)\to \mathbb R$ is a strictly monotone function and if $x_0\in (a,b)$ such that there exist two sequences $(a_n)$ and $(b_n)$ with $a_n<x_0<b_n$ and $\lim\limits_{n\to \infty}(f(b_n)-f(a_n))=0$, then $f$ is continuous at $x_0$.   By monotonicity we can say that $\lim\limits_{n\to \infty}f(a_n)=f(x_0)=\lim\limits_{n\to \infty}f(b_n)$. Let $(x_n)$ be a sequence in $(a,b)$ such that $x_n\to x$. Here I got stuck. How to show that $f(x_n)\to f(x_0)$? Please help!


This is my first installation of Ubuntu (18.10), and the first thing I noticed is that sound quality of any media is very bad (compared to Windows).  Most noticeable is absence of normalization of sound levels, watching movies without that becomes real pain, speech is silent, sound effects are loud and vice versa. In windows sound normalization is achieved by checking the check box, is there any similar way to do it in Ubuntu? Without getting PhD in console typing, because all the posts I found on this topic are too complicated (assumed that some things are obvious, whereas even opening a file to edit in Ubuntu is a challenge for me, so such posts are not useful). A manual for absolute beginners how to do this crucial thing could be very useful for many people.

As a Laptop user, I'm sure that a lot of people, even the ones using Netbooks would have already gone through this problem. Especially when listening to podcasts, and using it as an example, the sound might have loud moments and quiet moments, one person speaking loud and the other speaking very quiet in the same episode. Thereby, I always wanted the sound to be compressed system-wide, and I just noted the other day, that in Windows, some Realtek drivers already offer this function.  We have already a pulseaudio plugin for equalization system-wide, and although it still has problems like not letting us change its values and listen the change in real time, or cracking the sound while changing pulse volume, I do love it and use it. Now I'm just missing something to keep the sound around 0db (or near the volume level you're using) as a leveler plugin for pulseaudio.  Any suggestion?


I saw this sentence in a newspaper cartoon:      Not only are you dysfunctional — you appear to be completely spineless as well.   Is the verb are in the right position?

I have seen this construction quite often:      Online ads have been around since the dawn of the Web, but only in   recent years have they become the rapturous life dream of Silicon   Valley.   What is the rule there?. When your sentence doesn't start with pronoun + verb, invert them as verb + pronoun?. I know it sounds awkward but is it possible (grammatically correct) to use something similar to:      Online ads have been around since the dawn of the Web, but only in   recent years they have become...   And in any case, does this only work with have (or has)? Maybe it works fine with 'had' but I can't think of an example right now.


I've learned a little about . According to words on Internet, it says that the position and the velocity of an object cannot both be measured exactly at the same time. And there are some examples like:     Any attempt to measure precisely the velocity of a subatomic particle, such as an electron, will knock it about in an unpredictable way, so that a simultaneous measurement of its position has no validity.   This has been bothering me for a long time: If the uncertainty is cauesed by measuring instruments, then we can't say that particles (or everything) themselves are uncertain. So can I say the world is actually certain, and the reason why it looks uncertain is we can't predict exactly?

In many physics divulgation books I've read, this seems to be a commonly accepted point of view (I'm making this quote up, as I don't remember the exact words, but this should give you an idea):      is not a result of our lack of proper measurement tools. The fact that we can't precisely know both the position and momentum of an elementary particle is, indeed, a property of the particle itself. It is an intrinsic property of the Universe we live in.   Then this video came out:  (skip to , if you're already familiar with the uncertainty principle).  So, correct me if I'm wrong, what we may claim according to the video is:     the only way to measure an elementary particle is to make it interact with another elementary particle: it is therefore incorrect to say that an elementary particle doesn't have a well defined momentum/position before we make our measurement. We cannot access this data (momentum/position) without changing it, therefore it is correct to say that our ignorance about this data is not an intrinsic property of the Universe (but, rather, an important limit of how we can measure it).   Please tell me how can both of the highlighted paragraphs be true or how they should be corrected.


We all are used to think that the lowest base for numeral system is 10 2. But is it possible to do math in unary system?   I found the funny section in MS windows registry:  If you want to add monospace font to console font set, you must create entry wich name is filled with exact numbers of '0'. Is that example of unary numeral system?  But i have no idea how to write 'zero' or negaitve numbers in such a numeral system.

In the decimal system: $...-3, -2, -1, 0, 1, 2, 3...$ In the binary system: $...-11, -10, -1, 0, 1, 10, 11...$ In the unary system: $-111, -11, -1, \text{ ??? }, 1, 11, 111...$   I was only able to find a related question but none with an answer so far:


Xubuntu 18.10  So the other day I went to run TeamViewer and found it was gone. So I tried to re-install it and this happens:  $ sudo apt install teamviewer Reading package lists... Done Building dependency tree       Reading state information... Done Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation:  The following packages have unmet dependencies:  teamviewer : Depends: libqt5qml5 (>= 5.5) but it is not going to be installed or                        qt56-teamviewer but it is not going to be installed               Depends: libqt5quick5 (>= 5.5) but it is not going to be installed or                        qt56-teamviewer but it is not going to be installed               Depends: libqt5webkit5 (>= 5.5) but it is not going to be installed or                        qt56-teamviewer but it is not going to be installed               Depends: qml-module-qtquick2 (>= 5.5) but it is not going to be installed or                        qt56-teamviewer but it is not going to be installed               Depends: qml-module-qtquick-controls (>= 5.5) but it is not going to be installed or                        qt56-teamviewer but it is not going to be installed               Depends: qml-module-qtquick-dialogs (>= 5.5) but it is not going to be installed or                        qt56-teamviewer but it is not going to be installed               Depends: qml-module-qtquick-window2 (>= 5.5) but it is not going to be installed or                        qt56-teamviewer but it is not going to be installed               Depends: qml-module-qtquick-layouts (>= 5.5) but it is not going to be installed or                        qt56-teamviewer but it is not going to be installed E: Unable to correct problems, you have held broken packages.   I've tried a few things:  $ sudo apt-get install -f Reading package lists... Done Building dependency tree       Reading state information... Done 0 upgraded, 0 newly installed, 0 to remove and 2 not upgraded.   I've also tried Synaptic to install qt56-teamviewer, but that fails too and just says it's "broken".  I suspect a non-standard PPA repository, but any useful way to determine which one so I just fix this problem without causing other problems (such as blowing away the entire sources.list and replacing with default)? I noticed a lot of the sources have bionic in them even though I'm on cosmic. Should I change all references to bionic to cosmic instead?  -----------edits below---------      $ apt-cache policy qt56-teamviewer libqt5qml5 teamviewer qt56-teamviewer:   Installed: (none)   Candidate: 5.6.3.0   Version table:      5.6.3.0 500         500 http://linux.teamviewer.com/deb stable/main amd64 Packages libqt5qml5:   Installed: (none)   Candidate: 5.9.5-0ubuntu1.1   Version table:      5.9.5-0ubuntu1.1 500         500 http://us.archive.ubuntu.com/ubuntu bionic-updates/universe amd64 Packages      5.9.5-0ubuntu1 500         500 http://us.archive.ubuntu.com/ubuntu bionic/universe amd64 Packages teamviewer:   Installed: (none)   Candidate: 14.2.2558   Version table:      14.2.2558 500         500 http://linux.teamviewer.com/deb stable/main amd64 Packages      14.1.18533 500         500 http://linux.teamviewer.com/deb stable/main amd64 Packages         100 /var/lib/dpkg/status      14.1.9025 500         500 http://linux.teamviewer.com/deb stable/main amd64 Packages      14.1.3399 500         500 http://linux.teamviewer.com/deb stable/main amd64 Packages      14.0.14470 500         500 http://linux.teamviewer.com/deb stable/main amd64 Packages      13.2.26559 500         500 http://linux.teamviewer.com/deb stable/main amd64 Packages      13.2.13582 500         500 http://linux.teamviewer.com/deb stable/main amd64 Packages

There are now errors when updating and I cannot install most software due to a corrupted  /etc/apt/sources.list   file. Is there a copy I can download to replace it?  The file would be for Ubuntu 12.04 (Final Beta) in the United States.


Would someone give a good list of the equipment, tools, supplies, etc., I would need to take up carpet and padding that is glued to the concrete floor.  Thank you.

I have a 12x15' sun room that currently has carpet over concrete. I pulled a 3' section of carpet and the entire floor has adhesive.  Can I remove this using a liquid chemical or do I need a machine?  The house was build in '96 so I'm assuming there's no harmful chemicals existing on the floor to worry about.  I plan to tile over the concrete when finished.


I'm currently trying to do a basic "minecraft style" game. I know how difficult it is to create a game like this, that's why I juste want to do the base of a game like this. I did a class which creates one block face, another one which handles the creation of the whole block (All the faces), and a Chunk class which stores and renders all blocks.  My chunks are 16x1x16 sized (Just 1 layer of blocks). I did a first optimisation step : I removed all faces that aren't visibles (If two blocks are sided, I don't add the two sided faces). And another optimisation with the frustrum.  One chunk rendered Removing invisble faces     With one chunk rendered, framerates are good, but above 4-5 chunks rendered, framerates are becoming low. I don't know how to optimise more. I heard about VertexBuffers and IndexBuffers, but I don't know how to add them, because I have a lots of Blocks, in a lots of chunks. And maybe, in the future, how manage that if I want to destroy/place blocks ?  So my question is : How I can optimise the game ?  Thank you !  (Excuse my english, i'm a French guy eheh)

I'm writing my own clone of Minecraft (also written in Java). It works great right now. With a viewing distance of 40 meters I can easily hit 60 FPS on my MacBook Pro 8,1. (Intel i5 + Intel HD Graphics 3000). But if I put the viewing distance on 70 meters, I only reach 15-25 FPS. In the real Minecraft, I can put the viewing disntance on far (= 256m) without a problem. So my question is what should I do to make my game better?  The optimisations I implemented:   Only keep local chunks in memory (depending on the player's viewing distance) Frustum culling (First on the chunks, then on the blocks) Only drawing really visible faces of the blocks Using lists per chunk that contain the visible blocks. Chunks that become visible will add itself to this list. If they become invisible, they are automatically removed from this list. Blocks become (in)visible by building or destroying a neighbour block. Using lists per chunk that contain the updating blocks. Same mechanism as the visible block lists. Use nearly no new statements inside the game loop. (My game runs about 20 seconds until the Garbage Collector is invoked) I'm using OpenGL call lists at the moment. (glNewList(), glEndList(), glCallList()) for each side of a kind of block.   Currently I'm even not using any sort of lighting system. I heard already about VBO's. But I don't know exactly what it is. However, I'll do some research about them. Will they improve performance? Before implementing VBO's, I want to try to use glCallLists() and pass a list of call lists. Instead using thousand times glCallList(). (I want to try this, because I think that the real MineCraft doesn't use VBO's. Correct?)  Are there other tricks to improve performance?  VisualVM profiling showed me this (profiling for only 33 frames, with a viewing distance of 70 meters):    Profiling with 40 meters (246 frames):    Note: I'm synchronising a lot of methods and code blocks, because I'm generating chunks in another thread. I think that acquiring a lock for an object is a performance issue when doing this much in a game loop (of course, I'm talking about the time when there is only the game loop and no new chunks are generated). Is this right?  Edit: After removing some synchronised blocks and some other little improvements. The performance is already much better. Here are my new profiling results with 70 meters:    I think it is pretty clear that selectVisibleBlocks is the issue here.  Thanks in advance! Martijn  Update: After some extra improvements (like using for loops in stead of for each, buffering variables outside loops, etc...), I now can run viewing distance 60 pretty good.  I think I'm going to implement VBO's as soon as possible.  PS: All source code is available on GitHub:


On what basis is each chromosome given a number? There appears to me to be no visible ordering between each pair. Is there any reason other than differentiation?

What were the criteria devised for the numbering convention employed in human chromosomes? When was it fixed?  Correct me if I am wrong; it appears that chromosome pairs 1 to 22 were originally ordered in terms of perceived structural size, which ended up fitting neatly with the quantity of base pairs (but not with the quantity of genes).  The sex chromosomes in turn were arbitrarily assigned as "pair 23".  Is this sound?  Thanks in advance.


I need help making getting multiple buttons to change color when clicked and go back to the previous color when clicked a second time.  Here is my code:  <!DOCTYPE html> <html> <head>   <style>     .choices{       background-color:#F0F3F4;       padding:15px 32px;       display:inline-block;       font-size:16px;       font-family:century gothic;       font-weight:bold;       margin:6px 4px;       cursor:pointer;       border-radius:12px;       border:2px solid #5D6D7E;     }      .choices:hover{       background:#D0D3D4;     }   </style>   <script>    </script> </head> <body>   <div>     <button class="choices" type="button" id="button" >Grapes</button>     <button class="choices" type="button" id="button">Bananas</button>     <button class="choices" type="button" id="button">Strawberries</button>     <button class="choices" type="button" id="button">Apples</button>   </body> </html>   I'm not super experienced with javascript so I think I just need help figuring out how I can use javascript to solve the problem.

How can I change the class of an HTML element in response to an onclick or any other events using JavaScript?


I am trying to make a simple python script that starts a subprocess and monitors its standard output. Here is a snippet from the code:  process = subprocess.Popen([path_to_exe, os.path.join(temp_dir,temp_file)], stdout=subprocess.PIPE) while True:        output=process.stdout.readline()     print "test"   The problem is that the script hangs on output=process.stdout.readline() and that the line print "test" only executes after the subprocess is terminated.  Is there a way to read standard output and print it without having to wait for the subprocess to terminate?  The subprocess which I am starting is a Windows binary for which I do not have the source code.  I have found several similar questions, but the answers are only applicable on Linux or in case I have the source of the suprocess I am starting.

I'm using the  to start a subprocess and connect to its output stream (standard output). I want to be able to execute non-blocking reads on its standard output. Is there a way to make .readline non-blocking or to check if there is data on the stream before I invoke .readline? I'd like this to be portable or at least work under Windows and Linux. Here is how I do it for now (it's blocking on the .readline if no data is available): p = subprocess.Popen('myprogram.exe', stdout = subprocess.PIPE) output_str = p.stdout.readline()


I started downloading about 1gb from a colleague, and received 750mb in about 8 hours. The command I used was $ scp dev@dev_server:/home/dev/trainingVM/Centos7VMa_app_zxTmw457.ova  What command could I use next, so that the remainder would download in under 3 hours, not 10?

I am trying to fetch a log file which is repeatedly updated. I want that updated file, but don't want to download the entire file again and again from the remote system via SCP.  Any idea to achieve this in minimal network usage?


Solder masks can be had in many different colors. I have personally gotten white, black, red, and blue. But green is, by far, the most prevalent color on printed circuit boards, and the default at every fab house I've seen. Why green?

Green is the most common circuit-board color because it has become an industry standard.  What I'm interested in is How the traditional "PCB Green" become a standard in the first place?   Were there any interesting historical reasons for the initial choice, or was it just a product of what one particularly successful company was doing that became the de-facto standard?


My Apache 2.2 is running on port "8080" I want to call my site url http://www.example.in:8080/abc/xyz.html/index.php  (xyz.html is a folder)    as ....  http://www.example.in:8080/abc/xyz.html  Can any one help me with the .htaccess for this..

This is a  about Apache's mod_rewrite.   Changing a request URL or redirecting users to a different URL than the one they originally requested is done using mod_rewrite. This includes such things as:   Changing HTTP to HTTPS (or the other way around) Changing a request to a page which no longer exist to a new replacement. Modifying a URL format (such as ?id=3433 to /id/3433 ) Presenting a different page based on the browser, based on the referrer, based on anything possible under the moon and sun. Anything you want to mess around with URL   Everything You Ever Wanted to Know about Mod_Rewrite Rules but Were Afraid to Ask!  How can I become an expert at writing mod_rewrite rules?   What is the fundamental format and structure of mod_rewrite rules? What form/flavor of regular expressions do I need to have a solid grasp of? What are the most common mistakes/pitfalls when writing rewrite rules? What is a good method for testing and verifying mod_rewrite rules? Are there SEO or performance implications of mod_rewrite rules I should be aware of? Are there common situations where mod_rewrite might seem like the right tool for the job but isn't? What are some common examples?   A place to test your rules  The  web site is a great place to play around with your rules and test them. It even shows the debug output so you can see what matched and what did not.


Given $m \in \mathbb{Z}$, let $m\mathbb{Z}$ denote the set of integer multiples of $m$, i.e. $m\mathbb{Z} := \{mk\mid k \in \mathbb{Z}\}$.   Now let $a,b \in \mathbb{Z}$ with $a,b$ not both $0$. Prove that $a\mathbb{Z} \cap b\mathbb{Z} = \operatorname{lcm}(a,b)\mathbb{Z}$.   I am trying to write a proof for this, but I am unsure of what method to use. Also I am confused by $mk\mid k$, because wouldn't $m=1$ for this to be true.

The question is      Prove that $a\mathbb{Z}\cap b\mathbb{Z}=[a,b]\mathbb{Z}$.   Hint:First prove $b\mid a \Leftrightarrow a\mathbb Z\le b\mathbb Z$ and then prove $a\mathbb Z+b\mathbb Z=(a,b)\mathbb Z$   I managed to prove $b\mid a\Leftrightarrow a\mathbb Z\le b\mathbb Z$. About the next claim: From the first statement ($b\mid a...$) it follows that since $(a,b)\mid a$ and $(a,b)\mid b, a\mathbb Z+b\mathbb Z\le(a,b)\mathbb Z$. My problem is proving the opposite side (a.k.a $a\mathbb Z+b\mathbb Z\ge(a,b)\mathbb Z$). How can I do so and how can I proceed from $(a,b)$ to $[a,b]$?


In Adventurer's League, can the spell Booming Blade be casted using an improvised weapon (a shield)?

Green-Flame Blade:      As part of the action used to cast this spell, you must make a melee   attack with a weapon against one creature within the spell's range,   otherwise the spell fails.   This states that so long as the attack is a melee attack made with a weapon, you may use this cantrip and apply its affects. I realize improvised weapon has weapon in the name, and is under the weapons category, but it would also mean that I can use a mug as an improvised weapon with Booming Blade. I see no reason why this would not work, but  I'm still curious to see how others may interpret this.


Suppose I have a list [1,2,3,4,5]. Now I want to pass the elements of this list, starting from 3rd element to a method.  i.e. i want to invoke:  myfunction([3,4,5])   How can I do this in python. tried passing mylist[2], but it doesn't quite work this way it seems.

I need a good explanation (references are a plus) on Python's slice notation.   To me, this notation needs a bit of picking up.   It looks extremely powerful, but I haven't quite got my head around it.


I have to prove that for $a,b>2$, $a,b\in \Bbb{N}$  that $2^a+1$ is never divisible by $2^b-1$. The method I used is by taking cases, first of them being $b>a$. Now since $b>a$ implies $2^b-1>2^a+1$. That would mean that $2^a+1$ is never divisible by $2^b-1$.   For the case $a=b=k$, I wrote $2^k=2n$. So the questions reduces down to the fact that $2n+1$ is not divisble by $2n-1$. Now if you look at the sequence formed by $2n+1$ and $2n-1$ for different values of $n$ it is a sequence of odd numbers(i.e $1,3,5,\cdots$).Now given any value of $n$ the number $2n+1$ gives a number in the sequence whose preceding number is given by $2n-1$. Now given two consecutive odd numbers(By consecutive I mean in this arithmetic progression $(1,3,5,\cdots$)) there gcd is always one and hence not divisible.   But I do not know how to do it for the case $a>b$

Let $a,b>2$ be positive integers. We need to show that $2^a +1$ is not divisible by $2^b-1$.  Could any one give me hint?


Iam asking about the verb have when using it as possessing matter. I know the verb (has) comes with he,she,it and the verb (have) comes with I, you, we, they.   Now,why we say; he has a car, and we say in the question, does he have a car?   My question why not say, does he has a car?   Also, which sentence  is correct?      Does he has the responsibility of the accident.   Does he have the responsibility of the accident

Generally we use "hads* with he , she , and it.   So which one is correct to say ?  Does this phone has / have xyz function ?   Does his father has / have a car ?


Let $ a \in \mathbb{N}$, $ b \in \mathbb{N}_0 $, $ r \in \mathbb{N}_0 $, $ q\in \mathbb{N} $ and $ b \leq a$ so that $$a = bq + r $$with $$ 0 \leq  r \lt b$$ Proof: Let $ D = \{d \in \mathbb{Z} \vert ~  d \mid a \text{ and } d \mid b \}$ and Let $ D' = \{d \in \mathbb{Z} \vert ~ d \mid b \text{ and } d \mid r \}$ Let $ x \in D  $, so that $x \mid a$ and $x \mid b$: $$ a = bq +r   $$ $$ a - bq  = r   $$ So $x \mid a-bq=r$ so $x \mid r$ Let $$ x \in D',  $$ so that $x \mid b$ and $x \mid r$: $$ a = bq +r $$ So $x \mid b$ and $x \mid r$ but also $x \mid a$ and since $$ a \in D$$ $$ \gcd(a,b) = \gcd(b,r)$$ Any critique? Did i proved it somehow in a correct way? If not, could you show me what i did wrong or how to do it properly? Thanks in advance!

Given: $a = qb + r$. Then it holds that $\gcd(a,b)=\gcd(b,r)$. That doesn't sound logical to me. Why is this so?    Addendum by LePressentiment on 11/29/2013: (in the interest of  and averting a duplicate)  What's the intuition behind this result? I only recognise the proof and examples solely due to algebraic properties and formal definitions; I'd like to apprehend the result naturally.


I have a client who is on a sugar detox/diet. She can't eat any bread because all the bread companies added sugar. Why do bread companies add sugar to their breads?

My recipe says 1 tablespoon of sugar per loaf.   This seems like too small an amount for flavor.   The recipe is as follows:   3 cups flour 1 teaspoon salt 2 teaspoons active-dry yeast 1 tablespoon sugar 2 tablespoons oil 1 cup water knead, wait 1 hr, knead again, wait 1.25 hr, bake for 30min @ 350   Is this for flavor, or is there another purpose?


I would just like to know how to upgrade Xubuntu 18.04 to Xubuntu 20.04 Thank you Thank you

What are the different ways I can use to upgrade Ubuntu from one release to another?