If I'm not mistaken, a Young's modulus $E$ can theoretically take on any positive value without bound.   Physically, I interpret this as though a solid can have any arbitrary "stiffness" (within the limits of its linear stress-strain region, of course).  On the other hand, the range of possible Poisson's ratios is constrained to $[-1,0.5]$ for stable, isotropic, linearly elastic materials.  I'm not quite sure how to interpret this physically.  Why must the Poisson's ratio necessarily be constrained?

For an isotropic solid, Poisson's ratio can be expressed in terms of stiffness constants as:  $$\sigma = \frac{c_{11} - 2c_{44}}{2c_{11} - 2c_{44}}$$  Alternatively we may express Poisson's ratio in terms of the Lamé constants $\lambda$, $\mu$ where $\lambda = c_{12}$ and $\mu = c_{44}$.  For an isotropic solid, we have $c_{12} = c_{11} - 2c_{44}$.  When we solve this algebraically we get:  $$\sigma = \frac{\lambda}{2(\lambda + \mu)}$$   I am supposed to show that $\sigma$ must lie between $-1$ and $+\frac{1}{2}$.  I figure that by setting $\mu=0$, it follows from the last expression of $\sigma$ that we get the value $\frac{1}{2}$.  However, I can't see how to show that the lower bound must be $-1$.  I've tried fidgeting around with the expressions and letting them go towards $0$ or $\infty$, but I still don't get the $-1$ value.  If anyone can help me out here, I would greatly appreciate it!


I can't install lighttpd on my Ubuntu 18.04.  I did an update & upgrade and then:  fmf@kodi:~$ sudo apt install lighttpd Reading package lists... Done Building dependency tree Reading state information... Done Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation:  The following packages have unmet dependencies:  lighttpd : Depends: libssl1.1 (>= 1.1.0) but it is not going to be installed E: Unable to correct problems, you have held broken packages. fmf@kodi:~$   My sources.list:  fmf@kodi:~$ cat /etc/apt/sources.list # Ubuntu 18.04 Bionic Beaver deb http://it.archive.ubuntu.com/ubuntu/ bionic main universe restricted multiverse #deb-src http://it.archive.ubuntu.com/ubuntu/ bionic main universe restricted multiverse  deb http://security.ubuntu.com/ubuntu bionic-security main universe restricted multiverse #deb-src http://security.ubuntu.com/ubuntu bionic-security main universe restricted multiverse  deb http://it.archive.ubuntu.com/ubuntu/ bionic-updates main universe restricted multiverse #deb-src http://it.archive.ubuntu.com/ubuntu/ bionic-updates main universe restricted multiverse   # Backports: deb http://it.archive.ubuntu.com/ubuntu bionic-backports main restricted universe multiverse #deb-src http://it.archive.ubuntu.com/ubuntu bionic-backports main restricted universe multiverse   # Canonical partner: deb http://archive.canonical.com/ubuntu bionic partner #deb-src http://archive.canonical.com/ubuntu bionic partner fmf@kodi:~$   My system:  fmf@kodi:~$ lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description:    Ubuntu 18.04.1 LTS Release:        18.04 Codename:       bionic fmf@kodi:~$ uname -a  Linux kodi 4.15.0-44-generic #47-Ubuntu SMP Mon Jan 14 11:26:59 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux fmf@kodi:~$  How can I fix this?

After upgrading from 10.04 to 12.04 I am trying to install different packages.  For instance ia32-libs and skype (4.0).  When trying to install these, I am getting the 'Unable to correct problems, you have held broken packages' error message.   Output of commands:  sudo apt-get install -f Reading package lists... Done Building dependency tree        Reading state information... Done 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.   After running this:  sudo dpkg --configure -a foo@foo:~$ sudo apt-get install -f Reading package lists... Done Building dependency tree        Reading state information... Done 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.


I have seen the answers to this saying that the effect Earth's rotation is neglegible compared to Gravity. But isnt the answer to this should include that the relative acceleration between object under consideration and the observer on the ground is zero. As both have the same effect of Earths rotation.

Clearly, the Earth is accelerating (as it has centripetal acceleration), and thus it is a non-inertial frame of reference. Then, why don't we use pseudo forces all the time? My teachers told me that the effect produced by the centripetal acceleration of the Earth on our calculations is negligible and hence we can safely neglect pseudo force. But how? I want rigorous proof with examples that show exactly how much we are compensating in exchange for neglecting that the Earth is a non-inertial frame of reference.


This is a long shot since my tablet is not listed in the supported devices, but is there any chance that it might work anyway?  Android 4.2 Tablet E10320

With the announcement of the Ubuntu Phone OS I'd like to know what phone (and tablet) models are supported at this time.  Note from foss & Oli: We are making this the master question for all future "Will this work on <insert random tablet/phone/device here>?!" questions


This is a general question about (La)Tex. Is it possible to configure/setup tex to make it "hold register"?   To "hold register" is to ensure that the horizontal lines which all "normal/plain" text is placed on, are the same on all pages.

I'd like to typeset documents using the '' of page layout. Good examples are on pages 40-53 of . The  package is helpful for this, but two additional features would be useful:   Automatic flow of text across (arbitrarily placed) columns / textpos blocks. Vertical line spacing enforced to be an integer multiple of a base line spacing, even when interrupted (for example) by an equation of arbitrary height.   Any ideas as to how either or both of these could be accomplished?


I recently upgraded to 17.10 from 16.10, and I'm experiencing an annoying problem:  I CAN'T drag and drop files. When I select files and then hold to drag, it behaves as though I'm re-selecting and doesn't drag the files like it did in 16.10.  Also, ctrl- and shift- selecting no longer work the way they used to, shift now selects from the FIRST file selected rather than the LAST file I selected.  I don't know if these are OS bugs or if there's an easy solution.  PLEASE HELP. I don't want to have to re-install 16.10

I'm having a strange problem on Ubuntu 17.10: when I try to drag and drop something inside Nautilus it simply doesn't work, it doesn't even select the item, it seems like it's ignoring the action... Also, I cannot select things inside nautilus by drawing rectangles with the mouse.  All of these actions work only on the Desktop. Here is a demo:    I'm using the Xorg session with nVidia proprietary drivers. I also noticed that Nautilus seems to hang when I try to copy, paste or cut a file...  EDIT 1: I solved the problem for the slow copy/paste by disabling the clipboard sync plugin of KDEConnect. I also discovered that if I open Nautilus as root, I can drag and drop or select whatever I want...


Is there anything wrong with this? I have refreshed many time but the view still be 1.      I don't think think this is a dup of . In that question. Jeff Atwood answers:     We buffer view count increments, so this should be normal -- unless the post stays at 0 for more than say 5 minutes or so.    I submitted the question at 04:33:40Z, and got the first upvote at 04:43:13Z (I don't know what Z means).

I look today on a few fresh question, and the view count was 0. Even after I refreshed the page a few time. This is definitely a bug, since the question isn't mine.  Also I don't think the all page was cached, since that the DateTime mark was change every reload.  But maybe the SQL result is cached.


What is the difference between MapBox and CartoDB ?

I want to start working on a web map at work to map some of our statistics by city.    I have an idea, but I'm not exactly sure where to start.   Are there any definitive resources that provide step by step guidance on how to do this?


I've been told to calculate the age of the Universe at $T = 1 \, \text{MeV}$, assuming that $a(t=0)=0$.  Now, I've already calculated the value of $H$ at that temperature, which was around $H(1\,\text{MeV}) \approx 0.6 \,\text{s}^{-1}$. I've also shown, that in a radiation dominated Universe, which I assume much be the case at $T = 1 \, \text{MeV}$, that:  $$H = \frac{1}{2}t^{-1}$$  So basically, my idea was just to solve for $t$ in that equation, and use the value for $H$ I calculated, and then I end up with $t = 0.85 \, \text{s}$, which seems okay reasonable to me, but, my main question is the info: "assuming that $a(t=0)=0$". I haven't really used that information here, so either it's just not important, or I have missed something. But what ?

How does the  change with the age of the universe?  This question was posted recently, and I had almost finished writing an answer when the question was deleted. Since it's a shame to waste the effort here's the answer anyway.  Maybe this can be one of the canonical answers .


Is it possible to run Internet Explorer 11 32 bit on Windows 8.1 64 bit? Since only 32 bit ActiveX is available for Check Point Software VPN. Currently when I go into site it wants me to download the Java version.  Even when \Program Files (x86)\Internet Explorer\iexplorer.exe is clicked the 64 bit version of IE is launched.  (The three answers given to a previous similar question () do not apply. The first answer mentions a registery entry which is absent on my pc Windows 7 64 bit and IE 10 32 bit does not work on my case. Since the registery does not contain the mentioned "TabProcGrowth")

I need to run IE 10 in 32-bit mode on 64-bit Windows 7 Enterprise N.  When I run IE 10 from "C:\Program Files (x86)\Internet Explorer" I can see in task manager that I have only one process "iexplorer.exe" and no process "iexplorer.exe *32".  I have an application with an ActiveX that is supported only on 32-bit, and the application can't be loaded on 64-bit mode.  Is there a way I can force IE10 to run in 32-bit mode?


Like in standard controller we can fetch objects records like: standardcontroller="account"; {!account.name};  how we can fetch from a custom controller?

If I have a custom controller and a custom visualforce page, and I'm passing an ID as a query param, how can I get the associated record for that ID from within the VF page?  public class MyCustomController() {   ... legacy code here }  <apex:page controller="MyCustomController">   <apex:outputText value="{! SOME VF SYNTAX TO RETRIEVE RECORD GIVEN QUERY PARAM ID}" /> </apex:page>


Suppose $\lambda_1, \lambda_2, \dots, \lambda_k $ are complex numbers that $\forall n \in \mathbb{N}$ satisfy $$\lambda_1^n+ \lambda_2^n+ \dots +\lambda_k^n =0.$$ Can we deduce that $\lambda_1= \lambda_2= \dots= \lambda_k = 0 $?

Here is a statement that seems prima facie obvious, but when I try to prove it, I am lost.  Let $x_1 , x_2, \dots, x_k$ be complex numbers satisfying:  $$x_1 + x_2+ \dots + x_k = 0$$  $$x_1^2 + x_2^2+ \dots + x_k^2 = 0$$  $$x_1^3 + x_2^3+ \dots + x_k^3 = 0$$  $$\dots$$  Then $x_1 = x_2 = \dots = x_k = 0$.    The statement seems obvious because we have more than $k$ constraints (constraints that are in some sense, "independent") on $k$ variables, so they should determine the variables uniquely.  But my attempts so far of formalizing this intuition have failed.  So, how do you prove this statement?  Is there a generalization of my intuition?


I am trying to understand how to check equality of class instances.  Let's say I have a class as follows:  class Car(object):     def __init__(self):         self._color = None   I instanciate two objects as follows :  car1 = Car() car1._color = 'red' car2 = Car() car2._color = 'red'   The two objects having exactly the same attributes, I naively thaught that:  print(car1 == car2)   would print True , which is not the case.  What is happening here?  I did find a solution to check equality:  print(car1.__dict__ == car2.__dict__)   which does print True.  Was that in fact the simplest thing to do?

When writing custom classes it is often important to allow equivalence by means of the == and != operators. In Python, this is made possible by implementing the __eq__ and __ne__ special methods, respectively. The easiest way I've found to do this is the following method:  class Foo:     def __init__(self, item):         self.item = item      def __eq__(self, other):         if isinstance(other, self.__class__):             return self.__dict__ == other.__dict__         else:             return False      def __ne__(self, other):         return not self.__eq__(other)   Do you know of more elegant means of doing this? Do you know of any particular disadvantages to using the above method of comparing __dict__s?  Note: A bit of clarification--when __eq__ and __ne__ are undefined, you'll find this behavior:  >>> a = Foo(1) >>> b = Foo(1) >>> a is b False >>> a == b False   That is, a == b evaluates to False because it really runs a is b, a test of identity (i.e., "Is a the same object as b?").  When __eq__ and __ne__ are defined, you'll find this behavior (which is the one we're after):  >>> a = Foo(1) >>> b = Foo(1) >>> a is b False >>> a == b True


I want to build a regular expression which only matches [A-Za-z0-9\-] with an additional rule that hyphens (-) are not allowed to appear at the start and at the end.  For example:  my-site is matched.  m is matched.  mysite- is not matched.  -mysite is not matched.  Currently, I've come up with ^[A-Za-z0-9][A-Za-z0-9\-]*[A-Za-z0-9]+$.   But this doesn't match m.  How can I change my regular expression so that it fits my needs?

I had a requirement where in the text field the first character should be a alpha numeric and then i can allow a hyphen from thereafter in JavaScript.Also hyphen should not be allowed at the end


I have Dell Inspiron 5567 laptop (i-7, 8GB) with Windows-10 OS installed on it. I am trying to install ubuntu 16.04 as a dual boot OS on Windows10. I have disabled fast boot and secure boot options also. I am facing this error while installing Ubuntu 16.04:  grub-efi-amd64-signed failed to install into /target/. Without GRUB boot loader, the installed system will not boot  The target partition is /dev/sda1.  I have created three partitions:  20GB-ext4- Root mounted 18.9GB-ext4- /home 4GB Swap area   Launchpad link for the log files:   Pastebin link for boot-repair:   Output of sudo fdisk -l:   Disk /dev/sda: 931.5 GiB, 1000204886016 bytes, 1953525168 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 4096 bytes I/O size (minimum/optimal): 4096 bytes / 4096 bytes Disklabel type: gpt Disk identifier: F87D48DF-F3FF-429E-8F0B-558F81712A60  Device          Start        End    Sectors   Size Type /dev/sda1        2048    1026047    1024000   500M EFI System /dev/sda2     1026048    1288191     262144   128M Microsoft reserved /dev/sda3     1288192 1843265535 1841977344 878.3G Microsoft basic data /dev/sda4  1927151616 1928073215     921600   450M Windows recovery environment /dev/sda5  1928073216 1951281151   23207936  11.1G Windows recovery environment /dev/sda6  1951281152 1953523711    2242560   1.1G Windows recovery environment /dev/sda7  1843265536 1851078655    7813120   3.7G Linux swap /dev/sda8  1851078656 1890140159   39061504  18.6G Linux filesystem /dev/sda9  1890140160 1927151615   37011456  17.7G Linux filesystem  Partition table entries are not in disk order.   Output of sudo parted -l:  Model: ATA TOSHIBA MQ01ABD1 (scsi) Disk /dev/sda: 1000GB Sector size (logical/physical): 512B/4096B Partition Table: gpt Disk Flags:   Number  Start   End     Size    File system     Name                          Flags  1      1049kB  525MB   524MB   fat32           EFI system partition          boot, esp  2      525MB   660MB   134MB                   Microsoft reserved partition  msftres  3      660MB   944GB   943GB   ntfs            Basic data partition          msftdata  7      944GB   948GB   4000MB  linux-swap(v1)  8      948GB   968GB   20.0GB  ext4  9      968GB   987GB   18.9GB  ext4  4      987GB   987GB   472MB   ntfs                                          hidden, diag  5      987GB   999GB   11.9GB  ntfs                                          hidden, diag  6      999GB   1000GB  1148MB  ntfs                                          hidden, diag   Model: SRT USB (scsi) Disk /dev/sdb: 32.5GB Sector size (logical/physical): 512B/512B Partition Table: msdos Disk Flags:   Number  Start   End     Size    Type     File system  Flags 1      1049kB  32.5GB  32.5GB  primary  fat32        boot, lba   Please guide me how to resolve this problem.

I am installing Ubuntu 16.04 in an Intel NUC computer with UEFI enabled. I am using an SSD from another computer. During the installation I chose Erase the disk and make a new full install  At the end of the process I see:  grub-efi-amd64-signed failed installation /target/ Ubuntu 16.04    And the system does not boot.  I tried to use boot-repair but apparently it does not solve the problem.


I'm trying to download all features from this WFS: ,   It's working fine with the most simple requests like:   But now, I need >all< features in the dataset, but the service won't allow me to do so since the maxFeatures is set to 100 (serverside). Now, I'd want to create some sort of quadtree to iterate through the data. But therefore I need a boundingbox filter. I found some examples like;  and one using a cql_filter:  None of them is working. Is there someone who can guide me in the right direction? I'd like to know how to use the boundingbox filters, but still, ultimately I'm looking in downloading >all< features within a certain boundingbox.  Edit: I also tested the WFS server in QGIS. Without enabling the viewport as a boundingbox, it works fine. As soon as I say I want only the data within the viewport, it gives an error on the bbox... Is this maybe a server-side problem? Or is it just the QGIS method doesnt work on this specific Service?

I am running a GetFeature request against a WFS server which does not support to download all data at once. Can I use ogc:PropertyIsGreaterThanOrEqualTo to split the dataset into chunks at download them step by step? I wonder how I can construct the actual URL to include the paging filter. Here is what I tried:  http://example.com/wfs.aspx?request=GetFeature&service=WFS&version=1.1.0 \ &typeName=example:example&maxFeatures=50000 \ &FILTER=<ogc:Filter xmlns:ogc="http://www.opengis.net/ogc"> \ <ogc:PropertyIsGreaterThanOrEqualTo><ogc:PropertyName>OBJECTID</ogc:PropertyName> \ <ogc:Literal>50000</ogc:Literal></ogc:PropertyIsGreaterThanOrEqualTo></ogc:Filter>   This is not a valid URI though... That's why uri-encoded the filter part:  http://example.com/wfs.aspx?request=GetFeature&service=WFS&version=1.1.0 \ &typeName=example:example&maxFeatures=50000 \     &FILTER=%3Cogc%3AFilter%20xmlns%3Aogc%3D%22http%3A%2F%2Fwww.opengis.net \ %2Fogc%22%3E%3Cogc%3APropertyIsGreaterThanOrEqualTo%3E%3Cogc%3APropertyName%3EOBJECTID \ %3C%2Fogc%3APropertyName%3E%3Cogc%3ALiteral%3E50000%3C%2Fogc%3ALiteral \ %3E%3C%2Fogc%3APropertyIsGreaterThanOrEqualTo%3E%3C%2Fogc%3AFilter%3E   This actually works. Is there a "nicer" way to do this?


Is it possible that the DNA of an individual changes significantly over a period ?

As far as I know, DNA is the construction protocol of all organisms on Earth.  Does it change when influenced by time and environment (physical laws)?  As parents with schizophrenia are more likely to have children with schizophrenia and an individual with no genetic predisposition for schizophrenia can suffer from such a condition because of drug abuse or environmental influence, does this prove that human DNA is changing during our lifespan?


I've always said "texted" when referring to the past tense of receiving an SMS (text message). However I've noticed a pattern recently that a lot of my friends are saying "text".     I texted you earlier.        I text you earlier.   Despite having a red squiggly line under it in Chrome (), . Which word is correct?

–verb (used without object) Digital Technology.   15.   to send a text message: Texting while driving is an accident asking to happen.   Can I use:        I text to her but she didn't text me back.   I will text on your facebook later.      What about the simple past and past participle forms? Is it text, text, text?


Below exception is thrown from PayUMoney Android SDK. This is captured in Crashlyst. I cant reproduce this in local but it happens in production for few customer. Please let me know your thought? Im using latest PayUMoney sdk Caused by java.lang.NullPointerException: Attempt to invoke virtual method 'com.payumoney.core.PayUmoneySdkInitializer$PaymentParam com.payumoney.core.PayUmoneySDK.getPaymentParam()' on a null object reference Caused by java.lang.NullPointerException: Attempt to invoke virtual method 'com.payumoney.core.PayUmoneySdkInitializer$PaymentParam com.payumoney.core.PayUmoneySDK.getPaymentParam()' on a null object reference at com.payumoney.sdkui.ui.fragments.PayUMoneyFragment.onCreate(SourceFile:244) at androidx.fragment.app.Fragment.performCreate(Fragment.java:2414) at androidx.fragment.app.FragmentManagerImpl.moveToState(FragmentManagerImpl.java:844) at androidx.fragment.app.FragmentManagerImpl.moveFragmentToExpectedState(FragmentManagerImpl.java:1229) at androidx.fragment.app.FragmentManagerImpl.moveToState(FragmentManagerImpl.java:1295) at androidx.fragment.app.FragmentManagerImpl.dispatchStateChange(FragmentManagerImpl.java:2605) at androidx.fragment.app.FragmentManagerImpl.dispatchCreate(FragmentManagerImpl.java:2559) at androidx.fragment.app.FragmentController.dispatchCreate(FragmentController.java:234) at androidx.fragment.app.FragmentActivity.onCreate(FragmentActivity.java:304) at androidx.appcompat.app.AppCompatActivity.onCreate(AppCompatActivity.java:85) at com.payumoney.sdkui.ui.activities.BaseActivity.onCreate(SourceFile:77) at com.payumoney.sdkui.ui.activities.PayUmoneyActivity.onCreate(SourceFile:61) at android.app.Activity.performCreate(Activity.java:6904) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1136) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3266) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3415) at android.app.ActivityThread.-wrap17(ActivityThread.java) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1821) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:148) at android.app.ActivityThread.main(ActivityThread.java:7325) at java.lang.reflect.Method.invoke(Method.java) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120)

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?


There are a lot of Generalized Linear Model questions on here, but I couldn't find one that explicitly addressed this point.  The  page starts out by saying:     [T]he generalized linear model (GLM) is a flexible generalization of   ordinary linear regression that allows for response variables that   have error distribution models other than a normal distribution.   However, the subsequent parts of the Wikipedia page drop the talk of non-normal errors and instead talk about non-normal responses, e.g.     The general linear model may be viewed as a special case of the   generalized linear model with identity link and responses normally   distributed.   I get that sometimes a non-normal response variable means that the errors must also be non-normal, but understand from  that residuals can be normally distributed while the outcome variable is not. So why does Wikipedia bother talking about non-normal response variables?

On whether an error term exists in logistic regression (and its assumed distribution), I have read in various places that:   no error term exists the error term has a binomial distribution (in accordance with the distribution of the response variable) the error term has a logistic distribution   Can someone please clarify?


If $A,B$ are diagonalizable complex matrices of size $n$ such that $AB=BA$ , then is there a common eigen-basis of $A$ and $B$ ?

I've come across a paper that mentions the fact that matrices commute if and only if they share a common basis of eigenvectors. Where can I find a proof of this statement?


Let's say I run lspci command. This command reports names and models of the devices in my system. Output may look like:  03:00.0 Network controller: Intel Corporation Centrino Ultimate-N 6300 (rev 3e)   This string "Centrino Ultimate-N 6300" - where it came from? Was it originally stored somewhere inside the network card's ROM? If not, the card must have provided some information which allowed linux kernel to uniquely identify it. What information is that, how can I get it?

In  I found "[The   latest   version    of   this   document   ". There I says: "… lspci is a synonym for cat /proc/pci".  Which isn't the case here, on a Crunchbang 10 system (Debian based). No such directory. I do get the basic idea and, as far as I  know, the content of proc is (mainly) created during runtime. (Wrong?). This made me curious:  Question: Where does lspci gather it's information from? And where is this documented? (Where did I miss something?)    Another difference I found: In kernel.org's documentation, under "Table 1-5: Kernel info in /proc"      pci     Deprecated info of PCI bus (new way -> /proc/bus/pci/, decoupled by `lspci)


Let $0<a<b$, $x_1=a>0$, $y_1=b>0$, $x_{n+1}=\sqrt{x_ny_n}$, and $y_{n+1}={x_n+y_n \over 2}$, $n\geq 2$. Show that $\lim _{n\rightarrow \infty}x_n=\lim_{n\rightarrow\infty} y_n$.  I have considered the fact that $(y_n-x_n)^2>0$ implies that ${x_n+y_n \over 2}>\sqrt{x_ny_n}$. I'm not entirely sure how to prove this result. Any solutions/hints are greatly appreciated.

I am given this problem: let $a\ge0$,$b\ge0$, and the sequences $a_n$ and $b_n$ are defined in this way: $a_0:=a$, $b_0:=b$ and $a_{n+1}:= \sqrt{a_nb_n}$ and $b_{n+1}:=\frac{1}{2}(a_n+b_n)$ for all $n\in\Bbb{N}$    To prove is that both sequences converge and that they have the same limit. I don't know how to show this. I have spent 2 hours on this, no sign of success


I'm new to sql,  I've one table with 2 columns Table1  Form_Name | Form_Version  abc1     | 0.1  abc1     | 2.1  abc1     | 1.1  pqr      | 0.1  pqr      | 2.1  pqr      | 3.1  pqr      | 4.1  pqr      | 0.2  xyz      | 0.1  xyz      | 2.1   But i want output as below  Form_Name | Form_Version    abc1    |  2.1    pqr     |  4.1    xyz     |  2.1  I'm interested to get corresponding max value of each unique form_name  Answer will be appriciated

My table is:     id home datetime player resource     1 10 04/03/2009 john 399   2 11 04/03/2009 juliet 244   5 12 04/03/2009 borat 555   3 10 03/03/2009 john 300   4 11 03/03/2009 juliet 200   6 12 03/03/2009 borat 500   7 13 24/12/2008 borat 600   8 13 01/01/2009 borat 700     I need to select each distinct home holding the maximum value of datetime. Result would be:     id home datetime player resource     1 10 04/03/2009 john 399   2 11 04/03/2009 juliet 244   5 12 04/03/2009 borat 555   8 13 01/01/2009 borat 700     I have tried: -- 1 ..by the MySQL manual:   SELECT DISTINCT   home,   id,   datetime AS dt,   player,   resource FROM topten t1 WHERE datetime = (SELECT   MAX(t2.datetime) FROM topten t2 GROUP BY home) GROUP BY datetime ORDER BY datetime DESC  Doesn't work. Result-set has 130 rows although database holds 187. Result includes some duplicates of home. -- 2 ..join  SELECT   s1.id,   s1.home,   s1.datetime,   s1.player,   s1.resource FROM topten s1 JOIN (SELECT   id,   MAX(datetime) AS dt FROM topten GROUP BY id) AS s2   ON s1.id = s2.id ORDER BY datetime   Nope. Gives all the records. -- 3 ..something exotic:   With various results.


I heard that it's possible to do this with natbib but I am using biblatex with biber backend but I already have my bib file ready. Is there any way to do this with biblatex?  Pic related red underline is how I want it to work.

I have a reference which has a bib entry and appears in the bibliography. I want to be able to include the entire entry, exactly as it appears in the bibliography, somewhere else in the document.   Is there any way to do that other than to manually write it and format it to look similar?


Given the string This is just an example string to show what I mean.  How do I check that none of the words in this string start with amp, or that one (or more) of the words start with s?  This is what the iOS contacts app does when searching in the list: It checks if the firstname or lastname start with the given search string.  The post that's supposed to be a duplicate, does not answer my question; it's just a general item about the use of regular expressions.

Initial Googling indicates that there's no built-in way to do regular expressions in an Objective-C Cocoa application.  So four questions:   Is that really true? Are you kidding me? Ok, then is there a nice open-source library you recommend? What are ways to get close enough without importing a library, perhaps with the NSScanner class?


Simple question:  Is there a rule of thumb for number of bins in a histogram with a uniform distribution?  Details:  I have a stochastic computer simulation that produces, as a test, $n$ values that should be uniformly distributed in a given interval, $[a, b]$. Due to the inherent random nature of the simulation, there is some noise.  I want to show (visually) that under certain circumstances there is additionally a deviation from this uniform distribution. The deviation happens at the lower boundary, up to $5$ to $15$% of the interval and manifests as less values (up to about $40$%) per bin as a uniform distribution would have.  At the moment $n=5\times10^6$, but I can increase that if necessary. To simplify the comparison between different cases that don't have the same $a$ and $b$ I scale to $[0, 1]$. This is standard practice in my field.  My idea is to use a histogram, but I've been trying to find a justifiable method to define the bin size (or number of bins) and failed so far. Most rules-of-thumb I found assume a normal distribution. Is there any that uses uniform distribution? It's bad to search for, because I only find discussion about uniform bin size, not uniform distribution.  The best rules I can find from  are: Freedman-Diaconis $\approx 160$ Doane-Rule $\approx 20$ The difference lies most likely in the skewness, which is very close to zero in my cases, or I simply used the formula wrong. It's  not that simple. What I did (in Python): k = 1 + numpy.log2(n) + numpy.log2(1 + abs(scipy.stats.skew(z, bias=False)) / np.sqrt(6 * (n - 2) / ((n + 1) * (n + 3))))  Purely subjectively I'd say that $20$ is far too few and $160$ is ok, but Freedman-Diaconis is built on the assumption of normal distributed values... This is an example with 160 bins. I want to show the difference between the black, blue and red line at the bottom for panels (3)-(5), which are not there for (1) and (2). I'm aware that connecting histogram values with a straight line is terrible from a mathematical standpoint, but there are extenuating circumstances that make this a little bit better (basically the values represent a concentration field, which is continuous).    Edit1: I forgot to mention: plotting the independent variable on the second axis is standard practice in my field, because it's the height. So the histogram is turned by $90°$ compared to the usual way.  Edit2: An example P-P-plot (the rightmost panel in the figure above), as suggested by whuber:  For me it is a lot harder to interpret, but that might be my problem, not true in general.  Edit3:  is different, because it (i) looks for an automated solution (which I don't) and (ii) it does not have an underlying (almost) uniform distribution.

I'm interested in finding as optimal of a method as I can for determining how many bins I should use in a histogram. My data should range from 30 to 350 objects at most, and in particular I'm trying to apply thresholding (like Otsu's method) where "good" objects, which I should have fewer of and should be more spread out, are separated from "bad" objects, which should be more dense in value. A concrete value would have a score of 1-10 for each object. I'd had 5-10 objects with scores 6-10, and 20-25 objects with scores 1-4. I'd like to find a histogram binning pattern that generally allows something like Otsu's method to threshold off the low scoring objects. However, in the implementation of Otsu's I've seen, the bin size was 256, and often I have many fewer data points that 256, which to me suggests that 256 is not a good bin number. With so few data, what approaches should I take to calculating the number of bins to use?


I've been trying to create a button that adds a new Value to my Arraylist (contries) when clicked, but it instead of adding my item(Card) the app simply crashes. I am also using Fragments. Here's my code.  That one is my Class for my FragmentPage  package com.example.barryblack;  import android.os.Bundle; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.Button;  import androidx.annotation.NonNull; import androidx.annotation.Nullable; import androidx.fragment.app.Fragment; import androidx.recyclerview.widget.LinearLayoutManager; import androidx.recyclerview.widget.RecyclerView;  import java.util.ArrayList;  public class FragmentPage extends Fragment {  private RecyclerView.Adapter mAdapter; private ArrayList countries; Button btn;       @Nullable @Override public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable  Bundle savedInstanceState) {      CreateExampleList();      View view = inflater.inflate(R.layout.page_fragment, container, false);      RecyclerView recyclerView = view.findViewById(R.id.listRecyclerView);      btn = view.findViewById(R.id.button_insert);      btn.setOnClickListener(new View.OnClickListener() {         @Override         public void onClick(View v) {             InsertItem();          }     });      recyclerView.setHasFixedSize(true);     RecyclerView.LayoutManager layoutManager = new LinearLayoutManager(getActivity());     recyclerView.setLayoutManager(layoutManager);     RecyclerView.Adapter adapter = new MyAdapter(countries);     recyclerView.setAdapter(adapter);       return view; }  public void InsertItem() {     countries.add("Smile");     mAdapter.notifyDataSetChanged();   }  private void CreateExampleList() {     countries = new ArrayList<String>();     countries.add("Eat");     countries.add("Kill");  }      }   This is my CustomAdapter  public class MyAdapter extends RecyclerView.Adapter<MyAdapter.ViewHolder> { private ArrayList<String> cards;  public MyAdapter(ArrayList<String> countries) {     this.cards = countries; }  @Override public MyAdapter.ViewHolder onCreateViewHolder(ViewGroup viewGroup, int i) {     View view = LayoutInflater.from(viewGroup.getContext()).inflate(R.layout.example_item, viewGroup,  false);     return new ViewHolder(view); }  @Override public void onBindViewHolder(MyAdapter.ViewHolder viewHolder, int i) {      viewHolder.tv_country.setText(cards.get(i)); }  @Override public int getItemCount() {     return cards.size(); }  public class ViewHolder extends RecyclerView.ViewHolder{     private TextView tv_country;     private Button tv_button;     public ViewHolder(View view) {         super(view);          tv_country = (TextView)view.findViewById(R.id.tv_country);      } }  }public class MyAdapter extends RecyclerView.Adapter<MyAdapter.ViewHolder> { private ArrayList<String> cards;  public MyAdapter(ArrayList<String> countries) {     this.cards = countries; }  @Override public MyAdapter.ViewHolder onCreateViewHolder(ViewGroup viewGroup, int i) {     View view = LayoutInflater.from(viewGroup.getContext()).inflate(R.layout.example_item, viewGroup,  false);     return new ViewHolder(view); }  @Override public void onBindViewHolder(MyAdapter.ViewHolder viewHolder, int i) {      viewHolder.tv_country.setText(cards.get(i)); }  @Override public int getItemCount() {     return cards.size(); }  public class ViewHolder extends RecyclerView.ViewHolder{     private TextView tv_country;     private Button tv_button;     public ViewHolder(View view) {         super(view);          tv_country = (TextView)view.findViewById(R.id.tv_country);      } }  }   And my LogcatText  java.lang.NullPointerException: Attempt to invoke virtual method 'void androidx.recyclerview.widget.RecyclerView$Adapter.notifyDataSetChanged()' on a null object reference         at com.example.barryblack.FragmentPage.InsertItem(FragmentPage.java:60)         at com.example.barryblack.FragmentPage$1.onClick(FragmentPage.java:43)

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?


If a circuit calls for a capacitor with a specific capacitance, what happens if a capacitor with a different capacitance is substituted?  I have a circuit that calls for a 250uF capacitor to power a small speaker. What would happen if I substituted it for a capacitor with less/more capacitance?   Why can't I substitute it for a 220uF capacitor?  Why can't I substitute it for a 300uF capacitor?

The basic amplification schematics shown in the  datasheet shows a 250 uF capacitor in series with the output. I don't have any 250 uF, but I do have plenty of 470uF. If I understand correctly, is this capacitor used as a high pass filter, so should I be able to use a 470 uF instead of a 250 uF?   Also, is the resistor (10 ohm) and capacitor (0.05 uF) going to ground a low pass filter?


Anxious means 'very eager' or feeling nervous . Can you please explain the difference via an example. I'm interested to hear other people's opinions on this.

Are these words interchangeable? When would you use one over the other?  For example, is it correct to say you "feel nervous" or "feel anxious"? Is it correct to say you are an "anxious person" or a "nervous person"?  The Oxford Dictionaries website defines  as "feeling ... nervousness ... about something with an uncertain outcome" or "... characterised by nervousness".  is defined as "the quality or state of being nervous".  is defined as "anxious or apprehensive". It seems circular to me.  In fact, one of the example sentences of "nervous" is:     The days are gone when I am going to get nervous about games or worry about whether or not I play well.   Yet, according to the definition of "anxious", it sounds to me that "anxious" would be a better fit, since it relates to "something with an uncertain outcome".


I have just installed Ubuntu for the first time. I followed the steps for partitioning and root directories as recommended. However, when I partitioned the /dev/sda1 was green and the disk did not recognize Windows 7. After installation, the Ubuntu was orange. When I reboot I am not given a choice of operating system: instead it goes straight to Ubuntu. How do I change this so I can access Windows 7 again?

I installed Windows 7, which ate Ubuntu's boot file. When starting up the computer, it now goes straight to Windows, without giving me the option of booting Ubuntu.   How can I get Ubuntu back?


How can I check, from a client machine (in Global Group)(also is local admin), whether the domain controller is authenticating my login request to the domain using NTLM or Kerberos?  I know that Kerberos is enabled by default, but the domain Admin can always force clients to auth with other Protocols. So i just want to be sure which protocal they are using. Are there any methods to do to check?  Any help would be appreciated

Is there a command line program you can use?


How to show $A \times (B \cup C) = (A \times B) \cup(A \times C)$, where $A$, $B$, and $C$ are sets. i.e. If $A=\{1,2\}$, $B=\{2,3\}$ then $A \times B = \{(1,2), (1,3), (2,2), (2,3)\}$.   I started with the proposition, suppose $x$ is an element of $LHS$, i.e. $A \times (B \cup C)$. Help is appreciated! Thanks.

How do I prove or disprove $X \times (Y \cup Z)= (X \times Y) \cup(X\times Z)$  for all sets $X$, $Y$, and $Z$? I'm lost on the steps here.


Here's an image of what's happening:    I can't change any of the things. Restarting Blender does nothing. This has never happened to me before and I'm unsure to why this is happening now. I saw other people with this problem but they just said that restarting would help but it didn't.  Anyone experienced this problem before or knows how to fix it?  Thanks in advance.  UPDATE:  Also tried re-installing which didn't help. Tried deleting all addons which also didn't help. Also found out that when I try move something to another layer I can't use the numbers on my keyboard which is another thing which randomly changed recently.  UPDATE 2:  Turns out there was an answer. Just had to search other terms into google. If anyone else is having the problem then go User Preferences, Editing and then enable global undo. Don't remember disabling it but I must of at some point.  the question where I found the answer. Sorry for wasting anyone's time if they were writing an answer :/

Sometimes when adding an object to the scene I see that all options (on toolbar or in window after pressing F6) are disabled. Can anyone tell me when can this happen? What is causing it and how to revert it - make it enabled again. It worked for me when I restarted Blender and reloaded the scene. However I would really like to know what can cause it?


Unable to install flash player on Ubuntu 16.04.   I tried locating on Software Center. Didn't help.   Tried updating Ubuntu. Didn't help.  Tried going through the process of downloading .tar.gz from Adobe. That didn't help either. I tried all three steps on wikihow. Didn't worked for me.   What should I do?  [Update:] This might help. When I tried running command  sudo apt-add-repository multiverse && sudo apt-get update, I get the following message: N: Ignoring file '50unattended-upgrades.ucf-old' in directory '/etc/apt/apt.conf.d/' as it has an invalid filename extension

I know, it's been asked before but I couldn't really get a satisfying answer for some details/backgrounds and I guess it's an important question for many.    Some application seem only to be running with Adobe Flash 15 (or at least I know it does, because I have that version on my Windows Partition).  The official Adobe website says:     NOTE: Adobe Flash Player 11.2 will be the last version to target Linux as a supported platform. Adobe will continue to provide security backports to Flash Player 11.2 for Linux.   Some search on the web like "Ubuntu Adobe Flash 15" or similar does not return any good websites.  I found something that says   (using a "pepper-based version"), and  .   Is it impossible to use this for Firefox too? Would it be a privacy risk?  Are there no alternative projects (I know it's closed source but there are so many so very bright people out there using something similar to wine but just for the plugin....)?  How about the Mac-Version? Shouldn't someone be able to port that one to Linux?


I am having Ubuntu 14.04 LTS. While trying to install crossvc, I am getting broken package error.  I tried to find solutions and tried all the suggested steps in different posts. But no success.   LOGS for sudo apt-get install crossvc  Reading package lists... Done Building dependency tree        Reading state information... Done Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation:  The following packages have unmet dependencies:  crossvc : Depends: libqt3-mt (>= 3:3.3.8-b) but it is not installable E: Unable to correct problems, you have held broken packages.  LOGS for sudo aptitude install crossvc  The following NEW packages will be installed:   crossvc{b} libfam0{a}  0 packages upgraded, 2 newly installed, 0 to remove and 0 not upgraded. Need to get 1300 kB of archives. After unpacking 4048 kB will be used. The following packages have unmet dependencies:  crossvc : Depends: libqt3-mt (>= 3:3.3.8-b) which is a virtual package. The following actions will resolve these dependencies:       Keep the following packages at their current version: 1)     crossvc [Not Installed]                                Accept this solution? [Y/n/q/?] n  *** No more solutions available ***  The following actions will resolve these dependencies:       Keep the following packages at their current version: 1)     crossvc [Not Installed]                                Accept this solution? [Y/n/q/?]   LOGS when installing using Ubuntu Software Center  Package dependencies cannot be resolved  This error could be caused by required additional software packages which are missing or not installable. Furthermore there could be a conflict between software packages which are not allowed to be installed at the same time.  Details: The following packages have unmet dependencies:  crossvc: Depends: libc6 (>= 2.4) but 2.19-0ubuntu6 is to be installed          Depends: libgcc1 (>= 1:4.1.1) but 1:4.9-20140406-0ubuntu1 is to be installed          Depends: libqt3-mt (>= 3:3.3.8-b) but it is not going to be installed          Depends: libstdc++6 (>= 4.2.1) but 4.8.2-19ubuntu1 is to be installed  Other option tried  Even I tried with doing the below for resolving broken package [referred from different posts] but no success.  sudo dpkg --configure -a sudo apt-get clean && sudo apt-get update dpkg --get-selections | grep hold [ no package listed ]

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


I'm newer to this forum, and I'm learning English. My teacher has taught me that we must use gerund after "enjoy", as in:  I enjoy swimming.  Now,  if we use a verb after gerund, which verb should I use: base from or infinitive or gerund? for example:   I enjoy helping you improve your English.     I enjoy helping you to improve your English.     I enjoy helping you improving your English.   Thanks in advance.

Given the following sentences:   They helped us frame some experimental evaluations. They helped us to frame some experimental evaluations. They helped us in framing some experimental evaluations. They helped us on framing some experimental evaluations.   Are all them grammatically correct or not? Are there any semantical nuances introduced by each alternative (and why), or do they mean exactly the same? Are there any other alternatives besides these 4 to convey the same meaning? Finally, which alternative is the best one, or does it depend on the context or writing style?


I have a fork in my github account and I cloned the fork to my local computer. Now I have made some commits, and pushed it to origin. Then, I updated the readme.md file in the fork directly in GitHub, not in the local clone. I made a commit called Updated readme.md file.  Now I wanted to sync it with my local computer. So I ran git pull. This gave me the error:  Cannot pull with rebase: You have unstaged changes.  Please commit or stash them.   After the last commit I have modified 2 files on my local computer. But I no longer want the changes. So, I wanted to remove any changes made to these 2 files and to get in sync with origin.  On branch master Your branch is up-to-date with 'origin/master'.  Changes not staged for commit:   (use "git add <file>..." to update what will be committed)   (use "git checkout -- <file>..." to discard changes in working directory)          modified:   scripts/filename.js  Untracked files:   (use "git add <file>..." to include in what will be committed)          scripts/anotherfile.js  no changes added to commit (use "git add" and/or "git commit -a")

How do I discard changes in my working copy that are not in the index?


What is wrong with the following code? It is not printing the publisher name in 2nd bibliographic entry. What is wrong here? I am using TexStudio with MikConsole.  main file:  \documentclass[12pt, twoside]{report} \usepackage[utf8]{inputenc} \usepackage[a4paper,width=150mm,top=25mm,bottom=25mm, bindingoffset=6mm]{geometry} \usepackage{graphicx} \usepackage{fancyhdr} \usepackage{lipsum}   \usepackage{mwe} \pagestyle{fancy} \usepackage{caption} \usepackage{subcaption} \usepackage{array} \usepackage{amsfonts} \usepackage[style=numeric, sorting=none]{biblatex} \addbibresource{ref.bib}  \begin{document}      test example        \nocite{*}     \printbibliography       \end{document}   ref.bib file:  @article{einstein,     author =       "Albert Einstein",     title =        "{Zur Elektrodynamik bewegter K{\"o}rper}. ({German})     [{On} the electrodynamics of moving bodies]",     journal =      "Annalen der Physik",     volume =       "322",     number =       "10",     pages =        "891--921",     year =         "1905",     DOI =          "http://dx.doi.org/10.1002/andp.19053221004",     keywords =     "physics" }  @article{understandingPrivacy,     author      = "Solove Daniel J",     title       = "Understanding privacy",     publisher   = "Harvard University Press",     year        = "2008", }  @book{dirac,     title={The Principles of Quantum Mechanics},     author={Paul Adrien Maurice Dirac},     isbn={9780198520115},     series={International series of monographs on physics},     year={1981},     publisher={Clarendon Press},     keywords = {physics} }

Why is there no publisher field on the article entry type in biblatex?  I am using biblatex to create my bibliography, however I can't seem to figure out how to reference a publisher in an article Entry Type.  For example:  The Golden Ratio: A Contrary Viewpoint Clement Falbo The College Mathematics Journal Vol. 36, No. 2 (Mar., 2005), pp. 123-134  (article consists of 12 pages) Published by: Mathematical Association of America   How should I include the information about Mathematical Association of America in my entry?


Prove the following : $$ {{n}\choose{7}}-\left \lfloor{\frac{n}{7}}\right \rfloor  $$ is divisible by 7.

This is an exercise from Apostol, which i have been struggling for a while.  Given a prime $p$, how does one show that $${n \choose p} \equiv \biggl[\frac{n}{p}\biggr] \ (\text{mod} \ p)$$ Note that $\Bigl[\frac{n}{p}\Bigr]$ denotes the integral part of $\frac{n}{p}$.  I would also like to know as to how does one try to solve this problem. Well, what we need is to show is whenever one divides ${n \choose p}$ by a prime $p$ the remainder is the integral part of $\frac{n}{p}$.  Now, $${ n \choose p} = \frac{n!}{p! \cdot (n-p)!}$$ Now $n!$ can be written as $$n!= n \cdot (n-1) \cdot (n-2) \cdots (n-p) \cdots 2 \cdot 1$$  But i am really struggling in getting the integral part.


I often wonder what is the proper pronunciation of "lives", like how would I pronounce "human lives", am I suppose to pronounce it like:  Leeves  Like i in thing. Or more like:  Laives  Like i in I'm. I usually say the "Leeves" way, but I mostly hear people say the "Laives" version. I would like to know the proper pronunciation of "lives".

I know that live has several meanings, and two different pronunciations (/lɪv/ and /laɪv/), but I don't know which pronunciation I should use in each case. Can anybody clarify this?


I'm wondering what is the actual verb in this sentence: "I have to study". Is the verb "have" or "study" ? Is the verb "have" and "to study" the infinitive?

A friend of mine is telling me that " have to " is not a modal verb, even thought I have learned that it is.  So is the " have to" a modal verb or not? If not which are the reasons?


My friend and I had a huge debate about whether the trajectory of a projectile thrown upwards will be affected by the rotation of the earth. We finally concluded after detailed explanations that it should be independent of whether earth is rotating or not. I can't "explain" the reason here (its basically related to the fact that the centripetal force due to gravity would act on it even if it is projected).    This question can be simplified to:       Whether a ball thrown upwards will come back to the same position if we consider the effect of rotation of the earth?     We feel it should reach the same point but then the term Coriolis force struck our minds and we got confused...Can someone clear our confusion?  Edit My explanation: When the ball is on the ground, it rotates with the earth due to the centripetal force experienced due to gravity. Similarly, when the object is in air the only difference is that it has lost contact with the earth's surface. It already has a tangential velocity as it was projected from the ground and a centripetal acceleration towards the center of the earth. Therefore, it should still rotate around the axis of the earth as it was earlier (when it was on the ground).     I now know that this doesn't happen from some posts on SE but am not clear with why this explanation is false.

If I'm standing at the equator, jump, and land 1 second later, the  Earth does NOT move 1000mph (or .28 miles per second) relative to me,  since my velocity while jumping is also 1000mph.   However, the Earth is moving in a circle (albeit a very large one),  while I, while jumping, am moving in a straight line.   How much do I move relative to my starting point because of this? I  realize it will be a miniscule amount, and not noticeable in practise,  but I'd be interested in the theoretical answer.


I am trying to create a sample app that draws the route between two locations (like the uber app) I have a toggle switch to turn the location on or off in the app.The app works fine and draws the route but when i just launch the app and toggle the location switch to on and then toggle it to off the app crashes showing a nullpointerexception at  handler.removeCallbacks(drawPathRunnable); I tried to figure out the error but I failed. Here's my code   @Override protected void onCreate(Bundle savedInstanceState) {     super.onCreate(savedInstanceState);     setContentView(R.layout.activity_welcome);     // Obtain the SupportMapFragment and get notified when the map is ready to be used.     mapFragment = (SupportMapFragment) getSupportFragmentManager()             .findFragmentById(R.id.map);     mapFragment.getMapAsync(this);      location_switch = (MaterialAnimatedSwitch)findViewById(R.id.location_switch);     location_switch.setOnCheckedChangeListener(new MaterialAnimatedSwitch.OnCheckedChangeListener() {         @Override         public void onCheckedChanged(boolean isOnline) {             if(isOnline)             {                 startLocationUpdates();                 displayLocation();                 Snackbar.make(mapFragment.getView(),"You are online", Snackbar.LENGTH_SHORT)                         .show();             }             else             {                 stopLocationUpdates();                 mCurrent.remove();                 mMap.clear();                 handler.removeCallbacks(drawPathRunnable);                 Snackbar.make(mapFragment.getView(),"You are offline", Snackbar.LENGTH_SHORT)                         .show();             }         }     });   I have declared handler at the top of my code private Handler handler;  Please explain the answer and the cause of the error.

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


I understand that $x_{1} \ mod \ x_{2} : x > 0$ is the remainder after dividing $x_{1}$ by $x_{2}$ ex: $5 \ mod \ 256 = 5$ but what does it mean to say $-x_{1} \ mod \ x_{2} : x > 0$ or $-5 \ mod \ 256$, I thought that it will be $-5$ but it's $251$, also the other way $x_{1} \ mod \ -x_{2} : x > 0$ or $5 \ mod \ -256$.

Since $16 \div{-3} = -5.\overline{3}$, I thought I could also express this as $16 \div{-3} = -5\:R\:1$ or in other words $16\mod{-3} = 1$. My calculator tells my it is in fact $-2$.  Along the same lines, I see that $-16\mod{3} = 2$. So, while the true answer evaluates to $-5.\overline{3}$ again, the "remained notation" is $-6\:R\:2$ here, and $-6\:R\:-2$ in the first example.  Why do we go "past" $15$ to $18$ (or in the second example, past $-15$ to $-18$) and calculate the remainder from there?  Further warping my brain, $-16\mod{-3} = -1$, so it looks like we "stop" at $-15$ in this example.


When you use the \intertext in the \align* environment with the amsmath package, it has a small vertical space between the displayed text and equation even though it is still coded on the same line as the equation.   In a regular line of code, you can type \intertext{text} (generic equation) on the one line. Yet, when it is compiled, it visual output shows a small vertical space between the text and the equation that I did not add manually.  I am using \intertext because it is left-aligned and I don't want the equation itself to be left-aligned, just the text, but it should also be on the same displayed line as the \intertext.

I have a document I am trying to copy to learn TeX. Here is what I have encountered: How can I have the "or" in the equation. This is what I have right now:  \[ f = ma; \]  But $a$ is the change in velocity,  \[ f = m \frac{dv}{dt};\] \[ f = m  \frac{d^2y}{dt^2};\]   Edit: Trying out Stefan's answer


This question is based on this . Consider the problem of having $\mathbb N$ players. Each is wearing a hat (white, or black), and has to guess his own hat color; however player $i$ can only see the hats of players $j$ with $j>i$. Here's the proposed solution from the blog:  If they can make a strategy before hand, they can make equivalence classes of functions $f: \mathbb N \to \{0,1\}$ with the relation $f \sim g$ iff they agree in all but a finite number of coordinates. Using AC, pick a representative of each equivalence class. Once on the line, since player $i$ can see all players $j$ with $j>i$ then he can tell in which equivalence class they ordering is. Player $i$ the just guesses his hat according to the representative previously picked. Since the representative agrees in all but a finite number of coordinates, then all players guess correctly except a finite number of players.  My question is if the use of the axiom of choice is necessary here. Naively, since these equivalence classes have a lot of structure inside them, it seems to me that I can pick each representative by other means. For example, it's possible to pick a countably infinite number of these representatives: If $\langle 0,1,0,1,0... \rangle$ is in that equivalence class then pick it. If $\langle 0, 0,1,1,0,0,1... \rangle$ is in that equivalence class then pick it. And so on. Of course this is not enough as there are uncountably infinite of these sequences. I would like a prove that AC is necessary here, or if not which weaker version of AC is necessary. (Maybe DC?)

The link to Wikipedia describes the puzzle, and the solution. The axiom of choice is used to pick a sequence from each equivalence class, which the prisoners memorize beforehand.  However, the answer says "When they are put into their line, each prisoner can see what equivalence class the actual sequence of hats belongs to."  Why not wait until the prisoners see which equivalence class they are in. Then, pick a sequence from this equivalence class? This would avoid having to use the axiom of choice, or am I mistaken?


How can I calculate $$ \int{\sec\left(x\right)\tan\left(x\right)  \over 3x + 5}\,{\rm d}x $$  My Try:: $\displaystyle \int \frac{1}{3x+5}\left(\sec x\tan x \right)\,\mathrm dx$  Now Using Integration by Parts::  We Get $\displaystyle  = \frac{1}{3x+5}\sec x +\int  \frac{3}{(3x+5)^2}\sec x\,\mathrm  dx$  Now My Question is How Can I calculate (II) Integral.  Please explain this to me.

Cruising the old questions I came across juantheron asking for $\int \frac {\sec x\tan x}{3x+5}\,dx$ He tried using $(3x+5)^{-1}$ for $U$ and $\sec x \tan x$ for $dv$while integrating by parts.  below is his work.  How can I calculate $$ \int {\sec\left(x\right)\tan\left(x\right)  \over 3x + 5}\,{\rm d}x $$  My Try:: $\displaystyle \int \frac{1}{3x+5}\left(\sec x\tan x \right)\,\mathrm dx$  Now Using Integration by Parts::  We get  $$= \frac{1}{3x+5}\sec x +\int  \frac{3}{(3x+5)^2}\sec x\,\mathrm  dx$$  Here he hit his road block.   I tried the opposite tactic   Taking the other approach by parts.   let $$U= \sec x \tan x$$ then$$ du= \tan^2 x \sec x +\sec^3 x$$ and $$dv=(3x+5)^{-1}$$ then $$v=\frac 1 3 \ln(3x+5)$$ Thus $$\int \frac {\sec x \tan x}{3x+5}\,dx= \frac {\ln(3x+5)\sec x \tan x}{3} - \int \frac {\ln(3x+5) [\tan^2 x \sec x +\sec^3 x]}{3} \,dx$$    As you can see I got no further than he did.   So how many times do you have to complete integration by parts to get the integral of the original $\frac {\sec x \tan x}{3x+5} \, dx$ or is there a better way?


Using the following command I am able to parse strings except for some mismatch: re.compile("(?P<Date>\d{2}[.-]\d{2}[.-]\d{4})\s(?P<Item_Name>.+)\s(?P<Transaction_Amount>[\d,\.\s\d]+)\s(?P<Balance>[\d,\.\s\d]+)")  If I apply this to a list of strings: ['07-10-2019 BIL/INFT/somenumbers/82D3/ AJAY KUMAR 6,080.00 2,46, 287.08',  '08.10.2019 MOBILE BANKING MMM TiMPS/somenumbers/ SIHDFC 4,411.00 250,698.08']  the output is     [{'Date': '07-10-2019', 'Item_Name': 'BIL/INFT/somenumbers/82D3/ AJAY KUMAR 6,080.00', 'Transaction_Amount': '2,46,', 'Balance': '287.08'},  {'Date': '08.10.2019', 'Item_Name': 'MOBILE BANKING MMM TiMPS/somenumbers/ SIHDFC', 'Transaction_Amount': '4,411.00', 'Balance': '250,698.08'}]  So, the second dictionary output is correct . In the first output, it seems due to an extra space in 2,46, 287.08, the number 6.080.00 is getting clubbed with Item_Name and Transaction_Amount , Balance is incorrect. Any way to rectify this?

I have this gigantic ugly string: J0000000: Transaction A0001401 started on 8/22/2008 9:49:29 AM J0000010: Project name: E:\foo.pf J0000011: Job name: MBiek Direct Mail Test J0000020: Document 1 - Completed successfully  I'm trying to extract pieces from it using regex. In this case, I want to grab everything after Project Name up to the part where it says J0000011: (the 11 is going to be a different number every time). Here's the regex I've been playing with: Project name:\s+(.*)\s+J[0-9]{7}:  The problem is that it doesn't stop until it hits the J0000020: at the end. How do I make the regex stop at the first occurrence of J[0-9]{7}?


I try to modify @Mico  as follows:  \documentclass{article}  \begin{document} \[ V = \int_0^2(4-x^2)\,dx = 4\int_0^2\!dx - \int_0^2\!x^2\,dx = 4\left[x\middle]_0^2 - \middle[\frac{1}{3}x^3\right]_0^2 \] \end{document}   but to my surprise I got the following result:    Is this a bug?   I expect that at both term indices will be on the same position regarding bracket. The same result is also if instead x is for example if in brackets is \frac{1}{x}.

I'd like to write this formula with all parenthesis of the same size  N = \left( \frac{s}{2} \right)^2 - \left( \frac{d}{2} \right)^2   so I tried  N = \left( \frac{s}{2} \middle)^2 - \middle( \frac{d}{2} \right)^2   The two results are the following:    Is there a way to achieve my goal without using \big( and similar?  Thanks


Problem. Suppose that $f$ has an isolated singularity at the point $a$, and $f'/f$ has a first-order pole at $a$. Prove that $f$ has either a pole or a zero $a$  This is a problem from a past qualifying exam in the institution I'm attending now which might appear in the final exam on tomorrow.(so if asking this is a problematic, then let me know, I'll delete it.)Because $f$ should have pole or removable or essential singularity at $a$, I checked that if $f$ has removable singularity at $a$ then $f(a)$ has to be $0$ to satisfy the condition in the problem, and also checked that if $f$ has pole at $a$ then $f$ satisfies the condition in the problem. So, I was trying to show that $f$ can't have essential singularity at $a$, and tried to use Casorati-Weiestrass theorem to derive some contradiction and it didn't work. I also tried to just plug in Laurent series expanded at $a$ in $f'/f$ and do calculation to eliminate some coefficients with negative indices but calculation would result infinite system of linear equations so I gave up doing it. Therefore, I'm stuck and please give me some hint.

The following is an old qualifying exam that I cannot solve:  Suppose $f$ is holomorphic on the punctured unit disk and $ \frac{f '}{f} $ has a simple pole at $0$.  Show that $f$ does not have an essential singularity at $0$.


My question is quite elementary but I need help understanding the basic concepts. In the following example from the Mathworks  of the princomp function  load hald; [pc,score,latent,tsquare] = princomp(ingredients); pc,latent   we get the following values for:  pc =     -0.0678   -0.6460    0.5673    0.5062    -0.6785   -0.0200   -0.5440    0.4933     0.0290    0.7553    0.4036    0.5156     0.7309   -0.1085   -0.4684    0.4844  latent =    517.7969    67.4964    12.4054     0.2372  score =     36.8218   -6.8709   -4.5909    0.3967    29.6073    4.6109   -2.2476   -0.3958   -12.9818   -4.2049    0.9022   -1.1261    23.7147   -6.6341    1.8547   -0.3786    -0.5532   -4.4617   -6.0874    0.1424   -10.8125   -3.6466    0.9130   -0.1350   -32.5882    8.9798   -1.6063    0.0818    22.6064   10.7259    3.2365    0.3243    -9.2626    8.9854   -0.0169   -0.5437    -3.2840  -14.1573    7.0465    0.3405     9.2200   12.3861    3.4283    0.4352   -25.5849   -2.7817   -0.3867    0.4468   -26.9032   -2.9310   -2.4455    0.4116   Legend:  latent is a vector containing the eigenvalues of the covariance matrix of X.  pc is a p-by-p matrix, each column containing coefficients for one principal component. The columns are in order of decreasing component variance.**  score is the principal component scores; that is, the representation of X in the principal component space. Rows of SCORE correspond to observations, columns to components.  Can somebody explain whether the values of score are genetrated somehow using the values of pc and if this true, what kind of computation is perfomed ?

Given a data matrix $\mathbf X$ of $12 \times 7$ size with samples in rows and variables in columns, I have calculated centered data $\mathbf X_c$ by subtracting column means, and then computed covariance matrix as $\frac{1}{N-1} \mathbf X_c^\top \mathbf X_c$.  The dimensions of this covariance matrix are $7 \times 7$. After that I have calculated the eigenvalue decomposition, obtaining eigenvector matrix $\mathbf V$ with eigenvectors in columns.  Now I want to know about projections (i.e. principal component scores in PCA): is it $\mathbf{V}^\top \mathbf{X}_c$ or $\mathbf{X}_c \mathbf{V}$?  mean_matrix = X - repmat(mean(X),size(X,1),1); covariance = (transpose(mean_matrix) * mean_matrix)/(12-1);  [V,D] = eig(covariance); [e,i] = sort(diag(D), 'descend'); V_sorted = V(:,i);


Is it possible to indent blocks of code in vim instead of going to each line and indenting a line at a time?   Maybe highlight the code and execute a command that will indent the highlighted code?

It should be trivial, and it might even be in the help, but I can't figure out how to navigate it. How do I indent multiple lines quickly in vi?


I have a hosted VM with about 20 client websites on board. Many use a database which is currently SQL Server 2008 R2 (not an evaluation). Because of upcoming licensing issues, I need to change to the Web Edition of SQL Server with my current host. Is it possible to install SQL Server Web Edition on a box that already has SQL Server 2008 R2 installed?  If it's not possible, could someone suggest best process for this switch?

We are running a SQL Server 2008 R2 Standard Evaluation version. The client has decided they don't want to pay for full SQL Server standard and feel the Web edition is suitable. Can I downgrade SQL Server 2008 R2 Standard Evaluation to Web Edition?  Obviously I need to put a licence on it. Can I just put the Web edition licence on it and it will become a Web Edition server or does it require a re-install.


Let $X = \mathbb{R}$ equipped with usual topology $\tau$, then $\tau = 2^\mathbb{R}$  Does this imply that the cardinality of $\tau$ is greater than continuum?

Calculate the number $o(\mathbb{R})$ of open subsets of the real line.  I know that the answer is $\mathfrak{c}$ but I don't know how my lecturer got this.  I am doing an introductory topology course, so I know a few topological concepts. Such as that the set of all open intervals forms a base for the real numbers. Is this somehow relevant in showing that  $o(\mathbb{R}) = \mathfrak{c}$?


Generalized linear models (GLM's) are apparently widely used, but I'm having some trouble to find comprehensive but still simple resources to explain it to someone who is not a statistician but has a basic background on statistics.  Currently I have found the following references:   Wikipedia GLM article This book (I didn't have access to it yet):MCCULLAGH, Patrick; NELDER, John A. Generalized linear models. 2nd ed. London: Chapman & Hall/CRC, 1995. 511 p. This paper (very hermetical): McCullagh, Peter. "Generalized linear models." European Journal of Operational Research 16.3 (1984): 285-292.   Looking for websites, books or research papers.

I am looking for an introductory to intermediate level book on Generalized Linear Models. Ideally, in addition to the theory behind the models, I would want it to include applications and examples in R or another programming language - I hear SAS is also a popular choice. I intend to study it on my own and so it would help if it provided the answers to its own exercises.   You can assume I have taken the traditional year-long courses in calculus and probability theory. I am also familiar with the basics of regression analysis.


I have a little problem, I'm in this situation: I have a json that I parse with no problems with json_decode making an object, in this array I have various values, in particular I have an array called "message" then I want to add values to this $jsonObj->message for example:  $jsonObj->message->hello = 'example';   now I want to add another object to $jsonObj->message without removing other values then, what I want is:   $jsonObj->message->hello; // this is auto generated from the json   $jsonObj->message ADD $json2;   So I should have $jsonObj->message->somethingIntoJson2 and $jsonObj->message->hello too;  Thank you.

We have two PHP5 objects and would like to merge the content of one into the second. There are no notion of subclasses between them so the solutions described in the following topic cannot apply.    //We have this: $objectA->a; $objectA->b; $objectB->c; $objectB->d;  //We want the easiest way to get: $objectC->a; $objectC->b; $objectC->c; $objectC->d;   Remarks:   These are objects, not classes. The objects contain quite a lot of fields so a foreach would be quite slow. So far we consider transforming objects A and B into arrays then merging them using array_merge() before re-transforming into an object but we can't say we are proud if this.


As far as I understand bash is the default shell in Ubuntu, so why does /bin/sh point to /bin/dash?

I am wondering what the point of sh being symbolic linked to dash is? I understand that dash is supposed to be faster than bash, but I am uncertain why the original sh shell isn't present in sh.   Or if anything why isn't sh linked to bash?


Why can black bodies emit all wavelength radiations?  Also, in Wein's law of displacement, how do we sat that wavelength corresponding to the max intensity of the radiation is inversely proportional to the temperature?

The  (unlike the quantized emission seen from atomic spectra), is continuous over all frequencies.  Many objects approximate ideal blackbodies and have radiation curves very similar in shape and continuity to that of an ideal black-body (often minus some emission and absorption lines from the atoms in an object, such as radiation curves seen from stars).  I am wondering what exactly gives rise to a basically continuous black-body radiation curve in real objects? Since atomic energy states are quantized, it seems real life black-body curves would have some degree of measurable quantization to them (or perhaps the degree of quantization is so small the radiation curves look continuous).


In my view port full model is showing, but in camera view and also in render view the full view of model is not showing.

I have created a simple model here   When rendering it the end of it is cut off   How can I get the camera to render a longer distance?


I have burned a Ubuntu DVD to install. I want to install it on my alternative, internal D drive,  NOT my normal C drive!  When I reboot and put in the DVD it starts my windows on C drive again. What should I do?

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


I am trying to center an icon in my header navigation.  I have the basics down but the center changes depending on if there are multiple icons in the same header.  How can I keep the center icon centered even if the left or right icons are removed?    HTML

   CSS  .mp-center-wrapper{     text-align: center; }  .mp-myheader {     background: #015688 !important;     width:100% }  .mp-icon-hamburger {     background-image:       url("http://icons.iconarchive.com/icons/klukeart/summer/128/hamburger-icon.png");     background-position:center;     background-repeat:no-repeat; }  .mp-icon-xsm {     width: 25px;     height:25px;     background-size: 25px;     display:inline-block; }  .mp-float-left {     float:left; }  .mp-float-right {     float:right; }

How can I horizontally center a
 within another
 using CSS?

Foo foo


My UK visit visa got refused and nw I want to apply again immediately. I had applied for UK visit visa but it got refused due to some reasons as mentioned in refusal letter. The mistake I did is that I forgot to submit my salary account statement but apart from this.they raised some more concern regarding my trip. Please see the attached refusal letter and advice me. I had submitted the imvitation letter from my brother in law with all required docs(his account statement, invitation, letter, passport copy,telephone bill). My suggest me what all things i should consider for reapplying and content for cover letter. This was my first visa and have no visa history. They refused my visa  under paragraph V4.2(a), (c) and (e) of Appendix V of the immigration letter. Should I apply it again immediately or not? Thnaks]

I'm married have a job with stable income.I have 2 kids. I have applied for UK visit visa about 7 years ago and was refused. I can't remember what exactly was the reason for refusal.  I want to travel for tourism to spend 9 days and my budget is around 1300GBP for the trip. I would be spending part of my annual leave in the UK. I have the following people in UK: Mother, Dad, Sister(she's married), Brother (married), Uncle and Aunt.  I'm travelling alone since my wife is pregnant. I haven't travelled since I was in school then.  I will be on my yearly 21 days annual leave during which I will be spending 9days in UK. I can't think of anything more about my circumstance.  So what should a cover letter look like?  secondly I have just 1 account where my salary is paid in monthly and my savings.I will be submitting the 6 months bank statement for the account.  Additional question:  In the income & expenditure where one is asked to indicate if I have income and savings,should I click Yes or No. And if Yes should state the ending balance as at the time of my application.


Is it true that in Javascript the order of the for in loops is determined by the priority field in the objects?  var objs={     foo:{priority:0,name:"foo"},     bar:{priority:1,name:"bar"}, } for(key in objs){     console.log(objs[key].name) }   First I see bar, then foo.  So is it true?

Does the "for…in" loop in Javascript loop through the hashtables/elements in the order they are declared? Is there a browser which doesn't do it in order? The object I wish to use will be declared once and will never be modified.  Suppose I have:  var myObject = { A: "Hello", B: "World" };   And I further use them in:  for (var item in myObject) alert(item + " : " + myObject[item]);   Can I expect 'A : "Hello"' to always come before 'B : "World"' in most decent browsers?


On my website I have a button that I hope visitors would use to share my content by mail.  It's simple, it uses the mailto protocol and it works.  However the message within the mail sucks because it's plain text.  I know there are emails with a html body that makes sharing stuff easier and you can add things like Twitter Cards, Facebook Open Graph and Google+ Markup.  However it seems the two doesn't combine or am I missing something? I want to be able to send rich HTML emails using the mailto protocol.  I'm currently using a CMS-platform called indexhibit and simply changing to wordpress or something else is not an option.

I have not had to mess with mailto links much.  However I now need to add a link in the body of a mailto if it is possible.    Is there a way to add a link or to change the email opened to an html email vs a text email?  Something like:  Link text goes here


I'm plotting experimental data with pgfplots and wonder how I can add smaller ticks to the axis which are not annotated. Every data analysis software (even Excel) makes this, but I didn't find a way to do it easily in pgfplots. I must have overlooked it.    I hope there is a way to tell pgfplots to split every "big" step (0-5, 5-10, ...) into, lets say, five smaller steps.

I'm trying to plot an easy function and I would like to enable the minor grid. But it seems that this instruction is ignored. I used the grid=both option but it has no effect. The only grid I can see is the major grid. I could not find anything helpful on the internet. Thanks for any advise.  \documentclass[11pt]{amsart} \usepackage{geometry}                 \geometry{a6paper}                    \usepackage[utf8]{inputenc} \usepackage{graphicx} \usepackage{amssymb} \usepackage{amsmath} \usepackage{epstopdf} \usepackage{pgfplots} \usepackage[german]{babel} \usepackage{tikz} \usetikzlibrary{shapes.misc} \usetikzlibrary{decorations.markings}  \title{Control}  \begin{document}  \begin{tikzpicture}  \begin{axis}[grid=both,xlabel={error},ylabel={power}] \addplot[mark=none,domain=4:30,samples=200]{55/(1.3*(ln(x)/ln(10)))}; \end{axis} \end{tikzpicture} \end{document}


I am not sure how to approach this problem. if you could help it would be great.

Show that the set of all finite subsets of $\mathbb{N}$ is countable.   I'm not sure how to do this problem. I keep trying to think of an explicit formula for 1-1 correspondence like adding all the elements in each subset and sending that sum to itself in the natural numbers, but that wouldn't be 1-1 because, for example, the set {1,2,3} would send to 6 and so would the set {2,4}.  Multiplying all the elements in each subset and sending that product to itself in the natural numbers wouldn't work either since, for example, {2,3} would send to 5 and so would the set {1,5}. Any ideas?


I am reading from a txt file and populating a core data entity.  At some point I have read the value form the TXT file and the value is @"0.9".  Now I assign it to a CGFloat.  CGFloat value = (CGFloat)[stringValue floatValue];   debugger shows value as 0.89999997615814208 !!!!!!?????  why? bug? Even if it things [stringValue floatValue] is a double, casting it to CGFloat should not produce that abnormality.

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


I tested the program using static allocation and the compiler gives me an error when I had changed the value .  But when I used dynamic allocation, the value changed .  class Test{  private:     int *value;  public:      Test( int v ){         value = new int;         *value = v;     }      int getValue() const{         *value = 110;         return *value;     }      ~Test(){         delete value;     }  }; int main(){     Test t1(7);     cout<<t1.getValue()<<endl; }

class String {      private:         char* rep;      public:         String (const char*);         void toUpper() const; };   String :: String (const char* s) {     rep = new char [strlen(s)+1];     strcpy (rep, s); }   void String :: toUpper () const {     for (int i = 0; rep [i]; i++)     rep[i] = toupper(rep[i]); }   int main () {     const String lower ("lower");     lower.toUpper();      cout << lower << endl;     return 0; }


Let $W=\operatorname{M}_{n\times n}(\mathbb{F})$ (square matrices $n\times n$ over $\mathbb{F}$), and $f\in W^*$.  If $f(AB)=f(BA)$ for every $A,B\in W$ and $f(I)=n$ prove that $f(A)=\operatorname{tr}A$ for every $A\in W$.  I can understand why it's true, the only part in $AB$ that is the same in $BA$ is the diagonal, and together with $f(I)=n$ it is pretty obvious. But how can I prove it? I tried writing the base for $W$ and then writing $I$ as a linear combination of that base, but I got stuck.  Thank you.

We know that the trace of a matrix is a linear map for all square matrices and that $\operatorname{trace}(AB)=\operatorname{trace}(BA)$ when the multiplication makes sense.   On the , under properties, it says that these properties characterize the trace completely in the following sense: If $f$ is a linear function on the space of square matrices satisfying $f(xy)=f(yx)$, then $f$ and $\operatorname{tr}$ are proportional. A  of the page gives the justification, but I do not understand the logic of it. Thanks


I tried to use the grep command to search for a string like -R in a file. But the command thinks, that I am trying to hand over an option like -i for ignore case.

I wrote the following command in order to match $a with $b, but when the value includes "-", then I get an error. How can I avoid that?  # a="-Xmx5324m" # b="-Xmx5324m" # # #  echo "$a"  | grep -Fxc "$b" grep: conflicting matchers specified


I'm currently in the process of developing some shell scripts but have run into a problem: whilst I am able to execute numerous commands on my Mac, when I try to run it on other people's computers I get Command not found errors indicating that they do not have the specific command line tools installed.  It is my belief that many of these tools come as a result of installing Xcode and other package managers like Homebrew. My question is: is there a list or another way of finding out if a specific command (tool) is pre-installed on a standard Mac computer (without Xcode installed) without having to manually test it on someone else's computer?  For example,  post hints that git is pre-installed which is only the case if you have installed Xcode, otherwise, git is unavailable.   P.S. For my specific case, I am wondering if hexdump is pre-installed or not (without Xcode)

I am trying to setup a bunch of development projects in my Mac. I have to run various tools like python, ruby, scala, groovy etc.  To see if a tool is available I use options like   ruby --version.    Instead I would like to see all the list of tools available in Mac terminal via a single command. What is the command/options for it?


I'm using:  \begin{acronym} \acro{URL}{Uniform Resource Locator} \end{acronym}   with package \usepackage[printonlyused]{acronym}  But my acronyms are not alphabetical sorted , and I want it. How can I make this?

I am using acronym package to create the list of Acronyms. I am using Acronym1.tex containing the definition of all the acronyms. However here is the list of problems I am facing.   I have to sort the list manually every time I need a sorted list in the pdf. I am not aware of the options with usepackage. I am currently using  \usepackage[printonlyused,withpage]{acronym}  Is it possible to order the Acronym list? Currently what I am getting is      <short>:<Description>..........<Page Number>   I would prefer something like this :     <short>\t<Description>..........<Page Number>   Example:   \documentclass{article} \usepackage[colorlinks]{hyperref} \usepackage[printonlyused,withpage]{acronym} \begin{document}  \section{Intro} In the early nineties,\ac{TDMA}, \ac{IEEE} , \ac{GSM}, \ac{WPAN} \ac{FPGA}  \section{Acronyms}  \begin{acronym} \acro{TDMA}{Time Division Multiple Access} \acro{WPAN}{Wireless Personal Area Network} \acro{GSM}{Global System for Mobile communication} \acro{FPGA}{Field Programmable Gate Array} \acro{IEEE}{Institute of Electrical and Electronics Engineers} \end{acronym}  \end{document}   If you are using  acronym package and know the options on how to use it, that will be really helpful.  I could not find any relevant information, in .


I am currently trying to solve some beginners exercises but I am stuck at the point where I am supposed to expand an existing function and also add the string that allows me to ignore upper and lower cases. I do really do not know where in the function I should be adding this last information. I am also supposed to find all the lines where the words appear ('Heaven', 'all', 'you'). Here is what I have now: def all_line_numbers(text, word):     """     Returns the line numbers (beginning with 1) where the word appears in     :param text: Text in which the word is searched for     :param word: A word to search for     :return: List of line numbers     """      lines = text.splitlines()     i = 0     for line in lines:         i = i + 1         if word in line:             return i      return []  and it ends with: # print() print("exercise") words = ['Heaven', 'all', 'you'] for word in words:     num = all_line_numbers(it_rains, word)     if num:         print(f"The word {word} is in the following lines {num}.")     else:         print(f"The word {word} was not found!")  Thank you very much in advance!

How can I do case insensitive string comparison in Python?  I would like to encapsulate comparison of a regular strings to a repository string using in a very simple and Pythonic way. I also would like to have ability to look up values in a dict hashed by strings using regular python strings.


I made a mistake that resulted in the deletion of /etc/pam.d, how do I restore the PAM configuration to the state that would be generated for my currently installed packages when I don't know the specific files to restore?

I would like to restore LightDM to its default state, because for some reason /etc/lightdm/unity-greeter.conf is now an empty file.  Deleting /etc/lightdm/unity-greeter.conf and then running sudo apt-get install --reinstall unity-greeter doesn't create a new config file as you might expect.   How can I restore a missing config file?


What is wrong with this solution of find the least value of $ \sec^6 x +\csc^6 x + \sec^6 x\csc^6 x$  They all are positive terms so arithmetic mean is greater than equal to geometric mean. $$ \sec^6 x +\csc^6 x + \sec^6 x\csc^6 x\geq  3(  \sec^6 x \csc^6 x \sec^6 x\csc^6 x)^\frac{1}{3}   $$  $$ \sec^6 x +\csc^6 x + \sec^6 x\csc^6 x \geq 3(  \sec x \csc)^4 $$  $$ \sec^6 x +\csc^6 x + \sec^6 x\csc^6 x\geq  \frac{3 * 2^4}{\sin ^4 2x} $$ Clearly least value is 48, but something is wrong here, as the answer is 80, if I use other methods.

Find the least value of $$ \sec^6 x +\csc^6 x + \sec^6 x\csc^6 x$$ I tried AM greater than equal to GM But that's for finding maximum value.  This can probably be solved with calculus but I don't know for some reason I can't find the answer . Which is $80$.


I was messing around with some computer files and accidentaly deleted my .minecraft folder. There was alot of important stuff in there, and I don't know how to get it back. Can anyone help?

So I deleted my .minecraft folder thinking, "oh yeah it'll all just Re-Download when i start minecraft up". I was wrong. I looked in my .minecraft folder and all that is in there is the bin folder and the last login file. I have no idea what to do... Can someone help me with this?  Just letting you know that I emptied my recycle bin after I deleted it. I also have a premium account and it worked fine for the past year.


I have an account with close to 100 reputation on .  -  When I get 200 reputation, will the site association bonus apply to already existing accounts (like my meta.se - this account),  or   Does it only apply to new communities joined thereafter?   And if I do get it on previous accounts, will I get +100 rep or enough to make my balance 100?

I was just awarded +100 reputation on all of my Stack Exchange accounts.  What is this bonus for? It simply says "Association Bonus" on my reputation overview.  Also:   What privileges does the association bonus grant users? Can I lose the association bonus? Does it make my reputation 101 everywhere? Can I earn the association bonus on sites I haven't joined yet? Does it matter which site I earn the 200 reputation on? Will I get an association bonus every time my reputation on a site crosses 200 points? Does the association bonus allow me to answer protected questions? Does the association bonus count towards the reputation cap? Can I get the association bonus if I only have a profile on one site? What else is there to know about the association bonus?


I'm performing a nested grep like this:  grep -ir "Some string" . |grep "Another string I want to find in the other grep's results"   This works perfectly as intended (I get the results from the first grep filtered by the second grep as well), but as soon as I add an "-l" option so I only get the list of files from the second grep, I don't get anything.  grep -ir "Some string" . |grep -l "Another string I want to find in the other grep's results"   This results in the following output:     (standard output)   I guess piping doesn't work when I just want the list of files. Any alternatives?

I would like to get the multi pattern match with implicit AND between patterns, i.e. equivalent to running several greps in a sequence:  grep pattern1 | grep pattern2 | ...   So how to convert it to something like?  grep pattern1 & pattern2 & pattern3   I would like to use single grep because I am building arguments dynamically, so everything has to fit in one string. Using filter is system feature, not grep, so it is not an argument for it.    Don't confuse this question with:  grep "pattern1\|pattern2\|..."   This is an OR multi pattern match.


I was trying to activate network sharing on my computer and I had this error message from the terminal  Your wireless card or driver does not support Access Point mode.    My wireless card info is as follows   description: Wireless interface    product: Centrino Advanced-N 6200    vendor: Intel Corporation    physical id: 0    bus info: pci@0000:03:00.0    logical name: wlan0    version: 35    serial: 00:27:10:80:db:30    width: 64 bits    clock: 33MHz    capabilities: bus_master cap_list ethernet physical wireless    configuration: broadcast=yes driver=iwlwifi driverversion=3.13.0-29-generic firmware=9.221.4.1 build 25532 latency=0 link=no multicast=yes wireless=IEEE 802.11abgn"   I am not a comp guru but can follow instructions very well, please help.

I am a new Ubuntu user and have installed Ubuntu 12.04 LTS on my Acer Aspire One D255 netbook with an Intel Centrino N1000 Wireless Card. All I want is to set my netbook as wifi hotspot for my android devices. This worked well for me in Windows 7 using Connectify but I am trying to make hotspot in Ubuntu using hostapd () but getting following error:  ali@ali-AOD255:~$ sudo hostapd ~/hostapd-test.conf Configuration file: /home/ali/hostapd-test.conf nl80211: Failed to set interface wlan0 into AP mode nl80211 driver initialization failed. ELOOP: remaining socket: sock=4 eloop_data=0x8178910 user_data=0x8178e80  handler=0x807c5e0 ELOOP: remaining socket: sock=6 eloop_data=0x817ac98 user_data=(nil) handler=0x8086770   All I want is to setup a wifi hotspot using my netbook so that my android devices can view and connect to it.


So given a m*n matrix represented as columns, I'm supposed to increment one index at a time to fill a specified amount of row and column, say if I'm supposed to increment (2,0), it'll ONLY increment (2,0). So I wrote this code: for i in range(row):     for j in range(col):         print("X")         print(matrix)         content = matrix[i][j]         matrix[i][j]=content+1         print("matrix ({},{}) = {}".format(i,j,matrix[i][j]))  I added several prints to debug the code, and on the first index it outputs: X [[0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0]] matrix (0,0) = 1 [[1, 0, 0, 0], [1, 0, 0, 0], [1, 0, 0, 0]]  it's supposed to increment (0,0) to 1 so it's supposed to look like this: [[1, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0]]  but as you can see....it increments an entire row at once... I don't know why it happened, did I miss something?

I needed to create a list of lists in Python, so I typed the following: my_list = [[1] * 4] * 3  The list looked like this: [[1, 1, 1, 1], [1, 1, 1, 1], [1, 1, 1, 1]]    Then I changed one of the innermost values: my_list[0][0] = 5  Now my list looks like this: [[5, 1, 1, 1], [5, 1, 1, 1], [5, 1, 1, 1]]    which is not what I wanted or expected. Can someone please explain what's going on, and how to get around it?


I am suddenly having a strange issue with circles within an axis environment. Any circles drawn inside an axis become weirdly stretched, as in the following example:   \documentclass{standalone} \usepackage{tikz} \usepackage{pgfplots} \pgfplotsset{compat=1.15}  \begin{document}         \begin{tikzpicture}     \begin{axis}[xmin=-5,xmax=5,ymin=-2,ymax=2,axis equal]     \node[fill=black,inner sep=3pt] (a) at (0,0) {};     \draw (0,0) circle[radius=1];     \end{axis}     \end{tikzpicture} \end{document}     The issue persists even with the axis equal image option, and, weirdly, it seems that no matter what the bounds on the x-axis are, the drawn path does not "fit" into the coordinate system. On the other hand, the circle command works properly outside of an axis environment. Also, the arc command draws proper circles both in and outside of an axis environment (and with using axis coordinates and units), but I would obviously prefer to use the simpler syntax.  I should mention that I only have a single PC with this issue; my other computer compiles the exact same file properly. They are both running MiKTeX v. 2.9.7300 and have pgfplots v. 1.16.  I cannot say exactly when this issue appeared, but it should be within the last two months or so. It might be related to , but I cannot say.

With a fresh installation of TeX Live (updated just before writing this post), circles in axis environments are distorted. Consider the following MWE:  \documentclass{article} \usepackage{pgfplots} \pgfplotsset{compat=1.16}  \begin{document}  \begin{tikzpicture} \begin{axis}[   ymin=-3, ymax=3,   xmin=-3, xmax=3 ]  \draw (1,0) circle [radius=1.5]; \fill (1,0) circle [radius=1];  \end{axis} \end{tikzpicture}  \end{document}   The output looks like this:   Obviously, the circles aren't even circles. I haven't encountered this problem before. Did I do anything wrong while setting up my new system?  EDIT: It's not an issue of using axis equal or not since the axes are scaled more or less equally already. Instead, the circles appear as rotated ellipses that are strongly stretched out in one dimension.  EDIT 2: Here's the output of \listfiles:  article.cls    2019/12/20 v1.4l Standard LaTeX document class   size10.clo    2019/12/20 v1.4l Standard LaTeX file (size option) pgfplots.sty    2018/03/28 v1.16 Data Visualization (1.16) graphicx.sty    2019/11/30 v1.2a Enhanced LaTeX Graphics (DPC,SPQR)   keyval.sty    2014/10/28 v1.15 key=value parser (DPC) graphics.sty    2019/11/30 v1.4a Standard LaTeX Graphics (DPC,SPQR)     trig.sty    2016/01/03 v1.10 sin cos tan (DPC) graphics.cfg    2016/06/04 v1.11 sample graphics configuration   pdftex.def    2018/01/08 v1.0l Graphics/color driver for pdftex     tikz.sty    2020/01/08 v3.1.5b (3.1.5b)      pgf.sty    2020/01/08 v3.1.5b (3.1.5b)   pgfrcs.sty    2020/01/08 v3.1.5b (3.1.5b) everyshi.sty    2001/05/15 v3.00 EveryShipout Package (MS) pgfrcs.code.tex  pgfcore.sty    2020/01/08 v3.1.5b (3.1.5b)   pgfsys.sty    2020/01/08 v3.1.5b (3.1.5b) pgfsys.code.tex pgfsyssoftpath.code.tex    2020/01/08 v3.1.5b (3.1.5b) pgfsysprotocol.code.tex    2020/01/08 v3.1.5b (3.1.5b)   xcolor.sty    2016/05/11 v2.12 LaTeX color extensions (UK)    color.cfg    2016/01/02 v1.6 sample color configuration pgfcore.code.tex pgfcomp-version-0-65.sty    2020/01/08 v3.1.5b (3.1.5b) pgfcomp-version-1-18.sty    2020/01/08 v3.1.5b (3.1.5b)   pgffor.sty    2020/01/08 v3.1.5b (3.1.5b)  pgfkeys.sty pgfkeys.code.tex  pgfmath.sty     pgfmath.code.tex pgffor.code.tex tikz.code.tex l3backend-pdfmode.def    2020-02-03 L3 backend support: PDF mode supp-pdf.mkii epstopdf-base.sty    2020-01-24 v2.11 Base part for package epstopdf epstopdf-sys.cfg    2010/07/13 v1.3 Configuration of (r)epstopdf for TeX Live