NullPointerException when using a fragment to get values from another class

I am a beginner in android and having some problem in handling NullPointerException.I need to pass the magnetometer reading values in an array from one class to a fragment. Here is the magnetometer class:  public class Magnetometer implements SensorEventListener { private Sensor mag; private SensorManager magman; private boolean magAvailable; private float[] magValue;  public  Magnetometer(MagFragment context){     magman=(SensorManager)context.getActivity().getSystemService(Context.SENSOR_SERVICE);     magAvailable=magman.getDefaultSensor(Sensor.TYPE_ACCELEROMETER)!=null;     if(isMagAvailable()){         magValue=new float[3];         mag=magman.getDefaultSensor(Sensor.TYPE_ACCELEROMETER);         magman.registerListener(this,mag,SensorManager.SENSOR_DELAY_NORMAL);     } }  @Override public void onSensorChanged(SensorEvent event) {     for(int i=0;i<3;i++)         magValue[i]=event.values[i]; } public float[] getLastReading(){     return this.magValue; } @Override public void onAccuracyChanged(Sensor sensor, int i) {  } public boolean isMagAvailable(){     return this.magAvailable; } public void unregister(){     if(isMagAvailable())         magman.unregisterListener(this,mag); } }   Here is the fragment:  ublic class MagFragment extends Fragment { private Magnetometer mag; private TextView x,y,z; private float[] magValues; public MagFragment() {     // Required empty public constructor } @Nullable @Override public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {     //returning our layout file     //change R.layout.yourlayoutfilename for each of your fragments     View rootView = inflater.inflate(R.layout.fragment_mag, container, false);     x=(TextView) rootView.findViewById(R.id.mx);     y=(TextView) rootView.findViewById(R.id.my);     z=(TextView) rootView.findViewById(R.id.mz);     magValues=new float[3];     getData(this);     return rootView; }   @Override public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {     super.onViewCreated(view, savedInstanceState);     //you can set the title for your toolbar here for different fragments different titles     getActivity().setTitle("Magnetometer"); } public void getData(MagFragment context) {     magValues=mag.getLastReading();     displayData(magValues); } public void displayData(float [] magV) {     x.setText(String.valueOf(magV[0]));     y.setText(String.valueOf(magV[1]));     z.setText(String.valueOf(magV[2])); } }   I understand,that the function returns some NULL values. The error I get is "Attempt to invoke virtual method 'float[] com.example.ark.ark.Sensors.Magnetometer.getLastReading()' on a null object reference"


I have a transparent texture and I can't figure out how to apply that transparency to the object.     As you can see, the texture in the bottom right is transparent in places and solid in others. But in render view the texture is just black.    You can see it better here.


Can I restrict openssh to only allow public keys with pass phrases

Is it possible to configure ssh using PubkeyAuthentication yes but only allowing pub/private key pairs with a passphrases?


I would like to use a usb with vmware instead of virtual disk

Is there a way to install an os on usb using a virtual machine program? Open to other software, not just vmware.


If this is my file.tex:  Ras is capable of binding tightly to downstream effector molecules and  thereby propagate specific signaling pathways \cite{12581669}   and this my biblio.bib:  @article{12581669,   author = {Herrmann, C.},   title = {Ras-effector interactions: after one decade},   year = 2003,   journal = {Current opinion in structural biology},   volume = 13,   number = 1,   pages = {122--9},   pmid = 12581669,   keywords = {} }   I get:   citation '12581669' on page 1 undefined.    and the numbering is "?"**  Some idea of what should I do?


Why is SQL Server consuming more server memory?

SQL Server is consuming 87.5 % of my server RAM. This recently caused a lot of performance bottlenecks such as slowness. I researched this issue. One common solution I could find on the internet is to set the maximum limit for SQL Server. This was done and much improvement is gained. I want to know why if the maximum memory value is not set why SQL Server keeps consuming the resources


Although I'm mostly interested in programming I like to read very good questions and answers from other areas as well.  A network-wide newsletter could contain:   top questions from the stackexchange.com "hot questions" feed (I'm currently following that one in Google Reader, but it's hard work) announcement of new sites from Area 51 (at the moment, I have to remember checking regularly) network-wide announcements (basically blog.stackoverflow.com) content from the new site blogs more interesting things I didn't think of   What I would like best is to be able to customize my newsletter (e.g. "I want to read all hot questions from Unix, but only the very hot questions from Cooking"), but I realize that would probably be too much work and possibly cause confusion.


Extract height from DTM into attribute table of point layer

I am using ArcGIS Desktop 10.4  I have an empty point layer (100 random points) and a dtm.  I was wondering how I would go about to get the height from the dtm underneath each point into the points attribute table?


Is it ok to store open cans in the fridge?

I'd been taught growing up that you should never store canned food in the fridge in the open can. Is there any scientific basis to this, or is it just an old wives tale?   What types of foods should not be stored in their can once open? Would olives, for example, be harmed from this sort of storage? Or only more acidic foods like tomato paste or pineapple be affected?


Prove linear combinations of logarithms of primes over $\mathbb{Q}$ is independent

Suppose we have a set of primes $p_1,\dots,p_t$. Prove that  $\log p_1,\dots,\log p_t$ is linear independent over $\mathbb{Q}$. Now, this implies $ \sum_{j=1}^{t}x_j\log(p_j)=0 \iff x_1=\dots=x_t=0$.  I think I have to use that fact that every $q\in\mathbb{Q}$ can be written as $\prod_{\mathcal{P}}$, where $n_p$ is a unique sequence ($n_2$,$n_3$,$\dots$) with domain $\mathbb{Z}$. Here, $\mathcal{P}$ denotes the set of all integers.  Now how can I use this to prove the linear independency?


How to prove this inequality with factorials: $n!>n^{\frac {n}{2}}$

This is what I am trying to solve:  $n!>n^{\frac {n}{2}}$  I tried with induction and somehow it doesn`t work this way, I tried with logarithms and also didn´t find a way. Is there an elementary(if possible) way to prove this?  Or is it the case that for some large $n_0$ this inequality reverses sign?


Create an entry in index without creating a Chapter or Section title

My thesis is about a project I developed in a company. During the project, I generate several official documents that I'm appending at the end (using includepdf package). These documents have their own cover, so it's not necessary to create an almost blank page with only "Appendix A - Lorem ipsum", but if I don't include this I lose my reference in the index. What should I do? Thanks in advance!


Is there a word for a "promise breaker"?

I'm somewhat vexed in that I cannot think of a word that means a "promise breaker" or "person who breaks a promise". There are words that may subsume that, such as "miscreant" or "liar", but I cannot come up with an English word that is limited to a person who breaks promises.  The closest I've come is "piker", which is (a) informal and (b) limited to Australia/NZ, but means (according to the dictionary on my Mac):     a person who withdraws from a commitment.   Is there a more formal and common word that can be used to refer to people who break promises?


Null Pointer Exception when requesting Audio Focus

Here is my code:  int result = am.requestAudioFocus(audio_listener,AudioManager.STREAM_MUSIC,AudioManager.AUDIOFOCUS_GAIN_TRANSIENT); if (result == AudioManager.AUDIOFOCUS_REQUEST_GRANTED) {     mediaPlayer = MediaPlayer.create(NumbersActivity.this,onwhich_isClickedN.getAudiofile());     mediaPlayer.start();     mediaPlayer.setOnCompletionListener(on_comp);     }   Here is the error:  java.lang.NullPointerException: Attempt to invoke virtual method 'int android.media.AudioManager.requestAudioFocus(android.media.AudioManager$OnAudioFocusChangeListener, int, int)' on a null object reference


Is $[0,1]$ a union of family of disjoint closed intervals?

According to , $[0,1]$ cannot be written as union of countable disjoint closed sets, is the same true about (uncountable) family of disjoint closed intervals ?


Restrict ImportRange to only visible rows

I need to restrict the ImportRange function below to show only visible rows as some of the rows are filtered and some of the rows are grouped.  =importrange("WorkbookID","Sheet1!A2:K13285")


Force use of tex live in /usr/local/ instead of old copy in /usr/bin

The TeX live installation bundled with TeXmaker in ubuntu (Xubuntu 11.10) is ancient and was breaking the acronym package (and who knows what else) so I though I'd update by installing using tl-install direct from CTAN.  But after removing TeXmaker through ubuntu software centre and installing the new copy, I still have a whole Tex live install under /usr/bin, and the new install under /usr/local/texlive/2013/bin/x86_64-linux.  Although I've added the latter location to my path (as prompted by tl-install), which pdflatex still tells me it's using the copy in /usr/bin.  I need a way of forcing the new version to be used.  It took 3 hours maxing out my bandwidth to install, so removing all packages with tex in the name (or similar) and reinstalling isn't really an option.  I don't have to uninstall all the old stuff - I'm not short of disk space.    The easiest way is presumably to delete all the tex-related binaries in /usr/bin - but how do I find them all?


CSS: Remove scroll bar and replace with variable height for textarea in a table

Currently  I have a table row that contains a textarea for user input. The purpose of textarea is so user can input multiple lines.  Code:    table {   border-collapse: collapse;   width: 100%;   border: 1px solid black; }  th, td {   text-align: center;   border: 1px solid black;   padding: 10px; }  .container {   border: 1px solid blue; }  .text-area {   width: 100%;   box-sizing: border-box;   display: flex; }  .fixed-min {   min-width: 600px; } <!DOCTYPE html>

     Column 1	     Column 2

             <textarea class="text-area">Set width in this big column             </textarea>

             <textarea class="text-area">This contents of this column should always be visible i.e. no scroll bar, and instead the height of this row should adjust to show all content.             </textarea>

         Problem  I would like the textarea to show all content by auto-adjusting height rather than requiring the user to scroll.    Notes:   I saw a solution on , but there has to be a simpler solution through CSS that I am missing. I used to use an editable  rather than  before, but because I am using this html within a react component, there were other complications with using an editable  so I switched to a . I wanted to know if there is a  solution, but appreciate it if there is not, and will then refactor the code to use  once more.   EDIT: Seems there is no CSS only solution for  :'(


Why is the collection of all groups a proper class rather than a set?

According to ,  The collection of all algebraic objects of a given type will usually be a proper class. Examples include the class of all groups, the class of all vector spaces, and many others. In category theory, a category whose collection of objects forms a proper class (or whose collection of morphisms forms a proper class) is called a large category.  I am aware of Russell's Paradox, which explains why not everything is a set, but how can we show the collection of all groups is a proper class?


Have "Figure", "Table"... word generated automatically when referencing

Is there a way to get \ref generate also the "word", not only the number?  As in: Using \ref{eq:gauss}, we can now prove  I'd like this to turn into Using Equation 1, we can now prove.  Right now it just generates the number and I need to write the word Equation myself.  Not sure if this is related, but in my "header" file I have this:  \usepackage{url} \usepackage[     unicode=true,     bookmarks=true,     bookmarksnumbered=true,     bookmarksopen=false,     breaklinks=false,     pdfborder={0 0 0},     pdfpagemode=UseNone,     backref=false,     colorlinks=true]{hyperref}   I believe it colours the numbers, not really sure.


OSM street nodes across postal code boundaries

Querying a street on OSM may result in multiple matches for the same street if it spans a postal code boundary (i.e. parts of the street have different postal codes). How can all nodes for the street be retrieved? Is there an option to get the street geometry as GeoJSON or similar to use as map overlay to highlight the street?


If a Dementor can consume and destroy a person's soul, and a Horcrux is part of someone's soul in an object, could harry have just found a Horcrux and thrown it at a Dementor, so that it could destroy it for him?


Consider the download link  http://trac-hacks.org/changeset/latest/accountmanagerplugin/tags/acct_mgr-0.4.4?old_path=/&filename=accountmanagerplugin/tags/acct_mgr-0.4.4&format=zip   with the query part  ?old_path=/&filename=accountmanagerplugin/tags/acct_mgr-0.4.4&format=zip   Downloading the file in firefox 37.0 causes the query to be resolved and a download of a .zip file while   wget 'http://trac-hacks.org/changeset/latest/accountmanagerplugin/tags/acct_mgr-0.4.4?old_path=/&filename=accountmanagerplugin/tags/acct_mgr-0.4.4&format=zip'   retrieves a file named acct_mgr-0.4.4?old_path=%2F&filename=accountmanagerplugin%2Ftags%2Facct_mgr-0.4.4&format=zip which one definitely should rename in order to work with it on the command line.  How to get wget to store the download as .zip with the correct name without the need to figure out this name (diff-from-_-14559-to-accountmanagerplugin_tags_acct_mgr-0.4.4-14559.zip in the example) and specify it to the -O/--output-document= option?  I checked , but adding --content-disposition doesn't help.


Summary of All of Statistics in a useful mind map

Is there a good mind map to summarize all the important concepts in statistics in a useful manner so that a beginner can decide which topics he has covered, which he needs to cover in short term, which he needs to cover in long term and which he can just ignore for sure or at least replace it with some blackbox software for all practical purposes?  For example, machine learning has a very nice mind map by Jason Brownlee.    The mind map does not need to go into too much detail and include low-level topics. Just high-level topics like hypothesis testing, ANOVA, regression, experiment design etc. should suffice. But it should not miss any topic of mathematical statistics covered in both undergrad and grad level courses.


Which was the first story featuring time loops?

In  :  Subaru Natsuki is a NEET who is suddenly summoned to a fantasy-like world. Just after arriving, he is killed while trying to help a young elf, just to revive some hours in the past. After dying some times, he realizes that he has the power to turn back time after his death.  In :  U.S. Army Aviation pilot Captain Colter Stevens repeatedly experiences the last eight minutes of another person's life to identify the bomber in a terrorist attack in order to prevent a second, nuclear attack on Chicago  And in :  A weatherman finds himself inexplicably living the same day over and over again.  Which was the first story featuring time loops, or a character living the same period of time again and again?


What is anti-money and how do I launder it?

So the phrase "anti-money laundering" has an obvious meaning, referring to something or some process that acts against the laundering of money.  However, I find the use of the hyphen slightly confusing.  Lets try another example:  "anti-gravity modulation"  Is this something that acts against the modulation of gravity, or is it the modulation of anti-gravity (as in: my anti-gravity boots keep me stable because they use anti-gravity modulation).  Does this just come down to context or am I using incorrect grammar (or am I just confused)?


What visa does my wife need to travel to the UK with me, if I'm going there on a business visa?

I am resident of India and just got UK Business visa ( 6 months, multiple entry) .. I am going for a week on business trip. I want to take my wife along with me and at the end of trip.. I want to extend my trip for 3 days and we want to spend some time on leisure.   What visa I should apply for my wife.. visitor visa? should she mention in the visa form that she is going along with me and staying with me while I am on work and later we are spending time on leisure.   While filling my business visa form, there was a field asking if anyone else is going with me.. I selected no.. as there were no plans.  Also is it ok to spend time on leisure on UK Business visa


Spanning Trees: Prove if $e_1$ is an edge in $X$ that isn't in $Y$, then there exists an edge ...

Say $X$ and $Y$ are two different spanning trees of a simple and connected and undirected graph $G$. Prove that if $e_1$ is an edge in $X$ that isn't in $Y$, then there exists an edge $e_2$ in $Y$ that isn't in $X$... so the graph $(X − e_1) + e_2$ (obtained from $X$ on replacing $e_1$ by $e_2$) is also a spanning tree of the original graph, $G$.


How to remove hyperref/colour for Author only in the Author-Year Citation Natbib LaTeX?

I would like to remove the colour only for the Author Name in the citation created using natbib + bibliography for Springer (svjour3) journal manuscript.         \documentclass[12pt,a4paper,referee]{svjour3} \smartqed   \usepackage{mathptmx} \usepackage{float} \usepackage{url} \usepackage[colorlinks=true,linkcolor=blue,citecolor=blue,urlcolor=blue]{hyperref} \usepackage{etoolbox} \usepackage{cite} \usepackage{natbib}  \begin{document}  \citep{kannan2013} ....... \\ \citet{kannan2013}  \begin{thebibliography}{300} \bibitem[Kannan and Santhi(2013)]{kannan2013} Kannan, M. R., \& Santhi, M. H. (2013). Constructability Assessment of Climbing Formwork Systems using Building Information Modeling. \textit{Procedia Engineering}, 64, 1129-1138. \end{thebibliography} \end{document}


infinite blinking cursor at top lefr corner of the screen after booting

I started installing Ubuntu with unetbooting then I got so excited about the install that I forgot my charger wasn't plugged in, then my pc died, immediately I plugged it in and switched it on it showed me up as usual then moves to a dark screen (not purple Ubuntu screen) that has a cursor at the top left corner that blinks infinitely it's been blinking for the past hour now please help. I'VE got really important projects to do. Pleaaaaaaseeeee help me.


Combinatorial proof of identity involving central binomial coefficients

The identity I am interested in reads, $$ \sum_{k=0}^{n-1} {2k \choose k} \cdot 2^{2(n-k)} = 2n \cdot {2n \choose n}. $$ It is not hard to prove using the generating functions, but it seems that there should be a combinatorial argument. I tried different ideas with lattice path counting, but without success.   Update: I found a related discussion , however, among the many arguments there is no combinatorial one.  Update 2: it seems I have found a combinatorial proof (quite indirect), but will post it only after the bounty expires. I hope someone comes up with an answer before this so that the bounty is not wasted.


my else if statement isnt working in my tic tac toe program

//main code  public static void main(String[] args) {  //initiate game board  initGame();     //start the game     do {         PlayerMove(Cplayer);         updategame(Cplayer, crow, ccol);         printboard();         //game over message         if (currentstate == you_win){             System.out.println("'X' Won!!");             else if (currentstate == comp_win)                 System.out.println("'O' won!!");                 else if (currentstate == draw)                 System.out.println("It's a Draw :(");         }


Where does Google get the shorter title that it uses in site links when it is different than the page title?

Google seems to use the Title tag as the primary source for determining sitelink titles.  However, I noticed that for some sites, the page title is not the same as the sitelink title.  For example, Airbnb has a sitelink titled 'Business Travel':    But when you enter the page the title is actually 'Corporate & Business Travel on Airbnb':    Does anyone know how to determine the title of a sitelink, and make it different than the target page's title?  Thanks!  *Note: The precise process of determining the sitelink title is automated, and Google is not transparent about it at the moment.


Edit: The $F$'s are Fibonacci numbers.  I need an idea on how to show the following:     If $m$ and $n$ are positive integers, then $(F_m,F_n)=F_{(m,n)}$.   I believe that using the fact that $F_{m+n}=F_mF_{n+1}+F_nF_{m-1}$ could come in handy. Moreover, Euclid's algorithm may as well be needed. But I am not certain, as there may be better methods to achieve this.  Thanks in advance.


How to prove the fact that ANY motion of body is superposition of translational and rotational motion of and about centre of mass respectively?

According to University Physics  Every possible motion of a rigid body can be represented as a combination of translational motion of cm and rotation about centre of mass. This is true even if centre of mass is accelerating  How can the above statement be proved. If a rigourous proof can be given thats good but only an intuitive explanation about this fact and how is it true for ANY motion and even if centre of mass is not having constant velocity would be sufficient ?


Process management and high technology weapon. Novel name and author?

I am looking for help to point me out at a very old novel (likely from the '60s) about two empires at interstellar war. When it comes to starships, one is technologically very advanced, and the other has very low and inefficient technology.  The highly advanced empire has apparently strong chances to win the war, in particular considering a new technology they were developing. I remember the technology to work like this: consider the space as a flat surface, and on this surface, a disk around the spaceship. When the technology was turned on, this disk was stretched out, as made of rubber, so that it produced a cone, with the tip being the spaceship. The spaceship was therefore teleported 10 parsec away (if I remember correctly), but retained all the connections to the original position. If the spaceship moved, the cone moved as well. This allowed to move in position among enemy ships completely unnoticed, by stretching while afar, then moving in the proper position 10 parsecs away, then destretching.  Despite this technology, the empire lost the war because of delays. It's a perfect example of how having a disruptive technology does not guarantee to win against the competitors.  I am trying to find out the author and name of this novel, hopefully with the date of publication and in which journal/magazine.


Is anyone aware of it ever having been addressed that for a technology such as beaming to remove an object from an environment that is not a vacuum, that on removing it, there would be an instant collapse of a vacuum pocket where the object used to be. The inverse of that would be, provided that one was not "beaming the air out" then I would assume it gets pushed aside. If all this happens at any rate of high speed relating to that of electrons/photons one would have to guess that it causes at the very least a lot of noise...  One would think for this type of technology to work, there would have to be some sort of spatial pre/post processing. Likewise since the locations could and most likely would be moving in relation to one another (say if you were beaming to a planet from a space ship) if the source were not statically bound to the same physical / gravitational grasp (such as on the same planet) that it would not only have to be prepped ahead of time, but sustained and tracked at a potentially very fast rate. The theory could even be weaponized, imagine if someone were to “beam” all the air out of a large building relatively instantly… or beam up a few cubic miles of dense atmosphere just to the left of a ship in orbit, how about a few tons of solar plasma onto a bridge? Matter is matter in that regard, but I digress… There are things like Heisenberg compensators and inertial dampeners mentioned, has this seemingly obvious problem ever been directly addressed, and if so does anyone know of any specific show /. Episodes that did?


I have the file eclipse-inst-linux64.tar.gz of the URL :    I want  install it  in my ubuntu But I don't know how to install it. How do I install in ubuntu?


Treeview binding of button on node CanExecute issue

Not sure if this is something I am not understanding about WPF or about Catel, but I have a treeview with 3 datatemplates for different node types.  2 of the node types can be bound to a delete button.  The binding of the button command binds to the viewmodel of the parent control (rather than to the node itself) and a command parameter of the node where the button was clicked is passed.  I am providing a small snippet of one of the data templates (the whole thing is too large to enter here):  <Grid Margin="10" x:Name="CriteriaGrid">    <TreeView ItemsSource="{Binding Criteria}" >      <DataTemplate DataType="{x:Type self:Leaf}">          <Button Command="{Binding Source={x:Reference CriteriaGrid}, Path=DataContext.DeleteLeaf}"                   CommandParameter="{Binding}">X</Button>       </DataTemplate>    </TreeView> </Grid>   ViewModel (again just a small extract):  public class ManageCriteriaViewModel : ViewModelBase {     public ManageCriteriaViewModel()     {         DeleteLeaf = new Command<Leaf>(OnDeleteLeaf, CanDeleteLeaf);     }      private bool CanDeleteLeaf(Leaf leafNode)     {         return (leafNode?.Parent as Group) != null;     }      private void OnDeleteLeaf(Leaf leafNode)     {         // Some code     }      public Command<Leaf> DeleteLeaf { get; private set; } }   The problem is that when the Tree is initially being constructed, the command parameter is always null, and my CanExecute test returns false if the parameter is null.  So when my tree initially displays, all my buttons are disabled.  However, if I click any of the buttons, all of them get re-evaluated and become enabled because now the command parameter is being passed correctly.  I have tried adding:  protected override Task InitializeAsync() {     CommandManager.InvalidateRequerySuggested();     ViewModelCommandManager.InvalidateCommands(true);     return base.InitializeAsync(); }   In an attempt to re-evaluate all the commands after the UI is loaded but this does not seem to work.  What am I missing here?


Do Ewoks only eat people on special occasions?

An often glossed over point of Return of the Jedi is the fact that the cute fluffy Ewoks plan to cook and eat the rebels as the main course in a “celebratory feast”. Has this aspect of Ewok culture been expanded on in any medium? Was this a one off for their “god” (C3P0) or did the Ewoks regularly hunt and eat other sentient species? Also why not also eat Leia (or were they fattening her up for a future meal)?


Is it possible to test for a Gaussian distribution?

Suppose that I have $n$ independent samples from a probability distribution. I believe that the distribution is Gaussian ($G$) but I don't know; then my question is: does there exist a test such that I can interpret the result of the test to be something like "the probability that my samples are the output of a non-Gaussian distribution T with $d(G,T)>\epsilon$ is smaller than $x$%", where $d$ is the variational distance.  I have Googled and found the Kolmogorov-Smirnov test and some others, but I'm not sure if I can use the results of those tests to make a strong statement like the one above.


I'd like to ask you about the way of putting the listing next to the tikzpicture. Is there any way to place lstlisting as it is shown below?  \documentclass[12pt]{article} \usepackage{tikz}  \begin{document} \begin{tikzpicture}[scale=3] \clip (-0.1,-0.2) rectangle (1.1,0.75); \draw[step=.5cm,gray,very thin] (-1.4,-1.4) grid (1.4,1.4); \draw (-1.5,0) -- (1.5,0); \draw (0,-1.5) -- (0,1.5); \draw (0,0) circle [radius=1cm]; \fill[green!20!white] (0,0) -- (3mm,0mm) arc [start angle=0, end angle=30, radius=3mm] -- (0,0); \end{tikzpicture} \end{document}   My goal:


How is dark energy consistent with conservation of mass and energy?

I initially thought that dark energy must in some way violate conservation of mass and energy since the component of the energy density of space that comes from dark energy is constant, and space is expanding. Therefore, as space expands the energy in the universe that comes from dark energy would increase. I presumed the source of this energy was not coming from the conversion of other types of energy to dark energy, so it must violate conservation.  I decided to Google this and came upon this article:    It says that dark energy does NOT violate conservation and quotes Carroll, Press, and Turner (1992):  "…the patch does negative work on its surroundings, because it has negative pressure. Assuming the patch expands adiabatically [i.e. without loss or gain of heat], one may equate this negative work to the increase of mass/energy of the patch. One thereby recovers the correct equation of state for dark energy: P = – ρ c2. So the mathematics is consistent."  Is there a way to explain this in layman's terms? (The blog attempted to do this, but it was very unclear to me.) More specifically, can you explain where my initial train of thought described above fails when I erroneously concluded that dark energy violates conservation?  Thank you.


Representation of the delta distribution as an element of the dual of $H^1$

I'm working with some Sobolev spaces and I just wanted to consider the elements of $H^{-1}$ as elements on $H^1$ (Riez Theorem). Since the delta function $\delta(f) = f(0)$ is an element of the dual of $H^1$, who is his representative?  i.e. I want some $g \in H^1$ such that$$ \int g h dx + \int g' h' dx = h(0) \quad \forall h \in H^1$$


Let $f:R\to R$ a polynomial from degree $n\in N$, such that $f(x) \ge 0$ for all $x \in R$. Explain why n is an even number.

Let $f:R\to R$ a polynomial from degree $n\in N$, such that $f(x) \ge 0$ for all $x \in R$.       1.) Explain why n is even.      2.) Let $g= f+f'+f''+...+f^{n}$ (where $f^{k}$ is the kth derivative). Prove that g has an absolute minimum on R.      3.) Prove that $g(x)\ge 0$ for all $x\in R$   1.) Given the function is $\ge 0$ means that the leading coefficient is positive. Using limits, when x approaches $ \pm \infty $ for even polynomials, the limit is $\infty$.   Since f is a polynomial, f is continuous on all R.  When x approaches $\pm \infty$ for odd polynomials the limit is $\pm \infty$ and from the intermediate value theorem, f(x) must take on every value in-between $\pm \infty$, therefore exists c such that $f(c) \lt 0$ which is a contradiction to what we were given.  2.) Again, g is a polynomial of an even degree. How to solve this is beyond me.  3.) Again, not sure where to begin.  Id appreciate any help.


There is a bug below  where the share a link text does not appear correctly.  It is rendered as "Know someone who can answer? Share a link to this question via email, , , or ."


Unable to upgrade Ubuntu 18.10 to ANY version

I am trying to upgrade from 18.10 to any possible version with the aim of ultimately getting to 20.04.  Any help or tips would be greatly appreciated.  I have tried the following so far:  Run the basic Update Manager in graphical and command line modes and got this error:  "An upgrade from 'cosmic' to 'eoan' is not supported with this tool".  (Eoan is 19.10) Tried playing with /var/lib/update-manager/meta-release to change paths but it looks like the underlying repositories have been removed Removed update manager and tried reinstalling per another URL and now i cannot reinstall that at all.  Is there anyone who can help please?  I would really really prefer not to wipe everything out and reinstall if possible.


Referring to one of my last questions. I need for my WPF application to Auto-Calculate the Age of the movie based off of the release date, and the current date. This is one area that I personally have no experience with. I would assume it would have something to do with DateTime and CurrentDate. Any suggestions?  My WPF has a Movie class which contains:  namespace FinalExam {     public class Movie     {         public string movieName { get; set; }          public DateTime releaseDate { get; set; }          public DateTime movieAge { get; set; }          public string onDVD { get; set; }          public string onBluRay { get; set; }          public string genreType { get; set; }          public string directorName { get; set; }          public string producerName { get; set; }          public int movieLength { get; set; }          public string moveRating { get; set; }             } }   MovieUtility class which contains:  namespace FinalExam {     public static class MovieUtility     {         public static bool isItDate(string dateString)         {             DateTime date;             bool isDate;             isDate = DateTime.TryParse(dateString, out date);             return isDate;         }         public static DateTime ConvertStringToDate(string dateString)         {             DateTime date;             DateTime.TryParse(dateString, out date);             return date;         }     } }   And the MainWindow.xaml which is where the user will input the data and a datagrid will display it, and last, the MainWindow.xaml.cs which is where all of the strings are called and the data will be added the the List.  namespace FinalExam {     /// <summary>     /// Interaction logic for MainWindow.xaml     /// </summary>     public partial class MainWindow : Window     {         //GLOBAL VARIABLE AREA         List<Movie> movieList = new List<Movie>();          public MainWindow()         {             InitializeComponent();         }          private void but_Submit_Click(object sender, RoutedEventArgs e)         {             bool isGoodToAddNewMovie = true;             Movie newMovie = new Movie();             newMovie.movieName = txtBox_MovieName.Text;             newMovie.onDVD = txtBox_DVD.Text;             newMovie.onBluRay = txtBox_BluRay.Text;             newMovie.genreType = txtBox_Genre.Text;             newMovie.directorName = txtBox_Director.Text;             newMovie.producerName = txtBox_Producer.Text;             newMovie.moveRating = txtBox_Rating.Text;              if (MovieUtility.isItDate(txtBox_ReleaseDate.Text))             {                 newMovie.releaseDate = MovieUtility.ConvertStringToDate(txtBox_ReleaseDate.Text);                 txtBox_ReleaseDate.Background = new SolidColorBrush(Colors.LightGray);             }             else             {                 txtBox_ReleaseDate.Background = new SolidColorBrush(Colors.Red);                 isGoodToAddNewMovie = false;             }              int length;              if (int.TryParse(txtBox_Length.Text, out length))             {                 newMovie.movieLength = length;                 txtBox_Length.Background = new SolidColorBrush(Colors.LightGray);             }             else             {                 txtBox_Length.Background = new SolidColorBrush(Colors.Red);                 MessageBox.Show("Please enter movie length in minutes.");                 isGoodToAddNewMovie = false;             }              //ADD PERSON TO LIST             if (isGoodToAddNewMovie)             {                 movieList.Add(newMovie);                 dataGrid_Movies.ItemsSource = new List<Movie>(movieList);             }         }     } }   So how would I go about Auto-Calculating the Age of the movie based on release date and have it automatically put the age of the movie into the DataGrid on the Window.


..and I don't mean finding out why it doesn't compile, I mean serious debugging: breakpoints, figuring out value of variables at a given moment during run/compile, stepping, examining a stack (is there one?), etc. All the things that we take for granted when debugging a "real" programming language. Since TeX is "turing-complete", I would like to be able to really see what is going on internally.   I'm guessing that a GUI interface for the debugger would be too much to ask, but if it exists, I'd love to hear about it.


Did Synapse forget everything and so why?

I've been using Synapse for a while now. The  regrading the lacking ability to remember recurrent launches was fixed.  I've been launching the same documents I am working on at the moment for the past months and there was no issue. But today, for some mysterious reason, Synapse doesn't remember any of these, nor can it find them in its search. I had to browse and launch them myself! (How medieval is that! :) )  So, did something happen? Can I find out what and why? And most importantly: can it be fixed?  NB: problem also posted .


Two normal humans interact with a team of clones

I'm looking for a story I read in the 90s - I'd guess it's 20-30 pages long.  Two men are posted as scientific observers on an isolated planet for many years.  Despite their differences, they learn to get along and survive the solitude.  One day, a team of 12 identical clones arrives.  There are 6 males and 6 females who were cloned from a brilliant male biologist (by adding X chromosomes, etc.).  They are super close to each other; each one specializes in a different field of science, they all sleep together, and they don't really communicate well with outsiders.  The point of the story is the contrast between the original pair's way of dealing with differences and the clone's identical, in-built similarity which makes those skills unnecessary.  A disaster on the planet results in the death of some of the clones & explores the psychological aftermath of the breakup of their unit.


Prevent a part of the caption from appearing in the list of figures

I am using the 'article' class, 'figure' environment.  My captions are divided in two parts:   the information about the figure the credits of the figure (for which I use \textfff{})   In my list of figures, I would like to omit the second part. Would you have a solution, please?


As a molecular biology graduate student I have decided to learn some basic programming and bioinformatics since everybody says that it is crucial. For example, what would you learn if you need to work with RNA-Seq data, compare and interpret them?   Thanks!


How do I make LaTeX push long citations to a new line?

When I use the \cite command for my citations, often LaTeX will overflow the margins for my lines, and the text looks pretty bad.  How can I make LaTeX push long citations to the next line automatically?


Where can I find a Samsung Galaxy S5 ROM for Micromax Bolt A068? If an S5 ROM is not available, then please provide a download link for S4 or Note 3 for my device.


Does Southwest Airlines have assigned seating?

I have a short flight tonight, from Denver to Oklahoma. I was wondering if anyone has had any experience with Southwest before, and in which do they just allow you to sit wherever a spot is open, or are the seats still chosen for you on the short flight ?


Testing equality of two coefficients of two separate regressions in R

I run the following regressions:  Y_1 ~ c_1 + b_1*X Y_2 ~ c_2 + b_2*X   and I get two estimates for b_1 and b_2. What is the appropiate statistic to test if b_1 <= b_2 and is there a function for that in R?


I just start using the text-based Lynx browser, and a part of the interface is very hard to read like you can see on this screenshot:    How can I fix that?


Functions that take rationals to rationals

What is known about $\mathcal C^\infty$ functions $\mathbb R\to\mathbb R$ that always take rationals to rationals? Are they all quotients of polynomials? If not, are there any that are bounded yet don't tend to a limit for $x\to +\infty$? If there are, then can we also require them to be analytic?  (This is basically just a random musing after I found myself using trigonometric functions twice in unrelated throwaway counterexamples. It struck me that it was kind of conceptual overkill to whip out a transcendental function for the purpose I needed: basically that it had to keep wiggling forever. I couldn't think of a nice non-trancendental function to do this job, however, and now wonder whether that is because they can't exist).


Below is the Screenshot of my lightning-checkbox-group. Instead of showing them vertically I want them aligned horizontally. I have referred several links and applied many CSS but still no luck. Can someone please help me with this. Also I want the background color and border color of the checkboxes to be changed?  .html

                 <lightning-checkbox-group class="green-checkbox" options={objectFieldOptions} value={selectedObjectFieldValue}                     onchange={objectFieldHandleChange} required="true">                 </lightning-checkbox-group>

  For Bg color and border color change I tried this CSS but it's not working .CSS .THIS input[type=checkbox]:checked.green-checkbox{     border-color: #00b200;      box-shadow: 0 0 3px #006A00;      background-color: rgb(0, 178, 0);     border:1px solid; }  .THIS .slds-checkbox {     display: inline !important; }


I've been trying to install ppa's for a while and I'm a little desperate; -; , because I need to do a job and I can’t install it at all (ah, hi this and my first post aki hhihi, I just made an equi account in the community and downloaded the ubunto shortly) I installed the most updated version of the focal fossa, I am trying to install the OBS open broadcaster software, whenever I install ppa from the command line of the same error "Repository does not have a release file" I tried to look for some updates but most sites only have for ubunto 15.00 ; -; I don't know what to do because I already tried this method here: https: //itsfoss.com/repository-does-not-have-release-file-error-ubuntu/ but it doesn't solve anything ._. , I think I will have to download the previous ubunto, like going from 20.04 to 15.00 but I don't know how to do this; -; help this error for all unofficial ppas that I download more or less (oh and also sorry for my english! it's not my native language, i'm using google translator :v) AAAWWWo i understand a litle now :v, thaks for the answers people youre awnsome,you answered very quickly even,it work!


How to pass absolute path as an argument in shell script?

I am a beginner in shell scripting. I am trying to change directory in a shell script by passing an absolute path as an argument. I am trying to do it with cd command but it's not working.  Any idea how to specify an absolute path? e.g, currently I'm in /home/malik1 and I want to  go to  /home/documents  What I've done:  if [[ -d "$1" ]]; then      cd $1   Correct me please if I'm doing it wrong.


I'm using macbook retina mid 2014 with storage capacity 128GB. When i check my storage About This Mac > Storage, its showing uses of movies occupying 3.96GB. I check all folders individually but i can't find a single video file.  And also why the "other" section occupying 56.04 GB of storage. Here is the screenshot.


Showing the simplifying steps of this equality ...

Can someone please show me how these are equivalent in steps$$\frac{(h_2^2 - h_3^2 )}{\dfrac{1}{h_3}-\dfrac{1}{h_2}}=h_2 h_3 (h_2+h_3)$$ I thought it simplifies to $$(h_2^2-h_3^2)(h_3-h_2)$$This would be much appreciated, I cant wrap my head around it.


Ignoring newlines for better spacing? Or alternative?

So when I code, say in C++, I like to separate blocks of code with spacing, etc. This makes it easier to navigate and interpret. When I separate out a block, it becomes clear that that is a unit that serves some particular purpose.  In Latex, I do this for navigation reasons and clarity. However this causes undesired consequences: New paragraphs when I don't want them. For example, I like to write proofs as follows:  \begin{proof} etc. etc. etc. (blank line) \end{proof}   This way it's easy to see where the end of a long proof is. However, this causes the QED symbol to be on a new line: Not ideal.  Also, I like to separate an eqnarray environment with new lines too.  Is there any way to attain better clarify with space? Or is this something I should just live without?


Prominent Notification Areas in a Desktop Application

I am working on ux for a desktop application for users. I am looking to find out more information, answers, best practices when it comes to handling notifications of actions and other alerts within a desktop application. Obviously I have seen how StackExchange handles notifications but since this is a desktop application instead of web it is a question I wanted to source.  Included is an image in this post that will display the two options I have been looking at. Both options seem to be the most common display areas that I have researched as well as seen active in many other applications. Currently the standalone desktop application opens to the default 1024x768 size but also has the ability to be scaled fullscreen to any size window the user is using. What concerns me is when a user full screens the application to a size such as 2560x1440 and a notification displays I don't want them to miss this notification.    Option 1: In my mockup the notification bar alerts the user by sliding down from the top of the desktop application. The left and right arrows inside the notification represent the ability to scroll back or forward to previous notification messages. The notification would have a 4 Second display time before auto hiding or the user has the ability to click X to close.  Note: This notification would cover the top menu navigation bar when sliding down.  Option 2: In my mockup the notification bar alerts the user by sliding up from the bottom right of the desktop application. The left and right arrows inside the notification represent the ability to scroll back or forward to previous notification messages. The notification would have a 4 Second display time before auto hiding or the user has the ability to click X to close.  Note: This notification would cover only minimal content display.  So my questions:   Are the options I am displaying the best solutions for users to see the notification without covering up to much content and ruining the experience? Is one option losing the users vision over the other? Would there be better areas or ways to handle these notifications in a desktop application that I am missing?


I have found the following statement on the internet concerning the necessary number of samples in the central limit theorem:     In practice, some statisticians say that a sample size of 30 is large   enough when the population distribution is roughly bell-shaped. Others   recommend a sample size of at least 40. But if the original population   is distinctly not normal (e.g., is badly skewed, has multiple peaks,   and/or has outliers), researchers like the sample size to be even   larger. [1]   I need some references that prove this claim (i.e. scientific papers that actually recomend this sample size of 30 or 40). ¿Do you known any of them?  [1]


How to pass String as input in FreeMarker?

All the templates are stored in database. And i have to fetch contents of a template from database and marked up with freemarker. The end output will be rendered in a textbox.  But, i am not finding any methodology by which i can send string instead of file name.  Please suggest.


I just ran across  while on comment patrol. It seems normal in almost every regard... Except it isn't. For one, it's cut off - look at the source and you see that there's quite a bit more that isn't shown.  Another thing: the code block formatting is.. um... overflowing:    I don't know if this is an injection of some kind or what, but it certainly doesn't look good for security. What's wrong?


How to print all lines after a match up to the end of the file?

Input file1 is:  dog 123 4335 cat 13123 23424  deer 2131 213132 bear 2313 21313   I give the match the  pattern from in other file ( like dog 123 4335 from   file2).  I match the pattern of the line is dog 123 4335 and after printing all lines without match line my output is:   cat 13123 23424 deer 2131 213132 bear 2313 21313   If only use without address of line only use the pattern, for example 1s how to  match and  print the lines?


I got stucked in this problem and get no clue to solve this. Can any one please help me? Thanks     Suppose $X$ is an inner product space. If for every bounded linear function $f$, there exists $z \in X$ such that $$f(x) = <x, z>$$ for all $x \in X$. Prove that $X$ is a Hilbert space.   I can't find any way to relate the complete of space $X$ with the existence of $z$. Please help me solve this. I really appreciate.


Even as admin, I cannot edit DefaultFonts.plist for Notes.app. What am I doing wrong?

I want to modify . I've tried a few different ways since what worked on old OS doesn't on 10.14 Mojave:   I've navigated to the file through finder, went to Get Info, unlocked the file (via the lock icon), and tried to change permissions.    I get the message "The operation can’t be completed because you don’t have the necessary permission."  I've tried this command:  chmod 777 /Applications/Notes.app/Contents/Resources/en.lproj/DefaultFonts.plist  I get the message: Operation note permitted  I've also tried:  sudo nano /Applications/Notes.app/Contents/Resources/en.lproj/DefaultFonts.plist  I'm able to get into the editor, but when I try to save I get message: "error writing /Applications/Notes.app/Contents/Resources/en.lproj/DefaultFonts.plist"  also, I cannot cd to /Applications/Notes.app/Contents/Resources/en.lproj. (And I cannot see Notes.app when I'm in the Applications folder.)  The application is closed while I'm doing all this.  I have admin permissions on my computer. What in the world am I doing wrong here?  UPDATE: I'm now able to edit the file thanks to @bmike. However, changing the font size values in the file doesn't seem to affect the application. I think I have the correct file. (btw, not sure if I should be writing this follow-up here or just in comments...or creating a new post. Feedback welcome.) Created new post to address this:


Torque on electric dipole placed in non uniform electric field

When electric dipole placed in non uniform electric field, what is the approach to calculate torque acting on it? Can it be zero?


Is there a way to dump the list of installed package to be used as a basis for a new installation with tlmgr ? The same way pip works:  pip freeze > requirements.txt   then later, after a fresh git clone  pip install -r requirements.txt


Exit iPhone app, from tab bar controller?

I have a tab based app, which last tab button is "Exit" how can I quite iPhone App, on click of that last tab bar?


Converting to manipulatable datetime format

I have a date value 20130312 and I would like to convert it into a format like 2013-03-12 or a similar format  I've tried looking into the datetime library but could not find a solution.  Thanks in advance


On irreducible factors of $x^{2^n}+x+1$ in $\mathbb Z_2[x]$

Prove that each irreducible factor of $f(x)=x^{2^n}+x+1$ in $\mathbb Z_2[x]$ has degree $k$, where $k\mid 2n$.   Edit. I know I should somehow relate the question to an extension of $\mathbb Z_2$ of degree $2n$, say $GF(2^{2n})$. By this way I will be able to correspond each irreducible factor of $f(x)$ to a subfield of $GF(2^{2n})$ that obviously has degree $k$, where $k\mid 2n$.


Represent Integers with 2000 or more digits

I would like to write a program, which could compute integers having more then 2000 or 20000 digits (for Pi's decimals). I would like to do in C++, without any libraries! (No big integer, boost,...). Can anyone suggest a way of doing it? Here are my thoughts:   using const char*, for holding the integer's digits; representing the number like     ( (1 * 10 + x) * 10  + x )...


How would you describe  to someone without a data analysis background?


How does 3-wire RTD or resistance measurement works in bridge of wheatstone?

I cannot understand how 3-wire measurement will improve the resistance measurement.    They say that IF lead resistance \$ R_L \$ is the same, it will compensate. How can this happen?  If bridge is balanced (without \$ R_L \$):  \$ \frac {R_1}{R_2} = \frac {R_g}{R_3} \$  If \$ R_L \$ is added: \$ \frac {R1}{R2}= \frac {R_g+R_L}{R_3+R_L} \$  \$ \frac {R_g}{R_3} \$ is not same as \$ \frac {R_g+R_L}{R_3+R_L}\$; is this true only if \$ R_G=R_3 \$ in the beginning? So this means that \$R_L\$ does not get compensated?


I am trying to find the title of a book that I read in the late 90s early 00s.  I think the book was part of a trilogy. This is what I can remember about the story, a teenage boy leads a normal life until a man comes to him in a van. The man is an alien and and the van is a space craft. The vans name is Bes (I think). And it travels from USA to Africa in minutes. The man can change his disguise he turns his skin colour but before doing so the boy sees his real skin, I think he has horns or lumps on his face.   There is a war between this alien race and another and the boy plays an important role in it. They travel from earth to a mother ship called Tyson Grip (or something). And the alien home world is called Priam 5 (or something).   Another thing I remember, the boy is hit and falls on the floor of the van and the carpet starts to shape around him become extremely comfortable for him.


Can a character affected by the Death Curse choose to automatically undo it after the release of Season 7 Tier 3 material?

I have a Tier 2 character currently affected by the Death Curse after playing a Season 7 module, and I want to get rid of  that curse as soon as possible (but I haven't started playing the Tomb of Annihilation Hardcover yet, so ending the Death Curse by completing its story with my character would most likely take a very long time).   I have, however, read information about Season 7 Tier 3 material being able to make you automatically end the Death Curse on your characters. So, as I want to be sure that I understood properly, is the following statement accurate ?  "Once Season 7 Tier 3 material is released (supposedly in January 2018, so should be in a few weeks after this question is posted), I can simply choose to end the Death Curse on any of my Tier 1/2 characters currently affected by it - this permanently prevents me from playing Season 7 Tier 1/2 material (Tomb of Annihilation + DDAL07-X) with these characters, but not other seasons' Tier 1/2 material"


Uninstall system app failed using 'adb shell pm uninstall'

I attempted to force uninstall in ADB, but failed:  $ adb shell pm uninstall -k org.openintents.filemanager $ adb shell pm list packages -f | grep -i manager package:/system/app/FileManager.apk=org.openintents.filemanager   What went wrong here? What can I do?  I used the internal application manager and there isn't an option to delete it.


Compton scattering vs. photoelectric effect

Say a photon hits some atom.  What determines whether there will be a photoelectric effect (photon is absorbed, electron is released) or whether there will be a Compton scattering (the photon is  scattered at some angle, and the electron is released with another direction)?


The relationship between angular and linear momentum

Why is orbital angular momentum not 0 when spin and linear momentum are not collinear?   Why can it be 0 when spin and linear momentum are parallel?  Like in the example of a scalar field at rest decaying into an electron and a positron via interaction $\frac{1}{2}g\phi \bar{\Psi}\Psi $   If spin is along x axis and three-momenta is along z axis, decay rate will be 0 if two spins are opposite because orbital momentum is not 0 after decaying.


How can I create a progress bar with bash?  This is my script :  #!/bin/bash  pass='number1 number12 number13 number14 number15 number16'  chk='number14'  for i in $pass ; do    if [ "$i" == "$chk" ]; then      echo ' Found ^_^'    else      echo 'loading 50%'    fi  done   I want to replace echo 'loading 50%' with anything to create an progress bar.


how to stop working for other people's thesis?

Last semester, I took a course with my supervisor and he assigned me a project. This project is part of one of his student's theses. I did the project and passed the course.   Later, I was asked to upload my code for use in a paper. It turned out that the data the grad student had generated was not appropriate, and he needed to do other experiments. It later turned out there were other problems with the underlying model, and I redid a lot of that work as well.  The problem is that this other student is not really contributing at all.    Sometimes he does not come to work at all On one occasion the professor assigned us to do something, and he immediately told me he had no idea how to do it In one of our meetings with the professor, he talked 2 minutes with the prof with no slides; I talked for the other 58 with slides.    What should I do in this situation? I could not work like this, I have my own project and my thesis and stuff. I cannot dedicate my self for another student's thesis.  Question 1: how should I make this student understand this is his thesis and he should work more than me?  Question 2: How can I get off this project? I am taking another course with my supervisor, he again assigned me a term project with the same system and same grad student. I do not want to keep going like this. What should I tell to my supervisor Due to the problems we found, I think this current system is a bit of a dead end. But, I do not want to lose my connection with my supervisor; he is a good man.


For the code below how do I output the MySQL query with UTF-8 support ?    <?php $servername = "###"; $username = "###"; $password = "###"; $dbname = "###";  // Create connection $conn = mysqli_connect($servername, $username, $password, $dbname); // Check connection if (!$conn) {     die("Connection failed: " . mysqli_connect_error()); }  $sql = "SELECT Column1, Column2, Column3 FROM table ORDER BY Column1 DESC"; $result = mysqli_query($conn, $sql);  if (mysqli_num_rows($result) > 0) {     // output data of each row     echo '
';     echo "
Column1	Column2
";     while($row = mysqli_fetch_assoc($result)) {         echo "
";         echo '' . $row['Column3'] . '';         echo "	";            echo $row['Column2'];         echo "	";     } } else {     echo "Error."; }     echo "
";  mysqli_close($conn); ?>     What are the options for a clean output of UTF-8 characters? I tried several solutions found here and on other forums but I gave up. The database Collation is utf8_unicode_ci


Trying to remember story or novel with a non-functioning assassin robot

I have a vague memory of a story (I'm not sure of the length) that I must have read at least fifteen years ago, but beyond that I'm not sure.   There's only one element of a more complicated plot that I can really remember.  The main character is being targeted by some enemy, who has hired at least one assassin to go after him, and probably more than one.  The one I remember was a super-powerful assassin robot, who the villain located in some out-of-the way place (a backward planet where the robot had retired, perhaps).  When the robot shows up to attack the protagonist, it turns out all the robot's weapons are nonfunctional.  The robot knew this when it was hired, but it did not let on.  Somebody (probably the hero) sneers at the villain that nobody would have left a working super-robot out in the middle of nowhere.  I think that later, as a result of its having been caught up in the story's plot, the robot later gets repaired and fights on the hero's side in a later confrontation, but I'm not sure.  So what was this?


What is the point of LongLength Property in Array class in c#?

I know someone asked this question before  but it still doesn't make any sense for such a property! I looked into the source code of the Array class on  As you can see from source code, all methods related to finding a specific index, for example:  public static int LastIndexOf<T>(T[] array, T value)   return integer value System.Int32, So again, What is the point of a property which returns a System.Int64 representation of an array length but all the other methods that deal with internal item indices return System.Int32? This is really confusing!


How can I replace multiple spaces in a string with only one space in C#?  Example:  PLNICI PERO 2165/HORNET SPACESPACESPACESPACESPACE   would be:  PLNICI PERO 2165/HORNET   And second:  Example:  SPACESPACESPACESPACESPACE      77.000   would be:  77.000   Have you any idea please? Thanks


Old Budrys(?) end-of-world/alien invasion of NYC story

This one, from the late 1950s or early 60s (I think), features the last girl in NYC, who drives her jeep up the stairs of the main library (with the lions). She feels bad about breaking the lock, but what's a girl to do, if she wants something to read? In summertime, she drives topless and, the author writes, her bosom dances enchantingly on the steps. She lives in the boathouse on the lake in Central Park. Mysterious insect-like aliens are eating the buildings in the City.... I didn't recognize a title in Budrys or Bester's isfdb bibliogs, so I may be wrong about the author. But not about the story details: it's a memorable one. Thanks in advance for helping ID this one!


What is that I am doing wrong with the below query   Error Message :  You can't specify target table 'cp_asseteventinquiry' for update in FROM clause   Query :  UPDATE cp_asseteventinquiry SET Due_Date= curdate() WHERE TopLevelAsset_Num = (    SELECT Distinct(TopLevelAsset_Num) FROM cp_asseteventinquiry    WHERE cp_asseteventinquiry.History='NO'    AND NOT EXISTS(SELECT Scheduled_Date FROM flightlogs    WHERE flightlogs.Asset=cp_asseteventinquiry.TopLevelAsset_Num     AND flightlogs.Scheduled_Date=date_format (curdate(), '%m/%d/%Y')) );


I am developing an Android application using sqlite database. I need to convert this sqlite dump to mysql using PHP which can be used in Web application. Any help will be appreciable. Thanks.


Bad robots kill my SEO with high bounce rate on certain pages

They open a page and then leave immediately. What's the best practice to fight it? Time 1-2 s, bounce rate = 100%  I googled several services, for example this one shows this IPs like spam, but they are fighting spam comments, not total IP blocking.


Should it be "clotted cream scones" or "clotted-cream scones"?

I'm eating clotted cream-covered scones.   or     I'm eating clotted-cream-covered scones.   or     I'm eating clotted cream covered scones.   Formally, I thought they'd have to be clotted-cream scones, but Grammarly insists they're merely clotted cream scones.  I thought a compound adjective should be hyphenated when it appears before the noun it modifies, but it looks like I'm wrong.  Can anyone tell me what the rule is here, please?


Pigeon hole principle to prove $a-b=9$ in subset.

I have a set of numbers $$ [n] = \{1,2,...,n\} $$ in my special case $n = 100$, and I have a subset of $[100]$ with the following specification $$ A\subseteq[100] $$ and $$ |A| >= 55 $$ now I should prove, that this statement is true for some $$ a,b\in A: a-b=9 $$ I thought about the problem and I realised, that if I just take the numbers $1-55$ that there are a lot of pairs $a,b$ that match the condition. So I tried to build a set in which no pair matches the condition. Therefore I just used the even numbers from $2-100$. Because even-even=even. But there are only $50$ even numbers in $[100]$, so I have to add at least $5$ odd numbers. So as soon as I add one odd number my set matches the condition. Using the pigeonhole principle: $$ n,m \in \mathbb{N}, f: [n] \to [m], |f^{-1}(j)|, j \in [m], \exists j^{*} \in [m], |f^{-1}|>=\lceil\frac{n}{m}\rceil $$ I get, that there is at least $$ \lceil\frac{100}{55}\rceil = 1 $$ solution to my problem. But I think that I have to specify the function for the projection to prove the problem. And I think that I can use the modulo operator to achieve my goal, but currently I am stuck. Could someone please help me?


How to do a flawless and natural presentation?

I have been attending a number of academic / professional conferences recently and one thing that really awed me was the flawless and natural way in which the speakers presented on their topics.  Sure, they had the occasional mispronunciations or awkward pauses but they spoke with authority and confidence.   Some of them used powerpoint slides but were not reading from the slides; they were just talking on the points and they had so much to say on each point that I felt they could not do it without notes, but they were not even looking at their notes most of the time.  (The advantages of not looking at their notes too much was that they could maintain eye contact and could use very interesting slides that were not crammed with the dot points of their speeches.)  I hate to think that they had memorised their speech notes but some of the presentations went for more than an hour.  I know rehearsal is important but I wonder how could anyone remember so much in a nervous situation. (Its one thing to know everything on your topic; its another thing to present that 'everything'!)  Question:  What background / foreground things do presenters do that make their presentations flawless and natural?


designers,  I would like to ask You, where could I find patterns - backgrounds to download it it is possible for free - for businness cards, posters, logos, etc.? I mean, when I create some design and want to place it/put it like in real environment:  for example:   Is there are photoshop files or something like that?  Thank You


I can reveal package dependencies like this  apt-cache show wget | grep ^Depends   However I would like to also list the dependencies for the dependencies, so the output would be something like this  wget   libc6     libgcc1       gcc-4.9-base   libidn11   libssl1.0.0     debconf   libuuid1     passwd       libpam0g       libselinux1       libsemanage1       libpam-modules       debianutils   zlib1g   This example has a depth of 4 but I would like the actual solution to have full depth.


Difference between What are they doing? vs What they are doing?

what are they doing?   What they are doing?      What is the difference between these two? Both are correct?


What is the difference between IQueryable and IEnumerable?

What is the difference between IQueryable<T> and IEnumerable<T>?    See also  that overlaps with this question.


Money from my parents from abroad to my bank account in UK

I am from Japan. I have moved to UK recently on a spouse visa.   I still have my Japanese bank account which I have been using even before I came to UK. I have saving in that account and also my parents transfer me some money per month in my bank account in Japan. I have an International Debit Card on this account.  I am withdrawing this Money in UK via ATM / Debit Card.  In this case, do I have to pay taxes in UK or declare this as income in some form.


Let R be a commutative ring with identity, and I,J its two ideals. One book says that $Spec (R/I \otimes R/J)=Spec(R/(I+J)) $. But I just cannot verify it. Is $R/I \otimes R/J=R/(I+J) $ right? I cannot get it. Or is there some other way to prove this result?


Is there any rule for the pronunciation of 'Con' words like :  Constant, Constraint, Constitute, Constituent etc. My confusion is with these sounds 'kɒn' and 'kən'.  For Constiuent it is /kənˈstɪtjʊənt/ but in Constitute it's /ˈkɒnstɪtjuːt/.


Prove that $\cos A + \cos B + \cos C \geq \frac{1}{4}(3 + \cos(A - B) + \cos(B - C) + \cos(C - A))$

I have simplified the inequality as these but, can't proceed further: $$3(\cos A + \cos B + \cos C) \geq 3 + 2(\cos A\cos B + \cos B\cos C + \cos C\cos A)$$ $$(2\cos A-1)(\cos B-1)+(2\cos B-1)(\cos C-1)+(2\cos C-1)(\cos A-1) \leq 0$$


Italic citation reference for author name using natbib

I'm trying to get italics for the author name within the citation using natbib with agsm style.  My MWE:  \RequirePackage{filecontents} \begin{filecontents}{\jobname.bib} @BOOK{Smith2011,   author = {Joe Smith},   title = {The Lord of the Wings},   year = {2011},   publisher = {Amazon}, } \end{filecontents} \documentclass{article} \usepackage[authoryear]{natbib} % natbib used for reference style  \begin{document} So the following should show the name \citeauthor{Smith2011} in italic \citep{Smith2011}, but it doesn't work? \bibliographystyle{agsm} % AGSM style matches closely to Brunel style \bibliography{\jobname} \end{document}   I have to use Harvard style for my report, though when I tried to replace agsm with harvard, it didn't find the style? I thought it comes with natbib?


Why was the alien threat in The Next Generation episode "Conspiracy" never followed up?

In the Star Trek The Next Generation episode  Picard and crew are drawn into an alien conspiracy to take over the Federation. This ends with Picard and Riker destroying an alien "mother" beast, but not before it manages to send a signal to an uncharted sector of space. The feeling at the end of the episode is that this will be a threat that the intrepid crew of the Enterprise would be facing again at some point, but this never happens.   Why was the implied threat at the end of this episode never brought up again on the show?


how to set date field not to display past date

In a content I need a date field for which I have used Date module. Widget type used for this is popup calender. But when the calender popup appears I want to display only today's date and future dates, I don't want to display any of the previous date, not even a single day.  How could this be achieved?


"There is insufficient space on the device"--This is not duplicate

My mobile is Micromax Canvas HD Plus .It has 4 GB inbuilt memory and 16 GB external memory card.I have selected SD Card as default location to install apps but still when I try to install app from Play Store it shows above error.My SD Card is nearly empty.  I searched a lot .Uninstalling Play store updates,Clearing Cache nothing worked.


E: Type '<!DOCTYPE' is not known on line 1 in source list /etc/apt/sources.list.d/winehq.list E: The list of sources could not be read

line 1 does  not contain anything I have checked this by using sudo gedit /etc/apt/sources.list command. Got this error during repository update.


I have a long sequence of words or letters {word1 word2 word3 word1 word1 word2 ..etc}. Lets say we extract all the ngrams (unigrams, bigrams, trigrams, 4-gram, 5-gram ....) along with their frequency from a text.   My question simply is how can we "statistically" find the best length of the n-gram given this text. is it  unigrams, bigrams, trigrams, 4-gram, 5-gram or value-gram. Note that I have no prior knowledge about the text.


I've been looking through posts trying to find the answer, but haven't had any luck, so hoping someone can point me in the right direction.   When I use the following code, it checks all the input boxes and it unchecks them. However, if I click the check all again, it doesn't check them all. Why is that?  JQuery    $('document').ready( function() {     $('.check_boxes').click( function() {       if ( $(':checkbox').attr('checked')) {         $(':checkbox').attr('checked', false);       } else {         $(':checkbox').attr('checked', true);       }          }); });   HTML  <input type="checkbox" class="check_boxes" id="check_all" />


Number theory: if $(a,b)=1$, show that $(ac,b)=(c,b)$

Mostre que, se $(a, b) = 1$, então $(a · c, b) = (c, b)$ Como posso fazer isso usando $(a,b) = 1\implies$ Existem $m,n$ naturais tais que $am - bn = 1$ Tentative translation:  Show that if $(a,b)=1$, then $(ac,b)=(c,b)$. How can this be done using $(a,b)=1\implies$ there exist natural numbers $m,n$ such that $am-bn=1$?


When I was running Windows 7 on my Lenovo machine there was a pre-installed Lenovo utility which would make it so that anyone trying to see what my webcam sees would instead see a still image of a camera with a cross over it. And thus preventing applications and hackers without root privileges from seeing out of my webcam. I say root privileges because root privileges were required in order to change the settings of the program in order to allow programs to actually use my webcam and get what it sees rather than the still image.  This was a very useful utility for privacy and security reasons, however on Ubuntu I have been unable to find a similar utility which has the ability to do the same. Is there such a utility or is there any way of achieving what I have described?  I am running Ubuntu GNOME 16.04 with GNOME 3.20.


Getting the names and sizes of all the files in a folder

So I need to find the names and sizes of all the files in a certain folder (finding out the number of files in the folder is not necessary).  How would this be done and would I need to put the program in the same folder as the files I'm trying to find the name and size of?  Thanks in advance for your help!


I read this story a long time ago - it might have been part of a longer book all set in the same universe (a la I, Robot). I remember it very vividly, but I can't find the name of the  story or author now.  The basic plot of the story is that humans have colonized Mars, but it's just the beginning of colonization, maybe 1 or 2 generations of children have been born on Mars. The limiting factor on Mars is the lack of water, and there's a custom where if you go to someone's house, you bring water with you (like bringing wine, I think). They currently get all their water from Earth, but there is some political opposition to this - people thinking that Mars will take all the water from Earth (the Martians make the point that some absurdly small fraction of the ocean like 0.00000001% will cover their water needs for a century, but politicians are making a big deal of it).  In the end, to avoid their dependence upon Earth's water supplies, some Martian colonists take an incredibly risky mission to the Asteroid belt and bring back a frozen water asteroid, showing that they can get their own water if they need.  I'm fairly certain this is not anything too obscure, so presumably someone will get this one quick. Thanks!


I am having a problem with Windows 7. When I boot up, the CPU jumps to 100% execution for about 10-15 minutes. During this time, it is really slow, and if I play any music, the songs play slowly and sound distorted.  I tried to scan my computer with different antivirus programs, I used Spybot, HijackThis, and CCleaner, but I didn’t find anything of note.  I watched the process list in Task Manager and saw that there are two processes that are to blame. There are two copies of svchost.exe, one using ~48% CPU, the second (under the Network Service account) using ~37%. For the first 15 minutes, the CPU runs at about 70-80%, then eventually drops to 30-40%.  I don’t know what to do. I could not find a way to stop the services, and if I try to kill them, sometimes the system crashes.


I have posted several questions on SO, and only ONE of them has received a response, not necessarily an answer.  Due to this, I must ask:  Are there things that I can do to make my questions more "seen"? Seems as if there are new questions posted nearly every second.  Does reputation points play a role into it or something?  Does anyone else have any good reliable resources for getting answers (hate to say it, but maybe other sites)?


I usually only allow paragraphs to be indented when there's a need for them to be: only if the previous "element" could be confused and thus "merged" with the paragraph in question.  In practical terms, this means that there's no indentation after a \medskip or \bigskip, nor after itemize or enumerate, nor after displayed math.  Now, when typesetting floats it's hard to enforce this style: I'd like to leave no indentation after a float (in my opinion, it's hard to confuse things here).  Given, a paragraph may well finish "flush" to the right margin and continue a new sentence just after the float...  The "solution" I'm looking for then would be to force floats to occur (as many as need to) inside paragraphs, so that the first letter after the float is a lowercase, non indented, letter.  Any ideas?  PS: I usually also set \setlength\parfillskip=2em plus 1 fil, so as to have a consistent "visual clue" that a paragraph is over.


Do Bangladeshi with a Portuguese D visa need a transit visa in Barcelona airport?

I am Bangladeshi, have Portuguese D visa(PhD purpose). Booked a ticket by Qatar Airways Dhaka to Lisbon.The travel itinary is Dhaka - Doha - Barcelona - Lisbon. But in Barcelona I have 6 hours layover and it is mentioned that Qatar airways operated by Vueling. Do I need a transit visa for Spain?  I have tried to contact as many places as possible but still get no response. If it is possible then response please. Thank you!


Why does $PSL(2,\mathbb C)\cong PGL(2,\mathbb C)$ but $PSL(2,\mathbb R) \not\cong PGL(2,\mathbb R)$?


I'm working on a big project, but for this question I write a simple example of the problem. I have 2 classes.  public class Main {     public static void main(String[] args)     {         CustomType[] customType = new CustomType[3];          for(int i = 0; i < 3; i++)         {             customType[i] = new CustomType(i);         }          for(int i = 0; i < 3; i++)         {             System.out.println("Main " + customType[i].integer);         }     } }   and  public class CustomType {     public static int integer;      public CustomType(int input)     {         integer = input;         System.out.println("CustomType: " + integer);     } }   I get the following output:  CustomType: 0 CustomType: 1 CustomType: 2 Main 2 Main 2 Main 2   but I want to get this:  CustomType: 0 CustomType: 1 CustomType: 2 Main: 0 Main: 1 Main: 2


Evaluating $\int_{0}^{\infty} \frac {b \sin (ax) - a \sin (bx)}{x^2}dx$ for $a,b \gt 0$

I want to calculate the integral which is dependent on the parameters $a$ and $b$ ($a,b \gt0)$.   $\int_{0}^{\infty} \frac {b \sin (ax) - a \sin (bx)}{x^2}dx$  This integral is solved in my textbook but I don't understand how and why  like this:  $ab \int_{0}^{\infty} \frac {b \sin (ax- a \sin (bx)}{abx^2}dx=ab \int_{0}^{\infty} \frac {1}{x} (\frac {\sin (ax)}{ax} - \frac { \sin (bx)}{bx})dx = ab \ln (\frac {b}{a})$  $f(x) = \frac {1}{x}$, ${}$ $\lim_{\to \infty} \frac {sinx}{x}=0$, ${}$ $\lim_{\to 0^+} \frac {sinx}{x}=1$  I just can't see it how they calculated it. Thanks.


Are stationary flying creatures considered "hovering" so that they do not fall when prone or incapacitated, etc?

As the title suggests, I'm wondering if a PC race (for example, the  with the winged option) would have the ability to hover in regards to the  condition.  The      If a flying creature is knocked prone, has its speed reduced to 0, or is otherwise deprived of the ability to move, the creature falls, unless it has the ability to hover or it is being held aloft by magic, such as the fly spell.   All the winged option for the Variant Tiefling states is     Winged. You have bat-like wings sprouting from your shoulder blades. You have a flying speed of 30 feet while you aren’t wearing heavy armor. This trait replaces the Infernal Legacy trait.   From  we know a PC can stay in place in air. However, since nothing states it has to keep moving to continue to fly, is it considered to have the hover ability? Specifically, if it is knocked prone will it fall or not?


What can I do one day before admissions deadline, if I believe my recommendation letter writer will not submit in time?

One of my professors this term promised to write me a recommendation letter for grad school. However, tomorrow is the deadline and her letter is not on the application website. She really liked me, so it's probably a case of her forgetting about/misremembering the deadline.  However, I can't reach her via e-mail, and she's the kind of person who puts absolutely no information online (phone, travel plans, etc). Perhaps she's on some sort of trip to a conference or something.   What can I do (with respect to the graduate programs I have applied to) to resolve this? Is there usually some sort of university policy regarding this situation? I really don't want to be unable to apply for grad school because a professor forgot to check her e-mail.  This situation is different from , because in my situation the deadline has not yet passed.


I'm trying to install Ubuntu on a Compaq laptop computer -i386 (Model R3070US) using a DVD with the ios file Ubuntu-16.04.6-desktop-i386.iso.  (The computer previously had Windows XP.)  But I cannot get past the initial BIOS error problems.  The first error that shows up is "8254 timer not connected to IO-APIC," as discussed many times on your website.  I have tried all the suggestions I can find for this problem.  I have tried every one of the special bootup options that F6 brings up:  acpi=off, noapic, nolapic, edd=on, nodmraid, and even free software only.  I have also tried practically every possible combination of these choices.  The install hangs up regardless of which of these I try. The only difference is that with some of these options I also get other error messages.  A frequent one is "No UMS support in radeon module!"  Can you suggest something else I could do to allow Ubuntu to install?  Thanks very much.


i get this error when ever i try to compile my code here is the error      Error  1   An object reference is required for the non-static field, method, or property   below is my code  private void btnGenerate_Click(object sender, EventArgs e) {     frmFaultyDeviceByPeriod.FirstDate = dateTimePicker1.Value;     frmFaultyDeviceByPeriod.SeconDate = dateTimePicker2.Value;     frmFaultyDeviceByPeriod.Show(); }   the form am trying to call has the below code   public System.DateTime FirstDate; public System.DateTime SecondDate;   what am i doing wrong.. help please


Is there any closed form for the finite sum $1+\frac12+\frac13+\frac14+\dots+\frac1n?$

I know that the infinite summation  $$1+\dfrac{1}{2}+\dfrac{1}{3}+\dfrac{1}{4}+...+\dfrac{1}{n}+...$$ is divergent and also the sequence $$1+\dfrac{1}{2}+\dfrac{1}{3}+\dfrac{1}{4}+...+\dfrac{1}{n}-\ln n$$ is convergent.    I wonder that whether there exist a formula (closed form) for the obtain value of the following finite summation. $$1+\dfrac{1}{2}+\dfrac{1}{3}+\dfrac{1}{4}+...+\dfrac{1}{n}$$ If not why?


Trying to reinstall the Gerbera server. I get this message -  E: The repository ' bionic Release' does not have a Release file. N: Updating from such a repository can't be done securely, and is therefore disabled by default. N: See apt-secure(8) manpage for repository creation and user configuration details.  Kinda noobish with Linux. Hope I am not repeating a previously answered question. Thanks!


I created a blog via Github Pages and as I started writing articles I wanted to check if it was indexed by Google. The blog is:  After a few weeks I manually added it to Google Search Console. Then, in a day or two, it displayed only one page () which is a repo page, but seemed to totally ignore the main blog pages. I noticed my sitemap had not been fetched so I added it manually. Waited again a week or two and still no luck. Google still displays "Unable to fetch sitemap" (well, something like that, my Google is not in english) next to it. My sitemap () is generated by the jekyll plugin and looks good to me. Robots.txt () do not seem to be the problem either. So, now my Google Search is still empty except for this repo page mentioned earlier. Maybe I should wait longer, I did wait 1~2 months already though. Have you had any similar experience or have any idea I could try ? Thank you for your time !


Can Somebody travel with their gun internationally?

If somebody is a US Resident, owns a Semi auto Glock. Has local Permit to carry a concealed weapon. What if this person wanted to fly with this hand gun internationally with him for his personal safety. The destination is Dhaka,Bangladesh and the layover is in Dubai and Kolkata, India.   page helps but does not provide all the information.  Also, since I will be flying locally within the US to take the international flight, is it possible to fly in Delta (public airlines) with the gun  ?


'Undefined Reference' with Templates and Class Methods

Currently I'm working on a class that manipulates FITS files (image files used in astronomy), but I'm having trouble with a class method that is a template.  My code (shortened for legibility)is as follows:  File: fitslib.h  class FitsLib { private:     //some variables and functions public:     //some functions     //my problem function:     template<typename T>     void addFITS(T *data) }   File: fitslib.cpp  #include fitslib.h //Various other functions... //my problem function: template<typename T> void FitsLib::addFITS(T *data) {     //my code is here }   When I use this function within my main.cpp, I get an undefined reference. I understand why and the code works when I define it within the header file. However, I don't want to have it all in my header file.  Furthermore, I tried explicitly instantiating the template as described in solution 1 from , but I get the errors relating to nested-name-specifiers and the function not being recognised as a template.  I also tried switching between typename and class to no avail.  Thank you in advanced if a solution is found, the help is greatly appreciated!


javascript: Getting number.epsilon instead of 0

I'm just sitting here programming javascript. And it makes me nuts...  I have a simple calculation.  It's just    var vals = { grossTotal: 3.59, totalPaid: 3.35, alreadyPaid: 0.24 };  var amount = vals.grossTotal - vals.totalPaid - vals.alreadyPaid;  console.log(amount, amount === -Number.EPSILON);     and it always returns me the negative Number.EPSILON How can I get rid of this?


Similar questions have been asked, but none with the given information. My textbook doesn't give me the fact that  $∂A = \text{Cl}(A) − \text{Int}(A)$. If that were the case, I could just state that definition and note that it's the intersection of closed sets.   I have very little knowledge of set theory and proofs, so I'm not sure how else to prove this. As always, I appreciate any help.  The question comes from “Introduction to Topology: Pure and Applied” by Colin Adams and Robert Franzosa.   "Let $A$ be a subset of a topological space $X$. Prove that $∂A$ is closed given  $∂A = \text{Cl}(A) − \text{Int}(A)$"


How can I get the UV sphere face settings back?

When I place a uv sphere, it shows the option of how many faces on the sphere. But, when I click somewhere else, the settings disappears. I can't find any settings for it again so how to I change the settings of how many faces on the sphere?


How to find the sum of $i(i+1)\cdots(i+k)$ for fixed $k$ between $i = 1$ and $n$?

I learned that $$\sum \limits_{i=1}^n i(i+1) = \frac{n(n+1)(n+2)}{3}$$ or in general $$\sum \limits_{i = 1}^n i(i+1)(i+2) \dots (i + k) = \frac{n(n+1)\dots (n+k+1)}{k+2}$$ From a mathematical standpoint why is this true? I'm not asking for inductive proof. I am asking if you only given the left hand side, how would you go about writing a closed form expression for the sum?


How to change the default desktop icon size?

How to change the size of desktop icons? I tried gconf-editor as given at  .  I am not getting the option for changing size at app > nautilus > icon_view.  I am using Ubuntu 11.10. Kindly help me in changing default icon size.   I want to make them small.


xpath - select element that contains text in CLASS name

I am trying to find a way to select this particular web element:  <snack-bar-container class="mat-snack-bar-container ng-tns-c43-25 ng-trigger ng-trigger-state snackbar-info mat-snack-bar-center ng-star-inserted" role="alert" style="transform: translateY(0%);"><!----><simple-snack-bar class="mat-simple-snackbar ng-tns-c44-26 ng-trigger ng-trigger-contentFade ng-star-inserted" style="">Asset successfully loaded! <!----><button class="mat-simple-snackbar-action ng-tns-c44-26 ng-star-inserted" style="">Close</button></simple-snack-bar></snack-bar-container>   Currently I was selecting that by text:  .//snack-bar-container//*[contains(text(),'There are errors on the page:')]   But because there will be localisation (translation of texts) it will be unreliable in a long term, question is, is how to select element, which has a class attribute that contains some specific text in class name.  As you can see my web element class is very long, and often varies, so I need to check if it contains some specific text, I tried with:  .//[contains(@class,’snackbar-info’)]   But it does not work, any suggestions? Thank you.


How to Mount Guest DOS OS with HOST OS.?

I am newbie to VM concept. actually i have installed DOS6.22 under virtualbox and using 32bit windows 7 OS as HOST Operating System, now i want to copy some folders/files from HOST OS to DOS6.22 Guest OS. how can i copy.?


Regex to exclude specific special characters, spaces and alphabets

I want a regular expression which converts this:  91009-01-28-00 Maximum (c/s)................  1543.5   to this:  91009-01-28-00    1543.5   So basically, a regular expression that escapes alphabets, spaces, forward slashes and brackets.  I have written the following python code so far:  with open('lcstats.txt', 'r') as lcstats_file:         with open (lcstats_full_path + '_lcstats_full.txt', "a+") as lcstats_full_file:             lcstats_full_file.write(obsid )             for line in lcstats_file.readlines():                 if not re.search(r'Maximum [(c/s)]', line):                     continue                 line = (re.sub(**REGEX**,'',line))                   lcstats_full_file.write(line)


Can anyone give me an example of a normal matrix that isn't unitary? Here, $A \in \mathbb{C^{n \times n}}$.


In my answer to  SO question I originally tried using regex to grab the javascript array that follows json_items = and ends lazily at first ";" i.e. captures everything in the javascript array [array]  variable called json_items.  You can see the start of the match here:    And the regex is saved . I can correctly match with json_items = (.*?); in both python and PCRE (PHP) if I set the re.DOTALL flag or single line flag respectively.   For example, in Python the following functions correctly:  import requests, re, json  data = {   'inputType': '1',   'stringInput': 'https://www.youtube.com/channel/UC43lrLHl4EhxaKQn2HrcJPQ',   'limit': '100',   'keyType': 'default' }  r = requests.post('https://youtube-playlist-analyzer.appspot.com/submit',  data=data) p = re.compile(r'json_items = (.*?);', re.DOTALL) results = json.loads(p.findall(r.text)[0])   The array is retrieved. However, I cannot seem to find the right setting (or to adjust regex appropriately) to do the same in VBA. My best attempt is shown below. It simply fails to match. How do I grab the javascript array as discussed using Regex in VBA please?  Option Explicit Public Sub RegexMatch()      Dim s As String, ws As Worksheet, body As String, re As Object      body = "inputType=1&stringInput=https://www.youtube.com/channel/UC43lrLHl4EhxaKQn2HrcJPQ&limit=100&keyType=default"      Set ws = ThisWorkbook.Worksheets("Sheet1")     Set re = CreateObject("vbscript.regexp")      With CreateObject("MSXML2.XMLHTTP")         .Open "POST", "https://youtube-playlist-analyzer.appspot.com/submit", False         .setRequestHeader "User-Agent", "Mozilla/5.0"         .send body         s = .responseText     End With      Dim matches As Object      With re         .Global = True         .MultiLine = True         .IgnoreCase = False         .pattern = "json_items = (.*?);"         If .Test(s) Then             Set matches = .Execute(s)             Debug.Print matches(0).SubMatches(0)         Else            Debug.Print "Failed"         End If     End With End Sub     To preserve two answers given in comments:  FlorentB:   var json_items\s*=\s*((?:"(?:\\"|[^"])+"|[^;"]+)+)   Wiktor Stribiżew:  There is no option, use [^] or [\s\S] / [\d\D] / [\w\W] instead of a dot.


if there exists a discontinuous function f(x) which satisfies $f(\frac{x+y}{2})\leqslant\frac{1}{2}f(x)+\frac{1}{2}f(y)$ but is not convex?

This question comes from Rudin's book "principles of mathematical analysis" chapter  4,exercise 24,on page 101.  The original question is:  Assume that f is a continuous real function defined in $(a,b)$ such that  $$f(\frac{x+y}{2})\leqslant\frac{1}{2}f(x)+\frac{1}{2}f(y)$$ for all $x,y\in (a,b)$.Prove that f is convex.  I have solved this question.But when I am reading the definition of convex function,I find that convex function is not always continuous.So I want to ask if there exists a discontinuous function which satisfies $f(\frac{x+y}{2})\leqslant\frac{1}{2}f(x)+\frac{1}{2}f(y)$ but is not convex? Thanks！


Screenshot a specific dimension, by default

I would like to do a screenshot/grab of a specific size, is there a way to set this on Yosemite, or is anyone aware of a software tool/app to do this?  I currently have to draw the shape, but often start at the wrong place so have to go through the motions two or three times, when if I had a fixed size i could position it over the area to screenshot to make sure it is correct.  Unlike the related question, The exact position on the screen may differ as I'll be taking a screenshot of my own web site but the browser window might differ in its location.  I am open to all possibilities whether programmatically, workflow, app or website.  On Windows there is a tool called MWSnap that allows settings a default fixed area.  thanks


Finding languages such that $L_1\subset L_2\subset L_3$ where $L_1,L_3\notin$ RE and $L_2\in$ R

I am struggling to find such languages $L_1$, $L_2$, and $L_3$ such that $L_1\subset L_2\subset L_3$ where $L_1,L_3\notin$ RE and $L_2\in$ R.  I know they exist, I need help finding them.


How can I achieve an outline effect similar to the ones found in League of Legends or Diablo III?      Is it done using a shader? How? I would prefer answers that are not tied up to any particular engine but one that I can adapt to whatever engine I'm working on.


Weighting a List to make items with a lower index having a higher chance of being randomly chosen?

I am receiving a List<Fruit> of unkown size, usually between 4-10 items:  { Apples, Orange, Pear, ?, ?, ... }     How can I weight the List in a way that Apples have the highest % chance of being selected, then Orange, then Pear?   The effect should essentially be the same as picking a random item from a List that looks like this:  { Apples, Apples, Apples, Apples, Orange, Orange, Pear }   If the List was of a fixed size, I would've done    Generate a float between 0.0-1.0; If < 0.4, return Apples. Else if < 0.75 return Orange etc.   Note that this question is not about  but about weighting an existing List of arbitrary length in a way that a random pick will result in an Item's probability of being picked proportional to its position in the List.


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


X3DH protocol - What are One-time prekeys for?

I'm reading about  and this protocol uses the  to establish a shared secret key between the two parties but I couldn't understand why we use one-time prekeys in the flow. This keys are optional and if there is any in the server, in the first message between Bob and Alice, an extra Diffie-Hellman is calculate between this prekey and ephemeral key. What is the advantage of using One-time Prekeys?


Could we make it easier to find questions we haven't accepted an answer to?

A long time ago, I learned that the URL https://<S.E site>/search?q=user%3A<my user numbe>+closed%3A0+hasaccepted%3A0+answers%3A1+wiki%3A0&submit=search (user:XXX closed:0 hasaccepted:0 answers:1 wiki:0) shows all of my questions on a S.E site which I have not yet answered. I imagine that lots of users would not know of this and how to do it for their own questions, would like to know it, and would like it to be simpler to do. Would it be possible to add something like a button on my profile page, visible only to me, obviously, to show this? I don't really care how it is implemented, so long as it is easily accessible. If possible, I would like it both per site and S.E-wide. Or did I miss something, and this is already available? Not sure if it's for everyone, but I would be happy with a nagging email ("you haven't answered that question that you asked X days ago").


I remember hearing  mention in  that he'd barely ever used a foreign key (if I remember correctly). However, to me they seem pretty vital to avoid duplication and subsequent data integrity problems throughout your database.  Do people have some solid reasons as to why (to avoid a discussion in lines with Stack Overflow principles)?  Edit:


Is there a word for inheritance from male to male to male. For example, a father has a son(1) and a daughter; the son(1) has sons(2); those sons(2) have sons(3). And maybe the last name is keep amongst the males, but the daughters would take the husband's surname(which would be different). In Chinese culture, this is the tradition. Is this true for other cultures?