I am trying to make a second Toolbar, next to the one I have in my top bar. Basically there is a Button and when this is pressed, a bar pops up in the window. The user should be able to read something on the bar and can push a Button. Right now I am trying to just get text on there. But that doesn't seem to work.  .java function: (called when some button is pushed, this shows the toolbar)  public void showDialogue() {     //Set popupscherm as view     View v = getLayoutInflater().inflate(R.layout.popupscherm,null);     AlertDialog.Builder adb = new AlertDialog.Builder(GraphActivity.this);     adb.setView(v);     // Find the toolbar view inside the activity layout     toolbar = (Toolbar) findViewById(R.id.toolbar);     toolbar.setTitle("test"); //Here it gives the error     AlertDialog alert = adb.create();      alert.show();   popupscherm.xml  <?xml version="1.0" encoding="utf-8"?>  <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"     xmlns:app="http://schemas.android.com/apk/res-auto"     android:layout_width="match_parent"     android:layout_height="match_parent"     android:orientation="vertical">      <android.support.v7.widget.Toolbar         android:id="@+id/toolbar"         android:minHeight="?attr/actionBarSize"         android:layout_width="match_parent"         android:layout_height="wrap_content"         android:background="?attr/colorPrimary">     </android.support.v7.widget.Toolbar>      </LinearLayout>   error:  Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.support.v7.widget.Toolbar.setTitle(java.lang.CharSequence)' on a null object reference

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


I have an android next book tablet. I have a 16 GB SD card in it. Why is it still telling me I have insufficient space? How can I make things download straight to the SD card and not the internal storage?

I would like to know whether there is a way to tell Android to install applications on the micro SD card by default instead of having to download applications to internal memory first and then having to move them to the SD card manually.  Thanks


I.ve this thing in php  $v = "test";   How do i pass this to javascript  I did like this    <script>   var t = <?php echo $v; ?>  </script>   I'm passing that t to URL  But ii says undefined

What is the easiest way to encode a PHP string for output to a JavaScript variable?  I have a PHP string which includes quotes and newlines.  I need the contents of this string to be put into a JavaScript variable.  Normally, I would just construct my JavaScript in a PHP file, à la:  <script>   var myvar = "<?php echo $myVarValue;?>"; </script>   However, this doesn't work when $myVarValue contains quotes or newlines.


Currently, I have many historical questions (which have short, definitive, objective answers) that I would like to ask about games, and gaming. While much of gaming history is not necessarily well known, a lot of that is changing. Questions like:    Why does Mario have a mustache? (yes, there is a non subjective answer to this!)  Why did the original zelda have such strange enemy names?  Why did early consoles have so few buttons?  Why was Japanese Mario 2 not released in the United States?  Why did John Romero leave id?    The answers to these questions can be found, and answers can be backed up with evidence, citations etc. Since this information is historical (over 30 years old some of it) it is not hidden behind non-disclosures, as some might assume. However, there is no Stack Exchange that I know of that accepts these types of questions about games, while there is a an ever expanding study of gaming history.   Edit: Just so those skipping the comments know, no, I am not allowed to post these types of questions on "Gaming" - though I wish I could.

Is there a general discussion section for curious questions? Or are we simply left to swallow such curiosity because the results of it may or may not benefit a big crowd? Sample question There's an idiom, "It costs a moon". As of now NASA hasn't revealed if the Moon has precious elements. This brings some curious thoughts to me... What if the Moon has precious metals, gas, etc.? Does anyone own the moon or other planets in our solar system? Like Americans? Russians, Germans, Japanese, Chinese or British? Are there any constitutions that refrain anyone from such access or ownership to solar elements (either research wise or commercial wise)?


I am trying to solve the following question:     For each positive integer $n$, strictly larger than 1, it holds that $n^{n-1}-1$ is divisible by $(n-1)^2$.   This question appears in a chapter on the binomial theorem. I tried solving it by induction, with not much of a result. Then I decided to take another approach: just use Euclidean division. I got the following result: $$n^{n-1}-1 = (n-1)(n^{n-2} + n^{n-3} + \ldots + n +1)$$ hence I need to prove that the second factor is divisible by $n-1$. Here, I applied Euclidean division and I think the result is something like $$n^{n-2} + n^{n-3} + \ldots + n +1 = (n-1)(n^{n-3} + 2n^{n-4} + \ldots + )$$ I have trouble finding the correct terms.  Also, this way of solving does not use the binomial theorem. The exercises in this chapter are specifically on this theorem and on some binomial coefficient-identities.  My question is: can anyone explain me how I could solve this using the binomial theorem? (also, is what I have done so far correct and how to proceed?)

How do you prove this?  $$\left(n-1\right)^2\mid\left(n^k-1\right)\Longleftrightarrow\left(n-1\right)\mid k$$


Every time you hear of Batman catching the worst of psychopaths, it seems like the worst that happens to them is being sent to Arkham Asylim.  Does that mean that Gotham has no death penalty? If so, is it explicitly explained why in canon?  Restriction: I'm only interested in mainline canon. E.g. no Elseworld or by-design alternate dystopian Gotham versions.

With the amount of super villains roaming the streets of  and the massive body count that inevitably follows in their wake, has the death sentence ever been introduced to try and handle the crime epidemic?  Incarceration doesn't seem to work as [] escapes  /  whenever he / she feels like it.  Have we ever seen the death sentence put to use in Gotham, even for a short period of time?   * Extra points if you can tell me who that guy is on the left, in front of Killer Croc and behind Scarecrow in that rogue's gallery picture


I try to calculate the following limit:   $$\lim_{n\to\infty} \frac{n^{\log(n)}}{(\log n)^n}$$  I tried this:   $$ \lim_{n\to\infty} e^{(\log(n))^2 - n \log(\log(n))} $$   Is this useful? & what do now?

Solve for   $$ \lim_{x \rightarrow \infty} \frac{x^{\ln(x)}}{(\ln(x))^x} $$   I used l'Hôpital's rule but in vain. Could you help me someway. Thanks for attention.


What's that word where one is so absorbed into the environment around them and is unable to think, judge and decide as they would normally do by themselves? And no I'm not talking about indoctrination or brainwashing; more like going to a party and doing crazy shit because others are doing it without second guessing yourself, even when you're sober. In reality, when you look back on it, you realise how subtly but potently influenced you were by your friends or the atmosphere. Encapsulating that psychological phenomenon, what word sums that up in and of itself?

What is a word to describe the behaviour where you do something because everyone is also doing this, to the point where you do it without any clear reason?


Is this a proper way to simulate the joint cdf of normal rvs with perfect positive correlation?  I followed these steps:   I generate 10 000 observations for two independent uniform rvs, $U_1\sim U(0,1),U_2\sim U(0,1)$.  The copula function for perfectly dependent rvs is the comonotonicity copula $C(u_1,u_2)=min(u_1,u_2)$. I plug in the simulated values of $U_1$ and $U_2$ to get simulated values of $C$. I transform $U_1$ and $U_2$ using the std. normal quantile function, to get $X_1\equiv \Phi^{-1}(U_1)$, $X_2\equiv \Phi^{-1}(U_2)$.  I then gather together the simulated $(X_1,X_2,C)$. If I plot this triplet in a 3-dimensional plot, should it represent the cdf of bivariate normal variables with correlation coeff. 1?    Edit: This is not simulating from a Gaussian copula. This is about generating the cdf itself (the cdf depends on the marginal distributions).

Suppose that I have two univariate marginal distributions, say $F$ and $G$, which I can simulate from. Now, construct their joint distribution using a , denoted $C(F,G;\Sigma)$. All the parameters are known.  Is there a non-MCMC method for simulating from this copula?


I want to write down a algorithm using TeXStudio. The algorithm is very huge so it cannot fit in one page. I use \usepackage{algorithm} ,\usepackage[noend]{algpseudocode} to write down this algorithm. I have a demo code here   \documentclass{article} \usepackage{amsmath} \usepackage{xcolor} \usepackage{algorithm} \usepackage[noend]{algpseudocode}   \begin{document} \begin{algorithmic} \State $i\gets 10$ \If {$i\geq 5$}      \State $i\gets i-1$  \Else   \If {$i\leq 3$}         \State $i\gets i+2$      \EndIf \EndIf  \end{algorithmic} \end{document}   Now I want to write down   \begin{document} \begin{algorithmic} \State $i\gets 10$ \If {$i\geq 5$}      \State $i\gets i-1$  \Else   Upto this portion in one page and rest of the portion into another page.      \If {$i\leq 3$}         \State $i\gets i+2$      \EndIf \EndIf  \end{algorithmic} \end{document}   This portion is in another page.  I saw various example in stack exchange which define this problem but I cannot understand how this works. So if anyone help me to divide my example into two pages it is good for me.  Thank you in advance.

I am writing a few rather large pseudocode functions using algorithm and algorithmic, i.e. my code looks something like:  \begin{algorithm}                      \caption{Coolest Algorithm ever}           \label{findme}                           \begin{algorithmic} [1]                   % enter the algorithmic environment \REQUIRE    Here are a few variables \\             variable 2 \\             variable 3  \ENSURE     this is the output \\             output 2  \STATE $some cool code here$ \STATE $some cool code here$ \STATE $some cool code here$ \STATE $some cool code here$ \end{algorithmic} \end{algorithm}   Unfortunately this code does not fit on one page and I am definitely not able to split it into some subfunctions or so (I already did that as far as possible).  So now I need to split up the algorithm into two pages, but I have no idea how.  The easiest way I can imagine is just to start a new algorithm on the new page, but this time letting the line counter start at line 35 or so instead of 1. But how can I do that?  Please not that there is already a similar question here on this site, but it deals with the package algorithmicx.


I have a trigger that plays an animation but when i switch scene and i come back to the original scene, the animation plays again. I want to remember actioned triggers in order to play triggers once per scene. How can I do that?  The GlobalScript  public class GlobalScript : MonoBehaviour  {     public static GlobalScript Instance;     public Animator ani;     void Awake ()           {         if (Instance == null)         {             DontDestroyOnLoad(gameObject);             Instance = this;         }         else if (Instance != this)         {             Destroy (gameObject);         }       } }   The current script (Running every time i load the scene)      public Animator ani;     public AudioClip sound;     public GameObject text;     private int seconds = 2;     //var delay = 2.0; //This implies a delay of 2 seconds.  //  public void SavePlayer(){ //      GlobalScript.Instance.ani= ani; //  }      // Use this for initialization     void Start () {         ani= GlobalScript.Instance.ani;         ani.enabled = false;         text.SetActive (false);     }      void OnTriggerEnter(Collider other){         AudioSource.PlayClipAtPoint (sound, transform.position);         ani.enabled = true;         text.SetActive (true);         Destroy (gameObject);         Destroy (text,3);         //text.SetActive (true);         //StartCoroutine(Die());     }      //And function itself     IEnumerator Die(){         //play your sound         text.SetActive(true);         yield return new WaitForSeconds(2); //waits 3 seconds         Destroy(gameObject); //this will work after 3 seconds.     } }

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


I'm trying to install the lastest version of ceph on my armhf platform. I have already updated my installed release of ubuntu to the latest development of Xenial.  problem is, everytime i check, i find ceph version 0.94.5 (hammer) available for download. but when i check the actual repository at ports.ubuntu.com, i find version 9.2 (Infernalis) available. but the packages.[gz,bz2] file always lists version 0.94.5 instead.  what's the reason for this, and how can I fix this to install the latest available version ?  to explain that my questions is different from the proposed, i'm asking about the newest release which is already available in the repository. Thanks!

Why are packages in the official Ubuntu repositories older than the latest (upstream) versions from Debian Sid, PPAs, the authors, etc.?


In his first lesson (transcripted in "Tips on Physics"), Feynman talks about math for physicists in a very cool and practical way. And at the end of the section he talks something like "so the first thing to do is to learn to learn derivative, integral and algebra" (I don't know how much precise I'm being because I've read it in Portuguese). I would to know if there is some book that deals with math as Feynman did it in this lesson (respecting formalities, but teaching how to use the practical rules)? Also, someone have any recommendations for algebra book (college level)?

Every once in a while, we get a question asking for a book or other educational reference on a particular topic at a particular level. This is a meta-question that collects all those links together. If you're looking for book recommendations, this is probably the place to start.  All the questions linked below, as well as others which deal with more specialized books, can be found under the tag  (formerly ).  If you have a question to add, please edit it in. However, make sure of a few things first:   The question should be tagged  It should be of the form "What are good books to learn/study [subject] at [level]?" It shouldn't duplicate a topic and level that's already on the list   Related Meta:


In this case I'm trying to understand the difference between this wrong strdup and the good one.  char *wrong_strdup(char *str) {     char *dest;      dest = str;     return (dest); }

What is the purpose of the strdup() function in C?


In connection with the question  I would like to know whether $(0,1)$ and $(0,1]$ are homeomorphic. The map mentioned in the above question is onto but not a bijection. So does such a continuous bijection exist?

As the topic is there exist a homeomorphism between either pair of $(0, 1),(0,1],[0,1]$


If an RHB switches and becomes an LHB and the ball was going to LHB's off-side, is it a wide just because anything on the leg side is a wide.[since the batsman is an RHB] when the ball comes to play ?

It is permitted for a batsman to reverse or switch his bat from right to left or vice versa for getting runs.  If they missed the ball means, what is the rule there regarding wide?  To be more clear, for ex,  If a batsman faces the ball with RHB and switch his bat to LHB and missed the ball, now the ball went outside the leg stump according to LHB, is this a wide ball?


I understand and recognize that storing passwords in my own database is a massive security hole compared to using services like Google or Facebook, but I was wondering if the following code could be used to securely store usernames and passwords using a salted hash:  $username = $_POST['user'] $salt = md5(openssl_random_psuedo_bytes(24, true)); $pass = sha1($salt.$_POST['pass'])   I believe it's fairly secure, but I'm no expert.  EDIT:  I think this would be better, would it?  $salt1 = md5(sha1(openssl_random_psuedo_bytes(32, true)); $pass = password_hash($_POST['pass'] . $salt1, PASSWORD_BCRYPT);   Am I any closer to finding a decent mechanism for storing passwords?

It is currently said that MD5 is partially unsafe. Taking this into consideration, I'd like to know which mechanism to use for password protection.  This question,   suggests that hashing multiple times may be a good idea, whereas  suggests using salt.  I'm using PHP. I want a safe and fast password encryption system. Hashing a password a million times may be safer, but also slower. How to achieve a good balance between speed and safety? Also, I'd prefer the result to have a constant number of characters.   The hashing mechanism must be available in PHP It must be safe It can use salt (in this case, are all salts equally good? Is there any way to generate good salts?)   Also, should I store two fields in the database (one using MD5 and another one using SHA, for example)? Would it make it safer or unsafer?  In case I wasn't clear enough, I want to know which hashing function(s) to use and how to pick a good salt in order to have a safe and fast password protection mechanism.  Related questions that don't quite cover my question:


I'm new to Xubuntu, having used Windows XP for many years.  On Windows I ran MiKTeX, with editors/front-ends WinEdt and TeXworks.  I found the MiKTeX Package Manager and Update tools to be especially useful.  I'm now running Xubuntu 12.04 LTS.  How should I install a complete, easily updatable LaTeX system with text editor/front end?

I'd like to learn and use LaTeX on Ubuntu.  What packages do I need?  What is the best editor for LaTeX code on Ubuntu for a new LaTeX user?  I'd also like the ability to see the code in one pane and the results in a second pane, if possible -- not necessarily WYSIWYG, though.


I wish to insert a % symbol in a line. But the rest of the statement goes missing since % is usually intended for comment. How can I resolve this problem?

I know what my symbol or character looks like, but I don't know what the command is or which math alphabet it came from. How do I go about finding this out?


I'm using Google Pixel XL / Android 8.1.0 w/ March 5, 2018 security patch level.  Yet, I've got following pop-up on my screen:       Per Play Protect - "Looks good" - No harmful apps found.  I understand one of way to go about it is to do Factory Reset, however is there another way which doesn't involve Factory Reset?   I'm not really sure, how this virus got on my phone at the first place as I don't install anything outside of Play Store, any ideas what can be done to avoid this in future?  Please advise.

What is the cause of this chrome bug on android? The last site I went to was www.destructoid.com and all of a sudden it gets redirected to the following url. This happened previously awhile back, but I didn't document everything as I did today. I'm also on android chrome canary if that matters.   I took some screenshots before closing out of that tab. But my question is:   What chrome bug or malware is causing these random redirects? How can one detect if they have this vulnerability?   The url is:


What are the different meaning int the following sentences?    They have been dating for a year now.  They will have been dating for a year now.

Non-native speakers often get confused about what the various tenses  and aspects mean in English. With input from some of the folk here I've put together a diagram that I hope will provide some clarity on the matter.  I offer it as the first answer to this question. Consider it a living document. Input is welcome, and good suggestions will be  incorporated into the diagram.    Nota bene: What this is not is a discussion of whether there are  more than two tenses in English. , to which this question is not intended to supply arguments one way or the other.  Here, the aim is to provide an overview of what constructions English-speaking people use for conveying information about actions referring to past, present, and future, and to provide it first and foremost to precisely the people who are likely to use "tense" as a catch-all term in their search, rather than to linguists who know better.  Breaking News There is now an excellent ELU blog article titled  . It is highly recommended reading.


Playing with Python and the mod operation I encountered that (5 % -3) = -1. This is confirmed by , and I have not been able to find any simple explanation for this online, mostly because all I can find about modular arithmetic uses a positive n.  I am surprised by this result. My understanding of the modulo operation is that a mod n is a number c computed by taking the integer part q = a / n, and then substracting n·q from a.  Therefore, for 5 mod -3 I would do:   q = int(5 / -3) = int(-1.6667) = -1 5 - (-3)·(-1) = 5 - 3 = 2   Where am I wrong?  I have realised that -1 is congruent with 2 modulo -3, so maybe the answer is that the result must be between 0 and n, so if n is negative we need to add n to the positive result, but not sure if this is really the reason.    Please consider that I am not a mathematician, so the simpler the explanation the better.

Forgive me if this question does not belong on this site for it is simplistic and this is my first post, however I do not seem to understand the modulo function when it comes to negative numbers.  I'd assume the process for calculating modulo would be the same as with positive numbers:   9 % 7 = 2 because 9 - (7 * 9/7) = 9 - (7 * 1) = 2   So wouldn't 9 % (-7) = 9 - (-7 * -9/7) = 9 - (-7 * -1) = 2?


is it possible to have a werewolf/vampire lord hybrid using console commands or just normal glitches? I have wondered for a long time on the internet and have come out with no answer to this matter. there has to be a way to do this by just normal gameplay. I also have no access to mods and there are no websites I know to get free mods so an answer would be loved.

Related to .  Specifically, I want to know if these possibilities exist:   Can I become a werepire(vampwolf?), i.e. both vampire and werewolf at the same time. Can you infect other NPCs as a werewolf? Can I somehow infect a giant and turn it into a humongous werewolf? Will infected werewolves attack other NPCs?


\begin{table} \label{my-label} \begin{tabular}{ll} Name       & Local address \\ Affliation & Phone number  \\ Address    & Email         \end{tabular} \end{table}   I have a simple table here that I want to use for the header of my CV. However, the output looks like this:     How exactly can I left-align the first first column and right-align the second, similar to what you would typically see as the header of a CV?

I kind of would expect tables to be able to "fill to margin", instead of choosing a number and iteratively rebuilding the document until it is the right size.  For example, I want this 2-column table to have the first column as wide as it needs to be, and the 2nd column to "fill to margin":  \begin{tabular}{ l p{5cm} }   Of course, that's not gonna do it (2nd column will be 5cm), is there anyway to "fill to margin"?


On a site there are some pages from a Content-type. Some of those pages (for the Belgium language only) need to be only accessible for Dokters.  So when you try to reach the URL of one of those pages you are redirected to a login-page.  But the role 'dokters' needs to have an extra login-field. Or only this field to login is even better if thats possible! It should be a field with 11 digits. Or if this is to complicated (Username, Password, 11-digit field).  How (which modules) are best practices to built this functionality?  UPDATE:  Now i managed to do a workaround with . I made a role 'doctor'. And now only users with role 'doctor' can access those pages.  But is there something to do like when the Doctors visit those restricted pages they are redirected to a custom login-page. On this page you have a small form: Fill in your 11-digit code to access this page.  Because all doctors have their own 11-digit code. We don't have to send all doctors the username name and password for role 'doctor', instead they can access the content directly, with their 11-digit code! The only validation should be that the field contains 11 digits.  How do i manage this in the simplest/best way?

In my website have two types people login one is designer another is reader, i want people come to login my website by role. Mean designer go to design login form to login. Reader go to reader login form to login. my question is:   how to show two login forms in same page? how to check the role when the visiter login at the same time in login form? is it any module i can use or i need do something customize the user module and how    customize?   Plz help!


I am trying to find $\mathbb{E}(e^{-X})$ where $X$ is a random variable with a general normal distribution. I end up with  $$(2\pi \sigma)^{-\frac{1}{2}} \int_{-\infty}^{\infty} e^{-x}e^{\left(\frac{-(\mu-x)^2}{2\sigma^2}\right)}dx $$  Tried some transformations and the polar coordinate trick used to derive values of $(2\pi \sigma)^{-\frac{1}{2}}\int e^{(\frac{-(\mu-x)^2}{2\sigma^2})}dx $ but haven't been able to come up with anything explicit. Can anyone point me in the right direction? I am in despair... do I need to use a numerical method?   If it helps, here is what the integral boils down to $$(2\pi \sigma)^{-\frac{1}{2}}\int \exp\left(-\frac{x(2\sigma - 2\mu +x)}{2\sigma^2}\right)dx $$

I'm working through some old integrals and I found one that's interesting. I can't quite remember how it's proved, so if someone could set me off in the right direction, it would be really helpful. Thanks!   $\int_{\mathbb{R}} e^{-ax^2 + bx} dx = \sqrt{ \dfrac{\pi}{a}} e^{\frac{b^2}{4a}}$  I've tried change of variable, but I'm not sure this is the right approach.


How I can protect my code from SQL injections? I have URL like this:  example.com/players.php?ids=100098,131183,188736,261945,301588   and query  $ids = (isset($_GET['ids'])) ? $_GET['ids'] : false; $query = "SELECT * FROM player WHERE profileid IN (". $ids .")";

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?


Below I stated 2 equations which is my contribution to the solution, What should I  do next ?

Find the volume common to two circular cylinders, each with radius r, if the axes of the cylinders intersect at right angles. (using disk/washer)  I saw no example of this problem anywhere.. I saw an example how to solve it without calculus but I'm afraid that'll be deductions on my test.. I have the volume of a cylinder and the method of area between two curves but this is out of my reach.... I don't know what I can try...


I have a couple of las files for a city and I need to make a 3D model of the buildings, which should display info about the building when clicked on. I am pretty new to ArcGIS so I don't have the best idea to go about this. I have already downloaded LAStools and can use it to view the lidar data.   I have a point cloud set up but I am not sure how to make the model from this point. Would I need different software? (Sketchup, Meshlab, etc..)

I want to try to make a simple 3D map for a small area (10 square miles) with some housing, some roads and some vegetation on it. My geodata is as follows:    shapes with houses/roads/vegetation.  LIDAR point cloud data over the area (can easily be built to a dem). georeferenced aerial image.   Any idea where to start to bundle these geodata together and make a neat looking 3D map?


Hi I usually write whole beamer presentations in bulleted list which creates automatic indentation which produce odd looking lot of left margin space. I want to start bulleted list like normal text without indentation. I tried packages like \usepackage{enumitem} which is not working in beamer. Kindly suggest some solution

I can't figure out how to line up the symbols of an itemize environment in beamer with the left part of the main text. In other words, I would like to supress the left margin in beamer itemize lists.  It would be nice if the solution worked with any itemize label defined with  \setbeamertemplate{itemize item}[]   In order to make myself clearer, what beamer produces by default is something like:  Main text. Main text. Main text...    * Item 1    * Item 2    * Item 3    ....   and the desired result is   Main text. Main text. Main text... * Item 1 * Item 2 * Item 3 ....


I've been reading:   It's fascinating stuff, but documentation seems a bit sparse. Where I work, we have this aging, clunky VMWare ESXi setup for all our internal servers. I'd really like to read up on possible migration or just information on Orchestra, integration with Juju, etc that isn't a bunch of loosely connected blog posts. :p  This is concerning 11.10 and, presumably, 12.04.  To make this less vague, specifically documentation on:   Orchestra - features, comparisons, videos, etc Integrating Juju with Orchestra - I'm familiar with using Juju for deploying on AWS, but that wiki page glances over connecting it to orchestra Building a private cloud - Advantages, using/deploying Openstack, etc Working with internal networks - Configuring DMZs, setting rules, etc   Any recommended books would be appreciated too. I didn't intend for this to be a 'do all my homework for me! LMGTFY' post, I'm just hungry for information and haven't found a good repository of knowledge for much of this.

How do I install ? Is there an easier way other than official installation instructions?


I want to create center lines from road polygons.  Are there any automated tools in QGIS to do this?  I am including a Screenshot of my vector file below.

I was wondering if there is a way to create centre lines from polygons in QGIS? I have a polygon layer, but ideally need the centrelines as a separate file.


I am trying to install Python 3.6 as per , but I seem to be having troubles. My system is the following (it's on c9.io):  $ lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description:    Ubuntu 14.04.5 LTS Release:        14.04 Codename:       trusty   When I follow the instructions in the answer (add deadsnakes repository, apt-get update, sudo apt-get install python3.6), it seems to work, i.e I can run the command python3.6 and the interpreter fires up.  However, when I try to use pip from inside this using python3.6 -m pip --version, I get the following error:  Traceback (most recent call last):   File "/usr/lib/python3.6/runpy.py", line 183, in _run_module_as_main     mod_name, mod_spec, code = _get_module_details(mod_name, _Error)   File "/usr/lib/python3.6/runpy.py", line 142, in _get_module_details     return _get_module_details(pkg_main_name, error)   File "/usr/lib/python3.6/runpy.py", line 109, in _get_module_details     __import__(pkg_name)   File "/usr/lib/python3/dist-packages/pip/__init__.py", line 59, in <module>     from pip.log import logger   File "/usr/lib/python3/dist-packages/pip/log.py", line 9, in <module>     import colorama, pkg_resources   File "<frozen importlib._bootstrap>", line 971, in _find_and_load   File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked   File "<frozen importlib._bootstrap>", line 656, in _load_unlocked   File "<frozen importlib._bootstrap>", line 626, in _load_backward_compatible   File "/usr/share/python-wheels/setuptools-3.3-py2.py3-none-any.whl/pkg_resources.py", line 1479, in <module>     register_loader_type(importlib_bootstrap.SourceFileLoader, DefaultProvider) AttributeError: module 'importlib._bootstrap' has no attribute 'SourceFileLoader'   Googling a bit, I get this .  However, when I run the command:  sudo pip3 install --upgrade pip   I now get the following problem:  Requirement already up-to-date: pip in /usr/local/lib/python3.4/dist-packages (18.0)   Uninstalling and installing python3.6 again doesn't help. I still get the same error when trying to run pip. How do I fix this?  EDIT in responses to duplicate:  The alleged duplicate's top answer does not seem to work for me. I ran the following command:  $ curl https://bootstrap.pypa.io/get-pip.py | sudo python3.6   From there I got this result:    % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current                                  Dload  Upload   Total   Spent    Left  Speed 100 1604k  100 1604k    0     0  4637k      0 --:--:-- --:--:-- --:--:-- 4649k Traceback (most recent call last):   File "<stdin>", line 20651, in <module>   File "<stdin>", line 197, in main   File "<stdin>", line 119, in bootstrap   File "/usr/lib/python3/dist-packages/setuptools/__init__.py", line 12, in <module>     from setuptools.extension import Extension   File "/usr/lib/python3/dist-packages/setuptools/extension.py", line 7, in <module>     from setuptools.dist import _get_unpatched   File "/usr/lib/python3/dist-packages/setuptools/dist.py", line 16, in <module>     import pkg_resources   File "/usr/lib/python3/dist-packages/pkg_resources.py", line 1479, in <module>     register_loader_type(importlib_bootstrap.SourceFileLoader, DefaultProvider) AttributeError: module 'importlib._bootstrap' has no attribute 'SourceFileLoader'   Bear in mind that I did this with a completely new environment (i.e I first installed python, then ran get-pip.py).   What should I do?

I'd like to start by pointing out that this question may seem like a duplicate, but it isn't. All the questions I saw here on Ask Ubuntu were regarding pip for Python 3 and I'm talking about Python 3.6. The steps used back then don't work for Python 3.6.   I got a clear Ubuntu 16.10 image from the . Run apt-get update Run apt-get install python3.6 Run apt-get install python3-pip Run pip3 install requests bs4 Run python3.6 script.py   Got ModuleNotFoundError below:   Traceback (most recent call last):     File "script.py", line 6, in <module>      import requests  ModuleNotFoundError: No module named 'requests'   Python's and pip's I have in the machine:  python3 python3.5 python3.5m python3.6 python3m python3-config python3.5-config python3.5m-config python3.6m python3m-config    pip pip3 pip3.5


I am a newbie and I clicked this photo at around 8 PM:    I was around 1.5m away from  the subject. I wanted to focus on the lady and blur the remaining photo. How can I achieve that?   Should I rely on post processing to always change the focus? Any suggestion would be greatly appreciated.

I'm currently using an entry-level DSLR with 18-55mm lens and having great trouble trying to creating a blurred background effect in my photos. Now matter what aperture or shutter speed I choose, I'm not able to get it.  There's a general question about , but what specific things can I do to get this effect with an entry-level lens?


I was playing around with apache and a chromecast with video, and as far as I can tell, the local video will only play on the chromecast if it gets a 200 response, rather than a 206 response.  Is it possible to configure apache (or suggest another web server) to respond to  range: bytes 0-    with   200, OK   which is what chromecast appears to expect, rather than the partial content  206, Partial Content   Edit  This is not a duplicate of .  I want to support partial-content, with the special case that if all the file is requested, then the response is 200 rather than 206.  The result of disabling responses, would give a 200 request as I require in my special case, but disable the ability to do resumable downloads or stream from the stored content.

I have a web page with a link to a PDF file (target="_blank").  If I click the link, the PDF reader just shows a grey screen within the Firefox browser.  If I copy that link and manually open it in a new tab, the PDF will display correctly, and subsequent requests made by clicking the original link now work, suggesting that the problem occurs when loading the file into the cache.  It appears as though the Adobe PDF reader plugin is making byte-range requests (I see lots of 206 responses) and I suspect that this may be the cause of the issue.  I am running an Apache webserver.  Has anyone had problems with Apache and Adobe's byte-range requests?  Are there any workarounds?  Perhaps a way of configuring Apache to ignore byte-range requests on PDFs?


I am merging two folders with the following command:  rsync -a --checksum --backup --suffix=.merge-bkup src/ dst/   The idea is that if a file exists in both folders, both versions are preserved.  However, I am doing this on an operating system with a UI that uses extensions to associate files with applications. So while it may technically preserve both "My File.txt" and "My File.txt.merge-bkup" the latter file will not be useful to many users since it can no longer be opened automatically in the right application.  Can I use find to somehow take every file named "My File.txt.merge-bkup" and rename it to "My File (Backup).txt"? Even better would be to end up with "My File (Backup N).txt" if "My File (Backup).txt" already exists but I suspect that might be a stretch.

I have a directory full of images:  image0001.png image0002.png image0003.png ...   And I would like a one-liner to rename them to (say).  0001.png 0002.png 0003.png ...   How do I do this?


I will have a client application using a proxy to a WCF Service.  This client will be a windows form application doing basicHttpBinding to N number of endpoints at an address.  The problem I want to resolve is that when any windows form application going across the internet to get my web server that must have my web server online will need to know that this particular WCF Service is online.  I need an example of how this client on a background thread will be able to do a polling of just "WCF Service.., Are You There?"  This way our client application can notify clients before they invest a lot of time in building up work client-side to only be frustrated with the WCF Service being offline.  Again I am looking for a simple way to check for WCF Service "Are You There?"

I want to check the availability of the WCF web service i.c service is up or down through  the C# code. How to achieve that?


How did Newton figure out the ? I know there are two other questions answering the same question but I did not understand anything from the answers  Is there a third way of knowing how he did it without using complex formula and derivation.  I am dumb but curious :-)

This question is puzzling me since I learnt about the gravitation law in school. Why did Newton guess/assume that gravitational force is inversely proportional to the square of distance?  Did he verify that experimentally? (I remember hearing that the first experimental verification of the law of gravitation was after Newton's death.)  If the answer to the above question is no, is it for example more plausible to suppose that $F\propto1/r^2$ than to suppose that $F\propto1/r^4$? Did Newton carry out a thought experiment that makes $F\propto1/r^2$ a plausible guess?  So in summary: Why did Newton choose exponent of $-2$ instead of any other exponent? Was it a guess that depended on pure luck or an educated guess?


am using this code to get menu tab.when i mouseover on the tab the tab image will change, similarly i want to change the image of tab onlick using jquery.i used the below code to do this but i was not able to get it.how can i do this.            <title>Css Menu</title>     <link rel="stylesheet" type="text/css" href="css/style.css">

Home

I have an image URL in a imageUrl variable and I am trying to set it as CSS style, using jQuery:  $('myObject').css('background-image', imageUrl);   This seems to be not working, as:  console.log($('myObject').css('background-image'));   returns none.  Any idea, what I am doing wrong?


XXX-XXX-XXXX   XXXXXXXXXX         I want to use a regular expression of the format. I tried as shown   below, and an error occurs. How do I fix it?      sample var regExp = / ^ 01 ([0 | 1 | 6 | 7 | 8 | 9]?) - ([0-9] {3}) - ([0-9] {4}) $ /??; sample var regExp = / ^ 01 ([0 | 1 | 6 | 7 | 8 | 9]?) ([0-9] {3}) ([0-9] {4}) $ /??;

I'm trying to put together a comprehensive regex to validate phone numbers. Ideally it would handle international formats, but it must handle US formats, including the following:   1-234-567-8901 1-234-567-8901 x1234 1-234-567-8901 ext1234 1 (234) 567-8901 1.234.567.8901 1/234/567/8901 12345678901   I'll answer with my current attempt, but I'm hoping somebody has something better and/or more elegant.


I am a complete beginner at Java coding and I have never worked with GUI before. Here's what I am trying to do. I have main class "Frame" and two classes: "Circle" and "Square". How do I add Circle and Square to Frame that they'll appear on the frame?  Sorry for this easy question but I need your help on this. Thanks in advance!  public class Frame extends JFrame{      public static void main(String[] args) {         Frame f = new Frame();         Circle circle  = new Circle();         Square square  = new Square();         f.add(circle);         f.add(square);     }      public Frame(){         setTitle("Frame");         setSize(500, 500);         setVisible(true);         setDefaultCloseOperation(EXIT_ON_CLOSE);     } }    public class Circle extends JFrame{      public Circle(){     }      public void paint(Graphics g){         g.setColor(Color.GREEN);         g.drawOval(300, 300, 200, 200);     } }   public class Square extends JFrame{      public Square(){     }      public void paint(Graphics g){         g.setColor(Color.GREEN);         g.drawRect(300, 300, 500, 500);    } }

I have a JFrame. This JFrame contains a JButton. I click the JButton and 10 JTextFields are created.  the problem: I cannot see them until "I force a repaint()" by resizing the window. Only then do I see the JTextFields created.  CODE:  JPanel points = new JPanel();  //Creating the JTextFields: for (int i=0; i<10; i++) {     JTextField textField = new JTextField();     points.add(textField); }  repaint(); this.repaint(); super.repaint(); points.repaint();     THANK YOU - after the for loop, I just called points.validate() and it worked...


How can I make Blogger show the last modified date of a post?  When I edit an old post in Blogger, is there anyway to list the last modified date somewhere? anywhere?

I want to have last modified date on my blog post on Blogger.com. I have tried  but it didn't work out since this solution is for the old Blogger.com   Edit-1: I got to know about this meta tag   <meta http-equiv="last-modified" content="YYYY-MM-DD@hh:mm:ss TMZ" />   But I don't know where to put this meta tag in specific post and how it works ?


I am trying to calculate the days between two dates but if I select dates between before 29 Feb or after 29 its coming ok but if I select date between before 29 and after 29 then its giving me wrong days. Here is my code please check how can I fix it ?  $daylen = 60*60*24; $date1 = '2016-01-01'; $date2 = '2016-03-31'; $numberDays =(strtotime($date2)-strtotime($date1))/$daylen;

I have two dates of the form:  Start Date: 2007-03-24  End Date: 2009-06-26   Now I need to find the difference between these two in the following form:  2 years, 3 months and 2 days   How can I do this in PHP?


I was talking with a French penpal. He said:     you're helping me to improve   Which, as you may have guessed, is a literal translation from French. So I corrected him, and told him that using "to" isn't correct in English. But, now, I wonder:     you're helping me improve   Could you explain what construct it is?  My initial guess is that "help", here, is acting as a double object verb: "me" would be the indirect object, but:   I can't find "help" in  list of double object verbs. I've tried other pages too, with no luck. "Improve" can't possibly be a direct object.   Furthermore: it seems "help me to improve" is used more frequently than "help me improve". Now I'm really confused. Is "help me to improve" correct, then?

I wrote:      I will help you to acquire Russian.    A native English speaker corrected me saying that 'to' is unnecessary here. Is it correct to say      "I will help you acquire Russian"


I want to pin a .desktop file to dock. That file opens terminal and runs the command npm start. It opens an application, so Right Click > "Add to favorite" doesn't work. Any ideas how to pin that type of file?

I have made .desktop files for Ubuntu 16.04 to access my Google Chrome profiles, but once I upgraded to Ubuntu 17.10 (it worked up to Ubuntu 17.04) they got removed from the dock and I can't pin them back. Sample File: #!/usr/bin/env xdg-open  [Desktop Entry] Version=1.0 Type=Application Terminal=false Icon[en_US]=google-chrome Name[en_US]=Google Chrome Exec=google-chrome --profile-directory=Default Comment[en_US]=Chrome Name=Google Chrome Comment=Chrome Browser Icon=google-chrome Categories=Browser;Internet;


Government of Kerala has agreed   Government of Kerala have agreed   which is the correct usage

I'd say Microsoft have a way of bending the rules and I know that McLaren have won the championship. While this sounds strange, I believe it is correct English (sorry, I'm not native).   But when it's a small company, would you still use it this way? Is a company always plural, or are small companies singular? I.e., would you say Bakery Johnson makes fine bread or Bakery Johnson make fine bread? Is it My book seller, Woody's, have moved or is it has moved?


This is Parent class public class RequestDTO implements Serializable {      private static final long serialVersionUID = 1L;      private String paymentProvider;     private Boolean isEncrypt;      public RequestDTO() {     }      public RequestDTO(String paymentProvider,             Boolean isEncrypt) {         super();         this.paymentProvider = paymentProvider;         this.isEncrypt = isEncrypt;     }           public void setPaymentProvider(String paymentProvider) {         this.paymentProvider = paymentProvider;     }               public Boolean getIsEncrypt() {         return isEncrypt;     }      public void setIsEncrypt(Boolean isEncrypt) {         if (isEncrypt == null) {             this.isEncrypt = false;         } else {             this.isEncrypt = isEncrypt;         }     } }  Below is child class    public class CardDetailsDTO extends RequestDTO {              private static final long serialVersionUID = 1L;                  private String cardNumber;         private String expiryDate;         private String cardHolderName;         private String cardType;         private String cardIssueDate;         private String cardIssueNo;                     private String modifyDummyCardNumber(String cardNum) {             String dummyCardNumber ;             if (cardNum != null && !cardNum.isEmpty() && this.getIsEncrypt() != true) {                 dummyCardNumber = "************" + cardNum.substring(12);                 return dummyCardNumber;             } else {                 return "********";             }          }              public String getCardNumber() {             return cardNumber;         }                public void setCardNumber(String cardNumber) {             this.cardNumber = cardNumber;         }         public String getExpiryDate() {             return expiryDate;         }         public void setExpiryDate(String expiryDate) {             this.expiryDate = expiryDate;         }         public String getCardHolderName() {             return cardHolderName;         }         public void setCardHolderName(String cardHolderName) {             this.cardHolderName = cardHolderName;         }         public String getCardType() {             return cardType;         }         public void setCardType(String cardType) {             this.cardType = cardType;         }         public String getCardIssueDate() {             return cardIssueDate;         }         public void setCardIssueDate(String cardIssueDate) {             this.cardIssueDate = cardIssueDate;         }         public String getCardIssueNo() {             return cardIssueNo;         }         public void setCardIssueNo(String cardIssueNo) {             this.cardIssueNo = cardIssueNo;         } @Override     public String toString() {         StringBuilder builder = new StringBuilder();         builder.append("CardDetailsDTO [expiryDate=");         builder.append(expiryDate);         builder.append(", cardHolderName=");         builder.append(cardHolderName);         builder.append(", cardType=");         builder.append(cardType);         builder.append(", cardIssueDate=");         builder.append(cardIssueDate);         builder.append(", cardIssueNo=");         builder.append(cardIssueNo);         builder.append(", dummyCardNumber=");         builder.append(modifyDummyCardNumber(getCardNumber()));         builder.append("]");         return builder.toString();     }     }  when I called  modifyDummyCardNumber  method inside child class toString method it throws null pointer exception because I called this.getIsEncrypt() inside modifyDummyCardNumber method if statement as showing above ,but when I sout the isEncrypt value from the parent class it shows as "true", How to use the parent class variable value in child class?

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


Let $X_1, X_2,\cdots$ be an infinite sequence of sub-gaussian random variables which are not necessarily independent. Show that \begin{align*} \mathbb {E}\text{max}_{i}\frac {|X_i|}{\sqrt{1+\log i}}\leq CK, \end{align*} where $K=\text{max}_{i}\|X_i\|_{\psi_{2}}$. Deduce that for every $N\geq 2$ we have \begin{align*} \mathbb {E}\text{max}_{i\leq N}|X_i|\leq CK \sqrt{\log N}. \end{align*} This question is the Exercise 2.5.10 in , and has been asked twice, you can find them here: and . But I don't think the answer is satisfactory since it did not give $CK$ explicitly.

I'm trying to answer the following question from the book :  Let $X_1,X_2,\dots$ be a sequence of sub-gaussian random variables, which are not necessarily independent. Show that   $E\bigg[ \max_i \frac{|X_i|}{\sqrt{1 + \log i}} \bigg] \le CK$,  where $K = \max_i \|X_i\|_{\psi_2}$. Deduce that for ever $N \ge 2$ we have   $E\bigg[ \max_{i \le N} |X_i| \bigg] \le CK \sqrt{\log N}$.  I've tried to figure out what is the distribution of the maximum of Gaussians, but I'm reaching only inequalities that that don't help me answer the question.   I've also seen a similar question .  Does anyone have a clue or something to start with in order to answer this question?  Thanks!


For my highscore window I have 20 nodes inside a gridpane (20 labels). Now I want the gridpane to be as big as the window itself which is 450 x 450, and I was planning to do this by adding column & row constraints.  This is what I tried, but got a NullPointerException.  private ColumnConstraints[] columnConstraintses; private RowConstraints[] rowConstraintses;  for (int i = 0 ; i < 10 ; i++) {         columnConstraintses[i] = new ColumnConstraints(40);         rowConstraintses[i] = new RowConstraints(40);     }


I review / audit a question / answer like this:    And it comes back everytime I start a review session / audit. Stack Overflow has so many smart algorithms, it is not possible to show a task only once, if you respond and actively do something by that task? Like opening it? I can't downvote / upvote more than once, or dismiss more than once etc. If I have opened it once and not made a decision, it is because I do not have the knowledge to become a judge over that question, or answer. Like a special question about C#, I cannot judge, always, if it is a really bad answer or just a short and very precise answer.   A feature request for the "Admin Tools" could be to show not-visited items only.  Another solution could be presenting people for audits by the scope of tags they have. I have good reps on  but none in  - try sort the audits by relevance according to the user.

I usually review the  flagged posts list, which is the one with the most pending flags by the way (most of the time around 100 flags?). It is a great way to comfortably handle those posts and contribute to the site, but it has a couple of issues that keep me from using them as much as I'd like to:  I usually flag clearly-not-an-answer posts, and just skip the ones in tags I don't have enough knowledge about, or the ones I'm not sure about how to proceed with (I'm not certain enough to flag as invalid most of the flags). This means that when I request the next page of 50 flagged posts, I see many of the posts I just skipped.   The page shows 50 posts in random order. I understand this is intentional and aimed to avoid focusing handling of the flags on specific posts based on some ordering criteria. But when we're done scrolling through the 50 posts on the list, we can only get 50 more flagged posts (), and what is worse, having repeated posts all over.  This is disencouraging me from keeping reviewing flags once I've gone through the first page of the list.  Could the Showing 50 random posts;  link avoid showing posts already shown on the current post list?  Or could we have a "Skip" option (similar to the ones on the review queues) on the flagged posts in the list, just to indicate we're not sure about them and don't want them to appear again?


I'd like to listen to music on my home server from work. Both are Ubuntu boxes running pulseaudio. It seems from researching that applications communicate to the PA server via TCP on port 4317, so I figured it should be as easy as:  me@work: ssh -YR 4317:localhost:4317 me@home   At this point I can run rhythmbox from the ssh session with X11 forwarding, and I assumed rhythmbox would be transparently talking to pulseaudio over the reverse tunnel, resulting in the music playing on my work machine. However instead it appears that the music still plays on my home computer. I've tried messing around with PULSE_SERVER as well to no avail.  Has anyone accomplished something similar? It seems like this should be relatively simple due to pulseaudio's design. I've played around with mounting my music library via sshfs instead but I'd really like to have one set of metadata/app settings/playlists and such. Thanks for any tips!

Is there a way to carry audio over ssh?   Say after connecting to remote machine through ssh -X I opened a browser and want to watch a youtube video. Currently I could only able to watch the video without any audio. But I want to hear the audio too. How to do that?


My question refers to Photon flux spectrum diagrams.   The diagram shows the number of photons at different wavelengths. My question is whether the graph is granular or continuous. Do photons exist at all possible wavelengths, or are there some "forbidden" wavelengths?  --- I want to get a PFD data set but not sure how to treat the 0.5 nm increments in the  (G173-03) Spectral data.  Below my calcuations are in green. I am afraid I am double counting photons the way ive done it so far.  (small note the coloumn D should say PFD and not PPFD*)

Disclaimer: Please keep in mind that I am a young highschool student with no background in physics, this research was done in the course of an hour, and my reasoning could very well be wrong.  After a short conversation about color, I did some thinking, and read  The answer claims that there are $\infty^{\infty}$ colors   My first problem is the definition of colors, I'm going to simplify this (although it's not the same thing) as electromagnetic frequencies. This is what I mean when I refer to color in the rest of this question  The problem with $\infty^{\infty}$ colors is that the plank length exists. This causes two problems to arise with $\infty^{\infty}$. If $l_p$ is assumed to exist (as it is), this means the smallest distance in the universe is $l_p$. So, all wavelengths of light can be divided into a set, of the wavelengths produced by objects at $0^{\circ}$ Kelvin to $\infty^{\circ}$ Kelvin. According to this logic, there are simply $\infty$ colors.  Things are complicated further, when you introduce the Plank Temperature ($P_t$). $P_t$ is the theoretical limit temperature of the universe (at least for the purposes of light and color) Because an object hotter than $P_t$ will produce light with wavelengths shorter than $l_p$. This would introduce an upper limit on colors too.  Wouldn't this mean that the total number of possible colors is equal to however many plank lengths difference there is between an electromagnetic wave produced by a 0 degree object and a $l_p$ object? And therefor far less than $\infty$? Does this reasoning make sense at all?


I submitted a paper for publication several days ago. This was a resubmission after I had responded to the critique from the reviewers for my first draft. However, while I was looking at my data again, I saw that there was a section where my data points increased between phases, but I had written that they decreased. What's more, I had qualified why it made sense for the values to decrease, according to literature, so it's possible that the data I acquired was flawed. The reviewers had not marked this, and I had missed it upon reading through everything. Apart from this, there is a missing comma and a missing word at another spot in the paper. What I'm wondering is, is this a common occurence? And would it harm my credibility as an author/chances of getting published?

I am going to submit a paper in these days. I dedicated to it a lot of time, and a lot of effort to check that all the theoretical results in it are correct. Anyway, I am still afraid of having written something wrong without even realizing it, as the deadline is very sharp.  So my question is: how common is in the academia to find submitted papers with minor errors? If there is a minor error that is not invalidating the results, will the paper be rejected, even if the content is considered interesting?


What's the difference between "They finished the project by March" and "They had finished the project by March"? Can you give contexts when to use one and not the other?

This is something which came up in my .   As far as I know "had + verb" is done (started & finished) in the past. What's about "has + verb"? Can anyone please explain me the difference?


I'm creating a Redstone contraption that involves teleporting an armour stand directly behind the player, regardless of rotation or position. I can't find anything online that helps with my problem. I've tried the following command as a rough demonstration:  /execute at @p run tp @e[name="armourstand"] ~ ~ ~-1  This command only teleports the armour stand one block back on the z-axis relative to the player. How do I teleport the entity directly behind the player?  A step-by-step guide would be appreciated. I'm using 1.15.2 if that helps.

Already found similar posts like (), but those are some years old already and very outdated, what would be the new way to use the execute command relative (e.g. slightly behind) an entity? I'd guess it something with at @s[z=.5] or using the positioned tag, but neither of those worked yet. This is what I would like to accomplish, so that only in the right get stop the run command when they are in range, not both on the right and the left.  This is the actual detection range, where it detects the armor stand behind an infront of it.  And this would be the new detection range, where it only stops my execute command, when theres an armor stand in front of it.  All in all what I need is a way to reposition the anchor of the distance=0.5..1 tag, so that it's not the entity itself but rather e.g. +0.5 in the z coordinate


A week ago, I left soup simmering in my new Staub cast-iron pot () for too long, and all the liquid evaporated and what was left burned on the bottom. I've scrubbed and soaked in hot water overnight for a week but there are still black, charred remains stuck to the bottom (see photo).   My questions:   Based on the photo, can you tell what is on the bottom? Is it burned food, or the enamel, or "seasoning" (I've never seasoned it myself...), or rust, or something else?  How do I clean and restore my precious pot to full health?

I have a seasoned cast iron skillet, and I don't want to mess up the seasoning when I'm cleaning it.  What do I use and what don't I use to get it back to clean?  I've heard not to use soap and to make sure it is dry, but nothing beyond that.


The R function corrgram (in the corrgram package) offers several options for re-ordering the correlation matrix. One of them is a "PCA-based re-ordering" with the following source code:  x.eigen <- eigen(cmat)$vectors[, 1:2] e1 <- x.eigen[, 1] e2 <- x.eigen[, 2] alpha <- ifelse(e1 > 0, atan(e2/e1), atan(e2/e1) + pi) ord <- order(alpha)   where cmat is a correlation matrix $R$ and ord is used to re-order the variables.  That is, each variable $x_k$ gets assigned an $\alpha_k$ where $$ \alpha_k = \cases{\arctan \frac{e_{1,k}}{e_{2,k}}, \quad e_{1,k} > 0 \\ \arctan \frac{e_{1,k}}{e_{2,k}} + \pi, \quad e_{1,k} \leq 0} $$ and $e_1 = \left(e_{1,k}\right)_{k=1}^K$ and $e_2 = \left(e_{2,k}\right)_{k=1}^K$ are the first two eigenvectors of $R$, which is $K \times K$. Then the variables are sorted in order of largest $\alpha_k$ to smallest.  There's no reference for this or additional detail in the help file. What does this reordering accomplish and how should it be interpreted?

I've downloaded a script to draw a correlation matrix using colored circles. This script allows to order variables using PCA, but I'm not sure how it works. The code responsible for ordering is below:    if (order) {     if(!n==m){             stop("The matrix must be squre if order is TRUE!")     }   x.eigen <- eigen(corr)$vectors[, 1:2]   e1 <- x.eigen[, 1]   e2 <- x.eigen[, 2]   alpha <- ifelse(e1 > 0, atan(e2/e1), atan(e2/e1) + pi)   corr <- corr[order(alpha), order(alpha)] }   Question: What is the interpretation of such ordering and what theory lies behind it?


I know the title is a bit confusing but I couldn't think of a better way of describing it. This is python code.  Say I have a list a=["blue","yellow", "red", "green"]. How would I split it so it looks like this: a=[["blue","yellow"],["red","green"]]?

I have a list of arbitrary length, and I need to split it up into equal size chunks and operate on it. There are some obvious ways to do this, like keeping a counter and two lists, and when the second list fills up, add it to the first list and empty the second list for the next round of data, but this is potentially extremely expensive.  I was wondering if anyone had a good solution to this for lists of any length, e.g. using generators.  I was looking for something useful in itertools but I couldn't find anything obviously useful. Might've missed it, though.  Related question:


When i download the leagueoflegends.exe from  and trying to run it with the last version of wine, i get nothing, not even an error. (wine works fine with other .exe files)    Anybody knows something? I am using ubuntu 11.10 64-bit.

I am looking for a step by step instruction to guide me in the ways of installing, configuring and debugging many of the issues new users have when dealing with Wine in Ubuntu.  What is the recommended way of installing Wine, some of the key issues that it has and how to solve them?  If I have a specific problem with an App in Wine, how do I go about solving it? What are the recommended steps to ensure that I can fix a problem related to an app I wish to use?


I have database that organize this way   now -  14-17  ,  16-20  ,  1-12  ,  10-1  i want it to be like   after -  17, 20 , 12, 1  thanks!

I don't really understand regular expressions.  Can you explain them to me in an easy-to-follow manner?  If there are any online tools or books, could you also link to them?


I'm trying to install vsftpd on Ubuntu 18.04 LTS, but when I run apt-get install vsftpd I get this error:  You might want to run 'apt --fix-broken install' to correct these.  The following packages have unmet dependencies:  linux-image-generic : Depends: linux-image-4.15.0-42-generic but it is not going to be installed  Recommends: thermald but it is not going to be installed linux-modules-extra-4.15.0-39-generic : Depends: linux-image-4.15.0-39-generic but it is not going to be installed or  linux-image-unsigned-4.15.0-39-generic but it is not going to be installed  linux-modules-extra-4.15.0-42-generic : Depends: linux-image-4.15.0-42-generic but it is not going to be installed or  linux-image-unsigned-4.15.0-42-generic but it is not going to be installed  E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).   I've tried run apt --fix-broken install and apt-get install -f vsftpd but with no sucess.  I looked these answers but the solution didn't worked for me:    Update:  df -h output:  Filesystem      Size  Used Avail Use% Mounted on /dev/root        39G  7.3G   30G  21% / devtmpfs        989M     0  989M   0% /dev tmpfs           992M     0  992M   0% /dev/shm tmpfs           992M  680K  992M   1% /run tmpfs           5.0M     0  5.0M   0% /run/lock tmpfs           992M     0  992M   0% /sys/fs/cgroup /dev/xvda1      232M  224M     0 100% /boot tmpfs           199M     0  199M   0% /run/user/0   df -i output:  Filesystem      Inodes  IUsed   IFree IUse% Mounted on /dev/root      2537760 337826 2199934   14% / devtmpfs        253100    434  252666    1% /dev tmpfs           253889      1  253888    1% /dev/shm tmpfs           253889    606  253283    1% /run tmpfs           253889      4  253885    1% /run/lock tmpfs           253889     18  253871    1% /sys/fs/cgroup /dev/xvda1       62248    326   61922    1% /boot tmpfs           253889     10  253879    1% /run/user/0   apt-cache policy linux-image-generic output:  linux-image-generic:   Installed: 4.15.0.42.44   Candidate: 4.15.0.42.44   Version table:  *** 4.15.0.42.44 500         500 http://us.archive.ubuntu.com/ubuntu bionic-updates/main amd64 Packages         500 http://security.ubuntu.com/ubuntu bionic-security/main amd64 Packages         100 /var/lib/dpkg/status      4.15.0.20.23 500         500 http://us.archive.ubuntu.com/ubuntu bionic/main amd64 Packages      4.4.0.139.145 500         500 http://security.ubuntu.com/ubuntu xenial-security/main amd64 Packages   uname -r output:  4.15.0-36-generic   Update 2: I try this command:  dpkg -l linux-image-\* | grep ^ii   it shows only one kernel:  ii  linux-image-4.15.0-36-generic          4.15.0-36.39  amd64        Signed kernel image generic   When I try to remove:  apt-get remove linux-image-4.15.0-36-generic   The return is:  ou might want to run 'apt --fix-broken install' to correct these. The following packages have unmet dependencies:  linux-image-generic : Depends: linux-image-4.15.0-42-generic but it is not going to be installed                        Recommends: thermald but it is not going to be installed  linux-modules-extra-4.15.0-36-generic : Depends: linux-image-4.15.0-36-generic but it is not going to be installed or                                                   linux-image-unsigned-4.15.0-36-generic but it is not going to be installed  linux-modules-extra-4.15.0-39-generic : Depends: linux-image-4.15.0-39-generic but it is not going to be installed or                                                   linux-image-unsigned-4.15.0-39-generic but it is not going to be installed  linux-modules-extra-4.15.0-42-generic : Depends: linux-image-4.15.0-42-generic but it is not going to be installed or                                                   linux-image-unsigned-4.15.0-42-generic but it is not going to be installed E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).

My first issue was when I tried to apt-get update or apt-get upgrade. On upgrade I get the following error:  You might want to run 'apt-get -f install' to correct these. The following packages have unmet dependencies: linux-image-server : Depends: linux-image-3.2.0-27-generic but it is not installed E: Unmet dependencies. Try using -f.   I tried running apt-get install -f and this was the output(after saying yes on prompt)  (Reading database ... 186183 files and directories currently installed.) Unpacking linux-image-3.2.0-27-generic (from .../linux-image-3.2.0-27-generic_3.2.0-27.43_amd64.deb) ... Done. dpkg: error processing /var/cache/apt/archives/linux-image-3.2.0-27-generic_3.2.0-27.43_amd64.deb (--unpack):  failed in write on buffer copy for backend dpkg-deb during `./boot/System.map-3.2.0-27-generic': No space left on device  No apport report written because the error message indicates a disk full error                                                                           dpkg-deb:    error: subprocess paste was killed by signal (Broken pipe) Examining /etc/kernel/postrm.d . run-parts: executing /etc/kernel/postrm.d/initramfs-tools 3.2.0-27-generic   /boot/vmlinuz-3.2.0-27-generic run-parts: executing /etc/kernel/postrm.d/zz-update-grub 3.2.0-27-generic /boot/vmlinuz-3.2.0-27-generic Errors were encountered while processing: /var/cache/apt/archives/linux-image-3.2.0-27-generic_3.2.0-27.43_amd64.deb E: Sub-process /usr/bin/dpkg returned an error code (1)   I tried running apt-get autoremove and it gives me the same error as apt-get upgrade.  When I run df, I get this for /boot:  /dev/sda1                    233191     230297         0 100% /boot   So, I read elsewhere that I should try to purge old kernels. I checked for what kernels I had with:  $ dpkg -l linux-image-\* | grep ^ii ii  linux-image-2.6.38-13-server  2.6.38-13.52  Linux kernel image for version 2.6.38 on x86_64 ii  linux-image-3.0.0-13-server   3.0.0-13.22   Linux kernel image for version 3.0.0  on x86_64 ii  linux-image-3.0.0-14-server   3.0.0-14.23   Linux kernel image for version 3.0.0  on x86_64 ii  linux-image-3.0.0-15-server   3.0.0-15.26   Linux kernel image for version 3.0.0  on x86_64 ii  linux-image-3.0.0-16-server   3.0.0-16.29   Linux kernel image for version 3.0.0  on x86_64 ii  linux-image-3.0.0-17-server   3.0.0-17.30   Linux kernel image for version 3.0.0  on x86_64 ii  linux-image-3.2.0-24-generic  3.2.0-24.39   Linux kernel image for version 3.2.0  on 64 bit x86 SMP ii  linux-image-3.2.0-25-generic  3.2.0-25.40   Linux kernel image for version 3.2.0  on 64 bit x86 SMP ii  linux-image-3.2.0-26-generic  3.2.0-26.41   Linux kernel image for version 3.2.0  on 64 bit x86 SMP   When I try to remove the oldest with this:  $ sudo apt-get purge linux-image-2.6.38-13-server Reading package lists... Done Building dependency tree Reading state information... Done You might want to run 'apt-get -f install' to correct these: The following packages have unmet dependencies: linux-image-server : Depends: linux-image-3.2.0-27-generic but it is not going to be     installed E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).   How can I free up or extend boot without messing up my installation?


Is there anything I can do to speed up the time it takes to index my pages? It's currently indexing them on it's own time I believe which is every 2 - 3 days and when working in music and media I need to have the latest post fairly quickly.  My robots.txt file is.  User-agent: * Disallow: /wp-admin/ Disallow: /wp-content/ Disallow: /wp-includes/ sitemap: http://vipes.us/sitemapindex.xml   If I am understanding this correctly, I would put this URL into Google .  But in doing so I still only get some of my pages indexed?

I have  a post I created yesterday that was indexed rather quickly by Google. However, I have two other post that I created within the past 4 days that are  not indexed and I cannot find a trace of them within the SERPs.  Any idea what my cause this to happen?


I got problem which is the same here but I can not solve follow the way 2 of them pointing out  Please help me explain more. And one more thing I wanna ask that the converse is still right. Could you give the solution of the converse?

I'm stuck on the following question:     Let $R$ be a commutative ring with $1$, and $S \subseteq R$ a saturated multiplicative set (that is, $1 \in S$ and $x, y \in S$ if and only if $xy \in S$).  Show that $R \setminus S$ is a union of prime ideals.     Here's my attempt so far.  If $a \in R \setminus S$, then the ideal $Ra$ does not intersect $S$, because if $ra$ were in $S$ for some $r \in R$, then $a$ would have to be in $S$.  Thus, it follows by Zorn's lemma that there exist ideals $I$ of $R$ which are maximal with respect to the property that $I \cap S = \emptyset$.  Let $I$ be any such ideal.  If I can show that $I$ is prime, the conclusion will follow.  Let $xy \in I$.  I want to show that $x$ or $y$ is in $I$.  Suppose $x \not\in I$.  Then $I + Rx$ intersects $S$, so there exists $s \in S, a \in I, r \in R$ such that $s = a + rx$.  Then $sy = ay + rxy \in I$, so $sy$, and hence $y$, cannot be in $S$.  Similarly if $y$ is not in $I$, then $x \not\in S$.  So we are reduced to proving the following is impossible: $xy \in I$, $x$ and $y$ are not in $S$, but they aren't in $I$ either.


I would like to look at my referral traffic over time on a per domain-basis in Google Analytics. This is what I have done:   Set New visits as advanced segment  Navigated to traffic-sources -> Referrals Checked a couple of domains Clicked plot rows   The individual domains now show up in the graph, but the problem is that "all traffic" is also visible. All traffic is much bigger than the graphs for individual domains. This makes it very hard to see any changes as they look all values are Zero.  Is there any way to hide "Visits" from the graph in order to zoom in on the vertical axis?

I would like to look at my referral traffic over time on a per domain-basis in Google Analytics. This is what I have done:   Set New visits as advanced segment  Navigated to traffic-sources -> Referrals Checked a coulple of domains Clicked plot rows   The individual domains now show up in the graph, but the problem is that "all traffic" is also visible. All traffic is much bigger than the graphs for individual domains. This makes it very hard to see any changes as they look all values are Zero.  Is there any way to hide "Visists" from the graph in order to zoom in on the vertical axis?


My recipe calls for 1 packet active dry yeast. All I have is rapid rise instant yeast. How much instant yeast do I use in substitution?

I have a recipe for rolls where the first stage calls for 2 packages active dry yeast, 1 tbsp sugar, and 1/2 cup warm water to be mixed until the yeast is proofed, and then 1/4 cup cubed butter is added to the proofed yeast.  Then all of that is added to half of the flour (2 cups) and 2 tsp salt and allowed to do the first rise.    If I wanted to use rapid rise yeast instead of active dry, could I skip the proofing step?  Would I need to add the butter at all?  Could I just mix all the dry ingredients, add the warm water and start the dough that way?  What effect would this change have?


I'm learning a little about fsck on the fly, but what I am finding so far doesn't seem to do very much when I apply it. What would be the next step from this prompt to repair the errors I am having when booting?

I've run across (personally or by proxy) a bunch of storage media that exhibited physical problems during their life. Hard disks, solid state drives and other flash storage media all fail after some time. The situation is worse with USB flash drives and flash cards because of the large amount of suppliers with inferior flash cell and flash controller quality.  How can I reliably detect if a storage drive suffers from physical damage?  Note that this question isn't about file system integrity (which can be checked with ).


I want to ask you how can I calculate big o for this loop?' the x++ is clearly O(1) right? I don't understand the i*2 part... I watched videos on YouTube but i can't solve this. I will be thankful if you guys can help me understand this. for(int i{3} ; i<=n ; i*=2){       x++;    }

Most people with a degree in CS will certainly know what . It helps us to measure how well an algorithm scales.   But I'm curious, how do you calculate or approximate the complexity of your algorithms?


Show that for any reals a,b, both of which are not zero, it holds true that a^2 + ab + b^2 >0

How to prove that $a^2+ab+b^2\ge 0$?  Obviously the squares are positive, but how can I be sure that $ab$ doesn't become too negative with a certain combination of $a$ and $b$?


For actuarial mathematics there is an important identity to calculate the life expectancy for X defined on $[0,\infty)$:  $$ E[X]=\int_0^\infty S_X[x]\,\mathrm{d}x $$ where $S_{x}(x)$(survival function) is equal to $1-F_{x}(x)$, where $F_{x}$ is the CDF, which theorem or lemma exists so i can understand this identity?

Let $X$ be a non-negative random variable and $F_{X}$ the corresponding CDF. Show,   $$E(X) = \int_0^\infty (1-F_X (t)) \, dt$$   when $X$ has : a) a discrete distribution, b) a continuous distribution.   I assumed that for the case of a continuous distribution, since $F_X (t) = \mathbb{P}(X\leq t)$, then $1-F_X (t) = 1- \mathbb{P}(X\leq t) = \mathbb{P}(X>  t)$. Although how useful integrating that is, I really have no idea.


I am trying to create my own login system and I was wondering what is the best way to hash a password?  Should I just use the function from PHP SQL hash('SHA512' password) or should I use JavaScript for it?  I have already made the system to hash via PHP SQL with SHA512, but if it's more secure with JavaScript I wouldn't mind shifting.  So what I am  asking for is, what is the pros and cons for hashing with JavaScript and for PHP.  And could be cool if you could tell me too what it means to SALT, haven't really understood what it exactly means, and why I should do it.  And yes, I know there are lot's of good login system I can just copy/paste, but this is mostly for understanding how it all works and getting some experience.

It is currently said that MD5 is partially unsafe. Taking this into consideration, I'd like to know which mechanism to use for password protection.  This question,   suggests that hashing multiple times may be a good idea, whereas  suggests using salt.  I'm using PHP. I want a safe and fast password encryption system. Hashing a password a million times may be safer, but also slower. How to achieve a good balance between speed and safety? Also, I'd prefer the result to have a constant number of characters.   The hashing mechanism must be available in PHP It must be safe It can use salt (in this case, are all salts equally good? Is there any way to generate good salts?)   Also, should I store two fields in the database (one using MD5 and another one using SHA, for example)? Would it make it safer or unsafer?  In case I wasn't clear enough, I want to know which hashing function(s) to use and how to pick a good salt in order to have a safe and fast password protection mechanism.  Related questions that don't quite cover my question:


While experimenting with my 600d, I have noticed that on the same shutter speed, without inbuilt flash I get motion blur in my pictures, but with flash there is little to not motion blur (on the same shutter speed that produced motion blur without flash).  Why does this happen?

Why does a flash freeze a picture even if I use a shutter speed like 1/10 sec?  I don't understand it, because the light will hit the sensor the whole time, not just when the flash is fired.


In order to use an image as a form's submit button, I have come across two ways and would like to know which one is correct/best-practice.  Version 1:  <button type="submit">   <img src="mybutton.jpg" alt="Submit" /> </button>   Version 2:  <input type="image" src="mybutton.jpg" border="0" alt="Submit" />   I personally feel that the first version is better because it makes semantic sense and has a type of "submit". In the second version its saying the input is of type "image" which doesn't mean much to me as a human.  Which one should I go with?

When looking at most sites (including SO), most of them use:  <input type="button" />   instead of:  <button></button>    What are the main differences between the two, if any? Are there valid reasons to use one instead of the other? Are there valid reasons to use combine them? Does using <button> come with compatibility issues, seeing it is not very widely used?


In last days my apache is being attacked by many connections from proxies. I've identified the source but could not block the attack effectively.  The attacker seems to be using pyloris or a variation of this to attack my apache on port 80.  I installed nginx and varnish but not enough to support the extra load.  I also added a rule in iptables to drop packets that contain the string "X-Forwarded-For" but does not block all the proxies.  Does anyone have a suggestion?

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


How can I update the version ubuntu if ph.archive.ubuntu is not working? When I tried to enter this in terminal sudo apt-get update then I received this error  Ign:1 http://dl.google.com/linux/chrome/deb stable InRelease                    Hit:2 http://security.ubuntu.com/ubuntu xenial-security InRelease               Hit:3 http://dl.google.com/linux/chrome/deb stable Release                      Hit:5 http://ppa.launchpad.net/otto-kesselgulasch/gimp/ubuntu xenial InRelease  Hit:7 http://ppa.launchpad.net/webupd8team/sublime-text-3/ubuntu xenial InRelease Hit:4 http://screenshots.getdeb.net xenial-getdeb InRelease                     Hit:8 http://ppa.launchpad.net/wiznote-team/ppa/ubuntu xenial InRelease         Err:9 http://ph.archive.ubuntu.com/ubuntu xenial InRelease                        Could not connect to ph.archive.ubuntu.com:80 (2001:d18:0:23::172). - connect (101: Network is unreachable) [IP: 2001:d18:0:23::172 80] Err:10 http://ph.archive.ubuntu.com/ubuntu xenial-updates InRelease   Unable to connect to ph.archive.ubuntu.com:http: [IP: 2001:d18:0:23::172 80] Err:11 http://ph.archive.ubuntu.com/ubuntu xenial-backports InRelease   Unable to connect to ph.archive.ubuntu.com:http: [IP: 2001:d18:0:23::172 80] Reading package lists... Done W: Failed to fetch http://ph.archive.ubuntu.com/ubuntu/dists/xenial/InRelease  Could not connect to ph.archive.ubuntu.com:80 (2001:d18:0:23::172). - connect (101: Network is unreachable) [IP: 2001:d18:0:23::172 80] W: Failed to fetch http://ph.archive.ubuntu.com/ubuntu/dists/xenial-updates/InRelease  Unable to connect to ph.archive.ubuntu.com:http: [IP: 2001:d18:0:23::172 80] W: Failed to fetch http://ph.archive.ubuntu.com/ubuntu/dists/xenial-backports/InRelease  Unable to connect to ph.archive.ubuntu.com:http: [IP: 2001:d18:0:23::172 80] W: Some index files failed to download. They have been ignored, or old ones used instead.

I am trying to install WICD but getting following errors on my ubuntu 10.04 box  sudo apt-get install wicd   Err http://archive.ubuntu.schoolnet.lk/ubuntu/ lucid/universe python-wicd 1.7.0+ds1-2   Could not connect to archive.ubuntu.schoolnet.lk:80 (103.29.60.18). - connect (111: Connection refused) Err http://archive.ubuntu.schoolnet.lk/ubuntu/ lucid/main python-iniparse 0.3.1-1   Unable to connect to archive.ubuntu.schoolnet.lk:http: Err http://archive.ubuntu.schoolnet.lk/ubuntu/ lucid/universe wicd-daemon 1.7.0+ds1-2   Unable to connect to archive.ubuntu.schoolnet.lk:http: Err http://archive.ubuntu.schoolnet.lk/ubuntu/ lucid/universe wicd-gtk 1.7.0+ds1-2   Unable to connect to archive.ubuntu.schoolnet.lk:http: Err http://archive.ubuntu.schoolnet.lk/ubuntu/ lucid/universe wicd 1.7.0+ds1-2   Unable to connect to archive.ubuntu.schoolnet.lk:http: Failed to fetch http://archive.ubuntu.schoolnet.lk/ubuntu/pool/universe/w/wicd/python-wicd_1.7.0+ds1-2_all.deb  Could not connect to archive.ubuntu.schoolnet.lk:80 (103.29.60.18). - connect (111: Connection refused) Failed to fetch http://archive.ubuntu.schoolnet.lk/ubuntu/pool/main/p/python-iniparse/python-iniparse_0.3.1-1_all.deb  Unable to connect to archive.ubuntu.schoolnet.lk:http: Failed to fetch http://archive.ubuntu.schoolnet.lk/ubuntu/pool/universe/w/wicd/wicd-daemon_1.7.0+ds1-2_all.deb  Unable to connect to archive.ubuntu.schoolnet.lk:http: Failed to fetch http://archive.ubuntu.schoolnet.lk/ubuntu/pool/universe/w/wicd/wicd-gtk_1.7.0+ds1-2_all.deb  Unable to connect to archive.ubuntu.schoolnet.lk:http: Failed to fetch http://archive.ubuntu.schoolnet.lk/ubuntu/pool/universe/w/wicd/wicd_1.7.0+ds1-2_all.deb  Unable to connect to archive.ubuntu.schoolnet.lk:http: E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?


Need to know the MIME Types of file without program file name don't have any extension

How do you get a Media Type (MIME type) from a file using Java?  So far I've tried JMimeMagic & Mime-Util. The first gave me memory exceptions, the second doesn't close its streams properly. How would you probe the file to determine its actual type (not merely based on the extension)?


If someone calls me, and I say I can't talk to them at the moment, because I'm at school, is there any difference between the following two sentences?        I'm at school.   I'm in school.      Do they convey the same meaning or they are different?

I sometimes get confused whether to use in or at. For example,  Children were not at school yesterday, because yesterday was a holiday. Children were not in school yesterday, because yesterday was a holiday.  Is there a rule of thumb to not confuse in and at?


On macOS, I tried the following: \begin{tikzpicture} \pie{47/Rice,32/Wheat,22/Other} \end{tikzpicture}  What I observe is not what I expect with labels: It is like there is some debug info attached to the label (I would guess label position/angle). Any way to disable this behaviour ?  2020-09-21 edit: remove unrelated code ([text=legend]) 2020-09-21 edit: suggestion from @TorbjørnT. solved my issue. My question is a duplicate of

I am trying to make a simple pie chart with pgf-pie, but for a reason unknown to me the labels I use don't display correctly.   Here is the chunk of code I've copied from the manual into my .tex file :  \begin{tikzpicture}     \pie[color ={ cyan!10 , cyan!40, cyan!70,  cyan!100}, explode=0.1] {10/A, 20/B, 30/C, 40/D} \end{tikzpicture}   Here is a screenshot of what I get :    And here is a picture of what I'd like to obtain :   Does anybody knows why I get these numbers and how to get rid of them ?  edit : Here is a minimal working example   \documentclass{article} \usepackage[frenchb]{babel} \usepackage{pgf-pie}  \begin{document} \begin{tikzpicture}     \pie[color ={ cyan!10 , cyan!40, cyan!70,  cyan!100}, explode=0.1]{10/A, 20/B, 30/C, 40/D} \end{tikzpicture} \end{document}


I want to remove files from Google Drive, but I don't want them deleted from my hard drive. when I delete something from Google Drive it tells me that it will also be removed from my computer. I don't want that.

Using Google Drive on Windows (although I think the same question applies to OS/X) I want to exclude certain local folders but keep them on the computer.  When I go to Drive preferences and deselect specific folders, it wants to remove them from the local PC and keep them only in the cloud.  This doesn't work for me.  I feel like I could do this in earlier versions of the Google Drive client but I cannot recall for sure.  Is this possible?


how can i whitelist these URLs in Privoxy?  http://foo.org/user/10000/track?page=1 http://foo.org/user/10000/track?page=2 http://foo.org/user/10000/track?page=3 http://foo.org/user/10000/track?page=4 ...   I don't want to whitelist "foo.org" i just need to whitelist these specific url's. the "page=NUMBER" where NUMBER=1..99999999 [so it's a big number, i don't know exactly how much] What do i need to write in the "user.action" file? :\

I'm using Fedora 14 with privoxy-3.0.16-3.fc14.i686! These sites are blocked by Privoxy:        How can I whitelist these two sites/urls? I want to be able to visit these sites without being blocked (but e.g.: still block the ads on it)


I have a question concerning the creation of rings in the Lord of the Rings. It's, at least, hinted that the reason the Elves depart for Valinor after the demise of Sauron is because their Rings lose their power of preservation, hence the enchantments on Lothlorien would eventually wane, making it less like Valinor. But why can't they create more? Lets look at the Facts:  Fact 1 : We know that Celebrimbor is the only Elf that can forge the rings since Sauron under the guise of Annatar taught him how to. We also know that Celebrimbor was killed by Sauron before he could reveal this knowledge. However, Elves can't truly die until the end of the world and are lingering about in Valinor and I am sure that's where Celebrimbor is.  Fact 2: We know that Elves can go to Valinor and come back to Middle-earth since the Noldor have done precisely this.   So my question is, Why can't an Elf go to Valinor, learn the secret of forging rings from Celebrimbor, come back to Middle-earth and forge new ones?  Some are suggesting this question is a duplicate but I don't see how. I am suggesting a possibility where an opportunity was indeed present. Answers such as the elves fearing the past does not seem too convincing to me, after all it was a Maiar that got corrupted not the ring wearing elves. Why would they doubt themselves?

Why is it that more rings of this nature/power could not be made again? Are there no elven smith's left with the capability? How were the rings of power "enchanted" with their magical properties to begin with if Sauron did not directly forge them?   You would think that more would be made to aid in the battles against Sauron and his armies if someone had the capabilities to do so.


I'm playing around with C++11 and I've compiled the below successfully on Mac OS X using c++ -std=c++11 main.cpp.  #include <iostream> #include <vector> #include <string> using namespace std;   class s { public:     s(const string& str) : value {str} {}     string value; };  class t : public s  { public:     t(const string& str) : s{"t: " + str} {} };  int main(int argc, const char** argv) {      vector<s*> ss1     {         new s { "hello" },         new s { "there" }     };      vector<s> ss2     {         s { "greeting" },         s { "father" }     };      vector<s> ss3     {         { "ahoy" },         { "matey" }     };      vector<s> ss4     {         { "bonjour" },         t { "mademouselle" }     };      for (auto &s : ss1) {         cout << "value: " << s->value << std::endl;     }      for (auto &s : ss2) {         cout << "value: " << s.value << std::endl;     }      for (auto &s : ss3) {         cout << "value: " << s.value << std::endl;     }      for (auto &s : ss4) {         cout << "value: " << s.value << std::endl;     }  };   The output is here:  value: hello value: there value: greeting value: father value: ahoy value: matey value: bonjour value: t: mademouselle   The thing that I don't understand is that ss4 is simply a vector<s>, and yet I am able to store the derived class t inside of it. How is this possible?

Someone mentioned it in the IRC as the slicing problem.


I'm on my main phase.  I cast a 2/2 creature, and want to enchant it in the same phase.   I cast the creature - no counterspell.  I then want to cast a +3/+3 Aura enchantment on that creature, and then a second +2+2 enchantment on it.  My opponent then casts Counterspell on my creature as his spell goes on the stack.  Are the enchantments also gone to the graveyard or were they not able to be cast in the first place?  My way of seeing it was they couldn't have been cast because there was no creature to cast them on.  Otherwise, a counterspell basically counters three spells.  I sense I'm probably wrong but this seems broken.

Today, I was playing a duel, and my friend played a , which he then ended up enchanting with an . Between those two actions he asked me if I would counter it, to which I answered that I would wait for him to play the rest of his cards so I could choose what to do. He said that I had to counter the Wall of Reverence before he played Ethereal Armor for the counter to work. Was he right about that?


I am running this while loop in a script to take mysqldump and compress it, but I want to exit the script if the table doesn't exist. Below is what I have tried.  while read TABLES; do     sudo mysqldump $DB $TABLES | gzip -f > $DB.$TABLES.sql.gz     if [ $? != 0 ]; then         echo "mysqldump Query executed with error !!"         exit 1     fi done < file   But this will give the exit status of gzip -f, but not of mysqldump. I know I can get the exit status of mysqldump if I am not using gzip there, but is there any way in this method to get the exit ststus for mysqldump?

I have two processes foo and bar, connected with a pipe:  $ foo | bar   bar always exits 0; I'm interested in the exit code of foo. Is there any way to get at it?


Adult humans know it is logical to tell white lies in some situations. Every one of us does that. See what happened in the movie "Star Trek Into Darkness" when Spock refused to lie and wrote truthfully in his report how Kirk broke the Prime Directive. Kirk did it to save Spock's life. For saving his friend's life, Kirk lost his ship and job as Captain of the Enterprise because his Vulcan friend cannot lie.   Kirk: Where I come from, if someone saves your life, you don't stab him in the back. Spock: Vulcans can not lie.  Why can't Vulcans lie when it is a logical thing to do sometimes? Why can't Vulcans, with all their powers of logic, cannot see the logic?

There were various episodes where Vulcans did lie. For example, Spock did lie in episode  and Vulcans from Enterprise series were often deceitful, like in .  Now, Spock is half human, so really isn't the best example. But, Vulcans from Enterprise era are entirely Vulcan and they did lie.   Is the question of truthfulness just like with their emotions - not a physiological condition, but rather a result of their cultural conditioning? Such conditioning which was not widespread in Enterprise era, but already is in TOS era. Are they really incapable of telling a lie or is it that they usually don't lie?


I came across this in our codebase:  foreach (var evtType in EventLocator.GetTypes())   and remembering Shlemiel the painter's algorithm does the method EventLocator.GetTypes() get called on each loop or just the once?

Which types of classes can use foreach loops?


I have seen some users show a picture of their network profile on the profile tab. How can I add this for my own account?

I've noticed that a few users have something like this on their profiles:    It shows their total reputation across all sites.  How can I add that to my profile?


I'm trying to find the recommended approach for exposing custom Apex REST services using OpenAPI(fka Swagger). I found most articles on Salesforce consuming OpenAPI spec in external services but couldn't find a much info on how custom Apex REST services could be exposed as a Swagger Doc.

I have read many articles as how to expose the Apex class as a REST API or call the external REST API from Apex. How does OpenAPI (fka Swagger) work with Salesforce in inbound or outbound Rest API calls.