I am just wondering if it is possible to have a public static array that can be accessed and edited by all classes.  To see if it works I have tried to access it but I just get an error.  public class FileManager {     public static String[][] cassetteArray = new String[10][6]; }   The command I use to check if it works is;  FileManager.cassetteArray[0][1].length();   Instead I get the following error;  Exception in thread "main" java.lang.NullPointerException at AssignmentStage1.UserInterface.userMenu(UserInterface.java:35)

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


Would it be A or B?  A.) A wide variety of classes was added.  B.) A wide variety of classes were added.

A total of 10 payments were made.   OR     A total of 10 payments was made.   Which is correct? Or can both be correct?


When opening Nautilus it shows my Devices (which are actually just other partitions) like this:    However, they are not mounted. When I now click them, they get mounted.   What do I have to do to have them mounted automatically?

I have two NTFS partitions, and I don't want to mount them manually every-time I start Ubuntu.   How can I do this?  Is there a tool or a code to use?   If so, is it safe to automount? specially when they are being used by another OS?


I have many results being output from variables into spans, for example: JavaScript document.getElementById("ResultsSavingsPerDay").innerHTML = SavingsPerDay; HTML Savings per day:  Thai Baht  which may display the result as something like: 4347.343543654 How can I format the output to the currency to display as 4,347.34? And if the output is a negative figure then change the font color to red also? I have seen similar currency formats on Stack Overflow, but not changing the results within a span. It is this part that I am struggling with mainly.

I would like to format a price in JavaScript. I'd like a function which takes a float as an argument and returns a string formatted like this: "$ 2,500.00"  What's the best way to do this?


A particle with mass $m$ moving with constant velocity $v$ has a total energy $T$ equal to its kinetic energy. If we consider the reference system (inertial) moving with the particle, the velocity is 0, so the total energy is 0. Where is the energy gone? What about energy conservation law?

I'm having problems understanding the following situation. Suppose two 1-tonne cars are going with the same orientations but opposite senses, each 50 km/h with respect to the road. Then the total energy is   $$\begin{eqnarray}E=E_1+E_2&=&\frac{1\mathrm t\times(50\mathrm{km}/\mathrm h)^2}2+\frac{1\mathrm t\times(50\mathrm{km}/\mathrm h)^2}2\\&=&1\mathrm t\times(50\mathrm{km}/\mathrm h)^2\\&=&2500\frac{\mathrm t\times\mathrm{km}^2}{\mathrm h^2}.\end{eqnarray}$$  Now if we look at it from the point of view of one of the cars, then the total energy is   $$\begin{eqnarray}E=E_1+E_2&=&\frac{1\mathrm t\times(0\mathrm{km}/\mathrm h)^2}2+\frac{1\mathrm t\times(100\mathrm{km}/\mathrm h)^2}2\\&=&\frac{1\mathrm t\times(100\mathrm{km}/\mathrm h)^2}2\\&=&5000\frac{\mathrm t\times\mathrm{km}^2}{\mathrm h^2}.\end{eqnarray}.$$  I know that kinetic energy is supposed to change when I change the frame of reference. But I understand that then there must be some other kind of energy to make up for it so that the energy in the system stays unchanged. But I don't see any other kind of energy here. I only see two total energies of the same system that seem to be different. Could you explain this to me?  Please note that while I don't understand any physics, I do understand college level mathematics, so if necessary please use it. (I doubt anything more than high school maths should be needed here, but I want to say this just in case.)


I try this but unable to find a relation between nilpotent subgroup and commutator  Sinc N is nilpotent so Ni is a subgroup of zi (G) then no idia how to proceed further

I tried evaluating an arbitrary generator of $[N,G']$, but I can't show it equal to $1$ that way.  Working with examples such as when $G=S_3$ and $N=A_3$, then $[N,G']=[A_3,A_3]=1$ holds, but I don't have an idea about how to prove this is true in general.


I have a box #box with width: 100%, height: 100%, padding: 5px, margin: 5px; border: 5px;  I need in HTML5 layout correctly display that.  Now i have that:    But i need fit block in body area.  Code:  <!DOCTYPE html>     <style>     body,html {         width: 100%;         height: 100%;         margin: 0;     }      #box {         width: 100%;         height: 100%;         border: 5px solid red;         padding: 15px;         margin: 20px;     }     </style>      <body>     <div id="box">     Text will be here     </div>     </body>

With HTML/CSS, how can I make an element that has a width and/or height that is 100% of it's parent element and still has proper padding or margins?  By "proper" I mean that if my parent element is 200px tall and I specify height = 100% with padding = 5px I would expect that I should get a 190px high element with border = 5px on all sides, nicely centered in the parent element.  Now, I know that that's not how the standard box model specifies it should work (although I'd like to know why, exactly...), so the obvious answer doesn't work:  #myDiv {     width: 100%     height: 100%;     padding: 5px; }   But it would seem to me that there must be SOME way of reliably producing this effect for a parent of arbitrary size. Does anyone know of a way of accomplishing this (seemingly simple) task?  Oh, and for the record I'm not terribly interested in IE compatibility so that should (hopefully) make things a bit easier.   EDIT: Since an example was asked for, here's the simplest one I can think of:

         The challenge is then to get the black box to show up with a 25 pixel padding on all edges without the page growing big enough to require scrollbars.


I'm asked to find the derivative of $\frac{d}{dx}(\sin^{-1}x)=\frac{1}{\sqrt{1-x^2}}$ using implicit differentiation. The question is why do I need to use implicit differentiation when I have a function defined only in terms of $x$.

I'm trying to find the derivative of $\sin^{-1}(x)$. I know the steps that lead to $\frac{1}{\sqrt{1-x^2}}$, however I don't understand why the following reasoning leads to a wrong answer.  Because  $$\frac{d}{dx}f^{-1}(x) = \frac{1}{f'(f^{-1}(x))} $$  If we plug in for $f(x) = \sin(x)$, and because $\frac{d}{dx}\sin(x) = \cos(x)$ we get  $$\frac{d}{dx}\sin^{-1}(x) = \frac{1}{\cos(\sin^{-1}(x))} $$  Since $\sin(x) = \cos(x-\frac{\pi}{2})$, we can state that $\sin^{-1}(x) = \cos^{-1}(x-\frac{\pi}{2})$. (I suspect this is what is wrong)  Thus,  $$\frac{d}{dx}\sin^{-1}(x) = \frac{1}{\cos(\cos^{-1}(x-\frac{\pi}{2}))}$$  Then, by the definition of inverse function, we have  $$\frac{d}{dx}\sin^{-1}(x) = \frac{1}{x - \frac{\pi}{2}}$$


This my table and and my query  !   This is My query select CellId, PathId, channel, sum(Duration) as min_duration  from HourlySummary group by CellId, PathId, Channel   order by cellid, pathid, sum(Duration) desc   In my table I have 50+ cellid and each cellid have four pathid(i.e, 0,1,2,3)  Now I want to display top 10 records (each pathId) for each cellid order by Duaration

I have a table with fields  Hour, PathId, Duration, Event, CellId, Channel   I have 50+ CellId. Each CellId has four PathId (i.e. 0, 1, 2, 3). Each PathId has many Events and Durations. Now I want to display the top 10 records (each PathId) for each CellId.  Sample Table    Sample Output


For a bachelor thesis, I have a document with several 'phases' that each need their own local toc. I have used titletoc in order to do so, yet it does not give me a good result. I have used the following preamble:  \documentclass[12pt]{report} %\usepackage[utf8]{inputenc} \usepackage{quotchap} \usepackage{hyperref} \usepackage{titlesec} \usepackage{titletoc} \usepackage{biblatex} \usepackage{graphicx} \usepackage{float} \usepackage[a4paper, margin=1in]{geometry} \usepackage{wrapfig} \usepackage{caption} \usepackage{subcaption} \addbibresource{sources.bib}  \begin{document} \input{coverpage.tex} \newpage \input{Titlepage.tex} \newpage \input{Executive summary.tex} \newpage \tableofcontents \newpage \input{Main-introduction.tex} \input{1PID/PID.tex}  \input{2Analysis/Analysis.tex}  \input{2Analysis/DesignDocument.tex}  \input{3Development/Development.tex}  \input{4Design/Design.tex}  \input{5Evaluation/Evaluation.tex}  \input{6Reflection/Reflection.tex}  \end{document}   In for instance the first chapter PID I have created a local toc the following way:  \begin{refsection} \section*{Contents} \startcontents[mytoc] \printcontents[mytoc]{}{0}{}  \newpage  \section{Introduction} \section{Project description} \section{Problem description} \section{Problem statement} \section{Measurable goals} \section{Communication objectives} \newpage \section{Time plan}  \printbibliography[heading=bibintoc] \end{refsection} \stopcontents[mytoc]   Now for this local toc, I get the following displayed:   I do not understand the first and last lines. I would prefer for instance Chapter 1 as the first entry and I am completely lost as to why it displays chapter 2, which is not even written in this same .tex (since I have a separate .tex for each chapter). Note that I get this for each sequential local toc for every chapter.  Anyone that can help me out?? Thanks!!

I have been looking for two hours for an explanation to the problem I am facing, and so far I found no hint.  In a document of the book class, I am trying to include partial TOC at the beginning of my chapters after some text introducing the chapter. I was using the minitoc package successfully for that purpose. However, I needed the [toctitles] option of package titlesec to fix problems due to wide titles in headers. As minitoc complained that the use of titlesec was not compatible, I tried to get titletoc to generate my partial TOCs.  Here is a test document demonstrating my problem:  \documentclass[12pt,a4paper]{book}  \usepackage[hidelinks]{hyperref} \usepackage{titletoc} \usepackage[toctitles]{titlesec}  \newcommand{\PartialToc}{\vspace*{2pc}\hrule\vspace*{1pc}% \startcontents[chapters]\vbox{\bf\Large Outline} \printcontents[chapters]{}{1}{}\vspace*{1pc}\hrule}  \begin{document}  \chapter{First Chapter}  Text Text Text Text Text Text Text Text Text Text Text Text Text  \PartialToc  \section{First Section} \section{Another Section} \subsection{One Subsection} \subsection{Two Subsection}  \chapter{Second Chapter}  Text Text Text Text Text Text Text Text Text Text Text Text Text  \PartialToc  \section{Last Section} \subsection{Three Subsection} \subsection{Four Subsection}  \end{document}   This results in the following partial TOC for chapter 1   Notice the lines "chapter.1" and "section.2.1 subsection.2.1.1 subsection.2.1.2" before and after the TOC. I think this text comes from the last argument of the \contentsline instructions in the .ptc file, but I have no idea why they show up ...  Anyone knows how to get rid of them ?


I have these three equations in another tex file which compiles fine, but when I try to copy and paste those equations, I get an an error. This my code:  \documentclass{article}  \usepackage{amsmath}  \begin{document}    \begin{equation}       10sin(X_{1} + 10) + 10sin(X_{2} + 10) + ... + 10sin(X_{n} + 10)   \end{equation}  \end{document}    Edit: The error I get is: ! Display math should end with $$.

Possible Duplicate:          I'm trying to use official equation container for the first time, and it's giving me some trouble.  I have this equation of a simple matrix operation, and LaTeX isn't liking it.  What's wrong with this statement?  \begin{equation}      y = \begin{bmatrix}         T & I      \end{bmatrix}     \begin{bmatrix}         a \\         e     \end{bmatrix}  \end{equation}


I am trying to remember title (and author) of best sci-fi book i have ever read (at least thats what my fading memory tells me).  Plot revolves around multiple-universe theories - set on earth, 'hero' is given a brain implant that allows him to decide which future he wants to exist in (eg: coin toss produces 2 universes - one where it is heads, one tails) - he can 'choose' which of the 2 possible futures to take. The unchosen future is destroyed or disappears somehow(?).  Hero is tasked with finding a young girl who has same ability but can do it without implant. Plan is to find and kill her because the effect of her decisions (and now his) are affecting whole universe and aliens have wrapped solar system in some kind of event horizon to cut us off from universe until we sort out the problem.  Cant remember any real specifics; - lots of action (tech, guns etc), bladerunner-ish. Read it around 1990-5.  Googling hasnt got me anywhere but title potentially something like "sphere of influence. 2150"  If i can find this book, i will be eternally grateful.

Story: protagonist receives a device, which looks like a portable computer, and has to use his “quantum reality version selection” abilities to pick the one reality’s version where the computer has finished calculations.   After that is done, it is revealed that the object of calculations was some bio/nano-technological weapon that is released to the world shortly after, but is stopped without any harmful consequences.  2000–2008, full-length color movie, happy end included.


I have a global size netCDF document, the variable is three dimensions, including time. lat and lon. I have a shapefile boundary for my study area, both of them have same projection. How can I extract the study area from the netCDF by the shapefile boundary?

I have a 3-D time-series precipitation data (187 x 1800 x 3600), stored in a NetCDF file. I need to obtain the precipitation data for a shapefile. import matplotlib.pyplot as plt from netCDF4 import Dataset, num2date,  from matplotlib.pyplot import figure from datetime import datetime, date, timedelta import numpy as np import xarray as xr import pandas as pd import geopandas as gpd       MSWEP_monthly = 'D:\G3P\DATA\Models\MSWEP\MSWEP_monthly.nc4'  MSWEP_monthly = Dataset(MSWEP_monthly, 'r') Pre_MSWEP = MSWEP_monthly.variables['precipitation'][:]   MSWEP_monthly2 = xr.open_dataarray('D:\G3P\DATA\Models\MSWEP\MSWEP_monthly.nc4')  Lon_MSWEP = MSWEP_monthly2.lon Lat_MSWEP = MSWEP_monthly2.lat  Africa_Shape = gpd.read_file('D:\G3P\DATA\Shapefile\Africa_SHP\Africa.shp')    from osgeo import gdal,osr,ogr  def makeMask(lon,lat,res):     source_ds = ogr.Open(shapefile)     source_layer = source_ds.GetLayer()       # Create high res raster in memory     mem_ds = gdal.GetDriverByName('MEM').Create('', lon.size, lat.size, gdal.GDT_Byte)     mem_ds.SetGeoTransform((lon.min(), res, 0, lat.max(), 0, -res))     band = mem_ds.GetRasterBand(1)       # Rasterize shapefile to grid     gdal.RasterizeLayer(mem_ds, [1], source_layer, burn_values=[1])       # Get rasterized shapefile as numpy array     array = band.ReadAsArray()        mem_ds = None     band = None     return array  shapefile = 'D:\G3P\DATA\Shapefile\Africa_SHP\Africa.shp' source_ds = ogr.Open(shapefile)  # calculate the cellsize cellsize = Lon_MSWEP[:][1] - Lon_MSWEP[:][0]   # create the mask mask = makeMask(Lon_MSWEP,Lat_MSWEP,cellsize)  Now if I implement the following code, the precipitation data for the first day (from the time-series) can be obtained with shape of 1800x3600: precip = np.ma.masked_where(mask==0,Pre_MSWEP[0,:,:])  I tried to use a for loop to mask the precipitation data for the entire time series (time, lon, lat) over the area of interest. however, the below code gives me a 2-D data, probably for the last day. Why is that? for i in range(len(Pre_MSWEP)):     precip = np.ma.masked_where(mask==0,Pre_MSWEP[i,:,:])


I'm setting up a desktop for the first time and having issues with making sure all the drivers for sound and graphics work.  I looked for any troubleshooters and there are none to be found.  I am new to Ubuntu and using 16.04

I am total noob in Linux. I wanna know what is the equivalent of "My Computer" in Ubuntu 11.04. I want to check my computer specs such as Processor Speed, Memory, and etc.  Whenever I check properties in Home Folder it only gives me the HD capacity. I also tried looking at System Settings but I can't find it there. Please help.


I'm trying to add an image to a problem but it is not rendering the way I want it to. Below is the TeX code and below that a screenshot of what is happening.    \documentclass[]{book}  %These tell TeX which packages to use. \usepackage{array,epsfig} \usepackage{amsmath} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsxtra} \usepackage{amsthm} \usepackage{mathrsfs} \usepackage{color} \usepackage{graphicx}  %Here I define some theorem styles and shortcut commands for symbols I use often \theoremstyle{definition} \newtheorem{defn}{Definition} \newtheorem{thm}{Theorem} \newtheorem{cor}{Corollary} \newtheorem*{rmk}{Remark} \newtheorem{lem}{Lemma} \newtheorem*{joke}{Joke} \newtheorem{ex}{Example} \newtheorem*{soln}{Solution} \newtheorem{prop}{Proposition}  \newcommand{\lra}{\longrightarrow} \newcommand{\ra}{\rightarrow} \newcommand{\surj}{\twoheadrightarrow} \newcommand{\graph}{\mathrm{graph}} \newcommand{\bb}[1]{\mathbb{#1}} \newcommand{\Z}{\bb{Z}} \newcommand{\Q}{\bb{Q}} \newcommand{\R}{\bb{R}} \newcommand{\C}{\bb{C}} \newcommand{\N}{\bb{N}} \newcommand{\M}{\mathbf{M}} \newcommand{\m}{\mathbf{m}} \newcommand{\MM}{\mathscr{M}} \newcommand{\HH}{\mathscr{H}} \newcommand{\Om}{\Omega} \newcommand{\Ho}{\in\HH(\Om)} \newcommand{\bd}{\partial} \newcommand{\del}{\partial} \newcommand{\bardel}{\overline\partial} \newcommand{\textdf}[1]{\textbf{\textsf{#1}}\index{#1}} \newcommand{\img}{\mathrm{img}} \newcommand{\ip}[2]{\left\langle{#1},{#2}\right\rangle} \newcommand{\inter}[1]{\mathrm{int}{#1}} \newcommand{\exter}[1]{\mathrm{ext}{#1}} \newcommand{\cl}[1]{\mathrm{cl}{#1}} \newcommand{\ds}{\displaystyle} \newcommand{\vol}{\mathrm{vol}} \newcommand{\cnt}{\mathrm{ct}} \newcommand{\osc}{\mathrm{osc}} \newcommand{\LL}{\mathbf{L}} \newcommand{\UU}{\mathbf{U}} \newcommand{\support}{\mathrm{support}} \newcommand{\AND}{\;\wedge\;} \newcommand{\OR}{\;\vee\;} \newcommand{\Oset}{\varnothing} \newcommand{\st}{\ni} \newcommand{\wh}{\widehat}  %Pagination stuff. \setlength{\topmargin}{-.3 in} \setlength{\oddsidemargin}{0in} \setlength{\evensidemargin}{0in} \setlength{\textheight}{9.in} \setlength{\textwidth}{6.5in} \pagestyle{empty}  \begin{document}  Show the following regions in the complex plane and determine if the the regions are (i) open, (ii) closed, (iii) neither open nor closed.  \begin{enumerate}      \item $2<|z|$      \begin{soln}     \begin{figure}[hbt!]        \centering     \includegraphics[width=.4\textwidth]{abs(z) bigger than 2.PNG}         \end{figure}     \end{soln}      \item $Re(z)\ge 2$      \begin{soln}     \begin{figure}[hbt!]        \centering     \includegraphics[width=.4\textwidth]{Re(z) bigger than 2.PNG}         \end{figure}     \end{soln}  \end{enumerate}  \end{document}   Here is the image of the compiled PDF.    Why is the image that is coded under the problem and the solution showing up at the bottom of the page for both images? How do I fix this?

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


Is there any educational material that focuses on introducing neural networks for time series prediction, ideally comparing to traditional models?  It is ok if the references assume the reader knows about neural networks: I am only interested in how to efficiently apply them to time series prediction.  I would prefer some modern material (e.g., something that goes beyond :   )  I am  of  the typical references for learning neural networks in general, as well as neural networks applied to natural image processing and computer vision.      Some textbooks I looked at:   {1} Montgomery, Douglas C., Cheryl L. Jennings, and Murat Kulahci. Introduction to time series analysis and forecasting. John Wiley & Sons, 2015. --> only has three pages on neural networks.

I need some resources to get started on using neural networks for time series forecasting. I am wary of implementing some paper and then finding out that they have greatly over stated the potential of their methods. So if you have experience with the methods you are suggesting it will be even more awesome.


I have seen a vector explanation of time dilation that our net velocity in space-time is the speed of light. Most of that velocity for slow spatial speeds is in the time dimension.  As you go faster in a spatial dimension, your speed in the time dimension reduces, because the net vector magnitude remains constant but the angle changes.  Are we really for practical purposes traveling forward at the speed of light in time?

I read that an object at rest has such a stupendous amount of energy, $E=mc^2$ because it's effectively in motion through space-time at the speed of light and it's traveling through the time dimension of space-time at 1 second per second as time goes forward.  What troubles me here, is the fact that it is traveling through space-time at the speed of light. Why is it at the speed of light?


I just installed a  as a Windows 10 boot drive on an Acer Aspire E15. The computer previously had Windows 10 installed on a 1 TB HDD.   This is what my current configuration looks like:    Disk 1 is the SSD boot drive running Windows 10. Currently, the EFI System Partition appears to be listed as a boot drive during restarts, which is a problem. How can I format Disk 0 (the old 1TB HDD) so that the drive contains a single partition with no strings attached?  I have tried the following DISKPART commands with no success (See errors below).   DISKPART> list disk    Disk ###  Status         Size     Free     Dyn  Gpt   --------  -------------  -------  -------  ---  --- * Disk 0    Online          931 GB  1041 MB        *   Disk 1    Online          232 GB      0 B        *  DISKPART> delete disk override  The disk you specified cannot be deleted. Please select an empty missing disk to delete.  DISKPART> list disk    Disk ###  Status         Size     Free     Dyn  Gpt   --------  -------------  -------  -------  ---  --- * Disk 0    Online          931 GB  1041 MB        *   Disk 1    Online          232 GB      0 B        *  DISKPART> clean  Virtual Disk Service error: Clean is not allowed on the disk containing the current boot, system, pagefile, crashdump or hibernation volume.

I had a Windows 8 installation on an HDD, using UEFI as boot. The HDD has the following GPT table:  DISKPART> list partition  Partizione ###   Tipo              Dim.     Offset ---------------  ----------------  -------  ------- Partizione 1     Ripristino         300 Mb  1024 Kb Partizione 2     Sistema            100 Mb   301 Mb Partizione 3     Riservato          128 Mb   401 Mb Partizione 4     Primario           390 Gb   529 Mb Partizione 5     Primario           540 Gb   390 Gb   (I apologize it's in Italian, but the translation is quite straightforward).  I recently bought an SSD drive, connected it and installed a fresh Windows 8. Now I have a working dual boot, but the UEFI partition is on the HDD instead of the SSD. Here's the SSD partition list:  Partizione ###   Tipo              Dim.     Offset ---------------  ----------------  -------  ------- Partizione 1     Riservato          128 Mb  1024 Kb Partizione 2     Primario           221 Gb   129 Mb   I think that the best solution would be to have it on the SSD for two reasons:   The first is performance (I guess it would be a little be faster on the SSD due to the spin up time for an HDD, but I may be wrong about that.)  second reason is consistency. As I plan to use only the Windows 8 installation that is located on the SSD and I'm probably going to erase the system partition on the HDD to use it as a data storage device, I think that the boot partition should be on the same drive as the OS.  So the question is how do I move the EFI System Partition to the SSD?


Why the centre of  is dark? At the point of contact there is absolutely no air film between lens and glass sheet. then how can light reflected from this point produce destructive interference?

I have performed experiments in my college laboratory on Newton's rings to find radius the of curvature of the convex lens used. I always get a dark center. Is it possible to get a bright center? If yes, how?


Possible Duplicate:          I have read a piece of python code, and I don't know what does * and ** mean in this code :   def functionA(self, *a, **kw):    // code here   I just know about one use of *: extract all attribute it has to parameter of method or constructor.  If this true for above function, so what does the rest : ** ?

In the following method definitions, what does the * and ** do for param2?  def foo(param1, *param2): def bar(param1, **param2):


When I tap an upvote or downvote button the button turns orange. If I tap on the "Add comment" button on the same post, the vote button reverts to the gray unvoted state.  If I tap again (on the vote button) in 10 minutes, it tells me that I already voted. If I tap again after 10 minutes, it tells me that I already voted more than 10 minutes ago and it's now locked in.  Refreshing the question shows the buttons in the correct state (orange when voted).  This seems to happen after the tabbed model was changes to a single-page model.  * App version 1.0.50 1.0.51 * Samsung Galaxy SIII LTE * Android 4.3    Also:     Same goes when undoing the vote by tapping it again (after the question has been refreshed, of course). Will prompt "You haven't cast a vote to undo" -    I reproduced this as well. Basically, you up vote or down vote, then refresh, then undo your vote, then tap on "Add comment" (the vote button reverts to orange), then try to undo the vote again. You will then get the error mentioned.

Related:   I am using 1.0.71 on KitKat.  Immediately after voting, the arrow is displayed in red and the vote count is correct. However, when I scroll to read answers and then back to the top, the arrow is grey again and the vote count is reset to the previous value.  A reload of the question (pulling the finger down) is needed to show the correct situation, which is kept from then on.  This case was on security.stackexchange.com but I observed the same behavior on other sites too.  Screenshots   original state:  upvoted:  scrolled down and back up  after a reload


I installed phpbb3 with namecheap's control panel.  The standard method of disabling the approval requirement is to go to "permissions" -> "group permission" -> "submit" -> "advanced" -> "misc."  However, there's nothing to change about post approval - as you can see here:   So, how do I disable the requirement for posts to be approved?

I am creating a new forum used phpBB3. New users can post, but I have to manually approve them. How can I disable this so users can post without me having to approve the content manually?


I have spent what seems like 1 month of researching. So when I try to play Minecraft a few months ago, it works completely fine. Last week, I tried to play Minecraft and it doesn't want to launch. I press the play button on the launcher, it closes the launcher but after a few seconds, it doesn't launch Minecraft, it just goes back to the launcher and says Minecraft has crashed.   Can anyone help me to fix this? Also, the Minecraft screen doesn't show up, it just goes back to the launcher.  Edit: I have found the crash folder, anyone who knows coding and stuff please help me  java.lang.IllegalStateException: GLFW error 65542: WGL: The driver does not appear to support OpenGL     at cuo.b(SourceFile:199)     at org.lwjgl.glfw.GLFWErrorCallbackI.callback(GLFWErrorCallbackI.java:36)     at org.lwjgl.system.JNI.invokePPPP(Native Method)     at org.lwjgl.glfw.GLFW.nglfwCreateWindow(GLFW.java:1714)     at org.lwjgl.glfw.GLFW.glfwCreateWindow(GLFW.java:1897)     at cuo.<init>(SourceFile:81)     at dnr.a(SourceFile:19)     at cyc.au(SourceFile:464)     at cyc.b(SourceFile:394)     at net.minecraft.client.main.Main.main(SourceFile:155)

I recently got Minecraft but not from the website, I paid for a code and everything seemed ok. When I tried to play the game a thing came up saying it crashed and then a message popped up saying The game crashed whilst initializing game     Error: java.lang.IllegalStateException: GLFW error 65542: WGL: The driver does not appear to support OpenGL.


I want to make a test, what is more efficient write to a regular variable or write to volatile variable. I wrote this code for the test  private int v1= 42; private volatile int v2 = 43;  public void measure(){    long startRegular = System.nanoTime();    v1++;    long endRegular= System.nanoTime();    v2++;    long endVoltaile = System.nanoTime();    long rt = endRegular - startRegular;    long vt = endVoltaile - endRegular;    System.out.println("regular time : " + rt + " voltaile time " + vt); }   The output from this program is diffrenet result for every run. Is this a valid test? or there is a better way to test it?

How do you write (and run) a correct micro-benchmark in Java?  I'm looking for some code samples and comments illustrating various things to think about.  Example: Should the benchmark measure time/iteration or iterations/time, and why?  Related:


Let $G=A_4$. Prove that does not exist subgroup $H\le G$ s.t $|H|=6$.   I don't know from where to start (maybe I need to prove that if so $H\triangleleft A_4 $?) Any hint will be appreciated.

Show that  the  alternating  group  $A_4$  of all even permutations of $S_4$ does not contain a  subgroup of order $6$.   For me am thinking to write all elements of $A_4$ and trying to find every cyclic subgroup generated by each element of $A_4$, then I have to check whether there exist such a subgroup or not! This is a long procedure for me, I ask if there is a short way to do this.


Like the title says: Should site-specific feeds be tweeting meta questions?  I say no. It doesn't serve much of a purpose, to be honest.   The twitterbot tends to tweet crap in general, but lets assume that it didn't for a second. It would be more worthwhile to tweet something sysadmin related from the main site than a request to blackhole a tag from meta.  If you feel that there is value to having meta posts tweeted, then I think there should be separate twitterbots/accounts for mains and metas.

I follow the Twitter accounts of the sites where I moderate. Over the weekend I noticed that they were Tweeting meta questions. These questions were really esoteric questions that only someone very interested in the site or a CM/Developer would be able to answer.  Recent examples:      In fact if you look at the last three posts from both accounts they're all meta questions. If I wasn't involved with the sites on a daily basis and saw these I'd be really confused. It wouldn't encourage me to visit the site - except to satisfy some sort of morbid curiosity.  If this is a bot, why is it looking at meta?  If this is a human, why are they Tweeting these questions? Can they please stop.  This was raised  and does appear to have stopped for a while. This is new behaviour and therefore appear to be a new problem.


Jacob Oppenheim born 29/06/1880 in Nentershausen - Hessen - germany. Belonged to Reserve Infantry Regiment No. 83 Took part in the first battle of Ieper (or Yipers) Falled in 06/11/1914. I'm looking for his grave.

Where can I find information on German soldiers from World War I and World War II?   I am curious to find out about my ancestors' role in the wars, i.e. what rank they had, where they where fighting, with whom and anything else.


Let X and Y be sets and let $\tau$ be topology on X$\times$Y. Then there are $\tau_1$ and $\tau_2$ are topologies on X and Y , respectively such that $\mathcal B$={U$\times$V : U$\in$$\tau_1$ and V$\in$$\tau_2$} is basis for $\tau$ or not ? If it is true then I want to proof. But if not then I want to example.

Let X and Y be sets.  Does it have every topology on cartesian product X$\times$Y must be product topology ?


I've been reading my school textbook and found out that a Transistor can act in 3 different modes i.e. active mode, saturation mode and cut-off mode (let's just for now ignore the reverse-active mode). The cut-off mode is the mode when no current flows through the base if I am right (I am talking about the C-E config). The saturation mode is when all the current provided by the external cell flows through the Transistor.  So what actually is the active mode. Also is the value of saturation current different for different values of base current?

So can anyone explain me how the collector voltage(V (output)) will vary with variation in base current with respect to the following figure?         – Schematic created using


I'm hoping to try to control the rpm of a DC motor. AFAIK, I'd need to generate PWM for that. How does one find out which frequency is needed for a certain rpm? Is the frequency of the PWM signal supposed to be related to the speed of the motor?  Thanks

What is a suitable frequency for 15V/3A DC motor? Is there any effect on the motor when the frequency is changing? I am confused with this until now and the Internet shows a lot of theory that confuses me.


I am newbie to both latex and Ubuntu-linux 14.04. I already installed texlive and texstudio for latex environment. Everything works fine.  When I am trying to use spell check option it is giving error as "no dictionary available ". So always my document is having spelling mistakes.  Please help me with this. What packages have to install to get English dictionary. With spell check automatically.

I have trouble spell checking my document in TeXstudio. When I press spellcheck, I get the error No dictionary Available. Am I supposed to install a dictionary separately? How? Any suggestion?


I am using wp_get_attachment_image_src to construct the srcset attribute of an img tag. In that attribute I want to output a comma separated list of image urls along with the image widths.  Using the Media Settings page, I have configured the image sizes to be as follows:   Thumbnail size: 150x150 Medium size: 640x480 Large size: 1024x768 Small size: 278x320   The wp_get_attachment_image_src function returns the correct urls and the correct widths for the image sizes full, medium and small. small is a custom size I added using add_image_size.  If I call wp_get_attachment_image_src( $image_id, 'large' ), the returned array looks like this:  array (     0 => 'http://localhost/wp-content/uploads/2014/10/image-1024x768.jpg',     1 => 640,     2 => 480,     3 => true, )   Checking the image which can be found at that url turns up the image with the correct dimensions.  Currently i am using the php builtin function  to circumvent this problem, but this function call takes significantly longer than simply accessing the index returned by wp_get_attachment_image_src:  Without getimagesize (mtime before and after execution):   '0.83761000 1415195440' '0.83831600 1415195440'   With getimagesize:   '0.34808000 1415195635'  '0.35323900 1415195635'   What can I do to make wp_get_attachment_image_src return the correct dimensions?

When I upload an image, it is automatically resized as I would expect, however the sizes for inserting the image seem to ignore the settings I've placed in Settings/Media.  In my media settings I have:   Thumbnail: 150 x 150   Medium: 300 x 300  Large: 690 x 9999     I upload an image of: 2226 x 1663. Wordpress generates the correct image sizes, but gives me the following options for insertion:   Thumbnail: 150 x 150 (as expected)   Medium: 300 x 224 (as expected)   Large: 640 x 447 (Wrong. Why?)     I looked on the forums and found a suggestion that I add the following to my functions.php file:  update_option('large_size_w', 690);   However, this did not work.


I've been trying to erase (remove) a directory from one of my internal HDD and the system tells me that "The directory can not be removed because it is not an empty directory."  The issue is that the directory IS empty!  At least, I can not to see any inside it with Thunar file manager or from the Terminal with root privileges.  The directory where the directory I want to delete is, has this output to ls-la:  total 28  drwxrwxrwx 1 root root  4096 ene 15 10:01 .  drwxrwxrwx 1 root root 20480 ene 15 10:01 ..  drwxrwxrwx 1 root root  4096 ene 15 10:01 matrimonio de fiesta sara y luis hernan   And, the directory I want to delete, has this output:  total 8  drwxrwxrwx 1 root root 4096 ene 15 10:01 .  drwxrwxrwx 1 root root 4096 ene 15 10:01 ..   A similar case with another directory which has 3 files and, each time I was trying to remove them, the system tells me: "Files not found."  I was trying with sudo rm -r -f and... Nothing!  The same history each time I used it. What's wrong here?  Is there another, more powerful, command to remove directories and/or files?

How do I delete the following directory?  I typed:  rmdir lampp   This error comes up:  rmdir: failed to remove `lampp': Directory not empty   Is there a command to delete all the files in the directory and delete the directory folder?


I am a developer interested in moving (at least something like a dual boot) to Linux, specifically Ubuntu. I am interested in programming aspects of the OS, I know the majority of it is written in C and it's a great language to work with the OS, but are there any OS specific languages? Like how Windows has Batch (And Microsoft developing C#), and Mac has Swift, is there any language that is exclusive, or nearly exclusive for Ubuntu? What languages are most easily worked on in Linux environments?  Thanks!

Hi I've recently switched from Windows 7 to Ubuntu 12.10 and love the OS. However I have had trouble deciding which programming Language would be the all-around best for Ubuntu programming. I have no problem learning a harder language, I already know a good amount of C++ and C#. I really like C# but I've heard it doesn't mix well with Ubuntu.   What would be the best-integrated languages for Ubuntu, and good IDEs for them?


When i make a call all i here is a tone every few seconds just like its ringing but tones instead and the call goes thru. I can not find any setting that changes the out going ring tone.

When I place a call I hear the traditional rotary dial phone ringing sound until the person at the other end, whose ringtone most likely is completely different, answers. What I was wondering is, can I set a ringtone for the person placing the call to hear until the other party answers? If so, can such "ringtone" be set differently for every person called?


Could you please explain how this construction actually works and what does it mean?  var newObj = new Object () {   public String s = "test";   public int i = 1; };   What's the class of newObj and how it was created?

What is the use of anonymous classes in Java? Can we say that usage of anonymous class is one of the advantages of Java?


Here is my LaTeX code block..  It's combination of formula and sentences.  If I run it, an error always occurs: "Missing $ inserted" in that part (code block part).   \begin{itemize}  \item  \begin{singlespace}  \begin{verbatim}   se=strel('disk',9);   citra_dilasi=imdilate(cropped_img,se);   \end{verbatim}   \end{singlespace}    The morphological dilation is performed to "\emph{cropped_img}" with the SE       (structuring element), where the SE is a disk-shaped structuring element and the    radius is 9. \emph{cropped_img} is the image that has crop horizontally.   The error is like this.   How to solve it??

How can I produce the text Word_one_two in LaTeX?  I tried:  Samp\_Dist\_Corr   But, it doesn't quite look right. Also, I want it in the typewriter font, so actually, I'm doing:  \texttt{Samp\_Dist\_Corr}   I find it looks a bit like the underscore is merging in to the bottom of the "D", but maybe it's just because of the typewriter D?


i am a newbie to linux!i am having a trouble to install adobe flash player plugin! can any one please tell me how to install it clearly?  Many thanks in advance!

Even though I have the latest Adobe Flash player 11.2 for Linux in Firefox -   - a particular online flash game still requests that I update to the latest flash player.  I've tried this online game on my laptop (Windows 8 with Flash Player 11.8) and it has no problems.  Is there a way to trick Ubuntu or this game into thinking Flash Player 11.8 is "installed"?


I'm a Web Developer.  I've got an old Netbook computer.  I want to learn VIM and force myself to use the terminal to create a small NodeJS or Python project and fumble around in the dark with a text-only browser :)  Do you have any advice on which Ubuntu flavour I should use if I only want to run Ubuntu in Console mode? Is there a version that comes without a GUI but does have video, networking and wifi drivers, etc so I can be productive?  Thanks, Nick

I want to start my computer and it should open up to a CLI. I don't want a GUI, no fancy login screen etc.  I need a solution that does not use a minimal ISO because it requires an internet connection. I need an offline installation.


I have a service I'm running in a docker container locally, listening in port 8000. The service is non http secured. I'm trying to send a GET request from my apex code to the service and getting an 403 error. The user has "API enabled", and the endpoint was added to the "Remote Sites". When I try sending the same request from postman or the browser, I reach the service and get the required response. This is my code: HttpRequest request = new HttpRequest(); request.setEndpoint('http://localhost:8000/ABRequest'); request.setMethod('GET');  Http http = new Http(); HttpResponse response = http.send(request); System.debug(response.getStatusCode());  Can anyone help me understand what I'm missing?

Can we hit a local/private server using IP address with HTTP request in Salesforce ?? or the server should always be public.... can we access a private IP address of local host/server using the HTTP methods that salesforce.com provides. how to hit the local server...  I have make the callout which was written in .Net (hosted on localserver) which will get the data from stored procedure in SQL.  When i was trying to get the data from SQL to Salesforce , i was able to get the data when i was using the advanced rest tool. But when i tried in salesforce callouts http methods  with end point url after  setting remotesitesetting , i could not get the  data.User-added image  it gives me an error of '503 service unavailable'.  ,when i tried to execute a block of code in Salesforce, i  made callout to  the .Net webservice  file  to test the data, i got an error 'Server unavailable,status code = 503'.  My another important question is ''If the Webservice is hosted on the local or intranet, will the salesforce API (which is on the cloud) able to access that webservice  Thanx in advance


Does anybody of a way to access files and directories that have a % in their name (which is valid) from the command-line? Specifically, if there are two %’s and the text between them happens to correspond to an environment variable.  For example, if there is a file called C:\blah\%temp%.txt or a folder called C:\Program Files\%temp%\, none of the following will work because the variable gets expanded:  > dir "c:\blah\%temp%.txt" > dir "c:\blah\^%temp^%.txt" > dir "c:\blah\%%temp%%.txt" > dir "c:\blah\\%temp\%.txt"  > dir "c:\program files\%temp%" > dir "c:\program files\^%temp^%" > dir "c:\program files\%%temp%%" > dir "c:\program files\\%temp\%"    Using wildcards will work, but does not uniquely select the file/folder and may include others:  > dir "c:\blah\?temp?.txt"        (also shows ztempz.temp, 1tempa.txt, etc.) > dir "c:\program files\?temp?"   (likewise)    (This is frustrating because every now and then—usually when Explorer is restarted for whatever reason—the environment variables stop expanding and some places where they are used end up creating files or directories with the environment variable in it. For example, because I configured Chromium to store its cache in a subdirectory of %temp%, if the variable expands, it is fine, but when it doesn’t, Chromium creates a directory called %temp% under its own directory and stores the cache—which can get large—there. I want to add a line to my temp-/junk-file cleaning script to automatically delete that folder if it exists, but I cannot figure out how to access it from the command-line without resorting to wildcards.)

(This is on NT based Windows like 2000, XP, Vista, 7)  On the command-line, the percentage characters are ignored:  wget "http://www.justitie.nl/images/Handleiding%20voor%20verwerkers%20persoonsgegevens_tcm34-3940.pdf"   So it correctly downloads this file (each %20 becomes a space):  "http://www.justitie.nl/images/Handleiding voor verwerkers persoonsgegevens_tcm34-3940.pdf"   But inside a batchfile, all the %20 are being interpreted as expanding parameter 2 (which is empty) resulting in this file to get downloaded (each %20 becomes 0):  "http://www.justitie.nl/images/Handleiding0voor0verwerkers0persoonsgegevens_tcm34-3940.pdf"   Is there a way to circumvent the percentage parameter expansion?  --jeroen


I wrote a program that compiles and runs an external program(prog1.c). And I want to get the output of the prog1.c somehow. for example if prog1.c is printf("HELLO"); and prints HELLO to the terminal, I want this output to get to a variable in my program or a file. I saw somewhere something about pipe, but I dont know this command much and dont know if this is the right way.  Anyone can help me, direct me or show me an example? Thank you!

I'm trying to start an external application through system() - for example, system("ls"). I would like to capture its output as it happens so I can send it to another function for further processing. What's the best way to do that in C/C++?


We know that the escape velocity of Earth is about 11.2Km/s but what if we give that same velocity to an object at any angle let's just take 30° will it still escape from Earth's gravitational field or not

The term  is quite common to us. But we know velocity is a dimension dependent on the direction. But the escape velocity has same value irrespective of from where it is thrown from the earth. So its just the magnitude that matters, not the direction. In that  sense it should be given the name as escape speed. But it is not given so, can anyone explain?


I have  and .  Am I allowed to run four of each of these cards in one deck?  I cannot find a ruling on this, maybe my google-fu is a bit off though...

I'm new to the game and trying to make my first constructed deck. My understanding of the card rule is I can only have four cards of one kind.  What does this precisely mean?  For instance, does this mean I can only have four rat cards total or four rat cards of several kinds? If two different cards do the same thing (like  and ), can I have four of each?


I'm having some sections in a report with more images (figures) than text. I include the images in the following way:  \begin{figure}[h] \centering \resizebox{10cm}{!}{\includegraphics{images/test.png}} \caption{Test image.} \label{some label} \end{figure}   The problem now is that some of the figures are shown in the next section.  How can I enfore the figures to be placed in the section where I'm including them (even if white space must be introduced)? Otherwise it gets very confusing for the reader.  I have tried to use \begin{figure}[H] but it did not help.

How to influence the position of float environments like figure and table in LaTeX?   This is a general question and should collect useful answers for all users. I hope we can use this as a reference


The following  header ====== renders correctly in the editor preview  but once posted it renders incorrectly.

When I block quote a bit of a post that contains a Big Title generated by **Big Title** --  It shows as big while am previewing the post during edit. But as soon as I click Save Changes the appearance changes and the bigification disappears. Similar behavior when the ** marks are removed. Is this (what I feel to be) unexpected behavior by design? From :


I have got a dataset and I need to check if one specific observation within the dataset is significantly different from the dataset's mean.      set.seed(1) data = rnorm(20) #this is my dataset  my_ob = 1.59528080 #this is my observation taken from the dataset   What kind of statistical test can I use to check if my_ob is significantly different from the mean of data?  Any suggestion? Thanks

My samples follow heavy tail distributions. I use a process to detect and remove "extreme" samples that goes like this:   Measure mean and standard deviation of samples.  Remove samples higher than mean plus 4 standard deviations. Repeat from Step 1 - for a total of 3 times.   If there are no extreme samples then the above process removes none; if there are many then they skew mean/std.dev, however, the multiple iterations take care of that.   For my problem, the above algorithm removes 0-5% of samples and empirical tests show that it works quite well and seems quite robust.   However, is this process sound? Does it have a formal name to look it up?  Notice that, I can not just find the "optimal" number of standard deviations above which we reject samples, since this whole process needs to be automated for multiple datasets and run as part of a live system. The datasets are similar but not identical: sometimes they are small and there are no outliers (no luxury to lose samples); sometimes they are large and the number of extreme examples that need to be removed varies and can be quite high.   Data represent user actions (one variable per action type) and we have multiple sets of users we need to compare (different segmentations). However, many "users" are actually bots that typically (but not always) do the same actions multiple times (way more times than humans would do). It is fair to say that we have a mixture of two distributions that we can't really distinguish, human-users and bots. We care about differences of behaviours of human-users after we remove as many bots as possible. In the long term we will build a classifier for bots but for now we are after some quick solution.


As the title says, what happens to the tailed beast when jinchuriki dies by any reasons whether of old age or killed by enemies. Does it come out of jinchuriki alive or get reborn? What had happened to jinchuriki of three tails that it was the only bijuu that didn't have a jinchuriki in Naruto shippuden.

It is shown in the anime that the jinchuruki is caught and the tailed beast is extracted and sealed into the Demonic statue by the Akatsuki. What will happen if the jinchuruki is killed somewhere else? In search for Tsunade arc, during the fight between Jiraiya-Tsunade and Orochimaru, Orochimaru tries to kill Naruto as he is the jinchuruki of the nine tails. What would have happened to the nine tails if he had killed Naruto?


I was trying to work out why get in car but on most other transportation systems.  Get in a car, helicopter  Get on a train, plane, boat (although in feels like it works ok here)  Is it the size of vehicle? The function (private/public transport), or something else? How would you know whether to use in or on for an unknown vehicle?

Examples:   In a car, van, etc. On a bus, boat, motorcycle, etc.   How can one decide which preposition to use? Is memorization the only way or is there a better way?  Note: People generally explain this by either distinguishing between open and closed vehicles or between large and small vehicles. However, the examples I've given defeat both explanations.


\documentclass[14pt,english]{article} \usepackage[margin=0.8in]{geometry}  \usepackage{amsmath}  \begin{document}      \begin{align}   &=\sum_{i=1}^{n}\lambda\rho\sin(x_i-X_i)-\dfrac{1}{c}\sum_{i=1}^{n}\dfrac{-\beta_i\eta_1\sin(y_i-\beta_i X_i)+\beta_i\eta_2\cos(y_i-\beta_i X_i)}{1-\alpha_1\cos(y_i-\beta_i X_i)-\alpha_2\sin(y_i-\beta_i X_i)} \end{align} \end{document}

\documentclass{article} \usepackage{amsmath} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \begin{document}     \begin{align}         \hat{\alpha} &= \begin{cases}                       \tan^{-1}\frac{\hat{\alpha_1}}{\hat{\alpha_2}},  \,    &\text{if }  \hat{\alpha_1}>0 \, \hat{\alpha_2}>0 \\                      \tan^{-1}\frac{\hat{\alpha_1}}{\hat{\alpha_2}}+\pi,  \,  &\text{if }  \hat{\alpha_1}<0 \\                      \tan^{-1}\frac{\hat{\alpha_1}}{\hat{\alpha_2}}+2\pi,   \, &\text{if  }\hat{\alpha_2}<0 \,  \hat{\alpha_1} >0 \\                      \text{undefined}, & \hat{\alpha_2}=0 \, \hat{\alpha_1}=0                 \end{cases}      \end{align}  \end{document}   I need to numbering of this cases but when i put align code , the file not compiling because \par .... what is wrong please help me i attempt every probability to solve this


Why does top show 730MB of RAM used, but the "Task Manager" shows 190MB? Some more information on my system:  Lubuntu 14.04 VirtualBox  Screenshots:

I am using System Monitor 2.28.0.  When I look in the Resources tab, I see a nice graph with for memory and swap.  Memory is about 60% 2.3 GiB of 3.8.  When I type the command free, I got :               total       used       free     shared    buffers     cached Mem:       3994908    3962396      32512          0     100852    1477032 -/+ buffers/cache:    2384512    1610396 Swap:      8000328      28468    7971860   cat /proc/meminfo | grep MemFree give  MemFree:           34536 kB   The situation has remained the save for several minute.  I started a lot of process with a script and the script is waiting for the free memory to get lower.  According to what I am seeing in the Process tab (or with top), the number in System Monitor seem a lot closed to the total of the memory of the process that the one reported by free.   Thanks


At our company we have an migration scripts that converts all the old projects into a new relational database.   The migration script is a so called "ugly dragon" written by an colleague that is not working here anymore. It is one big mess written vanilla php with PDO without a exception structure.    No i have the problem that in the old database there are 43.415 records, after the migration there are 43.247 transferred. I know that there are 26 records not migrated because they had a duplicate value for a column that is now indexed as unique.  But the rest of 142 records are a big mystery for us.   Do any of you guys know a way two compare 2 tables in 2 different databases for missing records. There are some columns who stay the same in the new structure where i can query on.  I suck at mysql big time unfortunately, thats why i ask it to you guys.  Thanks in advance!  Edit: Comparing the whole database is not an option because almost everything has a new strucure. Old database was non relational, so for each field we create the relation and insert the fresh created ID. But the code field is a simple integer field with values that stayed the same.

I'm currently developing an application using a MySQL database.  The database-structure is still in flux and changes while development progresses (I change my local copy, leaving the one on the test-server alone).  Is there a way to compare the two instances of the database to see if there were any changes?  While currently simply discarding the previous test server database is fine, as testing starts entering test data it could get a bit tricky. The same though more so will happen again later in production...  Is there an easy way to incrementally make changes to the production database, preferably by automatically creating a script to modify it?     Tools mentioned in the answers:    (Commercial)     (Commercial)   (Commercial)


Hi Guys I am new to Java Why does it throws null pointer exception?? My Customer Class      package com.syncfusion;      import java.util.List;      public class Customers {          private List<String> customerNamesList;          public void addCustomerName(String customerName) {              customerNamesList.add(customerName);             System.out.println(customerName);          }           public void printAllCustomers() {             for(String customer : customerNamesList) {                  System.out.println(customer);               }         }     }   and my Main function is as shown below:  package com.syncfusion;    public class Persons {        public static void main(String[] args) {          Customers customer = new Customers();          customer.addCustomerName("Inteflex Inc");         } }   Why does it throw null pointer ? and I hope i have instanciated the Customer Class but it has error

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


In Cribbage play, people tell me that the rule for granting an opponent one point when you say "Go" has been done away with in tournament play. Is this true?

I've played a fair bit of cribbage, but I've never heard of scoring one point for "Go" (as mentioned in this other question: ).  What is it, and what impact does it have on the game?


package sphinxtest;   import edu.cmu.sphinx.api.Configuration;  import edu.cmu.sphinx.api.LiveSpeechRecognizer;  import edu.cmu.sphinx.api.SpeechResult;  import java.io.IOException;  public class Sphinxtest {  /**  * @param args the command line arguments  * @throws java.io.IOException   */ public static void main(String[] args) throws IOException {      System.out.println("running");      Configuration config = new Configuration();       config.setAcousticModelPath("resource:/edu/cmu/sphinx/models/en-us/en-us");      config.setDictionaryPath("C:\\Users\\sys\\Desktop\\3481.dic");      config.setLanguageModelPath("C:\\Users\\sys\\Desktop\\3481.dic");       LiveSpeechRecognizer rec = new LiveSpeechRecognizer (config);      rec.startRecognition(true);       SpeechResult spinput ;      while ( ( spinput = rec.getResult() ) != null) {           String command = spinput.getHypothesis();           if (command.equalsIgnoreCase("click")){               System.out.println("click command recieved");            }     }  }   }``


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?

I have a large raster layer with wind speed values assigned to each cell. I also have point data that displays locations where wind farms have been constructed. I would like to add the raster values to the wind farm location data. The goal is to figure out when each wind farm was built over each wind speed value. Any ideas?


I want to show that  $$\newcommand{\cov}{\operatorname{cov}}\newcommand{\d}{\mathrm{d}}\cov(x,y) = \iint (F_{X,Y}(x,y) - F_X(x)F_Y(y))\,\d x\,\d y$$ However, I have no idea how to start. I know that  $$\cov(x,y) = \iint (x-\mu_X)(y-\mu_Y)f_{X,Y}(x,y)\,\d x\,\d y = \iint xyf_{X,Y}(x,y)\,\d x\,\d y - \mu_x \mu_y$$ where $\mu_x = \int x f_X(x)\,\d x$ and $\mu_y = \int y f_Y(y)\,\d y$.  However, I have no idea how to proceed. I would be very grateful for at least a small hint.

I'm studying associated variables now and in one proof the following Lemma is used:  Let $X$ and $Y$ be random variables with distribution $F_X$ and $F_Y$ and joint distribution $F$. Then \begin{align} & \mathbb{E}[XY] - \mathbb{E}[X] \mathbb{E}[Y] \\[8pt] = {} & \int_{- \infty}^\infty \int_{- \infty}^\infty (F(x,y)-F_X(x) F_Y(y)) \,dx\,dy, \end{align} if $\mathbb{E}[XY]$, $\mathbb{E}[X]$ and $\mathbb{E}[Y]$ exist.  The proof begins with introducing to vectors of independent variables:  Let $(X_1,Y_1)$ and $(X_2,Y_2)$ be independent, each distributed to $F$.   Define $I(u,x)=\begin{cases}1& \text{if } u \leq x \\ 0 & \text{otherwise} \end{cases}$.  Then it is said, that  $$ 2 (\mathbb{E}[X_1Y_1] - \mathbb{E}[X_1] \mathbb{E}[Y_1]) = \mathbb{E}[(X_1 - X_2)(Y_1-Y_2)] $$ $$ = \mathbb{E} \left[\int_{- \infty}^\infty \int_{- \infty}^\infty [I(u,X_1)-I(u,X_2)][I(v,Y_1)-I(v,Y_2)] \, du \, dv \right].$$ The first equation is clear for me, but I don't get the second one. Some help would be nice here.  Furthermore the proof ends with the argument, that we can take the expectation under the integral sign since the expectation is finite, thats clear. Then we are ready, but I don't get the right result by calculating.To make the proof fit, we would have to end up at 2 times the right handside of the statement.  What I also observed is that this inequality gives a simple proof for $\mathbb{E}[XY] \geq \mathbb{E}[X] \mathbb{E}[Y]$.


Meal prep is usually meant to be a week's worth of meals but how does that work with the three or four days in the fridge most leftovers are considered safe for? Is three or four days too conservative then or are meal preppers risking their health with meals five days or so old?   Added: My question is, in spite of recommendations not to exceed 3-4 or 3-5 days in fridge, how are meal preppers doing fine with eating foods a week old? (I assume they are anyway). For example I have six day old chicken and veg I have just frozen and debating over that would be fine for a meal prepper I think but not fine if following the recommendations.

As through the week we too busy to cook we have gotten the idea of cooking a big bunch of food in the weekend, storing it in the fridge and eat it later in the week.  I am a bit concerned how long things will stay good in the fridge. For example mashed potatoes (which is prepared with milk), minced meat steaks or a cream-based sauce.  Are there any general rules of thumb that can be used to estimate how long things will stay good? And are there any 'dangerous' foods, foods that can be spoiled but not show any mold or smell strange, but are not good to eat?


What would be the best way to use TeX to typeset basic arithmetic as it's done in school - for example, to typeset equations like   356 + 42  ---  398   written in this way?

How do I present vertical (columnar) multiplication and addition in LaTeX. Like this:       3 8 4 x     5 6 ---------   2 3 0 4 1 9 2 0 --------- 2 1 5 0 4   I used the "array" environment. But i have right align problem. Any other best ideas?


I'm a new to python and I found a confusing result when using Python3.5.1 on my mac, I simply ran this command in my terminal       1 // 0.05   However, it printed 19.0 on my screen. From my point of view, it should be 20. Can someone explain what's happening here? I've already known that the '//' is similar to the math.floor() function. But I still can't get across to this.

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


I'm writing a paper that has citations in it. I use Jabref to organize the citations. Where I run Texmaker I get the following error:  What weird is that when I run this on a different computer, everything works fine (so I assume that my .bib file is ok). Is there any solution for this? Saw few questions about this subject however without any answer. Thank you

Running the minimal example  \documentclass{article} \usepackage{filecontents} \begin{filecontents*}{\jobname.bib} @ARTICLE{example,   author  = {Other, Anthony Norman},   title   = {Some things I did},   year    = {2014},   journal = {J.~Irrep. Res.},   volume  = {1},   number  = {1},   pages   = {1-10} } \end{filecontents*} \usepackage[backend=biber]{biblatex} \addbibresource{\jobname.bib} \begin{document} Hello\cite{example}. \printbibliography \end{document}   I get the warning There were undefined references.  I have read  and know that I need to run:   LaTeX Biber LaTeX   However, my editor is only set up to run BibTeX. How do I go about setting up my editor/IDE to be able to run Biber, and how do I run the LaTeX/Biber/LaTeX cycle?  Answers (sorted alphabetically by editor name)                    Answer guidelines   Each answer should be for one editor. If the editor is cross-platform, if possible give a single answer with notes covering the minor platform variations. Please edit the question to include new answers in the 'link list' Each answer should be 'stand alone', i.e. don't say 'It's almost the same as editor Y but ...' for the editor part Instructions for 'build tools' such as arara or latexmk are welcome but should explain how to set up the editor in question as not all editors allow simple addition of arbitrary tools


I'm wondering what the underlying mechanism of the flickering of the panel indicator lights is. Are there electronic oscillators of some kind in there?

Neon lamp indicators embedded in power strip switches indicate whether the switch is ON or OFF. When the neon lamp is ON in a dark environment (lights of the room are off), the lamp begins flickering and it sometimes goes off for a few seconds. When I switch the lights of the room on, it stops flickering and remains bright. Even when I unlock my phone in the dark near the lamp, it stops flickering! Is the light-making-mechanism in neon lamps affected by the light intensity of the surrounding environment?  UPDATE: I captured my observations with my iPhone and uploaded it to YouTube. Here is the link of the video:  All the lights of my room were turned off. There were no plugs connected to the power strip. The only source of light was the screen of my MacBook Pro, which was not plugged in.  I increased and decreased the brightness of the computer screen during the video.  I then produced two additional light environments using my phone.


I recently installed Lubuntu 16.04 on my laptop & I can't seem to get it to connect to WiFi. I tried using the Network Manager but it won't even start. At first I thought it wasn't installed so I tried:  sudo apt-get install network-manager-gnome   The output tells me it's already installed & up to date with the most recent version. I also tried adding "nm-applet" to the Default applications for LXSession on the Autostart tab & rebooting the laptop, but even after that it just doesn't appear on the panel or start with a command from the terminal. I tried:  sudo nm-applet   To start it, but the output was:  ** (nm-applet:20844): WARNING **: Error retrieving accessibility bus address: org.freedesktop.DBus.Error.ServiceUnknown: The name org.a11y.Bus was not provided by any .service files  (nm-applet:20844): Gdk-CRITICAL **: gdk_window_thaw_toplevel_updates: assertion 'window->update_and_descendants_freeze_count > 0' failed   The output of:  lspci -knn | grep Net -A2   was:  03:00.0 Network controller [0280]: Broadcom Corporation BCM4312 802.11b/g LP-PHY [14e4:4315] (rev 01)     Subsystem: Dell Wireless 1397 WLAN Mini-Card [1028:000c]     Kernel driver in use: b43-pci-bridge

How can I install firmware-b43-installer driver if I can't connect to internet by wire?


I have one source shapefile like this:  It consist the geographical coordinates of weather stations:    And several attribute files, which contain the Temperature data of each date for several years    I managed to linked them through the ID (project properties/ Relations).  Now I want to access for example the Temperature from the weather station 3 at a specific date. With the attribute table I can see all the values, but I don't know how to query some values with the Field Calculator. I can’t access the linked data.

I'm trying to create a join/relate in QGIS where I have a shapefile of buildings and to that I would like to join a non-spatial table (.csv-file) containing people who work in each building. So I have multiple records in my table that I would like to be able to join to my single features in my shapefile. I can only run a join in QGIS where the first record is joined to the shapefile feature (ie building) but subsequent records get removed. Could someone let me know how to complete this join/relate in QGIS?


I was reading from The Elements of Statistical Learning (Section 3.2) and they were able to find $Var(\hat\beta)$ Given $$\hat\beta = (X^TX)^{-1}X^Ty \qquad (3.6) $$ The answer they had was $Var(\hat\beta) = (X^TX)^{-1}\sigma^2$ Please how do I find $Var(\hat\beta)$ from $ (3.6)$

I just read this very insightful post , where the author stated that the variance of $\hat\beta$ is:  $$\text{var}(\hat\beta) = \sigma^2(\textbf{X}^\prime \textbf{X})^{-1}.$$  I couldn't figure out why it is like this. Can anyone elaborate a bit?


I had Kali Linux, Ubuntu, and Windows 7 installed alongside each other with a GRUB bootloader to boot into each, until I upgraded to Windows 10. I expected that would overwrite the bootloader, but it didn't. I have since deleted the Ubuntu partition from Windows, but I'm prevented from doing so with the Kali partition. Even though I've deleted the Ubuntu partition, the GRUB bootloader still has an entry for it. I've tried running linux bootrepair several times to no avail. I really just want to uninstall the GRUB bootloader and replace it with a Windows 10 bootloader.  So, I have tried following the steps of the answer from . However, when I run the command bootrec.exe /fixmbr I receive an error stating that the system cannot find the file specified.  Running the command bootrec.exe does seen to show the correct dialogue giving me the commands and what they should do. However, bootrec.exe /fixboot also gives an error stating that the system cannot find the file specified.  Also, running the commands bootrec.exe /scanos and bootrec.exe /rebuildbcd each find 0 Windows installations

I have absolutely no experience with Linux, and I desperately need to get my computer back up and running again with Windows.  How do I remove Ubuntu and reinstall Windows?    Editor's note: many of the answers are about removing Ubuntu from dual-boot but keeping Windows (which is a bit complicated), while other answers are about removing Ubuntu from single-boot (which is easy: basically just format the disk while installing Windows). The question as written is ambiguous between dual-boot or single-boot.


We have a lot of computers that have been donated to our school, but they are all running very slow. I am trying to find a way to make the computers run better without costing us an arm and a leg.  Someone suggested I try Ubuntu and I just tried installing it on one of our old computers. I got the following message:     This kernel requires an x86-64 CPU, but only detected an i686 CPU. Unable to boot.   Is there an older version that I would be able to install so we can use the computers. I have about 20 computers throughout the school and we have not been able to use very many of them for a few years. We are trying to make them run faster, so we can run some new math and reading software we will be getting in the fall.

I need to find the 32-bit version, and all I keep finding is the 64-bit. Can anyone provide me with a link?


I need some help proving the following:  If $F$ is a finite field then $|F|=p^n$ for prime $p$ and some integer $n$.  By contradiction, suppose $|F| =pq$ for primes $p$ and $q$. Then by Cauchy's theorem there exists $a, b\in F$ such that the order of $a$ is $p$ and the order of $b$ is $q$. I am not quite sure where to go from here, but I think we need to contradict that $F$ is a finite field. The only thing that comes to mind is to show zero-divisors.    Where can I go from here? I thought every finite field had to have prime order? $p^n$ is not prime!   Thanks for all the help!

Let $F$ be a finite field. How do I prove that the order of $F$ is always of order $p^n$ where $p$ is prime?


I'm running Cygwin on windows with cmder as a terminal for zsh. The way I got it to be a bit similar to what my linux setup has is I placed a shotcut (.lnk) on my desktop with a keyboard shortcut (which I assume is handled by explorer.exe) for ctrl+alt+t. However, when I use the shortcut, the startup time is enormous (same for mintty), multiple seconds at least. At the same time, starting off by simply clicking the icon twice results in near instantaneous startup. Why is this the case, and is there any faster alternative to starting up a terminal?    Moved to AutoHotKey as a long-term solution.

I've got a couple of shortcuts on my desktop and on some of them I've configured the "Shortcut key" to a keyboard combination. For example I have a shortcut pointing to d:\documents\todo.txt and I've set Shift + Alt + T. This naturally opens up using notepad.  Double-clicking on the icon always opens up the text file immediately. Using the keyboard shortcut though is sometimes very (5-10 seconds) slow. Note that during that time CPU utilization does not rise.  This happens to all my machines (both old and new ultra fast boxes) in Windows XP (various versions) and Windows 7.  There are  but no solution.  Is there an explanation and solution to this problem?  Edit: The behavior is not consistent. I have 30 desktop shortcut and 5 of them have keyboard shortcuts assigned. I'm not interested in software alternatives for this Windows functionality. I want to know what the problem is and how to solve it.


I recently had a specific problem which had a poor visibility. I could find the exact question I needed (and the answer on SO). So I thought of giving some amount of my reputation to that answer, but I couldn't find a way to do it.   Reading the FAQ, I see the only method would be to start a bounty on that question and then award the bounty.  Is there any direct way, I can give away some reputation points to a answer?  Hope, I haven't missed something very basic here, please help me understand how is this doable if possible?

I must have been dreaming, but I could have sworn one was able to award extra reputation points to answers on stackoverflow.com if you felt the answer deserved it.  I'm in this predicament right now, where I was too late with choosing the best answer for a bounty question. I still want to award the answerer the full points, but I can't find the damn option to award extra rep. points anymore. :-/  Have I been imagining this 'extra rep. points' thing?


I'm using the nnet package in R to attempt to build an ANN to predict real estate prices for condos (personal project). I am new to this and don't have a math background so please bare with me.  I have input variables that are both binary and continuous. For example some binary variables which were originally yes/no were converted to 1/0 for the neural net. Other variables are continuous like Sqft.    I have normalized all values to be on a 0-1 scale. Maybe Bedrooms and Bathrooms shouldn't be normalized since their range is only 0-4?  Do these mixed inputs present a problem for the ANN? I've gotten okay results, but upon closer examination the weights the ANN has chosen for certain variables don't seem to make sense. My code is below, any suggestions?  ANN <- nnet(Price ~ Sqft + Bedrooms + Bathrooms + Parking2 + Elevator +              Central.AC + Terrace + Washer.Dryer + Doorman + Exercise.Room +              New.York.View,data[1:700,], size=3, maxit=5000, linout=TRUE, decay=.0001)     UPDATE: Based on the comments below regarding breaking out the binary inputs into separate fields for each value class, my code now looks like:  ANN <- nnet(Price ~ Sqft + Studio + X1BR + X2BR + X3BR + X4BR + X1Bath         + X2Bath + X3Bath + X4bath + Parking.Yes + Parking.No + Elevator.Yes + Elevator.No          + Central.AC.Yes + Central.AC.No + Terrace.Yes + Terrace.No + Washer.Dryer.Yes          + Washer.Dryer.No + Doorman.Yes + Doorman.No + Exercise.Room.Yes + Exercise.Room.No          + New.York.View.Yes + New.York.View.No + Healtch.Club.Yes + Health.Club.No,     data[1:700,], size=12, maxit=50000, decay=.0001)   The hidden nodes in the above code are 12, but I've tried a range of hidden nodes from 3 to 25 and all give worse results than the original parameters I had above in the original code posted. I've also tried it with linear output = true/false.  My guess is that I need to feed the data to nnet in a different way because it's not interpreting the binary input properly. Either that, or I need to give it different parameters.  Any ideas?

To use SVM or Neural Network it needs to transform (encode) categorical variables into numeric variables, the normal method in this case is to use 0-1 binary values with the k-th categorical value transformed to be (0,0,...,1,0,...0) (1 is on the k-th position). Is there other methods to do this, especially when there are a large number of categorical values(e.g.10000) such that the 0-1 representation will introduce a large number of additional dimensions(input units) in Neural Network which seems not quite desired or expected?   I am asking about general strategies.


I have a LaTeX template produced by Elsevier, "elsarticle-template-3-num.tex", which I have used to typeset a document. I want to distribute the compiled .pdf that I have typeset. Does the copyright of the template place any restrictions on my distribution of the compiled .pdf? Or does Elsevier have any say regarding the distribution of my typeset document?  To be explicit, here is the copyright statement in the header of the template:  %% This is file `elsarticle-template-3-num.tex', %% %% Copyright 2009 Elsevier Ltd %% %% This file is part of the 'Elsarticle Bundle'. %% --------------------------------------------- %% %% It may be distributed under the conditions of the LaTeX Project Public %% License, either version 1.2 of this license or (at your option) any %% later version.  The latest version of this license is in %%    http://www.latex-project.org/lppl.txt %% and version 1.2 or later is part of all distributions of LaTeX %% version 1999/12/01 or later. %% %% The list of all files belonging to the 'Elsarticle Bundle' is %% given in the file `manifest.txt'. %% %% Template article for Elsevier's document class `elsarticle' %% with numbered style bibliographic references %% %% $Id: elsarticle-template-3-num.tex 165 2009-10-08 07:58:10Z rishi $ %% $URL: http://lenova.river-valley.com/svn/elsbst/trunk/elsarticle-template-3-num.tex $ %%   I'm not sure if this is the appropriate place to ask this, but thought that the TeX community might have some experience or could point me to a resource/documentation that could answer the question.

If I write a LaTeX document that uses LPPL packages, since (La)TeX is a macro-replacement language, and I generate its output, to PDF for example, is the resultant output, in any form, a derived work from the LPPL packages?  I would like to be clear about this in order to know which types of licenses can I apply to my LaTeX source code and its output. For example, GFDL, CC-BY-SA, or even the source code LPPL and its output CC-BY-SA.


I'm using Cloudflare, i have set redirect https to http and it just ends up in a redirect loop on Safari,  Neither removing cache worked. Its very annoying , for a service status page of my web.  But what, it works on Chrome, Puffin and a lot of other thirdy parties browsers..  Safari just tries to redirect HTTP to HTTPS.  Is there any way to stop this?

Safari forces a redirect to the https version of a site I previously visited via https.  However, the https site no longer works and there is no way to prevent Safari form trying to load it.    Here is a related Apple Forums question,


I would like to append an arrow at the end of my plot, in the direction of the path.  Here my snippet:  \begin{tikzpicture}      \draw[line width=2pt, color=red, smooth,domain=0.2*pi:0.8*pi,->]  plot (\x,{0.75*sin(\x r)}); \end{tikzpicture}   But unfortunately, the arrow looks straight up, instead of looking along the path.

It seems that the smooth option applied to lines sometimes effects the arrow tips and produces incorrect results.  No problem with vertical lines, but any other seems to have a problem. Is this a known bug, or is there a reason why the smooth should not be applied to straight lines?  Updated: to show problem does NOT occur with TikZ, and problem also occurs with curves if smooth option is applied.  \documentclass{article} \usepackage{pgfplots} \begin{document}  \tikzstyle{MyStyle}      =[->, black, ultra thick,       ] \tikzstyle{MyStyleSmooth}=[->, black, ultra thick, smooth]  \begin{tikzpicture} \begin{axis}     % 'smooth' option seems to have no effect on lines '1' and '2'     \addplot [MyStyle      , green ] coordinates{(0,0) (0,1)} node [above] {1};     \addplot [MyStyleSmooth, blue  ] coordinates{(1,0) (1,1)} node [below] {2};     %     % But, can't seem to have the 'smooth' on lines, '4', '5' and '6'     \addplot [MyStyle      , orange] coordinates{(2,0)   (3,0)   } node [right] {3};     \addplot [MyStyleSmooth, red   ] coordinates{(4,0)   (2,0.5) } node [below] {4};     \addplot [MyStyleSmooth, red   ] coordinates{(2,1)   (3,1)   } node [left ] {5};     \addplot [MyStyleSmooth, red   ] coordinates{(3,0.8) (2,0.8) } node [right] {6};      % Similar problem with curves: "non-smooth" is ok, "smooth" is not     \addplot[MyStyle,       mark=none, domain=0:1,samples=50, blue] (x,x*x+1);     \addplot[MyStyleSmooth, mark=none, domain=0:1,samples=50, red ] (x,x*x+2);  \end{axis} \end{tikzpicture}  \begin{tikzpicture} % These are all fine     \draw [MyStyle      , green ] (0,0)   -- (0,1)    node [above] {1};     \draw [MyStyleSmooth, blue  ] (1,0)   -- (1,1)    node [above] {2};     %     \draw [MyStyle      , orange] (2,0)   -- (3,0)    node [right] {3};     \draw [MyStyleSmooth, red   ] (4,0)   -- (2,0.5)  node [below] {4};     \draw [MyStyleSmooth, red   ] (2,1)   -- (3,1)    node [right] {5};     \draw [MyStyleSmooth, red   ] (3,0.8) -- (2,0.8)  node [left ] {6}; \end{tikzpicture} \end{document}


I know this might be a silly question and maybe a bit off topic, but I wonder, could the big bang have been the collapse of a gigantic black hole in which all off its contents was pushed out? I have only basic skills in physics so I feel a bit embarrassed to ask. I could imagine a cycle of black holes collecting matter, merging with other black holes and when reaching some limit, spewing it all out, just to be collected by other black holes in the future

As discussed in , as far back as the 1960s it was suggested that the Schwarzschild metric can be smoothly joined to a de Sitter metric. For example the idea has been used by Lee Smolin in his ideas idea for black hole evolution.  If the suggestion is true it means that matter falling into a black hole would emerge into a de Sitter spacetime arguably comparable to our own.  So has the universe we live in started as a black hole of this type?  Is it possible to prove that the big bang was a black hole of this type?


How do I determine the RHEL version by looking at this extraction, I can only know that it is RHEL7 from el7 but what is the exact version?  Command: /bin/uname -a ==================================================== Linux xxxxxxxxx 3.10.0-957.12.2.el7.x86_64 #1 SMP Fri Apr 19 21:09:07  UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

We have some new hardware in our office which runs its own customized Linux OS.   How do I go about figuring which distro it's based on?


I want to convert the image file into byte[] array format. I used this code     Bitmap bm = getBitmapFromLocalPath(file1.getPath(),1);    ByteArrayOutputStream baos = new ByteArrayOutputStream();    bm.compress(Bitmap.CompressFormat.JPEG, 100, baos); //bm is the bitmap object    bm.recycle();    byte[] image = baos.toByteArray();   //method  public static Bitmap getBitmapFromLocalPath(String path, int sampleSize)     {         try         {             BitmapFactory.Options options = new BitmapFactory.Options();             options.inSampleSize = sampleSize;             return BitmapFactory.decodeFile(path, options);         }         catch(Exception e)         {             //  Logger.e(e.toString());         }          return null;     }   It showing error like  E/BitmapFactory: Unable to decode stream: java.io.FileNotFoundException: /storage/emulated/0/DCIM/Camera/IMG_20200324_121621.jpg (Permission denied) E/AndroidRuntime: FATAL EXCEPTION: Thread-2     Process: com.example.multiupload, PID: 5477     java.lang.NullPointerException: Attempt to invoke virtual method 'boolean android.graphics.Bitmap.compress(android.graphics.Bitmap$CompressFormat, int, java.io.OutputStream)' on a null object reference

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


I’m reading Black Beauty and there is a sentence there which starts like this:     Many a brave man went down, many a horse fell,   Why man here? Why not men?

Can someone please elucidate the difference between "many" and "many a"? In what context of usage should we add an extra "a" beside the word "many"?  For example:         Many times, I had seen that . . . .   Many a times, I had seen that . . . .      I do not know if the example is accurate enough to support my question, but I would like to know the difference between how they are used.


Hello I have the following code:  \documentclass[12pt]{article} \usepackage[top=0.3in, bottom=1.5in, left=0.8in, right=0.8in]{geometry}  \usepackage[utf8]{inputenc}  \usepackage{setspace} \setlength{\parindent}{0cm}  \usepackage{amsmath} \usepackage{unicode-math}  \usepackage{listings}  \begin{document}  \begin{lstlisting}[frame=single,title={Blinking both LEDs},breaklines=true]  #include  <msp430g2553.h>   unsigned int i = 0;  void main(void) {   WDTCTL = WDTPW + WDTHOLD;    P1DIR |= 0x01;   P1DIR |= 0x40;    for(;;)    {         //Both LEDs blink simultaneously          P1OUT ^= 0x01;         P1OUT ^= 0x40;          //Or alternative P1OUT ^= 0x01|0x40          for(i=0;i<30000;i++);          //If I place P1OUT ^= 0x40; here then one LED blink and then the other   };  }   \end{lstlisting}  \end{document}   In the last comment why doesn't the new line starts from the beggining (meaning under the //) but instead starts with a little left margin? And also why the first comment is far more left than the rest of the code in its block?  I have uploaded an image also with tabs on. There is something wrong. When I experiment with tabs odd things happen and the document doesn't appear as it should be. The second image is based on the code I wrote in that post and I haven't experiment on that one.

This is a follow-up question to . Why do I experience problems when I copy and paste code inside the lstlisting environment? Should I be careful about tabs or spaces in listings? And if yes, then why is that? How exactly do tabs and spaces affect horizontal spacing in source code typeset with the listings package?


Say I have this list here:  list = [a, b, c, d, e, f, g]   How would I delete say indexes 2, 3, 4, and 5 at the same time?  pop doesn't accept multiple values. How else do I do this?

Is it possible to delete multiple elements from a list at the same time? If I want to delete elements at index 0 and 2, and try something like del somelist[0], followed by del somelist[2], the second statement will actually delete somelist[3].  I suppose I could always delete the higher numbered elements first but I'm hoping there is a better way.


I have a file upload button which i need to file. I currently defaults to some pre-set styles.    <form class="uploadButton" method="POST" action="upload.php" enctype="multipart/form-data">   <input type="file" name="file[]" multiple> </form>

How do you style an input type="file" button?


I am currently a college student (20yrs) finishing up a semester of college in the US before flying back to Korea to be with my parents, but I heard that the travel restrictions in Korea are a bit crazy at the moment due to COVID-19.   I am a dual US/Korean citizen and am wondering how exactly I should be entering Korea using these two passports to avoid the travel restrictions. My name is different on the two passports and dual citizenship is allowed in both countries.  Before COVID-19, I would usually exit the US and enter Korea with my US passport due to having a 90- day travel visa. However, now the Korean government is making people who hold short term visas quarantine in a government-designated facility for 2 weeks at their own expense (~$1200!!), and I would really like to avoid that.   I'm a little confused about which passport to buy the airplane ticket with and which to show in immigration in both countries. Does anyone know how I would go about doing that?  EDIT: Not trying to avoid quarantine/self-isolation! Just trying to avoid paying $1200 to self-isolate at a government-designated facility when it is possible to self isolate at my parents' house (which is what Korean citizens have been doing).

I am a citizen of two different countries, and have two passports.  How should I use my passports when traveling?


Why does someone else breaking the rules and being removed cause me to lose reputation for votes they had cast on my questions or answers?

Currently, when a moderator deletes a user all of the user's votes are removed along with the user themselves. I was pretty surprised at this behaviour when I first heard about it, and I don't think it is a good idea to throw away all of the votes just because the user is deleted.  Votes are locked after a short while and you can't change your vote unless the post is edited. This is a precedent that shows that users don't have complete control over their old votes, their ability to change or remove their votes is restricted for the benefit of the whole site. I don't understand why users that get deleted are suddenly exempt from this restriction.   The drawback of removing the votes is that we throw away valuable information. Voting plays an important role on SE sites, and every time an active user is deleted we throw away some of that information.  I also don't see why rage-quitting users get to remove one kind of contribution (votes) while we stop them if they try to remove their other contributions to the site (posts). We stop users from deleting all their posts because they still provide value to the site, I don't see why we shoud treat votes any different. They might have less value than posts, but they are useful to the site as a whole.  I'm ignoring any vote invalidation in connection with vote fraud or sock puppeting for the purposes of this post. Those votes should certainly be invalidated, but that doesn't usually happen by deleting users.  To prevent abuse of user deletion for vote fraud, there could be some minimum requirements on account age and reputation, below those requirements any votes would be discarded on deletion. Any suspicious voting patterns of the user should automatically block the deletion until they have been checked manually. This is of course more effort for the moderators, but account self-deletion doesn't happen so often that this would be a problem in my opinion.  The recent change to counting reputation from deleted questions if they are old enough and have at least three upvotes moves the whole reputation system further into a direction where reputation can't be taken away after some time. The reasoning for this change was that even though certain questions are off-topic now, they used to be on-topic and therefore the reputation earned had some meaning then. This provides further precedent that reputation shouldn't be removed retroactively on a large scale.


Any tips on polite yet resolute phrasing for an e-mail to the managing editor of a journal when your article is under review for far too long and it would be nice to give the process a nudge?  Thanks in advance; specific advice for math journals appreciated.

Around 3 months ago, I submitted a paper to a Math journal for peer-review through an online submission system. The same day I received in my e-mail an acknowledgement saying that the paper had been received.  The problem is that the status of the paper on the online submission system is still "Manuscript submitted".  I think this means that the paper has not even been assigned to an editor yet (once this happens, the editor will probably start looking for reviewers), but as far as I know submissions are assigned to editors within a few weeks (I once submitted a paper to another journal and when an editor had been assigned, the status on the online system changed to "Editor handles" or something like that).  I know that publishing is a long and complicated process and I'm not trying to rush anybody, but sometimes manuscripts are lost in the system. In fact, this has once happened to me, so I just want to make sure that the paper was not lost in the system.  Should I send an e-mail asking for the status of the paper?  PS: I think that, at the time of submitting the paper, I didn't choose any specific editor to submit the paper to.


Lets say I try to replace in a like this   asdasdasdHit Hitasdasd Hit Hit Hitasda Hit Hit asdaHit Hit Hit Hit Hitasda Hit ... ...   Is there  a way to get every "clean" Hit replaced with OK? I tried /g but then everything gets an OK  With s/\ Hit\ /OK/g the Hit on the newline gets lost.

My script is:  n="y" while [ "{n}" = "y" ] if [ $n == "n" ]; then   break; fi echo "n is $n" do         read -p "Enter the word to find = " word         read -p "Enter word to replace = " replace         echo "$word n $replace"         #sed -i r.text.bak 's/$word/$replace/g' r.txt         sed -i "s/$word/$replace/g" "test.txt" echo "do you have further replacement? n or y" read temp n=$temp done   My problem is that I am also replacing partial matches. For example, for a line like this:  1.1.1.14 1.1.1.14567   I get this output:  1.1.1.3  1.1.1.3567   but I expected:  1.1.1.3 1.1.1.14567   How can I solve this?


Let's pick a random real number from $[0,1]$. What's the probability we picked number $1$? It can't be a nonzero $\alpha$. Otherwise we could pick $n$ numbers from $[0,1]$ so that $0<\frac1{n}<\alpha$. One of those $n$ numbers must have a probability of being picked less than $\alpha$, but we picked randomly, so all probabilities should be equal.  But if the probability is $0$, does it mean that it's impossible to pick $1$?

I read a comment under :     There are plenty of events that can occur that have zero probability.   This reminds me that I have seen similar saying before elsewhere, and have never been able to make sense out of it. So I was wondering    if zero probability and impossibility mean the same? if an event with zero probability doesn't mean that the event is impossible to occur, how probability theory represents/describes impossibility?   Thanks and regards!


How long can you store used cooking oil then re-use it? I deep fried a turkey one year ago and have had it refrigerated since.

How long may I store used deep fryer oil. I always strain my oil, store it in it's original container and place it in a cool, dark place. Thanks, Floyd


I am looking for a simple shell function (bash prefered) to list all file extensions in an arborescence and count the number of occurences of each.  For example, list_extensions . would return something like :  pdf 134 tex 42 cpp 30 ...   A plus would be to also count the file without extensions.

I did a website scrape for a conversion project. I'd like to do some statistics on the types of files in there -- for instance, 400 .html files, 100 .gif, etc. What's an easy way to do this? It has to be recursive.   Edit: With the script that maxschelpzig posted, I'm having some problems due to the architecture of the site I've scraped. Some of the files are of the name *.php?blah=blah&foo=bar with various arguments, so it counts them all as unique. So the solution needs to consider *.php* to be all of the same type, so to speak.


How can I make the same diagram like this in LaTeX?    I see that i could use package  but i don´t like placement of x.

In a document, I have to include those simple diagrams to show the procedure of reducing logical circuits.  What do you think is the best way to do them?


Find $\displaystyle \int \sqrt{\tan(x)}dx$.   According to an integral calculator, the answer to this question is $$(-2 \tan^{-1}(1-\sqrt(2) \sqrt(\tan(x)))+2 \tan^{-1}(\sqrt(2) \sqrt(\tan(x))+1)+\log(\tan(x)-\sqrt(2) \sqrt(\tan(x))+1)-\log(\tan(x)+\sqrt(2) \sqrt(\tan(x))+1))/(2 \sqrt(2))+C.$$   Is the question as complicated as the answer looks?

I have been having extreme difficulties with this integral. I would appreciate any and all help. $$ \int \sqrt{\tan x} ~ \mathrm{d}{x}. $$


prove: let there be $\phi:A\to B$, $F:C^B \to C^A$. $F(f)=f\circ\phi$. prove that if $\phi$ is injective, then F is surjective.  I did something but from some reason I haven't used the $\phi$ so probably I did something wrong, would appreciate your notes.  this is what I did:   we have to prove F is surjective, then we have to prove: $\forall g\in C^A \exists f\in C^B (F(f)=g)$ From definition of F, we can call g to be $f\circ \phi$ then, $F(f)=g=f\circ \phi$ Let's notice that $f\circ \phi$ is indeed in Range(F) $\phi:A\to B$, $f:B\to C$, then $f\circ \phi:A\to C$   Thus, we found that $f\circ \phi$ is the element that exists in Range(F) for every f in Dom(F). Q.E.D (???)

Let $\varphi: A\to B$ and define $F:C^B\to C^A$ such that $F(f)=f\circ\varphi$. Prove the following:  if $\varphi$ is surjective then $F$ is injective.  if $\varphi$ is injective then $F$ is surjective.    For both of them I realize that I should begin with assuming the condition on $\varphi$ is true and the condition for $F$ is false and then apply the composition in some way to get a contradiction but I have no idea how to begin...


Given some matrix A, $A \in \mathbb{R}^{nxn}$  Find all matrices B, $B \in \mathbb{R}^{n×n}$, such that  $AB =BA$  I found an interesting way to solve this problem, and I want to ask you all is this is a valid solution.  First define any infinite sequence of coefficients $\alpha_k$ where k is an integer such that $k\geq0$. Then write B as the following.   $ B = \sum_{k=0}^{\infty} \alpha_k A^k $  It is easy to prove that B will always commute with A.  $ AB =  A\sum_{k=0}^{\infty} \alpha_k A^k = \sum_{k=0}^{\infty} \alpha_k A^{k+1} = \sum_{k=0}^{\infty} \alpha_k A^k A = BA $  Can all matrices $B$ that commute with $A$ be represented in this way, or is this a special case that is not true of all matrices B that commute with A?

Given two square matrices $A,B$ with same dimension, what conditions will lead to this result? Or what result will this condition lead to? I thought this is a quite simple question, but I can find little information about it. Thanks.