Each user in my db is associated to a city (with it's longitude and latitude)  How would I go about finding out which cities are close to one another?  i.e. in England, Cambridge is fairly close to London.  So If I have a user who lives in Cambridge. Users close to them would be users living in close surrounding cities, such as London, Hertford etc.  Any ideas how I could go about this? And also, how would I define what is close? i.e. in the UK close would be much closer than if it were in the US as the US is far more spread out.   Ideas and suggestions. Also, do you know any services that provide this sort of functionality?  Thanks

I've got a working PHP script that gets Longitude and Latitude values and then inputs them into a MySQL query. I'd like to make it solely MySQL. Here's my current PHP Code:  if ($distance != "Any" && $customer_zip != "") { //get the great circle distance      //get the origin zip code info     $zip_sql = "SELECT * FROM zip_code WHERE zip_code = '$customer_zip'";     $result = mysql_query($zip_sql);     $row = mysql_fetch_array($result);     $origin_lat = $row['lat'];     $origin_lon = $row['lon'];      //get the range     $lat_range = $distance/69.172;     $lon_range = abs($distance/(cos($details[0]) * 69.172));     $min_lat = number_format($origin_lat - $lat_range, "4", ".", "");     $max_lat = number_format($origin_lat + $lat_range, "4", ".", "");     $min_lon = number_format($origin_lon - $lon_range, "4", ".", "");     $max_lon = number_format($origin_lon + $lon_range, "4", ".", "");     $sql .= "lat BETWEEN '$min_lat' AND '$max_lat' AND lon BETWEEN '$min_lon' AND '$max_lon' AND ";     }   Does anyone know how to make this entirely MySQL? I've browsed the Internet a bit but most of the literature on it is pretty confusing.


I'm trying to write a utility script errpipe with a simple api that runs stderr through a filter. At first I tried to implement it using bash's process substitution feature.  #!/bin/bash  com="$1" errpipe="$2"  $com 2> >(1>&2 $errpipe)   The problem with this is that the output looks strange when com does not exist.  If I type  sh-3.2$ ./errpipe foo cat   I get  sh-3.2$ ./errpipe foo cat sh-3.2$ ./errpipe: line 6: foo: command not found @   with @ representing the cursor. In other words, the shell prompt was printed too early. I suspect this is because the main shell script is not waiting for the process substitution process to complete. Throwing in a wait at the end of the script doesn't seem to fix the problem.  I'm open to a solution that uses bash, ksh, zsh or possibly some crazy awk feature. I think I know how to wire this together using something like C or Perl that exposes a richer API for manipulating processes and file descriptors, but I'd like to avoid using it unless there isn't an alternative.    One solution that "almost works" is to use the fact that $$ is not changed when the shell forks and to lob a signal at the parent when errpipe is finished.  #!/bin/bash  com="$1" errpipe="$2"  $com 2> >(1>&2 $errpipe; kill -SIGUSR1 $$)  while true; do     sleep 60 done   This fixes the original problem but a) is ugly and b) prints User defined signal 1: 30 before terminating even if I have a signal handler for SIGUSR1 and c) will loop forever if the process responsible for sending a SIGUSR to the parent dies somehow.

The   echo one; echo two > >(cat); echo three;    command gives unexpected output.  I read this:  and many other articles about process substitution on the internet, but don't understand why it behaves this way.  Expected output:  one two three   Real output:  prompt$ echo one; echo two > >(cat); echo three; one three prompt$ two   Also, this two commands should be equivalent from my point of view, but they don't:  ##### first command - the pipe is used. prompt$ seq 1 5 | cat 1 2 3 4 5 ##### second command - the process substitution and redirection are used. prompt$ seq 1 5 > >(cat) prompt$ 1 2 3 4 5   Why I think, they should be the same? Because, both connects the seq output to the cat input through the anonymous pipe - .  Question: Why it behaves this way? Where is my error? The comprehensive answer is desired (with explanation of how the bash does it under the hood).


How to prove that there a constant $C$ such that $\arcsin \frac{1-x}{1+x}+2\arctan\sqrt{x}=C$?  I have no idea using which theorem to prove. Could someone show me how to start the problem?

I want to prove that$$2 \arctan\sqrt{x} = \arcsin \frac{x-1}{x+1} + \frac{\pi}{2}, x\geq 0$$  I have started from the arcsin part and I tried to end to the arctan one but I failed.   Can anyone help me solve it?


I have a friend from Japan who wants a simple explanation.  Which is correct?  "These are their bags."    "This is their bags."

I have the following sentences.        This is our first arrival in the UK.   These are our first arrival in the UK.      I am not sure, which sentence is correct?


I am trying to test a method sendEmail. I would like to do a negative test on the method. I want to catch the IllegalStateException case. The sendemail method is in my ServiceClient class. In the test I am mocking serviceClient and apiClient the code for the method looks like this: public HttpStatus sendEmail(){         Supplier<HttpStatus> apiRequest = apiclient.post(command);         return retry(apiRequest).orElseThrow(() -> new IllegalStateException()); }  private <T> Optional<T> retry(Supplier<T> apiRequest) {     T result = apiRequest.get();     if (result != null) {       return Optional.of(result);     }     result = apiRequest.get();     if (result != null) {       return Optional.of(result);     }     return Optional.empty(); }   The test that I am trying to run looks like this   @Test   void sendEmailShouldThrowIllegalStateException() {      when(apiclient.post(any())         .thenReturn(null, null);          assertThrows(IllegalStateException.class,         () -> serviceClient         .sendEndpointRegistrationEmail());   }  I thought this would work because the mock method should return null which would trigger the exception, but it throws org.opentest4j.AssertionFailedError: Unexpected exception type thrown ==> expected: <java.lang.IllegalStateException> but was: <java.lang.NullPointerException>  Just to clarify the issue isn't that I'm getting a NPE. The issue is that the wrong exception is being thrown.

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 know that if a module is semisimple then its submodules and quotients are also semisimple modules. But converse of this is not true, I cannot prove it yet and I just need an example for at least I can imagine it more easily.

An $R$-module $M$ is said to be a semisimple module if it is a direct sum of its simple submodules.  I've proved the following equivalent characterization for semisimple modules:  $M$ is semisimple iff every submodules of $M$ is a direct summand.  From the above proposition we can easily show that every submodule and factor module of a semisimple module $M$ are alosa semisimple.But the converse is not always true.  I want to find a module $M$ whose proper submodules and nonzero factor modules are semisimple but $M$ is not semisimple.


I'm redirecting the stdout and stderr of a 3rd party process to a log file. I want to add markers to that log file, they disappear when I get the final file.  3rdParty-process &> log & <<3rdParty-process prints a lot to stdout>> echo "myMark" >> log cat log #my mark is here <<3rdParty-process prints a lot to stdout>> cat log #my mark is NOT here   Any ideas?

Consider a shell like Bash or sh. The basic difference between > and >> manifests itself in a case when the target file exists:   > truncates the file to zero size, then writes; >> doesn't truncate, it writes (appends) to the end of the file.   If the file does not exist it is created with zero size; then written to. This is true for both operators. It may seem the operators are equivalent when the target file doesn't yet exist.  Are they really?


I'm trying to align and re-sample environmental layers in QGIS (2.18.3). The layers I am using were obtained from the world clim data base Bio3,Bio18,Bio12,Bio10 as well as a Sheep and Cattle layer obtained from the FAO website. The World clim layers are at pixel size of 0.0416667,-0.0416667 and the two livestock layers are at a pixel size of 0.05,-0.05. Using the identify tool in QGIS I can see the ocean areas in this raster have a value of 0 for the livestock layers and a nodata value in the environmental layers (note my analysis is only interested on the land). I have been trying to use the raster align tool in QGIS so I can match these layers for some later Maxent analysis. I have used the following procedure in QGIS. Raster>Align Raster. Then I have been adding all the 6 layers, making the livestock layer the reference layers as it is of lower resolution. Checking the CRS value is at WGS 85, as well as adding coordinates to trim. This process occurs correctly, with pixel size matched. However my concern arises when I look at the trim and aligned rasters. Three raster Bio 10,12,18 all get a minimum value of -32768, were as Bio3 gets 43. When I used the identify tool again on the rasters Bio10,12,18 in the oceans show a value of -32768, whereas Bio3 give a value of 255 and the livestock layers are at 0.   Should the min and max values be matching in these layers if I am to compare between them?   Or are these values just proportional?

I am attempting to align and then merge a number of rasters of the same resolution and extent, but where the pixels are slightly misaligned (creating small gaps when merged). This works fine using the Align Rasters tool, except that the pixel values are not retained and instead given a value of something like -3.23879e+8. I mostly want to keep the nodata pixels. Is this possible?


The recommended pattern for correctly implementing IDisposable according to Microsoft is the following:  bool disposed = false; // Instantiate a SafeHandle instance. SafeHandle handle = new SafeFileHandle(IntPtr.Zero, true);  // Public implementation of Dispose pattern callable by consumers. public void Dispose() {    Dispose(true);   GC.SuppressFinalize(this);            }  // Protected implementation of Dispose pattern. protected virtual void Dispose(bool disposing) {   if (disposed)      return;     if (disposing) {      handle.Dispose();      // Free any other managed objects here.      //   }    disposed = true; }   I think this is is unnecessary. The only time when you should be used is if you have unmanaged resources. Microsoft even included this pattern in the Visual Studio code templates. My main problem is that it generates a whole lot of noisy and unnecessary code. First of all, GC.SuppressFinalize(this); does nothing if there is no unmanaged code (). Secondly, the following is equivalent in 2 lines instead of 15+, as well as a member variable to keep track of:  public void Dispose() {   handle?.Dispose();   handle = null; }   Thoughts?

I know from reading  that the "primary" use of the IDisposable interface is to clean up unmanaged resources.  To me, "unmanaged" means things like database connections, sockets, window handles, etc.  But, I've seen code where the Dispose() method is implemented to free managed resources, which seems redundant to me, since the garbage collector should take care of that for you.  For example:  public class MyCollection : IDisposable {     private List<String> _theList = new List<String>();     private Dictionary<String, Point> _theDict = new Dictionary<String, Point>();      // Die, clear it up! (free unmanaged resources)     public void Dispose()     {         _theList.clear();         _theDict.clear();         _theList = null;         _theDict = null;     }   My question is, does this make the garbage collector free memory used by MyCollection any faster than it normally would?  edit:  So far people have posted some good examples of using IDisposable to clean up unmanaged resources such as database connections and bitmaps.  But suppose that _theList in the above code contained a million strings, and you wanted to free that memory now, rather than waiting for the garbage collector.  Would the above code accomplish that?


Is there a way to prevent some apps from accessing to internet when wi-fi or mobile data is on?

In Android, is it possible to block apps from accessing the Internet? Many apps will often connect to remote servers in the background, including Google's own apps or system services. Over time this can eat away at a user's data limit set by a mobile carrier. Does Android allow an app to act as a firewall whereby the user can select which apps have access to the Internet? Or does the device have to be rooted to have that ability?


I would like to install another OS besides Ubuntu for this I need to have some space but I cannot find how to unallocate space how to do it.

I've got Ubuntu 10.10 installed to use my whole hard-disk, but would like to use the 130GB of free space I've got to create a new partition and do some development on Unity and Natty.  Can I use gparted to do this?  If so how?


I have a class named Foo with static deque of pointers:  Foo.h:  class Foo : public Base { public:     static std::deque <Aircraft*> aircrafts;     void updateAircrafts(); ... }   Foo.cpp:  #include "Foo.h" void Foo::updateAircrafts() {     for (int i = 0; i < Foo::aircrafts.size(); i++) {     ...     } }   When I'm compiling, I get the following error:     Error LNK2001 unresolved external symbol "private: static class std::deque > Foo::aircrafts" (?aircrafts@Foo@@0V?$deque@PEAVAircraft@@V?$allocator@PEAVAircraft@@@std@@@std@@A)   QtGuiApplication1   C:\Users\a_kadirov\source\repos\QtGuiApplication1\Foo.obj   1   and     Error LNK1120 1 unresolved externals  QtGuiApplication1   C:\Users\a_kadirov\source\repos\QtGuiApplication1\x64\Debug\QtGuiApplication1.exe   1   Where could be the problem?   I also need to access deque from outside the class, so it must be accessible to other classes. So moving static deque declaration to .cpp file may not work.

Very simply put:  I have a class that consists mostly of static public members, so I can group similar functions together that still have to be called from other classes/functions.  Anyway, I have defined two static unsigned char variables in my class public scope, when I try to modify these values in the same class' constructor, I am getting an "unresolved external symbol" error at compilation.  class test  { public:     static unsigned char X;     static unsigned char Y;      ...      test(); };  test::test()  {     X = 1;     Y = 2; }   I'm new to C++ so go easy on me. Why can't I do this?


I've looked at differential equations, but nothing past what you would learn in Calculus I and II (slope fields, separation of variables, etc.). Is there a good book out there which provides a comprehensive introduction while not being too superficial? I checked out some other questions like this one and found Differential Equations With Applications and Historical Notes, which looks very cool, but I just want to make sure it is the best one to get before I get it. Thanks!!

I know this is a subjective question, but  I need some opinions on a very good book for learning differential equations.   Ideally it should have a variety of problems with worked solutions and be easy to read.   Thanks


I want the minimize, maximize and close buttons on windows to be on the right side. I've been looking for a way to solve this problem, but answers on some older questions didn't work for me.

Downloaded Ubuntu tweak and set window controls to the right side. Only some programs follow the rule. Pidgin as an example has window controls on the right. But Chrome, Thunderbird, Geany, still have controls on the left.  How can I move ALL window controls(close/min/max) to the right (or left)?


I have tried to reduce the left margins with the package geometry:  \usepackage[scale=0.90, top=0.5cm, bottom=1cm]{geometry} but cannot shrink the column where we have the dates in the experience section. I'm new with LaTeX and cannot find a proper solution?  \documentclass[11pt,a4paper,sans]{moderncv}    \moderncvstyle{classic}  \moderncvcolor{orange}     \usepackage[utf8]{inputenc}  \usepackage[T1]{fontenc} \usepackage{xcolor} \usepackage{color} \usepackage{lmodern} \usepackage{enumitem} \usepackage{eurosym} %\usepackage[super]{nth} \usepackage[scale=0.90, top=0.5cm, bottom=1cm]{geometry} %If you want to change the page margins, you simply need to change this line  \setlength{\hintscolumnwidth}{2.5cm}   \name{David}{Doe} %\title{Audit, Risk and Compliance\newline{}PMP®, ITIL, CRISC}  \title{PMP®, ITIL, CRISC}  %\address{}{}{} \phone[mobile]{+XXXXXXXX}  \email{emil.com}   \social[linkedin][WWWWW]{ZZZZ} \photo[80pt][0pt]{David_linkedn}    \renewcommand{\cventry}[7][.25em]{%   \cvitem[#1]{#2}{%     {\bfseries#3}%     \ifthenelse{\equal{#4}{}}{}{, {\slshape#4}}%     \ifthenelse{\equal{#5}{}}{}{, #5}%     \ifthenelse{\equal{#6}{}}{}{, #6}%     .\strut%     \newline{\small\strut #7 \par}}}  \renewcommand{\cvitem}[3][.25em]{%   \begin{mycvlist}     \item[#2] #3     \end{mycvlist}     \addvspace{#1}}  \newlist{mycvlist}{description}{1} \setlist[mycvlist]{labelwidth=\hintscolumnwidth,labelsep=\separatorcolumnwidth,leftmargin=!,align=right,font=\normalfont}  \usepackage{lipsum} %Just for dummy text  %\title{Resum\'e title}    %---------------------------------------------------------------------------------- %            content %----------------------------------------------------------------------------------  \begin{document}  \makecvtitle \section{Professional Statement }  ddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd   \begin{itemize}     \item  \begin{center} item1 \end{center}     \item  \begin{center} item2 \end{center}     \item  \begin{center} item2 \end{center} \end{itemize} %I'm seeking new challenge and opportunity to leverage that experience in a Global Pharmaceutical Company.     \section{Experience}  \cventry{Since \linebreak March 2019}{ DDDDDDDDDDDDDDDDDD}{\href{http://www.DDD.com//}{DDDDDA}}{SSSSS}{}{LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL  Main achievements:% \begin{itemize}%     \item \textit {\textbf{GGGGGGGGGGGGGGGGGGGGGGGGGGGGggg }} \begin{itemize}%   \item \textbf{Key Highlight}: GGGGGGGGGGGGGGGGGGGGGGGGGGgggg   \item \textbf{Purpose}: GGGGGGGGGGGGGGGGGGGGGGGGGGGGGGG   \item \textbf{Results}:     \begin{itemize}     \item KKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKK     \item GGGGGGGGGGGGGGGGGGGGGGGGGGGgg     \item GGGGGGGGGGGGGGGGGGGGGGGGgggg     \end{itemize}   \end{itemize}

I am creating my resume in moderncv style format.   I wanted to enter a period like (eg: 05/2017--09/2017), and should be in a straight line.   But with the code \cventry{05/2017--09/2017} I am getting it like the image below.    I tried to use \setlength{\hintscolumnwidth}{0.25\textwidth} but, then my contents on the right are also moving.  Could some one suggest how I can get my month and year typed in a straight line.


I'm using Windows 8.1 x64, and I'm trying a legacy app.  I get an error message complaining that the program is not compatible with x64.  Is there a way to force a program to run on 32-bit mode on a 64-bit system?  Here are some screenshots, that might shed a light on what type of program this is:  I run the program pointed to by the arrow, and the message show up one after the other (when clicking OK):

Why is it that:   a 32-bit OS, when installed on a 64-bit CPU, can run old 16-bit applications,  but if you install a 64-bit OS it can't run those applications directly and need some sort of emulation (that doesn't always work perfectly)?     To be more specific, I have an 64-bit processor (Intel Core 2 Duo). When I had Windows XP and Windows 7 (both 32-bit) installed, they could run old DOS and 616-bit Windows applications.   Now I have installed the 64-bit edition of Windows 7. Why can't it run those same applications anymore?


I have a render target RenderTargetScene that holds my scene texture with the scene's depth buffer              rtScene = new RenderTarget2D(             graphicsDevice,             graphicsDevice.PresentationParameters.BackBufferWidth,             graphicsDevice.PresentationParameters.BackBufferHeight,             false,             SurfaceFormat.Rgba64,             DepthFormat.Depth24Stencil8, // Requires a depth format for objects               // to be drawn correctly (e.g. wireframe model surrounding model)             0,             RenderTargetUsage.PreserveContents             );   If I attempt to copy the render target contents to another render target using the following code          game.GraphicsDevice.SetRenderTargets(sceneCopy);          game.GraphicsDevice.Clear(ClearOptions.Target, Color.Transparent, 0f, 0);         //game.GraphicsDevice.Clear(Color.Transparent);          game.SpriteBatch.Begin(             SpriteSortMode.Immediate,             BlendState.Opaque,             SamplerState.PointClamp,             DepthStencilState.Default,             RasterizerState.CullCounterClockwise             );          game.SpriteBatch.Draw(game.RenderTargetScene,              new Rectangle(0, 0, sceneCopy.Width, sceneCopy.Height), Color.White);          game.SpriteBatch.End();   Then the texture is copied across but the depth buffer appears to be lost.  This is apparent when using DepthStencilState.DepthRead as there is no depth for the objects drawn with that render state to read.  How can I make sure the depth buffer is copied across too?  EDIT:  I have a depth texture created via my deferred rendering system so I thought I would use that.  I'm now drawing a full screen quadrangle using a depth writing shader      public void RestoreDepthBuffer(Texture2D depthTexture)     {         // Set the render states         game.GraphicsDevice.BlendState = BlendState.Opaque;         game.GraphicsDevice.DepthStencilState = DepthStencilState.Default;         game.GraphicsDevice.RasterizerState = RasterizerState.CullCounterClockwise;         game.GraphicsDevice.SamplerStates[0] = SamplerState.PointClamp;          Effect effect = restoreDepthBuffer;          effect.CurrentTechnique = effect.Techniques["Default"];          effect.Parameters["DepthTexture"].SetValue(depthTexture);          effect.CurrentTechnique.Passes[0].Apply();          game.GraphicsDevice.DrawUserIndexedPrimitives<VertexPositionTexture>(             PrimitiveType.TriangleStrip,             NearPlaneVerticesVPT,             0,             4,             Indices,             0,             2             );     }   The important parts of the shader look like  struct PixelShaderOutput {    float4 Colour                        : COLOR0;    float Depth                          : DEPTH; };  PixelShaderOutput PixelShaderFunction(VertexShaderOutput input) {     PixelShaderOutput output;      output.Colour = float4(0, 0, 0, 0);     output.Depth = 1.0f - tex2D(DepthSampler, input.TextureCoordinates).r;      return output; }   This is still not working though.  EDIT2:  I've got it to work but I have to set the depth and draw all the objects when the RenderTarget is first set and not unset it again.  Should I post an answer based on my working method?

When I use this RenderTarget:  renderTarget = new RenderTarget2D(GraphicsDevice, GraphicsDevice.Viewport.Width,     GraphicsDevice.Viewport.Height, false, SurfaceFormat.Color, DepthFormat.Depth24);   and draw something to it:  graphicsDevice.SetRenderTarget(renderTarget); // some drawing code here graphicsDevice.SetRenderTarget(null);   and then when I want to continue with drawing depth buffer seams to be clean. Why? Is possible to save it for future use?


They sent over a gift, or     They sent a gift.        Come over to our house, or     Come to our house.   Is it not possible to make the meaning clear without using over in the sentence?

I'm not a native English speaker. I am having difficulty with some words. Could anyone please tell me if there's any difference between the above mentioned short sentences, as I'm a little confused.


Creating config file /etc/php/7.0/cli/php.ini with new version Setting up php7.0-fpm (7.0.8-0ubuntu0.16.04.3) ... Not replacing deleted config file /etc/php/7.0/fpm/php.ini insserv: warning: script 'K01jira' missing LSB tags and overrides insserv: warning: script 'nagios' missing LSB tags and overrides insserv: warning: script 'jira' missing LSB tags and overrides Job for php7.0-fpm.service failed because the control process exited with error code. See "systemctl status php7.0-fpm.service" and "journalctl -xe" for details. invoke-rc.d: initscript php7.0-fpm, action "start" failed. dpkg: error processing package php7.0-fpm (--configure):  subprocess installed post-installation script returned error exit status 1 dpkg: dependency problems prevent configuration of php7.0:  php7.0 depends on php7.0-fpm | libapache2-mod-php7.0 | php7.0-cgi; however:   Package php7.0-fpm is not configured yet.   Package libapache2-mod-php7.0 is not installed.   Package php7.0-cgi is not installed.  dpkg: error processing package php7.0 (--configure):  dependency problems - leaving unconfigured dpkg: dependency problems prevent configuration of php:  php depends on php7.0; however:   Package php7.0 is not configured yet.  dpkg: error processing package php (--configure):  dependency problems - leaving unconfigured No apport report written because the error message indicates it's a follow-up error from a previous failure.     No apport report written because the error message indicates it's a follow-up error from a previous failure.         Errors were encountered while processing:  php7.0-fpm  php7.0  php E: Sub-process /usr/bin/dpkg returned an error code (1)   I just upgraded from Ubuntu 14.04 to 16.04. Before doing so we completely removed mysql and php with the mindset of installing the new version afterward.  We installed a fresh apache and mysql server with zero issue. But when it comes to php we keep getting stuck with the above warning.  The guide we just followed was   How to resolve this issue and install php?

linux-image-server depends on linux-image-3.2.0-39-generic; however:   Package linux-image-3.2.0-39-generic is not installed. dpkg: error processing linux-image-server (--configure):   dependency problems - leaving unconfigured No apport report written because the error message indicates its a followup error from a previous failure. dpkg: dependency problems prevent configuration of linux-server: linux-server depends on linux-image-server (= 3.2.0.39.47); however:   Package linux-image-server is not configured yet. linux-server depends on linux-headers-server (= 3.2.0.39.47); however:   Version of linux-headers-server on system is 3.2.0.40.48. dpkg: error processing linux-server (--configure):  dependency problems - leaving unconfigured No apport report written because the error message indicates its a followup error from a previous failure.  Errors were encountered while processing:  linux-image-server linux-server  E: Sub-process /usr/bin/dpkg returned an error code (1)     I don't know how to fix this issue. Plz help me. ><


I have an existing PPA for a Qt-based application that dates back to xenial that I recently updated to support bionic.  I did this by just checking in all the changes required for bionic (in particular a switch from a third-party Qt PPA to the distro-provided Qt since that the version in the distro is sufficient in bionic) as an update to the launchpad project using bzr, thus abandoning the older version.   At risk of stating the obvious, to disambiguate the question, my package depends on (and lists as dependencies) the packages of the Qt components that the software uses. In practice this is so that required libraries are installed automatically when the user installs the package from my PPA. In principle I could create a package that did not explicitly depend on anything and the user could manually install the required libraries, but that would defeat the purpose of using a PPA. The third party Qt PPA used in the xenial version of my package uses different package names and versions than the distro-provided Qt from bionic, so the dependency lists must be different; the package cannot simply be copied to support both distros, and redeploying the package to the other distro with the same control file contents will not work.  In principle packages for different Ubuntu versions could need to be maintained in parallel; what is the right way to do that from the packaging, launchpad, and PPA infrastructure? The  field in debian/changelog allows multiple values, but I don't see a way vary the control settings for each.

(quote from chat)     Got a PPA on launchpad for source packages for an IRC bot project I'm associated with (since its all the intermediate packaging for the stuff between releases, it's classified as an "experimental" PPA). Question: I've already packaged the stuff for a lucid build. Any clue how I'd be able to create the same packaging, except package it for maverick, and put it up to the same PPA that I've put the lucid packaging to?


How do I prove that $6 \mid n^3 - n$ for all $n \ge 1$?  I'm having difficulty understanding this problem. All help is greatly appreciated.

As homework, I have to prove that     $\forall n \in \mathbb{N}: n^3-n$ is divisible by 6   I used induction  1) basis: $A(0): 0^3-0 = 6x$ , $x \in \mathbb{N}_0$ // the 6x states that the result is a multiple of 6, right?  2) requirement: $A(n):n^3-n=6x$  3) statement: $A(n+1): (n+1)^3-(n+1)=6x$  4) step: $n^3-n+(n+1)^3-n=6x+(n+1)^3-n$  So when I resolve that I do get the equation: $n^3-n=6x$ so the statement is true for $\forall n \in \mathbb{N}$  Did I do something wrong or is it that simple?


When there isn't a ground wire, is it okay to ground to the neutral on a outlet ?  There is no ground wires to my outlets.

I have a 3 wire outlet with the entrances for hot, neutral and ground. But I know that the ground entrance is not really grounded, so in effect useless. Now, since the neutral is grounded, could I connect the ground entrance with the neutral therefore "grounding" the ground? What would be the problem with that?


A $5$ kg and a $10$ kg box are touching each other. A $45N$ horizontal force is applied to the $5$kg box in order to accelerate both boxes across the floor. Ignore friction forces and determine the force between the hand and the boxes.  Considering the body as a single mass, we can find the acceleration of the body as $3\ \mathrm{ms}^{-2}$. The force between the blocks can similarly be found as $30\ \mathrm{N}$. But coming to the question, I cannot be sure as to whether to take the two blocks as a single body. If I do so, then as per my understanding of Newton's Third Law, the hand should experience a force of $-45\ \mathrm{N}$. Now, despite my hand experiencing an equal force in the opposite direction, I am able to keep contact with the block and continue pushing the 2 blocks over a distance (say $d$). Could someone please help me by explaining why this is so? Thanks a lot! (This is not an original question. I had come across it 'the Physics Classroom'  and thought of this variant.)

Given Newton's third law, why is there motion at all? Should not all forces even themselves out, so nothing moves at all? When I push a table using my finger, the table applies the same force onto my finger like my finger does on the table just with an opposing direction, nothing happens except that I feel the opposing force. But why can I push a box on a table by applying force ($F=ma$) on one side, obviously outbalancing the force the box has on my finger and at the same time outbalancing the friction the box has on the table? I obviously have the greater mass and acceleration as for example the matchbox on the table and thusly I can move it, but shouldn't the third law prevent that from even happening? Shouldn't the matchbox just accommodate to said force and applying the same force to me in opposing direction?


So I am trying to make my glasses, the lenses have a mirror coat. The problem is when I add a material, as we see on the right lens, is that we ca see the triangle shading happening. The lens are not completely flat, they are a tiny bit round.

When I create a UV sphere and add the subdivision surface modifier, the following wrinkle appears.    How can I avoid it?  I've read the article  but there seems to be no clear solution.  UPDATE 1  I've used the word 'apply' in the first sentence of the initial version of this question. It's misleading since I want to preserve the modifier without 'applying' it. Rather, what I meant is 'adding' the modifier.  UPDATE 2  I followed josh sanfelici's solution, but still there is an artifact at the pole.  Here is the screen: (A rendered view with a sun lamp)    Maybe it's the limitation of the general-purpose subdivision modifier.  BTW, when the cast modifier is added after the subdivision modifier, the sphere becomes perfect (even for my original wrinkled sphere).  But since I want to edit the resulting sphere (for example, scaling X, Y, etc) while modifier is added but not applied, it's not usable.


I am learning Javascript with codecademy, and I was doing some comparisons, and for my code I did:  `console.log(1 == 2)`   and it returned False.  I also did:  `console.log(2*2 === 3)`   and that also returned False. To check that I have not made a mistake, I did:  `console.log(1 == 1)`   and that returned True The instructions tell me that === means equal to.  Are there any problems with using == instead of ===? And, which is better to use and why?  Thanks for any help you can give me!

I'm using  to go through JavaScript, and it's returning many suggestions to replace == (two equals signs) with === (three equals signs) when doing things like comparing idSele_UNVEHtype.value.length == 0 inside of an if statement.  Is there a performance benefit to replacing == with ===?   Any performance improvement would be welcomed as many comparison operators exist.  If no type conversion takes place, would there be a performance gain over ==?


If a ring is a UFD, its irreducible elements are exactly its prime elements.      Show that the reverse is not true. Give a nontrivial counterexample.      Hint: Consider the ring $\mathbb{Z} + X\, \mathbb{Q}[X]$.   Note: in the following solution "denominator" of a rational number always means the denominator of its fraction simplified to lowest terms.  Let $R:= \mathbb{Z} + X\, \mathbb{Q}[X]$, whose only units  are $R^\times = \{+1, -1\}$.   We show that if $a$ is reducible in $\mathbb{Q}[X]$, which means that $a = q r$ with $\deg(q), \deg(r) \ge 1$, then it is reducible in $R$.   \begin{equation*}    a(X) = \Bigl(\sum_{i=1}^{m} q_i X^i\Bigr) \cdot \Bigl(\sum_{j=1}^{n} r_j X^j\Bigr) \quad \text{with $m, n \ge 1$}\, .  \end{equation*}  Since $q_0 r_0 = a_0 \in \mathbb{Z}$, there is an $c \in\mathbb{Q}$ with $c q_0, \frac{r_0}{c} \in \mathbb{Z}$. To be more precise $c = \frac{\text{Denominator of $q_0$}}{\text{Denominator of $r_0$}}$.  Then \begin{equation*}   a(X) =  \Bigl(\sum_{i=1}^{m} c q_i X^i\Bigr) \cdot \Bigl(\sum_{j=1}^{n} \frac{r_j}{c} X^j\Bigr) \, , \end{equation*} so $q, r \in R$ and not units, so $a$ is reducible in $R$.  Let $a, b, p \in R$ with $p$ irreducible and $p \mid a b$. Now we look at the problem in $\mathbb{Q}[X]$. As shown, $p$ cannot be reducible $\mathbb{Q}[X]$, so it must be a unit or irreducible.  We first treat the case that it is irreducible in $\mathbb{Q}[X]$. Since we are now in an UFD if $p \mid a b$ it follows that $p \mid a$ or $p \mid b$.  Assume without loss of generality that $p \mid a$. So there is an $u\in\mathbb{Q}[X]$ with $p u =a$. It follows that $p_0 \cdot u_0 = a_0 \in \mathbb{Z}$. If $u_0 \not\in \mathbb{Z}$, there is $c \in \mathbb{Z}$ (the denominator of $u_0$) for which $\frac{p_0}{c}\in\mathbb{Z}$ and so $\frac{p}{c}\in R$, which contradicts the assumption that $p$ is irreducible in $R$. But if $u_0 \in \mathbb{Z}$, also $u\in R$ and we have in $R$ (!) that $p$ divides $a$.  Now we treat the case that $p$ is a unit in $\mathbb{Q}[X]$. Since $(\mathbb{Q}[X])^\times = \mathbb{Q}\setminus\{0\}$ and $R \cap \mathbb{Q} = \mathbb{Z}$, it follows that $p\in\mathbb{Z}$ and since $p$ is irreducible, it has to be a prime number. If $p\mid ab$, it follows that $p_0 \mid a_0 b_0$ (again with $a_0, b_0\in \mathbb{Z}$), so $p_0\mid a_0$ or $p_0\mid b_0$ and therefore $p \mid a$ or $p \mid b$.  We have proven that all irreducible elements of $R$ are prime.   But $R$ is not an UFD, for example  $$\frac{X^2}{6} = \frac{X}{2} \cdot \frac{X}{3} = \frac{X}{6}\cdot X \, .$$  Can somebody have a look if this solution is ok? I think the solution seems far too complicated. Either I've missed something obvious or there is a theorem which would make it much easier.  PS: What would be a trivial counterexample?

Let $R = \mathbb{Z} + x\mathbb{Q}[x] \subset \mathbb{Q}[x]$. Find the irreducibles of $R$. Show that the irreducible elements in $R$ are $\pm p$ for prime integers $p$ and the irreducible polynomials $p(x) \in \mathbb{Q}[x]$ whose constant coefficient is $\pm 1$. Prove these irreducibles are prime in $R$.  The first part is pretty clear. ($\pm p$ for prime integers $p$), if $\alpha \in R$ s.t. $\deg(\alpha)=0$ then $\alpha$ is a constant polynomial thus in $\mathbb{Z}$. If $\alpha$ is a prime then it is irreducible. Having trouble showing that for $p(x) \in R$ s.t. $\deg(p(x)) > 0$ with constant term $\pm 1$ are irreducible.


When the dwarves and Bilbo arrived at Lonely Mountain, they went to the top to seek the open key hole to enter. When Smaug first conquered the mountain, he blew up the entrance gate... why didn't Bilbo and the dwarves just enter by the front entranceway instead of climbing?

Please bear with me as I've never read any of the LOTR books or the Hobbit, only seen the movies so far...  But when the sunlight fades and the dwarves think they've lost their only chance to enter Erebor using the secret passage and the key, they turn around to head home. Why is it that the dwarves would be unable to enter Erebor the way they did years ago, using regular doors to get inside? I'm assuming that's how they entered Erebor years ago?


Let $f \in H(\Omega)$, where $\Omega \subset \mathbb{C}$ open.  Suppose that for all $z_0 \in \Omega$ the Taylor series associated to $f$ $$\sum_{n=0}^\infty a_n(z-z_0)^n$$ has one null coefficient $a_N$. How do I prove that $f$ is then a polynomial (without applying Baire's category theorem)?

Let $f:\mathbb{C}\rightarrow\mathbb{C}$ be an entire function. And assume that at each point, one of it's derivatives vanishes.  What can you say about $f$?  A hint suggests that $f$ must be a polynomial.


My approach with partial integration: $$\int_{0}^{1} f(x) x^2 dx = \frac{f(1)}{3} - \int_{0}^{1} f'(x) x^2 dx = \frac{f(c)}{3}$$ By mean value theorems, there exists $d \in [0, 1]$ such that: $$\int_{0}^{1} f'(x) x^2 dx = f'(d) \cdot d^2$$ Hence: $$\frac{f(1)}{3} - f'(d) \cdot d^2 = \frac{f(c)}{3}$$ This is where I can not go further. If $d$ is a maximal or a minimal of $f$ in $(0, 1)$, then $f(1) = f(c)$ but $c$ can not be equal $0$ or $1$.

My approach was to start by integration by parts. $$\int_{0}^{1}f(x)x^2 dx = \frac{1}{3}(f(1) - \int_{0}^{1} f'(x)x^3 dx)$$ Now if I can bound $(f(1) - \int_{0}^{1} f'(x)x^3 dx)$ by $f(0)$ and $f(1)$ then we can use the intermediate value theorem and write it as some $f(c)$.   But this doesn't work. Can someone provide some hints?


Is there a way to save a webpage as static HTML, available for offline viewing, editing etc.?  I want to remove all JavaScript files. Leave only HTML, CSS and images.  For example, if this web page has a Facebook Like button, I want the image of the button to be part of the HTML as a regular image (and not be loaded as some JavaScript code runs after I load the page).  I'm trying to prepare a webpage for an offline demo. When I use the standard "save as HTML complete" like tools, all the JavaScript is saved as well, and when viewed offline, all the dynamic content is blanks.  Note- I don't expect the dynamic content to work, of course, with no JavaScript. I just want the web page to LOOK as though it was just loaded from the interwebs.

How can I download all pages from a website?  Any platform is fine.


As in the title:  Prove $\sqrt{n+1} - \sqrt{n} \to 0$ as $n \to \infty$  It seems so simple, but I can't seem to do it without ending up in circular reasoning.

Let $\ a_n=\sqrt{n+1}-\sqrt{n}$. I have to show that $\lim_{n\to \infty}a_{n}=0$.     How should I start? Do I have to use any theorem?


Just check out the file attached to this link  to understand the situation

Recently I have installed an older version of Ubuntu on my old machine. Whenever I try to install any software, I get an error saying it couldn't be found:  $ sudo apt-get install vlc Reading package lists... Done                Building dependency tree        Reading state information... Done     E: Couldn't find package vlc


Not really sure if I should be asking this here and I know I certainly don't have enough information for the community's help but I am going to let it fly.   I have a Lenovo v570 laptop, plenty of performance for Linux but I cannot get Ubuntu to install. I have an existing install of Windows 7 Pro from the OEM disc. My goal is to install Linux on the D drive and the OEM partition. I tried to modify those partitions using the installer repartition tool and that seemed to work but still failed to install. Here is the makeup of my drive.   .   I wold like to have the option to dual boot the computer in either the Linux or Windows environment. My preferred distribution is Ubuntu and I tried to install the 12.04.3 version but received the following Installation Failed message box during the installation:   The installer encountered an error copying files to the hard disk:  [Errno 5] Input/output error  This is often due to a faulty CD/DVD disk or drive, or a faulty hard disk. It  may help to clean the CD/DVD, to burn the CD/DVD at a lower speed, to clean  the CD/DVD drive lens (cleaning kits are often available from electronics  suppliers), to check whether the hard disk is old and in need of replacement, or  to move the system to a cooler environment.    to the instructions I used from the Ubuntu site to find the USB ISO creator. I downloaded and used the  to create the LiveUSB flash drive. The software will boot into a LiveCD as well as a LiveUSB flash drive.   I then tried 12.04.4 and then Linux Mint 16 and get the same response. Even occurs when I tried installing it in a Virtualbox. EDIT: I was able to install 13.10 on the Virtual Box.  I was however able in install Zorin OS 6 LTS which makes me wonder what am I doing differently with Zorin 6 that I'm not doing with Ubuntu.  I hate to ask this question but I am so new to Linux (5 days) I have no clue what to do. Any ideas why I seeing this issue?

I would like to see a full how-to guide on how to install Ubuntu.


I have a plane ticket arriving at Heathrow (Air Canada, so T2) at 11:05, and a LNER ticket from Kings Cross at 14:00. (I also have a ticket for the 16:00 service, just in case, but that gets in very late so I’d rather not.) How likely am I to make my connection, and what can I do to maximize my chances? Some details:  I’m young, traveling alone, and generally fairly comfortable with public transit. That being said, Air Canada decided to reschedule me onto an 8 hour layover, so I might be fairly tired if I can’t sleep on my flight. I’ll have one suitcase and a small backpack. I’m a USA citizen, so I should be able to use the e-gates at immigration. This is happening in a few weeks, i.e. COVID will be a thing.  Some specific things I’m wondering about:  How long does it typically take from the plane landing to getting off the plane, getting through immigration, and luggage showing up on the baggage claim? (I might be able to have my bag as a carry on—not sure.) Heathrow Express + Circle looks faster than the Piccadilly, but more expensive and more of a hassle. Should I bother?  TfL rail?   How much time do I need to get from Tube platform to mainline platform at Kings Cross? How close to the departure time can I get to the platform and make it onto the train?

My wife and I will be arriving in London via Heathrow Airport (LHR) and are staying at a hotel near King's Cross station. So, we were wondering what the best (which means fastest but also easiest when carrying two large pieces of luggage and two carry-ons) way to get from LHR to King's Cross?  I gather that, with only one changeover, we can take the Tube. However, in the interest of other passengers, we thought it would be best to take a taxi, or maybe a bus?  Thoughts?


I don´t have in field calculator "selected function help".

I haven't found a similar question that already has an answer so I hope I can get one... Please forgive me if the answer is obvious. I'm using QGIS version 2.14.0-Essen on my macbook pro with OSX Yosemite 10.10.5. I am trying the simplest select features using an expression  Here is the window I get:  I right-click the field (e.g. here "DIVISION") and select say Load all unique values but nothing happens. I can check layer values beforehand and enter the correct value and it works (e.g. "DIVISION"='CENTRAL') but it's cumbersome.  So my question is: How can I get this unique values window to show?


So a baseline Barbarian in D&D 5e gets Fast Movement at 5th level (Player's Handbook, p. 49):  your speed increases by 10 feet while you aren't wearing heavy armor.  The Storm Herald Barbarian subclass gets a feature at 6th level that can grant you a new, non-walking, movement speed if you pick the Sea environment ability (Xanathar's Guide to Everything, p. 10, emphasis mine):  Sea You gain resistance to lightning damage, and you can breathe underwater. You also gain a swimming speed of 30 feet.  Does the Fast Movement feature interact with this swim speed for an overall swimming speed of 40 feet? Does Fast Movement in general interact with non-walking speeds? If so, would it apply to a swim or climb speed granted through a different method, like a spell or magic item?

A monk's Unarmored Movement class feature increases the monks speed by 10 feet at level 2, and further at higher levels. According to , this stacks with an Aarakocra monk's fly speed, because that fly speed is innate to the race. However, how does this interact with fly speeds gained from other sources, such as the Fly spell? That spell specifically states that "the target gains a flying speed of 60 feet for the duration." Can this gained flying speed then be improved by a monk's Unarmored Movement, giving a level 2 monk a flying speed of 70 feet while the Fly spell is active on them?


As I was working my way through my book about statistics, I came across the topic of linear regression. During the chapter the author begins with explaining that you want to minimize the residuals in order to make your y = a + bx as good a fit as possible: I do understand this, but halfway the chapter all of a sudden the residuals change into sum squares of residuals. Why is this done? I have been googling, but couldn't find the right answer. Who would like to help me understand why the sums of squares of the residuals is used instead of just the sums of residuals?  Kind regards, Bas

Why are we using the squared residuals instead of the absolute residuals in OLS estimation?  My idea was that we use the square of the error values, so that residuals below the fitted line (which are then negative), would still have to be able to be added up to the positive errors. Otherwise, we could have an error of 0 simply because a huge positive error could cancel with a huge negative error.  So why do we square it, instead of just taking the absolute value? Is that because of the extra penalty for higher errors (instead of 2 being 2 times the error of 1, it is 4 times the error of 1 when we square it).


I've uninstalled the driver for the onboard keyboard, because it keys in random keys, but everytime I restart it reinstalls the onboard keyboard drivers. I've tried renaming the keyboard driver in the Windows folder, but I can't; it says I need from permission from TrustedInstaller. And I can't access the group policy because mine is the standard that doesn't have gpedit.msc. How can I prevent it from reinstalling the driver?    OS: Windows 8 Laptop model: Acer v3 772g

I have a HP Compaq Presario C700 laptop with Windows 7 installed on it.  My laptop's keyboard is not working properly; some keys never work and some keys will keep on pressing. I've formatted the OS but it didn't solve my problem.  I bought an external USB keyboard and it works well. As some keys in the built-in keyboard activate themselves, I still couldn't work effectively.  After searching Google I tried the following steps to disable the built-in keyboard:   Disabled keyboard drivers: This didn't work because when the system reboots, the driver gets installed again automatically. Installed irrelevant driver for keyboard: This failed - I couldn't install the driver. After rebooting it installed the correct driver automatically.   Can anyone help explain how I can temporarily uninstall my built-in keyboard? I don't want to remove it manually (removing the hardware cable).


I have an older server that still has Ubuntu 7.10, is there a way that I could update this since it is no longer supported?  lsb_release -a gives:  Distributor ID: Ubuntu Description:    Ubuntu 7.10 Release:        7.10 Codename:       gutsy   I did the following instructions from here and they don't work for me:  :  sudo sed -i -e 's/archive.ubuntu.com\|security.ubuntu.com/old-releases.ubuntu.com/g' /etc/apt/sources.list   then updated with  sudo apt-get update && sudo apt-get dist-upgrade   and then:  do-release-upgrade   and i get this error:  Checking for a new ubuntu release Failed Upgrade tool signature Failed Upgrade tool Done downloading extracting '/tmp/tmp8S5pl1/hardy.tar.gz' Failed to extract Extracting the upgrade failed. There may be a problem with the network or with the server.


Okay so I read Richard Rusczyk's AoPS Volume 2 Book, and I stumbled upon the part where he informs very briefly that $\lim_{n \rightarrow \infty} \left(1+\frac{1}{n}\right)^n=e$. But he doesn't really provide a rigorous proof as to why that's true (not criticizing him or anything).. It would really help if someone could provide me with the simplest proof possible as to why $\lim_{n \rightarrow \infty} \left(1+\frac{1}{n}\right)^n=e$. Thank you in advance!

I was wondering if it is possible to get a link to a rigorous proof that  $$\displaystyle \lim_{n\to\infty} \left(1+\frac {x}{n}\right)^n=\exp x$$


I found the other one with the lightdm thing but it doesnt work because its for 12.04! does anyone know how to enable the manual login like in XUbuntu where you can type in the user and the password?  Thanks

I used to modify /etc/lightdm/lightdm.conf, adding the line greeter-show-manual-login=true, in order to allow login for hidden users and root.  Now I've just installed the new Ubuntu 14.04 and the file lightdm.conf is no longer located in /etc/lightdm. It's in /etc/init and has been totally modified.  How can I force lightdm login screen to show a field to input a login name?


I removed the ubuntu partition from windows and extended the volume to a existing windows partition. Earlier I had a dual boot windows and ubuntu. Now it shows me the grub rescue.   grub rescue>ls  (hd0) (hd0,msdos5) (hd0,msdos3) (hd0,msdos2) (hd0,msdos1)   I loaded a livecd of ubuntu and did boot repair. Still it is showing grub resue. And I don't have a windows cd.   After trying  doing a   "ls (hd0,msdos1) /boot"    on all of partition shown by ls. In each case, it shows Filesystem is unknown.  In the liveCD, I get this:  sudo fdisk -l Device     Boot     Start        End   Sectors   Size Id Type /dev/sda1            2048   31791103  31789056  15.2G 27 Hidden NTFS WinRE /dev/sda2  *     31791104   32507903    716800   350M  7 HPFS/NTFS/exFAT /dev/sda3        32507904  780682991 748175088 356.8G  7 HPFS/NTFS/exFAT /dev/sda4       780685310 1465147391 684462082 326.4G  f W95 Ext'd (LBA) /dev/sda5       780685312 1465143607 684458296 326.4G  7 HPFS/NTFS/exFAT   I don't have any linux partition, should I install linux? Is there anyway to fix this?  Gparted:

After I deleted my Ubuntu partition, I rebooted my computer and I only get a prompt:   grub rescue >   The command ls lists   (hd0) (hd0,msdos5) (hd0,msdos3) (hd0,msdos2) (hd0,msdos1) (hd1) (hd1,msdos1)   I check them one by one:  ls (hd0,msdos5)/ ls (hd0,msdos1)/   But I cannot find the right partition.


I try to execute a class from the command line via java command (Windows cmd). I specified the classpath as well.  java -cp bin\ training.TestClient  works. But I can't specify another folder with a jar.  java -cp bin\:lib\ojdbc7.jar training.TestClient  If I try this I get an "main class not found" error.  How can I include the lib\ojdbc7.jar in the classpath as well?

Is there a way to include all the jar files within a directory in the classpath?  I'm trying java -classpath lib/*.jar:. my.package.Program and it is not able to find class files that are certainly in those jars.  Do I need to add each jar file to the classpath separately?


I just uninstalled my first program in Ubuntu (gtg - getting things gnome) and noticed that it didn't clean after itself. It left .config/gtg and .local/share/gtg  both full with configs and task info  Is that the norm in ubuntu? How to cleanly uninstall programs?

I am trying to do a clean install of the octave3.2 package.   To do this, I removed it, then tried to reinstall it.   When I reinstalled, an error occurred. It could be a bug in the package, but I want to make sure I have everything removed so that I can do a clean install.  Is it enough to do this?  sudo apt-get --purge remove octave3.2


I have a random variable X, number of hours that kids from 10-12 years old spend on video games in one month in a specific country, and I want to test the hypothesis that the mean of my population  $u_{x}$ is higher than 50hours. I have a sample with size 5000 where each data point shows me the number of hours that a different kid (10-12 years old) spent on video games. I constructed my hypothesis as $H_{o}: u_{x} = 50$ $H_{a}: u_{x} > 50$ To test this hypothesis, I want to use one sample t-test because I don’t know the population variance. I know that one of the assumptions of t-test is that the population should have a normal distribution. When I draw the distribution of my sample, I have the below plot.  When I run Shapiro-Wilk Test for normality usin my sample, I reject the null hypothesis, my sample is not drawn from a population with a normal distribution. Under these circumstances shouldnt I use one-sample t-test but rather should I use a non-parametric test, if so which test (maybe Wilcoxon Rank Sum test)? Or since I have a sample size 5000, can I simply ignore the normality assumption and continue with one-sample t-test (from  discussion, I feel like continuing with t-test is still safe)? Thank you!

I have a data set with tens of thousands of observations of medical cost data.  This data is highly skewed to the right and has a lot of zeros.  It looks like this for two sets of people (in this case two age bands with > 3000 obs each):   Min.  1st Qu.   Median     Mean  3rd Qu.     Max.   0.0      0.0      0.0   4536.0    302.6 395300.0  Min.  1st Qu.   Median     Mean  3rd Qu.     Max.   0.0      0.0      0.0   4964.0    423.8 721700.0    If I perform Welch's t-test on this data I get a result back:  Welch Two Sample t-test  data:  x and y t = -0.4777, df = 3366.488, p-value = 0.6329 alternative hypothesis: true difference in means is not equal to 0 95 percent confidence interval:  -2185.896  1329.358 sample estimates: mean of x mean of y   4536.186  4964.455    I know its not correct to use a t-test on this data since its so badly non-normal.  However, if I use a permutation test for the difference of the means, I get nearly the same p-value all the time (and it gets closer with more iterations).  Using perm package in R and permTS with exact Monte Carlo      Exact Permutation Test Estimated by Monte Carlo  data:  x and y p-value = 0.6188 alternative hypothesis: true mean x - mean y is not equal to 0 sample estimates: mean x - mean y        -428.2691   p-value estimated from 500 Monte Carlo replications 99 percent confidence interval on p-value:  0.5117552 0.7277040    Why is the permutation test statistic coming out so close to the t.test value?  If I take logs of the data then I get a t.test p-value of 0.28 and the same from the permutation test.  I thought the t-test values wold be more garbage than what I am getting here.  This is true of many other data sets I have like this and am wondering why the t-test appears to be working when it shouldn't.  My concern here is that the individual costs are not i.i.d.  There are many sub-groups of people with very different cost distributions (women vs men, chronic conditions etc) that seem to voilate the iid requirement for central limit theorem, or should I not worry about that?


Restarting network manager corrupted my network manager, after that I reinstalled fresh ubuntu I also tried , but nothing works for me Wicd is also not robust My Kernel version is (4.10.0-28-generic) Here is my output of network details:     sudo lshw -C network  *-network                   description: Ethernet interface    product: RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller    vendor: Realtek Semiconductor Co., Ltd.    physical id: 0    bus info: pci@0000:02:00.0    logical name: enp2s0    version: 10    serial: d0:17:c2:12:1b:d7    size: 10Mbit/s    capacity: 1Gbit/s    width: 64 bits    clock: 33MHz    capabilities: pm msi pciexpress msix vpd bus_master cap_list ethernet physical tp mii 10bt 10bt-fd 100bt 100bt-fd 1000bt 1000bt-fd autonegotiation    configuration: autonegotiation=on broadcast=yes driver=r8169 driverversion=2.3LK-NAPI duplex=half firmware=rtl8168g-3_0.0.1 04/23/13 latency=0 link=no multicast=yes port=MII speed=10Mbit/s    resources: irq:47 ioport:4000(size=256) memory:b2104000-b2104fff memory:b2100000-b2103fff *-network    description: Wireless interface    product: RTL8821AE 802.11ac PCIe Wireless Network Adapter    vendor: Realtek Semiconductor Co., Ltd.    physical id: 0    bus info: pci@0000:03:00.0    logical name: wlp3s0    version: 00    serial: b0:c0:90:69:0e:6d    width: 64 bits    clock: 33MHz    capabilities: pm msi pciexpress bus_master cap_list ethernet physical wireless    configuration: broadcast=yes driver=rtl8821ae driverversion=4.10.0-28-generic firmware=N/A latency=0 link=no multicast=yes wireless=IEEE 802.11    resources: irq:51 ioport:3000(size=256) memory:b2000000-b2003fff *-network    description: Ethernet interface    physical id: 1    logical name: enp0s20u8    serial: 7e:b3:cd:e0:18:61    capabilities: ethernet physical    configuration: broadcast=yes driver=rndis_host driverversion=22-   Aug-2005 firmware=RNDIS device ip=192.168.42.238 link=yes multicast=yes   Here is the output of lsusb  Bus 001 Device 004: ID 138a:0010 Validity Sensors, Inc. VFS Fingerprint sensor Bus 001 Device 003: ID b49a:04f2   Bus 001 Device 002: ID 8087:8001 Intel Corp.  Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 003 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Bus 002 Device 003: ID 0bda:57bc Realtek Semiconductor Corp.  Bus 002 Device 002: ID 24ae:2000   Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub   Output of dkms status  The program 'dkms' is currently not installed. You can install it by typing:   sudo apt install dkms  here is the output of networks when it is not showing in network manager Applet using command    sudo iwlist wlp3s0 scan | grep -i SSID  ESSID:"Error" ESSID:"Sagar_Network"                   ESSID:"USER_5EE147"                     ESSID:"CPH1701" ESSID:"Moto E\xC2\xB3 POWER 4025" ESSID:"AAAAAHz2tmkAQwHVRedmi" ESSID:"Rconsultant"

I have continuous problems of network dropping connections on wifi with ubuntu 16.04, I have an ASUS R510J, this is my network card:  ##### lspci #############################  03:00.0 Network controller [0280]: Realtek Semiconductor Co., Ltd. RTL8821AE 802.11ac PCIe Wireless Network Adapter [10ec:8821]         Subsystem: AzureWave RTL8821AE 802.11ac PCIe Wireless Network Adapter [1a3b:2161]         Kernel driver in use: rtl8821ae  04:00.1 Ethernet controller [0200]: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller [10ec:8168] (rev 12)         Subsystem: ASUSTeK Computer Inc. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller [1043:200f]         Kernel driver in use: r8169   sudo service network-manager restart doesnt's help, as I never regain internet connection after it drops, and I have to restart the PC. On Ethernet cable I have no problem.  What do you think is the issue? drivers?  thank you


How do I install Java, including in my browser, so websites with Java work?


is there any possibility to use an Esri .lyr data in QGIS?   Maybe a tool to convert the file into a xml or sld?

At college we use ArcGIS Desktop 10, but that does not function on my Mac so I have QGIS there instead.  I want to do my exercises with QGIS, but in ArcGIS Desktop we use .lyr files with ArcMap and .lyrx files with ArcGIS Pro, and they are not supported by QGIS.  Does anyone know, how I can connect the *.lyr files to my *.shp files to use them on my Mac with QGIS?


Given the follow sample data:  CREATE TABLE People(PeopleID int, Name varchar(10)) INSERT INTO People VALUES(1, 'Chris') INSERT INTO People VALUES(2, 'Cliff') INSERT INTO People VALUES(3, 'Heather')  CREATE TABLE Things(ThingID int, ThingName varchar(10)) INSERT INTO Things VALUES(14, 'Bike') INSERT INTO Things VALUES(17, 'Trailer') INSERT INTO Things VALUES(18, 'Boat')  CREATE TABLE PeopleThings(PeopleID int, ThingID int) INSERT INTO PeopleThings VALUES(1, 18) INSERT INTO PeopleThings VALUES(2, 14)   ...and the following query:  SELECT P.Name,      T.ThingName FROM People P     LEFT OUTER JOIN PeopleThings PT ON P.PeopleID = PT.PeopleID     INNER JOIN Things T ON PT.ThingID = T.ThingID   I am wanting to see the following results:  |Name      |ThingName | ----------------------- |Chris     |Boat      | ----------------------- |Cliff     |Bike      | ----------------------- |Heather   |(null)    | -----------------------   I am wanting a list of everyone in the PEOPLE table, and the names of the THINGS they own (or if they own anything).  I know the issue is somewhere in my JOINs, but I'm not understanding/seeing where.  Please help.

I have 3 tables and I have to inner join Table A with Table B but a left outer between Table A and Table C.   Can I combine outer and inner join in the same query? I can nest queries and attain the desired result but I am unable to do both the joins in the same query. It appears that in other SQL languages, the order of joining is important. Is this the case in SQL Server as well?    Ok, here's the scenario.  Consider 3 tables. Table A, Table F, Table D.  I will need the recordset to contain all rows in D irrespective of whether it exists in F (after it's inner joined with A). So, a outer join comes to mind. What I would need is:   First do a inner join between A and F to get a set (this may be a null set) Then do a outer join with the recordset in (1) with D


I want to make a clay material like in this photo. Not a clay render, a clay material; something for my sculptures I model in Blender. How could I make something like the material in this image?    I have been trying to make this material for hours and it's driving me crazy. please help!  this is what i have gotten after playing around with nodes:

Sometimes, I find that it is useful to do a Clay Render for my model, where all of the materials render with a single common "clay"-like material (see example image below). In the past, I have done this by:   Selecting all of my objects by using the A hotkey Manually deselecting the World object, camera, and lights in the Outliner Linking materials using Ctrl+L Manually setting to the same material in the Properties>Materials menu Render like normal   When I was done with my Clay render, I would revert to the old version by pressing Ctrl+Z a few time. However, this is a rather clunky solution, since I can't make any edits in the clay version without losing my old materials/textures data.  Is there a better way to do Clay renders, either with an addon or through some other technique such that I can make edits to my model and not lose my materials? If at all possible, I would like a single setting that allows me to quickly toggle clay-mode on and off in the same file.  Example "Clay Render":


For typesetting my mathematical documents, I have been using MikTeX (for the back-end compilation) and WinEdit (for front end typing), on a Windows system.   However, I often find that I need a tutorial on LATEX document preparation using MikTeX and WinEdit.   There are plenty of tutorials around, but none (of those I know of) seems to deal with MikTeX + WinEdit duo.   Any suggestions please?   Any online books or tutorials specifically on MikTeX + WinEdit?

Which book (free or otherwise) was the most useful to you when you started learning LaTeX?  I am frequently asked this question by friends who want to learn LaTeX, and I recommend the book which got me started, , but I feel that there might be better options around.  Also see .


In the ring $\mathbb Z_5[X]$ find associated elements with $X^3+4X^2+3X+2$   I know that I must find $a \in \mathbb Z_5[X]$ such that $a|(X^3+4X^2+3X+2)$ and $(X^3+4X^2+3X+2)|a$. Assume that this $a$ exist we have:  $$\exists _{c\in \mathbb Z_5[X]} (X^3+4X^2+3X+2)=ac $$ $$\exists _{d\in \mathbb Z_5[X]} a=(X^3+4X^2+3X+2)d $$  However, I don't know how to find such $ a $ quickly

Recall the following relevant definitions. We say that   $b$ is divisible by $a$ in $R$, or $a\mid b$ in $R$, if $b = r a$ for some $r\in R$. $a$ and $b$ are associates  in $R$ if $a\mid b$ and $b\mid a$, (or, equivalently, if $aR = bR$). $u\in R$ is a unit if it has a multiplicative inverse (a $v\in R$ such that $uv=vu=1$). $a$ and $b$ are unit multiples in $R$  if $a = ub$ for some unit $u\in R$.   Given these definitions, my question is,     If $R$ is a commutative ring with unity and $a,b\in R$ are associates in $R$, are $a$ and $b$ unit multiples in $R$?   I was told that this not always true. But I encountered some difficulties in finding a counterexample.


I'm in the US with 120V mains. I have a "heavy" style AC/DC adapter (weighs a pound or so) and a lighter one (weighs a couple of ounces) which came off a 1TB Seagate NAS. Can I replace the heavy one with the light one?  Here are the specs for the heavy one:  AC100V  50/60Hz 19VA DC 12V 1000mA   and here are the specs for the light one:  AC INPUT: 100-240V~ 50-60Hz, 0.65A max, 51-80 VA DC OUTPUT: 12V  2A   If I understand correctly, the DC output of the lighter one is 12V and is capable of handling a draw (e.g. from a DC motor) up to 2000mA, so in that regard it is just as capable as (more capable than) the heavy one.  But I know pretty much diddly about electric, so I don't know how to interpret what 0.65A max, 51-80VA means on the AC input side.  P.S. The writing is so small, I can't tell if that is a tilde ~ or a minus-sign after the 240V.

Power supplies are available in a wide range of voltage and current ratings.  If I have a device that has specific voltage and current ratings, how do those relate to the power ratings I need to specify?  What if I don't know the device's specs, but am replacing a previous power supply with particular ratings?  Is it OK to go lower voltage, or should it always be higher?  What about current?  I don't want a 10 A supply to damage my 1 A device.


I just started with java and its doing realy good till now. But now i startet coding a little bit on my own. dont get the Problem here:  import java.util.Scanner;   public class Taschenrechner {      public static void main(String[] args) {          System.out.println ("Mein erster Java Taschenrechner");         Scanner scan = new Scanner (System.in);         System.out.println ("Welche Operation ? Möglich sind + - x /");         String operation = scan.nextLine ();         System.out.println ("Erste Zahl ?");         int input1 = scan.nextInt ();         System.out.println ("Zweite Zahl ?");         int input2 = scan.nextInt ();         int output = 0;          if (operation == "+") {             output = input1 + input2;         }          else if (operation == "-") {             output = input1 - input2;         }          else if (operation == "x") {             output = input1 * input2;         }          else if (operation == "/") {             output = input1 / input2;         }          System.out.println ("Das Ergebnis ist: " + output);      }  }   The variable output stays 0 and dont change  By the way...have i postet the code sampe the right way ?

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


I've got installed a VisualSVN in a Windows Server 2003 (it has just a  drive C: with 10GB)   I'm planning to backup a VisualSVN server in this way:    Make a disk image with Ghost or some other software of my Windows  Server 2003.  Every night make a copy of the whole folder: 'C:\Repositories'  If I upgrade VisualSVN version, I should make again other disk  image.    In case of disaster recovery, in order to restore server, I would only  need to:    Restore Ghost image in a new server  Paste folder 'C:\Repositories' from backup to new server    My question are:    Would it work?  Is 'C:\Repositories' the only folder that I have to backup? Do I  have to backup any other thing?    Thanks

At this moment we are using Visual SVN and we are backing up the entire repositories directory for visual svn.  This backs up the entire data for each repository inside our svn engine.  I am curious if I will be able to restore those files in case of an emergency or a disaster?  Any of you have experience with this restoration procedure?  Thanks.


I tried the following layout  \documentclass{article} \usepackage[explicit]{titlesec}  \titleformat{\section}   {\vspace{1cm}\titlerule\vspace{.8ex}%    \bfseries\large}   {\Roman{section}\,|}   {.5em}   {#1}  \titlespacing{\section}{0.5ex}{*1}{*0}  \begin{document}  \section{Test}  \section{Test}  \section{Test}  \section{Test}  \section{Test}  \section{Test}  \section{Test}  \section{Test}  \section{Test}  \section{Test}  \section{Test}  \section{Test}  \section{Test}  \section{Test}  \end{document}   But all the titles are put on the page 2, with a strong vertical overfull box: see the image below.    What is the issue and how to fix it?

I'm working on a large document in Emacs (23.2.1) org-mode (7.8.06) which I export to LaTeX. At present, the outline/structure of the document has been created, but not any of the content. The LaTeX version (which consists of \section, \subsection, \subsubsection and items mainly) has broken pagination, a blank page and text that runs off the page.  I shortened the document by moving \end{document} around to try to find the problem. In some cases, the document rendered correctly. This seems to be related to too many "section" types headings in LaTeX with no content.  To test this, I added  \usepackage[english]{babel} \usepackage{blindtext}   to my document and then inserted \blindtext "content" for most of the sections/subsections. The document now renders correctly.  The documentclass is article and the only package loaded is .  Are there any known issues with pdfLaTeX/pdfTeX where a document contains only/mainly section headings and not much, if any, content? The only relevant error message pdflatex generated was:  Overfull \vbox (333.44125pt too high) has occurred while \output is active [5] [6]   I'm using pdfTeX, Version 3.1415926-1.40.10 (TeX Live 2009/Debian).  An example can be found . The only required package is hyperref.


I recently migrated to a new 2019 MacBookPro, 16" ... running 10.15.6 ... now I notice something I have never seen with my old Mac with the 3 desktops I am using:  Desktop 1 takes terminals, IDE, ... Desktop 2 takes browsers Desktop 3 takes my mail client, slack, ...  Meaning: when I startup my mac, and start my applications, I place the windows like that. What I have seen now repeatedly: desktop 2 and 3 seem to fully "swap" at some point. Not sure, but I just come back and find: mail client, slack, ... are now showing up on desktop 2, and my browser windows are all on desktop 3. Any idea what could be causing this, or how to prevent it? (I am not running any fancy additional "desktop related" apps, the only "special thing" I am using is the  window switcher).

You may have encountered a situation in which Mac changes the order of desktops based on some events like alerts on a program or a web page in browser. How could I disable this logical change? Note: I'm using El Capitan, but I had this problem since Mavericks.


Is the following (part of the) sentence correct grammatically?     ... I will describe how my personal experiences and my   professional and academic background have prepared me to ...

For example,      I like chocolate, vanilla, and lemon and orange ice cream.    Indicating "lemon and orange" is a combined flavor, as an item in the list needing an initial and.


Both of these functions rewrites the original value right? Is there any benefit to doing it one way over the other?  #include <iostream> using namespace std;  void passptr(int *p) {     *p = 7; }  void passaddy(int &a) {     a = 7; }  int main() {     int a = 5;     int *p = &a;      passptr(p);     cout << a << endl;      a = 5;     passaddy(a);     cout << a << endl;      return 0; }

I know references are syntactic sugar, so code is easier to read and write. But what is the difference between a pointer variable and a reference variable?


I need to delete some objects from a list if they meet a condition.  But I am getting java.util.ConcurrentModificationException.  Here is my code:  collegeList.addAll(CollegeManager.findByCollegeID(stateCode, districtCode));  for(College clg:collegeList){     if(!clg.approve()){         collegeList.remove(clg);     } }

We all know you can't do the following because of ConcurrentModificationException:  for (Object i : l) {     if (condition(i)) {         l.remove(i);     } }   But this apparently works sometimes, but not always. Here's some specific code:  public static void main(String[] args) {     Collection<Integer> l = new ArrayList<>();      for (int i = 0; i < 10; ++i) {         l.add(4);         l.add(5);         l.add(6);     }      for (int i : l) {         if (i == 5) {             l.remove(i);         }     }      System.out.println(l); }   This, of course, results in:  Exception in thread "main" java.util.ConcurrentModificationException   Even though multiple threads aren't doing it. Anyway.  What's the best solution to this problem? How can I remove an item from the collection in a loop without throwing this exception?  I'm also using an arbitrary Collection here, not necessarily an ArrayList, so you can't rely on get.


I was issued a Schengen visa by the Netherlands embassy. I am on a two-week trip, the first week in the Netherlands and the second week in France. But at this moment I want to travel through as my first entry and then a train to Wageningen, which is my first week of stay before I get back to France for my final days and then back to Accra. Is it possible with the Schengen visa?

In case, if I get a multiple-entry Schengen visa in one of the embassies in Ukraine, Kyiv - should my first trip be to the country which issued the visa?  Any there any requirements of this sort? Does this condition vary depending on embassy which issued the visa?  What are the possible consequences on not visiting that country first? Does it somehow depend on country where the embassy is (i.e. non-Schengen and not EU members)?


I’m taking night pictures with Canon EFS 18-135mm STM lens and EOS 450D body. I’ve noticed that when I’m trying to shoot distant objects and there is enough light for the AF to work the pictures come out nice and sharp. But sometimes AF is unable to lock on the right focus (too dark?) so I try manual focus. But even though I turn the focus ring all the way to „infinity” the pictures are very out of focus. Essentially using MF I can’t find the focus setting to make the picure sharp. But in the same distance to object but a bit brighter circumstances AF successfully finds the right focus.  Is this normal? Shouldn’t MF set all the way to infinity result in a sharp picture of distant objects? I’m trying to take a picture of an urban landscape at night. And yes, i’m using a tripod.

I have a kit lens which has no markers. What would be a recommended way to find infinity focus on this lens?  I plan to shoot objects at night -- not necessarily stars or the moon. So, adjusting the focus using the viewfinder may not be an option.


Let $V=(1,2,...,n), n>5$ be a set of vertices. How many tagged trees are there on V such that the vertices 1,2,3 are leaves and the minimum path length between every 2 of them is greater than 2?  What I've tried: I said that without 1,2 and 3 there are $(n-3)^{n-5}$ tagged trees on V without 1,2,3. So now we need to connect 1,2,3 to the tree with one edge each (so it will be a leaf) and it can't be the same vertex in the tree every time because this will result a length of 2.   So this will give: $(n-3)^{n-5}\cdot(n-3)\cdot(n-4)\cdot(n-5)$  Is this nonsense or somewhat correct?

I’m stuck on this question in graph theory. The question is:  How many labeled trees are there over $V={0,1,2,...n}$ with which vertices 1,2,3 are leaves, and distance between any two of these leaves is 3 or more.  I tried using Cayley theorem but I don’t know how to apply it in this specific question.


If I have Optimize iPhone Storage enabled on my iPhone and my phone storage is completely full, I understand that iOS will only store a low-res thumbnail of many of my photos on the device. (The full high-res version of the image will only exist in iCloud and on devices with Download and Keep Originals enabled.)  But when only thumbnails exist on the device, how does that work in relation to other photo apps on iOS? For example, do third-party cloud-based photo apps (like Google Photos, Dropbox's Carousel, or Amazon Prime Photos) have access to the full high-res images from the iCloud Photo Library? Or will they only see the low-res thumbnails in some cases?

I am considering to use iCloud Photo Library to store a growing number of family photo albums, shared to web or set of AppleIDs.  I dont need to keep original photos on iDevices for 99.9% of photos.  How much space will be used on the photo-originating set of devices (iOS, OS X, Windows)? I.e. what (roughly) is the function from the original size and number of photos, device storage space available, any other variables?


Running a campaign for the first time (first time for players and for me) and of course I am running Lost Mine of Phandelver. My players are about to confront Glasstaff and I had a question about the staff of defense he holds.  Do players and their characters know that if they use up all the item's charges there is a chance it will be destroyed? I am writing the item description on the card to give to the player and I wasn't sure if if should include the "roll a d20 after all charges, if 1 item destroyed".    I suppose there are 3 ways:   They know immediately upon attuning. They can take it to someone to know more about it They will never find out until the day they roll that 1     How should the players find out about this property in magic items?

Similar to this , but specific to D&D 5e, how are players meant to find out the effects of items/potions/scrolls/weapons/armor?  Say, they find a potion in some chemist's chest. It is red and smells nice. Should they perform an investigation/perception check? Or an arcana/nature check? If I tell the players specifically to do an Arcana check, then I am already hinting at the fact that this potion will have some magical effect. It could just be a natural elixir concocted by Druids to help your health regen.  Same goes for weapons. They find the legendary bow of X, which has a +3 to hit and a 10% chance of striking other enemies near the target. I describe the bow as unique, glowing, made from dragon scales and hovering on air. Would they investigate their properties? Or just I just let them fire at a wall until something happens?   Our playstyle so far has been to use active checks for a quick understanding of the item (drink a little bit of Potion as an Investigation check to find whether it heals or not, sensing magical properties of the bow with Arcana checks). When time is available, and experimentation is necessary, allow the PCs to do some creative testing and, based on their ideas, "After Y time, you realize that the bow sometimes hits several points of the wall instead of just your target".  According to the RAW, is there a specific way of checking the stats/effects of such items?


How do I implement boolean logic in the select statement while the query is running?  SELECT t.[Key]       ,t.[Parent_Key]       ,t.[Parent_Code]       ,t.[Code]       ,t.[Desc]        ,t.[Point]       ,[isChild] -- If Point > 2, then true, if Point == 1 Then false          ,t.[By]        ,t.[On] FROM [db].[stats] t WHERE t.[Parent_Key]= @tmpParameter   I want make some logic to determine [isChild] boolean value based on t.[Point]

How do I perform an IF...THEN in an SQL SELECT statement?  For example:  SELECT IF(Obsolete = 'N' OR InStock = 'Y' ? 1 : 0) AS Saleable, * FROM Product


I can't figure out what's wrong with this field formula.  Everything below in quotes has been copy/pasted directly so there are no typos AFAIK.  Custom object API name = CompanySetting__c Custom object field API name = Title__c Custom field formula on Lead object: Location (Text) = CompanySetting__c.Title__c     "Error: Field CompanySetting__c does not exist. Check spelling."   I have also tried unsuccessfully using "CompanySetting__r.Title__c"  On a different object the following field formula works as expected: Account.Location_Title__c   But that might be due to the fact that the object is not a custom object even though the field is a custom field.  Any suggestions?

I have a custom object "Reporting__c".  This custom object is linked to MyContracts__c, which is a child of Opportunity.  I need to display a field from Opportunity on my Reporting__c object and I want to use a formula.  I tried:  Formula(Text) = MyContracts__r.Opportunity.CustomField   But this does not work. Isn't this possible?  Tia.


on Control page:  <?php   include 'pages/db.php';    $results = mysql_query("SELECT * FROM sidemenu WHERE `menu_id`='".$menu."' ORDER BY `id` ASC LIMIT 1", $con);   $sidemenus = mysql_fetch_object($results); ?>   on View Page:  <?php foreach ($sidemenus as $sidemenu): ?>   <?php echo $sidemenu->mname."<br />";?> <?php endforeach; ?>   Error is:     Notice: Trying to get property of non-object in C:\wamp\www\phone\pages\init.php on line 22   Can you fix it? I don't have any idea what happened.

So I'm refactoring my code to implement more OOP.  I set up a class to hold page attributes.  class PageAtrributes  {   private $db_connection;   private $page_title;      public function __construct($db_connection)      {         $this->db_connection = $db_connection;         $this->page_title = '';     }      public function get_page_title()     {         return $this->page_title;     }      public function set_page_title($page_title)     {         $this->page_title = $page_title;     } }   Later on I call the set_page_title() function like so  function page_properties($objPortal) {         $objPage->set_page_title($myrow['title']); }   When I do I receive the error message:     Call to a member function set_page_title() on a non-object   So what am I missing?


This is a WCF Rest Service.  I am trying to return either XML or json.  I've tested and tested it but I get Method Not allowed and I can't figure out what I am doing wrong.  When I run it   web.config  <system.serviceModel>     <services >        <service name="Project.TestService"    behaviorConfiguration="TestServiceBehavior">           <endpoint               address=""               binding="webHttpBinding"               contract="Project.ITestService"               behaviorConfiguration="web">         </endpoint>       </service>   </services> <behaviors>   <serviceBehaviors>     <behavior name="TestServiceBehavior">       <serviceMetadata httpGetEnabled="true" />       <serviceDebug includeExceptionDetailInFaults="true"  />     </behavior>   </serviceBehaviors>     <endpointBehaviors>         <behavior name="web">             <webHttp/>         </behavior>       </endpointBehaviors> </behaviors> <serviceHostingEnvironment aspNetCompatibilityEnabled="true"   multipleSiteBindingsEnabled="true" />     Contract ITestService.vb  Imports System.ServiceModel Imports System.ServiceModel.Web  <ServiceContract()> Public Interface ITestService  <OperationContract()> <WebInvoke(Method:="Get", ResponseFormat:=WebMessageFormat.Xml, BodyStyle:=WebMessageBodyStyle.Wrapped, UriTemplate:="/xml/{id}")> _ Function XMLData(id As String) As String  <OperationContract()> <WebInvoke(Method:="Get", ResponseFormat:=WebMessageFormat.Json, BodyStyle:=WebMessageBodyStyle.Wrapped, UriTemplate:="/json/{id}")> _ Function JSONData(id As String) As String  End Interface   SVC Markup TestService.svc  <%@ ServiceHost Language="VB" Debug="true" Service="Project.TestService" CodeBehind="TestService.svc.vb" %>   Method TestService.svc.vb      Imports Project.MODEL     Imports System.ServiceModel.Activation      <AspNetCompatibilityRequirements(RequirementsMode:=AspNetCompatibilityRequirementsMode.Required)> _     Public Class TestService     Implements ITestService      Public Function XMLData(id As String) As String Implements      ITestService.XMLData         Return "Your request product " + id     End Function     Public Function JSONData(id As String) As String Implements ITestService.JSONData       Return "Your request product " + id     End Function  End Class   URL  http://localhost:23390/TestService.svc/xml/ABC

In the process of developing my first WCF service and when I try to use it I get "Method not Allowed" with no other explanation.   I've got my interface set up with the ServiceContract and OperationContract:      [OperationContract]     void FileUpload(UploadedFile file);   Along with the actual method:      public void FileUpload(UploadedFile file) {};   To access the Service I enter  but I get the "Method not Allowed" error  Am I missing something?


I just started using Ubuntu yesterday because Windows has been nothing but headaches for nearly 20 years now. There are only a few Windows-based applications I want to continue using, and it seems something called WINE will probably enable me to go on using those applications. But ... all the directions I'm finding for how to get and use WINE are confusing the heck out of me.   provides a link to download WINE, but before using it the page says you first must add the WineHQ PPA Repository. I don't even know what that is. Per the directions, I opened Ubuntu Software Center, but I don't see Edit ... which makes following the rest of the directions impossible.  Please help. And please use small words, lol, because I know nothing about computer programming. I only know Microsoft is evil and I'm sick of dealing with it...

I keep reading about  ('PPAs') and people answer questions with a link to a PPA. What's the best way to use these?     There are multiple valid answers for this question spanning over several versions of Ubuntu. For your convenience, an index of each is below.


Our teacher gave us this question but I am very stuck. I drew graphs to see why it cant be true but I didnt find anything. I see that if $p$ existed then: $$p(\cdots p(a))=a,\;p(\cdots p(b))=b,\;p(\cdots p(c))=c$$  (With $3n$ $p$'s). But I don't know where the contradiction is... Maybe we can work on the divisibility of the polynomials coefficients or something?

Let $a,b,c$ be $3$ distinct integers, and let $P$ be a polynomial with integer coefficients.Show that in this case the conditions $$P(a)=b,P(b)=c,P(c)=a$$ cannot be satisfied simultaneously.  Any hint would be appreciated.


I am trying to learn and better understand how to properly prevent sql injection and properly extract database information to show in a website.  I am currently using mqli_real_escape_string but the problem is when I extract the data there is a slash where the user may have entered an apostrophe or a quote, such as O'Connell, etc...  If I use a function to remove slashes, it defeats the purpose of using the mqsli_real_escape_string.  What is the proper way to prevent injection while allowing usage of apostrophes where necessary?   MySql  $name = mysqli_real_escape_string($link, $_POST['commentName']); $comment = mysqli_real_escape_string($link, $_POST['commentMessage']); $BID = mysqli_real_escape_string($link, $_POST['BID']);   HTML/PHP
<?php echo $name ?>

<?php echo $comment ?>

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


I installed Ubuntu 13.10 on an HP Compaq D530 cmt and I can only see the desktop pic and I have found out that I don't have the unity plugin enabled. I went  to see what this person did. I got ccsm and I have no way of applying changes to the unity plugin, so I can enable it, but that does no good because the changes don't take effect. If I leave ccsm and come back the unity plugin is uncheckmarked. I really do not know what to do, some people have mentioned there are missing drivers for my PC also, but when I go to the update manager and go to drivers it says there are no drivers available for this computer. I don't know what is stopping me from enabling the unity plugin, can anyone tell me a command I can use in terminal to fix my problems. Thanks

I can only see my desktop pic upon login and that is because unity plugin isn't enabled.  I tried ccsm, but there is no way for me to apply changes so the unity plugin remains disabled. I also can't close windows because the bar at the top of each window is not there.


I'm trying to use regex to extract a MAC address from a string. The regex that I've used should work.  raw_mac_string returns a ether <mac_address>  What I'm trying to do is get original_mac to extract the <mac_address> from raw_mac_string.  original_mac when run, keeps giving error: AttributeError: 'NoneType' object has no attribute 'group'  Thanks for the help  I guess my question is, how can I extract the MAC address from a string that contains other text as well?  #get original mac address     global original_mac     raw_mac_string = subprocess.check_output('ifconfig en0 | grep ether | awk "{print $2}"', shell=True)     print "raw_mac"+raw_mac_string     original_mac = re.match(r"/^(?:[[:xdigit:]]{2}([-:]))(?:[[:xdigit:]]{2}\1){4}[[:xdigit:]]{2}$/", raw_mac_string).group()

I need a cross platform method of determining the MAC address of a computer at run time.  For windows the 'wmi' module can be used and the only method under Linux I could find was to run ifconfig and run a regex across its output.  I don't like using a package that only works on one OS, and parsing the output of another program doesn't seem very elegant not to mention error prone.   Does anyone know a cross platform method (windows and linux) method to get the MAC address?    If not, does anyone know any more elegant methods then those I listed above?


I am a Philippine passport holder travelling to US via Haneda. I only have a 3-hour layover in Haneda. From Manila I will be taking PH Airlines and from Haneda to US I will be taking AA (American Airlines).   Do I need a transit visa at Haneda airport?

I will be transferring between two international flights at Tokyo Narita airport. I'm scheduled to depart the same day I arrive. I am planning to stay within the airport during the layover. Does anyone know if I will require a transit visa at Narita?


I have a computer with two screens..  A laptop with its screen. And another screen that I have connected to it that is much larger.  I can move my mouse from screen 1 (The laptop screen), left to screen 2.  But the problem is that if I move my mouse to near the bottom of screen 2, and right, I cannot get to screen 1. I'd like it so that if my mouse is, at the bottom of screen 2, and I move my mouse right, i'd get to the bottom of screen 1.  And that if my mouse was 5% up screen 2, and I moved it to the right, i'd get 5% u pscreen 1.   At the moment, there is a border the right edge of screen 2 at the portion where there's no screen 1.  If I am at the bottom of screen 1, and I move my mouse left, I don't get to the bottom of screen 2, (as you can see from the ctrl panel display it's obvious why). though i'd like to.  As you can see the way Windows works is the border that is shared by screen 2 and screen 1, no issue. The mouse moves across though if it's half way up one screen and you move it across it may not be halfway up the other screen. But where the border isn't shared, then one screen you hit the border, the other screen you get across.  I would like the screens to relate to each other, so that at any position on one screen you can move to the side to the other screen. So the top of one screen relates to the top of the other screen. The bottom of each screen relate. The middles relate. So that even with different sized screens there isn't a portion of a screen where you can't go across.  Is that possible?

I have 2 monitors. The main one is horizontal, the secondary one is vertical.    When moving from the right to the left monitor, if the mouse hits the areas I've shown in red, it gets stuck. I would like to change this behavior.  Whenever the mouse hits any part of the tall monitor's left edge, it should be wrapped to the wide monitor's right edge. I don't particularly care where on the edge it gets wrapped: It's fine if it's just the closest point like I've shown in the image (dashed line is the wrap/teleport).  How can I do this?


^^On , the box for this specific question is coloured green, which means my answer is accepted... but it isn't.  Is this a bug? If it is, I guess the system makes bounties (which I just received) act as being accepted?

Accepts are green, that's good.        But why is the color of bounties green in summary, recent rep?        Bounties are blue everywhere, so make them blue there!        So can we change the color of bounties from green to blue? It would make a whole lot more sense and better to differentiate rep earned from accepts and bounties.


I'm looking at upgrading my 95 MB/s SD card to a UDMA 7 CF on my 5D mk II; however, I know that eventually I'll hit an internal hardware bottle neck (after all the processor can't spit out images at an infinite rate).  Instead of asking specifically about my camera, how would I find that threshold where adding a faster card wouldn't make the camera any faster?

Cameras rarely specify exactly what speed cards you should be using in them - I just checked the manual for my DSLR, and all it says is to use an SDHD card, and a "high speed" card should be used for recording video.  On the other hand, there are a number of different rating systems for memory card speed (33x! 150x! Class 2! Class 10!) and price seems to increase with speed.  Is there any way to test the maximum write speed the camera is capable of?  Are the read/write speeds documented anywhere?


In a previous question: , I was directed to:   Here, an answer states that "hence G/Z(G) is a group of prime order, hence G/Z(G) is nontrivial cyclic, which is impossible (well-known exercise)."  However, I'm unable to see why this is impossible.   Any tips or hints would be greatly appreciated.  Thanks!

Continuing my work through Dummit & Foote's "Abstract Algebra", 3.1.36 asks the following (which is exactly the same as exercise 5 in ):     Prove that if $G/Z(G)$ is cyclic, then $G$ is abelian. [If $G/Z(G)$ is cyclic with generator $xZ(G)$, show that every element of $G$ can be written in the form $x^az$ for some $a \in \mathbb{Z}$ and some element $z \in Z(G)$]      The hint is actually the hardest part for me, as the quotient groups are somewhat abstract. But once I have the hint, I can write:  $g, h \in G$ implies that $g = x^{a_1}z_1$ and $h = x^{a_2}z_2$, so \begin{align*}gh &= (x^{a_1}z_1)(x^{a_2}z_2)\\\  &= x^{a_1}x^{a_2}z_1z_2\\\ & = x^{a_1 + a_2}z_2z_1\\\ &= \ldots = (x^{a_2}z_2)(x^{a_1}z_1) = hg. \end{align*} Therefore, $G$ is abelian.  1) Is this right so far?  2) How can I prove the "hint"?