Python: Appending float element to an array changes its precision, e.g. 1.2 to 1.200000002

I have encountered a very bizarre problem. I am trying to create a function that returns an array of values that enclose a range with a certain step size (such as you might find on the axis of a plot). Instead of just using np.arange(min,max,step), I want something that rounds the step size better. Here is what I tried:  def get_decade(value):     return pow(10,math.floor(math.log10(value)))  def get_steparray(min,max,delta):     delta_step = float(get_decade(delta))     next = math.floor(min/delta_step)*delta_step     print next     array = [next]     while next < max:         next = int((next+delta_step)/delta_step)*delta_step         print next         array.append(next)         print array     print array     return array   The print statements are in there to help me figure out what is going on. Here is what I tried running it with:  print get_steparray(1.032,1.431,0.1)   From this, I was expecting the array to end up as [1.0,1.1,1.2,1.3,1.4,1.5]  Here is what I get from the function:  1.0 1.1 [1.0, 1.1] 1.2 [1.0, 1.1, 1.2000000000000002] 1.3 [1.0, 1.1, 1.2000000000000002, 1.3] 1.4 [1.0, 1.1, 1.2000000000000002, 1.3, 1.4000000000000001] 1.5 [1.0, 1.1, 1.2000000000000002, 1.3, 1.4000000000000001, 1.5] [1.0, 1.1, 1.2000000000000002, 1.3, 1.4000000000000001, 1.5]   As you can see, some of them work, and others have the extra decimals added.  Anyone have any ideas what might be causing this? Thanks for any insight you can provide. Alternatively, I would be just as happy if someone knew a better, more functional way to create such an array. Maybe I should just stick to using np.arange and adjust the max/min/step values?  (Yes, I know my code isn't the cleanest. The function above started out much cleaner, but I added some unnecessary features to it to try to get it to work.)  Edit: While I appreciate everyone's insightful comments, I am still not sure that they address my issue fully. As is visible in the printout, each value is stored to sufficient precision of my needs when as an isolated float type. But when they are added to the array, it is only then that they change precision. I am quite aware of the issues with floating points, in general, but was curious about the specific differences between the float and the array. I wonder if maybe the array is storing the value in a lower number of bits than the individual value.  That being said, I think the suggestion to focus more on formatting at the point of usage is what I will end up doing.  Thanks!


How do I capture the audio that is being played?

Does anyone know how to programmatically capture the sound that is being played (that is, everything that is coming from the sound card, not the input devices such as a microphone).


Why would I create an object with 'class' instead of 'function'?

I've briefly followed a . It shows this style of object creation:  function component(width, height, color, x, y) {    this.width = width    ...    this.method = function(){...}  // instantiate block using class block = new component(30, 60, "red", 225, 225);   But I've also been told about , which I believe would do something very similar, but more inline with other language's formal object creation syntax:  class component {     constructor(width, height, color, x, y){         this.width = width         ...     }     method(){        ...    }  // instantiate block using class block = new component(30, 60, "red", 225, 225);   What are the functional differences of these two approaches? Why would I use one over the other?


If apostrophe + s is the acceptable way of denoting a genitive in English, is it possible that possessive pronouns, such as hers, ours and yours, started life as possessive adjectives with apostrophe + s?  E.g. her's, our's, your's, their's? Perhaps, even his' ? Its and my obviously stick out from this tempting pattern.  Is there any evidence that this might be the case, or is the 's completely unrelated?


In Android, how can I overcome my "Out of Memory" error?

I have an activity that uses tabs. The content of the tab is pulled is pulled from the SQLite database. Everytime the user taps on a tab a call is made to the database and the content in the viewing area is displayed.   The content is list of ImageViews that, when clicked, interact with other areas of the activity. Since this can vary between 1 -> n number of items I'm not loading all the images at once and hiding views. Doing this could really cause some issue with loading the activity.  The tabs work but as I go through switching between tabs I end up getting an out of memory error:  E/AndroidRuntime(10469): FATAL EXCEPTION: main E/AndroidRuntime(10469): java.lang.OutOfMemoryError E/AndroidRuntime(10469):    at android.graphics.BitmapFactory.nativeDecodeStream(Native Method) E/AndroidRuntime(10469):    at android.graphics.BitmapFactory.decodeStream(BitmapFactory.java:613) E/AndroidRuntime(10469):    at android.graphics.BitmapFactory.decodeResourceStream(BitmapFactory.java:439) E/AndroidRuntime(10469):    at android.graphics.drawable.Drawable.createFromResourceStream(Drawable.java:817) E/AndroidRuntime(10469):    at android.graphics.drawable.Drawable.createFromStream(Drawable.java:776) E/AndroidRuntime(10469):    at com.testapplication.testapplicationconfigurator.Configurator$2.createTabContent(Configurator.java:405) E/AndroidRuntime(10469):    at android.widget.TabHost$FactoryContentStrategy.getContentView(TabHost.java:735) E/AndroidRuntime(10469):    at android.widget.TabHost.setCurrentTab(TabHost.java:430) E/AndroidRuntime(10469):    at android.widget.TabHost$2.onTabSelectionChanged(TabHost.java:161) E/AndroidRuntime(10469):    at android.widget.TabWidget$TabClickListener.onClick(TabWidget.java:563) E/AndroidRuntime(10469):    at android.view.View.performClick(View.java:4383) E/AndroidRuntime(10469):    at android.view.View$PerformClick.run(View.java:18097) E/AndroidRuntime(10469):    at android.os.Handler.handleCallback(Handler.java:725) E/AndroidRuntime(10469):    at android.os.Handler.dispatchMessage(Handler.java:92) E/AndroidRuntime(10469):    at android.os.Looper.loop(Looper.java:176) E/AndroidRuntime(10469):    at android.app.ActivityThread.main(ActivityThread.java:5279) E/AndroidRuntime(10469):    at java.lang.reflect.Method.invokeNative(Native Method) E/AndroidRuntime(10469):    at java.lang.reflect.Method.invoke(Method.java:511) E/AndroidRuntime(10469):    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1102) E/AndroidRuntime(10469):    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:869) E/AndroidRuntime(10469):    at dalvik.system.NativeStart.main(Native Method)   The image being used is a stored location on the devices such as   /storage/emulated/0/TestApplicaiton/2/maUdwcbaLU.jpg   I use the location to make it into a drawable object and place the drawable as the background to an ImageView:  ImageView iv = new ImageView(Configurator.this); int ivHT = (int) (getResources().getDimension(         R.dimen.iv_height) / getResources()         .getDisplayMetrics().density); LayoutParams params = new LayoutParams(         LayoutParams.WRAP_CONTENT,         LayoutParams.MATCH_PARENT); // set margins (left,top,right,bottom) params.setMargins(0, 0, 40, 0); iv.setLayoutParams(params); iv.getLayoutParams().height = ivHT; iv.getLayoutParams().width = ivHT; final String imageLoc = partData.get("productIndexImageLoc"); Log.d("imageLoc",imageLoc); InputStream imageStream; try {     imageStream = new FileInputStream(imageLoc);     Drawable x = Drawable.createFromStream(imageStream, null);     iv.setImageDrawable(x); } catch (FileNotFoundException e1) {     // TODO Auto-generated catch block     e1.printStackTrace(); }   partData is just a LinkedHashMap to store content and values for each part such as price, name, etc.  It seems pretty obvious that it has something to do with the Bitmap/Drawable I'm creating being left in memory. Is there a way to clear that used memory when someone taps a new tab or clear the item from memory once it's used in the view?


$f \colon G_1 \to G_2$ group homomorphism, then $G_1 / N_1 \cong G_2 / N_2$

I'm stuck on a question regarding group theory, related to the isomorphism theorems. I am given a group homomorphism $f \colon G_1 \to G_2$, and $N_2$ a normal subgroup of $G_2$. I have proven that the pre-image $N_1 := f^{-1}(N_2)$ is a normal subgroup of $G_1$. Now, if we assume $f$ is surjective, I need to prove that $G_1 / N_1 \cong G_2 / N_2$.  I have already thought of using the first isomorphism theorem, but this has only lead to the conclusion that $G_1 / N_1 \cong G_2$, because $N_1$ is a normal subgroup and thus a kernel, and $f$ is surjective. Other than that, I have thought of using the canonical homomorphism $\varphi \colon G_2 \to G_2/N_2$. I suppose I could show the composition $\varphi \circ f$ is a bijection, but I'm not sure about how to prove this or whether this is the right direction for the proof.


In the context of commutative algebra, localization at a prime ideal was inspired by ideas of algebraic geometry. Some author said that it just like "take a small neighborhood". But what does this exactly mean?


Dumbledore's note for Harry or question about sequence of tenses

When I was re-watching the well-known movie about the boy who lived I noticed that the tenses in the note from Dumbledore (spoiler, sorry ><) don't really correspond, or do they?   Here's what I mean:     It is time it was returned to you.   Shouldn't it be:     It is time it is returned to you.   Of course, Dumbledore is not dumb (or movie creators, if you will :P), and I'm just wrong, but could you explain why?


Is uncertainty in velocity via HUP reference frame dependent?

Simply put HUP involves position and momentum, further more consider a mass of 1kg. as momentum is mass X velocity = 1X velocity = velocity for calculation purposes. now for a stationary observer the uncertainty in velocity of the observed mass is some value, if another observer is travelling at the same speed as the mass the relative velocity is zero or at least smaller than what the stationary observer would see the mass travelling at. we now have two values for the uncertainty in the velocity of the mass. they both can't be right, HUP is subject to classical Newtonian relativity?


When is appropriate to auto play music or video on a page?

We have a page with a demo video that we want users to watch but nobody is clicking play. Is it okay to automatically start the video when they hit the page or is that considered bad design?


Today I noticed in my inbox that I had been granted several privileges, for which I don't have the reputation necessary.  I still can't perform the functions allowed by the privileges, and my reputation has not increased.  I have a feeling this may be a bug, but I'm not sure.  Has this happened to anyone else?  The messages I received are as follows:     Congrats, you've gained the privilege – create wiki posts learn more   Congrats, you've gained the privilege – participate in meta learn more   Congrats, you've gained the privilege – vote up learn more   Congrats, you've gained the privilege – flag posts learn more   Congrats, you've gained the privilege – remove new user restrictions   learn more


How to construct a bijective mapping from a 4D cuboid to a 4D sphere?

I thought about the parameterizing the 4D sphere using $$x_1= r\cos(\theta_1), x_2= r\sin(\theta_1)\cos(\theta_2), x_3= r\sin(\theta_1)\sin(\theta_2)\cos(\theta_3),\\ x_4= r\sin(\theta_1)\sin(\theta_2)\sin(\theta_3),$$ where $x_1,x_2,x_3,x_4$ are my 4D space coordinates. But what will be the range of values of $\theta_1, \theta_2, \theta_3$ to make the mapping from $(r,\theta_1, \theta_2, \theta_3)$ to $(x_1,x_2,x_3,x_4)$ bijective ?


I cannot delete a folder because it has endless folders

It seems some software had a bug and created a endless path of folders like:  folderA/folderB/folderC/folderA/folderB/folderC...    I cannot delete it because Windows says that the path is too long.  How can I delete them?


Mail delivery failed for a message I didn't send

I have started to receive emails with the subject: "Mail delivery failed: returning message to sender" for emails I haven't sent.  I host my own mail server at my domain matos-sorge.com (a linode) and I am slightly worried someone is using my mail server for spamming.  The emails I receive look like this:  This message was created automatically by mail delivery software.  A message that you sent could not be delivered to one or more of its recipients. This is a permanent error. The following address(es) failed:  acoperis@ls12.globehosting.net   (generated from ppaxylfg510@acoperisexpert.ro)   mailbox is full: retry timeout exceeded  ------ This is a copy of the message, including all the headers. ------  Return-path: <paulo@matos-sorge.com> Received: from [70.45.238.57] (port=15427 helo=host-70-45-238-57.onelinkpr.net)   by ls12.globehosting.net with esmtp (Exim 4.80)    (envelope-from <paulo@matos-sorge.com>)    id 1WkK88-001FK5-6e     for ppaxylfg510@acoperisexpert.ro; Wed, 14 May 2014 00:20:59 +0300 From: <paulo@matos-sorge.com> To: <ppaxylfg510@acoperisexpert.ro> Subject: regional Asistent manager Date: 13 May 2014 05:42:50 -0800 Message-ID: <002801cf6eb6$056bf74c$152b8580$@matos-sorge.com> MIME-Version: 1.0 Content-Type: text/plain;   charset="ibm852" Content-Transfer-Encoding: 8bit X-Mailer: Microsoft Office Outlook 11 Thread-Index: Acjpbbuaee0o3789jpbbuaee0o3789== X-MimeOLE: Produced By Microsoft MimeOLE V6.1.7601.17514 X-Spam-Status: No, score=2.5 X-Spam-Score: 25 X-Spam-Bar: ++ X-Ham-Report: Spam detection software, running on the system "ls12.globehosting.net", has  identified this incoming email as possible spam.  The original message  has been attached to this so you can view it (if it isn't spam) or label  similar future email.  If you have any questions, see  the administrator of that system for details. Content preview:  Buna ziua! Noua ne-a placut CV-ul dvs si am hotarat ca sunteti   interesati sa lucrati in compania noastra. Ne specializam in consultare in   domeniul de management al afacerilor. Activitatea noastra se desfasoara in   mai multe tari din lume, la fel avem si clienti in Romania. Si in legatura   cu acest fat,dorim sa marim numarul de membrii echipei noastre. Activitatea   poate fi deplina sau partiala. Salariu de la 400 pana la 2000 euro lunar.   [...]     Content analysis details:   (2.5 points, 3.0 required)   pts rule name              description  ---- ---------------------- --------------------------------------------------   2.5 URIBL_DBL_SPAM         Contains an URL listed in the DBL blocklist                            [URIs: myjob-ro.com] X-Spam-Flag: NO  Buna ziua!  Noua ne-a placut CV-ul dvs si am hotarat ca sunteti interesati sa lucrati in compania noastra. Ne specializam in consultare in domeniul de management al afacerilor.  Activitatea noastra se desfasoara in mai multe tari din lume, la fel avem si clienti in Romania. Si in legatura cu acest fat,dorim sa marim numarul de membrii echipei noastre. Activitatea poate fi deplina sau partiala. Salariu de la 400 pana la 2000 euro lunar.  Daca sunteti interesati de oferta propusa,va rugam sa scrieti pe adresa Lizzie@myjob-ro.com pentru a primi mai multe informatii. Cu respect,HR Manager   I never tried to send this message.  I use postfix + dovecot on my mailserver, but I am far from being a professional network administrator.  How can I ensure my server is not being used for spamming.  If it isn't then, why do I get these messages?


By the reduction criterion, I mean the following test for the irreducibility of polynomial with Dedekind domain coefficients.      Let $\mathfrak{m}$ be maximal in Dedekind domain A and $f(X)\in A[X] $. If $f$ reduced modulo $\mathfrak{m}$ is irreducible in $A/\mathfrak{m}$, then $f$ is irreducible in $A$.   I know that the converse doesn't generally hold. There are irreducible polynomials with integer coefficients that is reducible when reduced modulo $p$ for some prime $p$.  So I conjecture the following for polynomials with integer coefficients.      For monic polynomial $f(X)\in \mathbb{Z}[X]$, if $f(X)$ modulo $p$ is reducible for all prime $p$, then $f(X)$ is reducible in $\mathbb{Z}[X]$.   I have thought of some galois theoretic approach but couldn't quite reach the conclusion. How would I prove or disprove this statement?


How can I have SQL Server email me the error details when a job fails?

SQL Server lets you configure a job to send email alerts when it fails.  This is a simple and effective way to monitor your jobs.  However, these alerts do not include any detail--just a success or failure notice.    If a job fails, this is what a typical alert email will look like:  JOB RUN:        'DBA - Consistency Check Databases' was run on 8/14/2011 at 12:00:04 AM DURATION:       0 hours, 0 minutes, 0 seconds STATUS:         Failed MESSAGES:       The job failed.  The Job was invoked by Schedule 2 (Nightly Before                  Backup 12AM).  The last step to run was step 1 (Check Databases).   To determine the cause of the failure, you have to navigate to the instance in SQL Server Management Studio, find the job, and view its execution history.  In a large environment it can be a pain to have to constantly do this.    The ideal alert email would include the failure reason upfront and let you get straight to working on the solution.  I am familiar with  to this problem.  Does anyone have any experience with it?  Its drawbacks are:   you have to add a new step every job you have, and  you have to pray that no-one messes up the alert proc, spDBA_job_notification   Has anyone come up with a better solution?


Whenever I try to install any drivers or something I get this error. Because this error I guess I am not able to on the machine. I have booted normal from recovery mode after that I have rebooted system but no luck. w: possible missing firmware /lib/firmware/rtl_nic/rtl8125a-3.fw for module r8169  w: possible missing firmware /lib/firmware/rtl_nic/rtl8168fp-3.fw for module r8169  i: the initramfs will attempt to resume from /dev/nvme0n1p4  i: (uuid=827a4ecd-a3d9-4990-8a01-bb7aa2a57a22)  i: set the resume variable to override this.


wine installation through software&update

I have tried to install wine by software&update ,but got this error: E:Malformed entry 1 in list file /etc/apt/sources.list.d/wine-obs.list (Suite), E:The list of sources could not be


I have windows 7 on my laptop and dual boot of 12.04 LTS now I want to upgrade to 14.10 how to uninstall 12.04 ?


How to remove duplicate values from an array

The array in question is:  Array (     [0] => Array         (             [product_id] => 33103             [offer_id] => 4         )      [1] => Array         (             [product_id] => 33103             [offer_id] => 4         )  )


How to update Ubuntu from 16.10 to 17.10?

I'm confused. I just tried to upgrade a Ubuntu Server system from 16.10 to 17.10 .... Without success. All typical ways of updating such an Ubuntu system do not work. do-release-upgrade tells me: An upgrade from 'yakkety' to 'artful' is not supported with this tool. And apt dist-upgrade simply tell me: Nothing to upgrade.  There are tutorials using both tools to upgrade to 17.04 which don't help as now 17.10 is already released. They - of course - advice exactly both ways described above but following them results in the strange situation I just described.  So the questions is:    How can I upgrade to 16.10 to 17.10?  Or at least: How can I upgrade 16.10 to 17.04 (so that I in consequence might be able to update to 17.10)?     Here's an example:  root@mysystem:~# apt update && apt dist-upgrade Hit:1 http://de.archive.ubuntu.com/ubuntu yakkety InRelease Hit:2 http://security.ubuntu.com/ubuntu yakkety-security InRelease       Hit:3 http://de.archive.ubuntu.com/ubuntu yakkety-updates InRelease      Hit:4 http://de.archive.ubuntu.com/ubuntu yakkety-backports InRelease Reading package lists... Done                      Building dependency tree        Reading state information... Done All packages are up to date. Reading package lists... Done Building dependency tree        Reading state information... Done Calculating upgrade... Done 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. root@mysystem:~# apt-get install update-manager-core Reading package lists... Done Building dependency tree        Reading state information... Done update-manager-core is already the newest version (1:16.10.10). 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. root@mysystem:~# nano /etc/update-manager/release-upgrades root@mysystem:~# do-release-upgrade -d Checking for a new Ubuntu release No new release found root@mysystem:~# lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description:    Ubuntu 16.10 Release:    16.10 Codename:   yakkety root@mysystem:~#    Of course the key Prompt in /etc/update-manager/release-upgrades is set to normal.  And do-release-upgrade -d leads to:  root@mysystem:~# do-release-upgrade -d Checking for a new Ubuntu release No new release found root@mysystem:~#      Note: The question is: Why is there no update path at all? Even if 16.10 as well as 17.04 is not maintained any longer there should be an update path.    As moderators do not seem to understand either the questions or the answers and associate this question to a completely uncorrelated question and prevent providing a real answer, I don't see another way as to provide the answer here within the question.  Answer: There is no update path. That's the problem. Yes, it's the Ubuntu way to not provide an update path for non-LTS releases as soon there is even a single non-LTS release in between the current release and the most recent one. This renders non-LTS releases completely useless after two non-LTS release have been published. There is no official way of upgrading.  So you have two options:  a) Do a reinstallation with a more recent (LTS) version. This is the cleanest solution you can get.  b) Or do some manual work with risks involved following the recommendations provided in this answer here:   This question is - if at all - a duplicate of THAT question just mentioned.


D'Arvit is the most commonly used Gnommish word in the Artemis Fowl series. We know it's a swear word from the first time it's introduced:  “D’Arvit!” growled Root. (There is no point translating that word as it would have to be censored.) -- Artemis Fowl, Chapter 5: Missing in Action (emphasis mine)  And from one of the later books:  “Hurkk,” said Artemis half-choking with surprise. “D’Arvit,” swore Holly. “I think we all know what D’Arvit means,” said No.1. “But hurkk is not English. -- AF and the Time Paradox, Chapter 5: I Now Pronounce You (emphasis mine)  Is the actual meaning of the word D'Arvit ever revealed or implied? Perhaps some hints are dropped from which its general ballpark can be deduced (e.g. is it sexual? does it refer to bodily waste?) Or perhaps Colfer has said something about this in an interview?


Permissions set to 555. How can another user modify the files?

I run an Ubuntu 12.04 x64 VPS with Vesta, and a site in PHP. It has been hacked several times with injected code that looks like this:  <?php $KoDgalxVvsZfidVcEOTJDeMX='ba'.'se6'.'4_deco'.'de';eval($KoDgalxVvsZfidVcEOTJDeMX("cHJlZ19yZXBsYWNlKCIvN0xna0xnND1IR2JEOGs2WDht....   To fix it, I decided to change permissions and owner of all the files to 555 and root, so no user can change the files. I removed FTP access and secured SSH so only the keys I have in the VPS are able to connect.  In spite of all these changes, another user is always able to change files, rename folders, and upload another hacked file.  What do you think I am missing? Any suggestion? Thank you! If you need further information about this issue I will be glad to share, to help others suffering from the same evil!


Carousel in web design is used to display a series of (interactive) banners. Is it phasing out-of-fashion, these days?  Microsoft.com and Apple.com still do use it with and without arrows.  Is there a Usability study that verily questions its use /application in design?


Inconsistent and confusing rep total in achievements tray after downvoted answer was deleted

Just a while ago, after editing another post here on meta, I happened to notice a green "+1" in the new top bar, apparently informing me that I'd somehow gained 1 rep somewhere.  Clicking it, here's what I was shown:    Notice how there's no +1 rep entry in the drop-down, or even any set of entries that could sum to +1.  However, there is a red -1 from yesterday, caused by downvoting an answer.  (It was still shown in the tray when I took the screenshot, but as I'm writing this, it has disappeared entirely.)  Apparently, what happened is that  was just deleted by its author, causing me to regain the lost rep.  That's fine, that's .  But frankly, the way it's presented in the achievements tray is pretty confusing, and I'd argue that it should be considered a bug.  Instead, I'd suggest either:   not showing rep changes due to post deletion in the achievements tray at all, or showing an explicit "question/answer was deleted" entry in the drop-down, with a rep value corresponding to the actual rep change due to deletion (i.e. +1 in this case).


Eigenspaces of angular momentum operator and its square (Casimir operator)

The casimir operator $\textbf{L}^2$ commutates with the elements $L_i$ of the angular momentum operator $\textbf{L}$:  $$ [\textbf{L}^2, L_i] = 0. $$  However, the $L_i$ do not commute among themselves:  $$ [L_i, L_j] = i\hbar\epsilon_{ijk}L_k. $$  This makes sense so far, but it leaves me wondering how their eigenspaces relate to each other. I remember some theorem that diagonalizable, commuting matrices share their eigenspaces. If those operators could be expressed as complex matrices (in the finite-dimensional case), they surely are diagonalizable. So it follows that $\textbf{L}^2$ has the same eigenspaces as the three $L_i$, but that would imply that they commute among themselves, which is not the case.  What am I missing? What is the relation between the eigenspaces of these operators?


What are all these network devices on my Mac?

I have a 2019 iMac (running Big Sur)with three physical Ethernet ports; one is the built-in port and two more are located on Thunderbolt devices I have attached. When I run ifconfig, I get two whole screens full of interfaces, and I'd like to know what they are. I have Parallels installed, which adds some more virtual interfaces.  I also found  which explains a few more of them.  But I'd like some help understanding what all these interfaces are:  lo0 -- The loopback interface gif0 -- The linked article says it's a "software interface" but that's pretty hand-wavey stf0 -- 6-to-4 interface (for IPv6 <-> IPv4 tunneling) en0 -- Built-in Ethernet port en1 -- Built-in WiFi en5 and en6 -- These are the two external Ethernet ports ap1 -- ??? awdl0 -- Apple Wireless Direct Link (Apple's own flavor of the WiFi Direct protocol; used for AirPlay, AirDrop, HomeKit, GameKit, iOS Bluetooth tethering, etc.) llw0 -- ??? bridge0 -- Internet connection sharing, perhaps? bridge100 -- Parallels 'Shared Network' adapter utun0 and utun1 -- Linked article says these are for Find My Mac, but I don't have that turned on, and why are there two of these?  That leaves us with en2, en3  and en7.  I'm pretty sure 'en7' is the Parallels 'Host Only' adapter (it's the only one that has the promiscuous mode flag set), but I have no idea what the other two could be.  Also, what ever happened to en4? Some help understanding all these would be appreciated.


installing node.js E: Sub-process /usr/bin/dpkg returned an error code (1)

I need to install node in my system (Ubuntu 16.04) so I type:  sudo apt-get install nodejs   but I get this error:


Dual to align closer to align* such that only one equation is numbered and the equation can be splitted in different pages

When I write some long equation for notes, I write e.g.       \begin{align}     a & =  a \cdot 1 \nonumber % this not numbered  \\       & = a \cdot (1+0)  \nonumber % this not numbered \\         & = a \cdot 1+a\cdot 0  % say, I do want this numbered \\          & = a +a\cdot 0 \nonumber  % this not numbered      \end{align}   Is there kind of a dual align command (say alignsinglenumbered) that is closer to align* than to align, in the sense that       \begin{alignsinglenumbered}      a & =  a \cdot 1  % this not numbered  \\       & = a \cdot (1+0)   % this not numbered \\         & = a \cdot 1+a\cdot 0 \numbered  % say, I do want this numbered \\          & = a +a\cdot 0     % this not numbered           \end{alignsinglenumbered}   produces the same output as the one given above with align?  Since these equations turn out to be long, one wishes allowdisplaybreaks  to work, which doesn't if one writes  \begin{align} \begin{split}         a & =  a \cdot 1   \\           & = a \cdot (1+0)   \\           & = a \cdot 1+a\cdot 0  \\              & = a +a\cdot 0    \end{split} \end{align}


When I try to open my .qgs file I get the following error:   It says that the project can't be opened, and that something is wrong when trying to read the project file, this is my translation.  Can I do anything to "fix" the file so I can open it?  No, I have no backup, just a .qgs~, does that help? I use QGIS 2.12.1 and Windows 10, and the file I'm trying to open is also made in 2.12.1.


Count_Distinct: System.LimitException: Too many query rows: 50001

I cannot understand why I am receiving the following error:  Too many query rows: 50001  The first two queries work perfectly when using COUNT( id), but the last two Contacts_Reached_TR_120_Query and Accounts_Reached_TR_120_Query receive this error. Is there something wrong with using COUNT_DISTINCT. I also would like to note that the Aggregate Result is only returning six rows.  String Contacts_Created_TR_120_Query = 'SELECT CreatedByID SDR_ID, COUNT( id ) result FROM Contact Where CreatedDate = LAST_N_DAYS:120 AND CreatedById in :ListOfIDs GROUP BY CreatedById'; DynamicBatchApexAR batch1_TR120      =   new DynamicBatchApexAR('SDR_ID', 'result', 'Contacts_Created_TR_120__c', Contacts_Created_TR_120_Query, SDR_IDs);  String Accounts_Created_TR_120_Query = 'SELECT CreatedByID SDR_ID, COUNT( id ) result FROM Account Where CreatedDate = LAST_N_DAYS:120 AND CreatedById in :ListOfIDs GROUP BY CreatedById'; DynamicBatchApexAR batch2_TR120      =   new DynamicBatchApexAR('SDR_ID', 'result', 'Accounts_Created_TR_120__c', Accounts_Created_TR_120_Query, SDR_IDs);  String Contacts_Reached_TR_120_Query = 'SELECT Ownerid SDR_ID, COUNT_DISTINCT( whoid ) result FROM Task Where ActivityDate = LAST_N_DAYS:120 AND OwnerId in :ListOfIDs GROUP BY Ownerid'; DynamicBatchApexAR batch3_TR120      =   new DynamicBatchApexAR('SDR_ID', 'result', 'Contacts_Reached_TR_120__c', Contacts_Reached_TR_120_Query, SDR_IDs);  String Accounts_Reached_TR_120_Query = 'SELECT Ownerid SDR_ID, COUNT_DISTINCT( accountid ) result FROM Task Where ActivityDate = LAST_N_DAYS:120 AND OwnerId in :ListOfIDs GROUP BY Ownerid'; DynamicBatchApexAR batch4_TR120      =   new DynamicBatchApexAR('SDR_ID', 'result', 'Accounts_Reached_TR_120__c', Accounts_Reached_TR_120_Query, SDR_IDs);


Why does Ubuntu always boot regardless of boot priority?

I am running Ubuntu 12.10. I thought I had installed 64-bit but somehow I had installed 32-bit.   I wanted to install 64-Bit Ubuntu over the current installation with my flash drive but whenever I select my flash drive to boot, it boot into Ubuntu anyway.   My computer teacher gave me an Ubuntu 8.10 Desktop Edition DVD. Could I possibly boot from it and delete the partition so I can do a clean installation?   I looked this up for quite some time and I haven't found any answers.


Is there any way to reduce the size of MS Office install? I only need Word and Excel

I'm close to capacity on this Windows 10 laptop and would like to reduce my biggest users.  Office 365 is the largest as you can see.  I only need Word and Excel.


How can I safely move a module to another folder?

I created a module through Drupal Console, unfortunately it wasn't placed in a folder of its own, rather straight into /modules/custom. Before I noticed where it had gone, I enabled the module.   In Drupal 6/7, this was easy to fix - I could literally just put the files into the correct path, clear the cache (maybe rebuild the registry, it wasn't an exact science), and all was well.  The same isn't true for Drupal 8; I moved the files into a subfolder, rebuilt cache, and all requests tell me that Drupal is failing to include a required file. The particular file is a block class, and the path Drupal is trying to find it is where it used to be, not where I've moved it to.  The bit of code objecting is in Symfony's ApcClassLoader, so I guess I need to clear something that's slightly above Drupal's head to get this path reference updated.  How can I do that?  Uninstalling and re-installing the module does work, but once there's important data stored that's not going to be an option.  I was wrong, uninstalling and re-installing is not a viable option. After uninstalling and reinstalling, Drupal can no longer pick up the custom blocks the module defines. I'm guessing that reference is cached somewhere that isn't cleared when the module is uninstalled. Just need to find out where that is and how to clear it...


Can someone provide a synonym for the term "pan-handle erf".  It appears in a legal document from Pretoria, South Africa.  Thanks!


I cannot get SQL Server to parse my query as I tried to alter a table and add a constraint. like this:  ALTER TABLE TaxVal ADD CONSTRAINT ch_taxVal CHECK (CASE WHEN Col1 IS NOT NULL THEN Col2 = 1 ELSE 0 END)    I want to update or set the value of col2 base on the value or condition of col1. Thank you


How to find sets of images for collages?

Is there any place with good sets of free jpgs or pngs for use in collages or just any work in general?   I see so many great collages and work in general with a lot of great images incorporated, but I just don't know where to get started doing so for myself.  I mean yes you could obviously search through thousands of images for the right one to cut out, but is there any site where you can find pre-made sets of images?  I found a few on Deviantart.  I'm personally mostly looking for illustrations of any type to use in collages.   Thanks again!


How to move multiple objects in relation to central point

What I mean precisely is how to move multiple objects away from central point without scaling them.   This is what I'm working with:   I'm searching for a way to create little space between the triangles. All triangles are separate objects.  Or if you can do this with scaling that's ok too ofcourse.


Nexus7 Stuck in Reboot Following Full Discharge

I am experiencing the same symptoms as described in the following:  "  "  My Nexus 7 is full discharged.   I have it connected to Factory AC-to-USB adapter.   It cycles through boot up, sounds a tone ... stays on perhaps for 10-20 seconds ... long enough to display "0% Charging" ... and then powers itself down, again with another tone.    On some instances when it powers down the screen display shows 'static' with accompanying white noise sound, like an old television set.  I've had it plugged in for over 4 hours ... and its cycled probably 2-3 dozen times.  Any ideas?


encrypting a .Net application and assemblies

I have an encryption/copy protection question.  I'm writing an application for a company that uses a dongle.  Please don't tell me that software protection is useless, or that I should just let it fly free into the air, or that any time I spend doing this is a waste; this isn't a philosophical question about the validity of software protection, more like a how-to.  As I understand it, the first step in cracking a dongle-protected piece of software is to remove all the calls to the dongle from the code (ie, patch the executable).  Also as I understand it, I can create 'strong names' in .NET in order to protect the application and the assembly, as explained .  Is strong naming enough to ensure that my application can't be easily patched?  Or do I need to use some sort of encryption library?  If I need to use a library, which one, or where can I get information about setting this up?  The next step, of course, is to put important algorithms on the dongle.  I realize that these are just speed bumps to the dedicated cracker, but as our market share grows, the speed bump will help us get to the point where the sting of piracy is not so keenly felt (I hope).  Thanks!


Focusing on hyperfocal distance with Nikkor 35mm f/1.8G prime lens

I have a Nikkor 35mm f/1.8G lens on a Nikon D7000 body. I have a theoretical understanding of hyperfocal distance. And it seems like the lenses with an clear indication of "infinite" focus point are easy to focus to infinity. But is it possible to do that with my lens?  Must my lens have an infinity (∞) sign to be able to focus on hyperfocal distance? If not, then what is the easiest/most effective way to do that with my lens?


I already have the points I need, I just need to figure out how to create a nurbs curve that uses those points (I know there are answers around, but I am hoping that since those answers are from over 5 years ago that there might be easier / cleaner methods)


How to "pretty" format JSON output in Ruby on Rails

I would like my JSON output in Ruby on Rails to be "pretty" or nicely formatted.   Right now, I call to_json and my JSON is all on one line.  At times this can be difficult to see if there is a problem in the JSON output stream.  Is there way to configure to make my JSON "pretty" or nicely formatted in Rails?


Why does the flag box say "404" when I use it?

I posted  then click "Flag" then click "It doesn't belong here" and I get a 404 error        What's the deal?


negative number divided by positive number, what would be remainder?

my question is      If $-27$ is divided by $5$, what would be the remainder?


Is it true that $(\int f d \mu)^2 + (\int g d \mu)^2 \leq (\int \sqrt{f^2+g^2} d \mu)^2$

Let $f,g$ positive measurable functions where $\mu$ is a positive measure. Is it true that $$\left(\int f d \mu\right)^2 + \left(\int g  d \mu\right)^2 \leq \left(\int \sqrt{f^2+g^2}d \mu\right)^2$$? By monotone convergence theorem, it suffices to prove this for simple functions. Write $$f= \sum_i a_i \chi_{E_i}, \quad g = \sum_j b_j \chi_{F_j}$$ with the sets on the indicators pairwise disjoint The LHS is $$\left(\sum_i a_i \mu(E_i)\right)^2 + \left(\sum_j \mu(F_j)\right)^2$$ The RHS is $$\left(\int \sqrt{\sum_i a_i^2 \chi_{E_i} + \sum_j b_j^2 \chi_{F_j}}d \mu\right)^2$$ How can I compare these two?


How does -a command line option in grep work?

I am trying to learn to use the grep command.  I am not able to access the -a option and understand how it works.


A typical example in category theory is to consider a given group $G$ as a category with one object. Then, $\hom(G, G)$, the set of arrows from $G$ to $G$, is defined to be the elements of $G$.  My problem is that I can't understand the relation between the set of arrows from $G$ to $G$ and the set of element of $G$. Is it that to each arrow is associated an element of $G$? How? It is hard for me to grasp the idea. Any help would be appreciated.     There is a question with a similar title ; but I couldn't find my answer there.


Ubuntu Installer doesn't recognize my partitions

I'm trying to dual boot Ubuntu 13.10 along with Win8.1. The problem here is Ubuntu installer does not recognize any of my partitions and shows my whole hdd space as unallocated. That is the case with GParted also. The tricky part is that the Ubuntu itself (in Live mode) is perfectly capable of recognizing and mounting the partitions.  I did a little searching and came up with  but I can not be sure that it applies to my problem too as I can not risk loosing my Windows installation.  UPDATE: The result of mount:  /dev/sda2 on /media/ubuntu/585084B850849DFE type fuseblk (rw,nosuid,nodev,allow_other,default_permissions,blksize=4096) /dev/sda3 on /media/ubuntu/Linux type fuseblk (rw,nosuid,nodev,allow_other,default_permissions,blksize=4096) /dev/sda5 on /media/ubuntu/Linux Home type fuseblk (rw,nosuid,nodev,allow_other,default_permissions,blksize=4096) /dev/sda6 on /media/ubuntu/Misc type fuseblk (rw,nosuid,nodev,allow_other,default_permissions,blksize=4096)   UPDATE 2: Upong running GParted I get the following message:     /dev/sda contains GPT signatures, indicating that it has a GPT table.    However, it does not have a valid fake msdos partition table, as it   should.  Perhaps it was corrupted -- possibly by a program that   doesn't understand GPT partition tables.  Or perhaps you deleted the   GPT table, and are now using an msdos partition table.  Is this a GPT   partition table?   And here is a screenshot from GParted.


App is crashing when trying to check radio button status

I have two radio button in my app Yes and No.So whenever user select Yes then I want to show bottom sheet dialog but app is crashing whenever it launches. It is showing error below: Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.CharSequence android.widget.TextView.getText()' on a null object reference  Below is my code: public class Signup extends AppCompatActivity {  RadioButton radioButton; RadioGroup radioGroup; BottomSheetDialog bottomSheetDialog; int selectedID;  @Override protected void onCreate(Bundle savedInstanceState) {     super.onCreate(savedInstanceState);     setContentView(R.layout.activity_signup);          radioGroup = findViewById(R.id.radioGroup);          selectedID = radioGroup.getCheckedRadioButtonId();     radioButton = findViewById(selectedID);        if(radioButton.getText().toString().equals("Yes")){           bottomSheetDialog = new BottomSheetDialog(Signup.this);          bottomSheetDialog.setContentView(R.layout.bottom_file_type);          bottomSheetDialog.setCanceledOnTouchOutside(true);          bottomSheetDialog.show();     }      } }


Right now I am experiencing some very, very weird behaviour on a Ubuntu 14.04.2 LTS server I am managing.  Connecting to the server over ssh either from cygwin(mintty) or a terminal on a Linux machine, I can't type the letter e.  I have done the following debugging:   The letter e can be typed in vim on the remote server The letter e can be typed in the terminal on the local machines $TERM is set to xterm $LANG, $LANGUAGE and $LC_ALL are set to de_DE.utf8 locale charmap returns UTF-8   Right now, I am completely out of ideas what could be causing this.   I'd be very happy about some advice on how to fix this.


A (non-artificial) example of a ring without maximal ideals

As a brief overview of the below, I am asking for:   An example of a ring with no maximal ideals that is not a zero ring. A proof (or counterexample) that $R:=C_0(\mathbb{R})/C_c(\mathbb{R})$ is a ring with no maximal ideals.    A homework question in my algebra class earlier this year asked to exhibit a ring (necessarily without identity) without any maximal (proper) ideals. For solutions to this, it suffices to exhibit an abelian group $(G,+)$ without maximal (proper) subgroups. For, given such a group, define multiplication to be constantly zero. In this case, $G$ becomes a zero ring without maximal ideals (because ideals correspond to subgroups).   It is not particularly difficult to construct examples of the above. For example, consider $(\mathbb{Q},+)$. Another interesting example is $P=\{z\in\mathbb{C}\mid \exists n\in\mathbb{N}, z^{p^n}=1\}$ with standard complex number multiplication as "addition" (that is, as the abelian group operation).   However, any example constructed in this manner is a zero ring, and as such seems "artificial," which I admit, is not a rigorous term. I would like to find a somewhat less artificial example of a ring without maximal ideals. For a definition of "less artificial," let us start with "not a zero ring."   I have a candidate in mind, but I am having trouble explicitly proving that it has no maximal ideals. Let $C_0(\mathbb{R})$ denote the ring of continuous real-valued function on $\mathbb{R}$ vanishing at infinity. Let $C_c(\mathbb{R})$ denote the (two-sided) ideal of compactly supported functions. I believe that the ring $R:=C_0(\mathbb{R})/C_c(\mathbb{R})$ contains no maximal ideals, but I am having trouble showing it.   My intuition for this problem is as follows. Given a function $f\in C_0(\mathbb{R})$, $f(x)$ approaches zero at some "rate" as $x\to\pm\infty$ (possibly different based on $\pm$). Furthermore, for any given rate, we can find a function with a larger rate, in the sense that we can find a $g\in C_0(\mathbb{R})$ such that $f(x)=o(g(x))$ ($f$ is little-$o$ of $g$). Now, even if $f$ is non-vanishing, there is no $h\in C_0(\mathbb{R})$ such that $fh=g$, for any $h$ could not vanish at infinity. Thus the principal ideal generated by $f$ does not contain $g$. By iterating this process we could construct a strictly ascending chain of principal ideals.   Now, the idea is that the ring $R$ consists of these "rates" as described above. I know that this is not precise, or necessarily even correct. But it's my intuition. The previous paragraph shows that we can find an ascending chain of "rates," but a lot of work still needs to be done. If anyone can clean this up, it would be much appreciated.


Report sites that use Stack Exchange content without following attribution rules here

NB The following is a community-generated list of websites that republish Stack Exchange content without attributing it properly. It is no longer being maintained, because the procedure for reporting such sites has changed; see the duplicate for more information. There are a number of license-violating clones of Stack Exchange sites popping up that use Stack Exchange's  data without following our Creative Commons attribution terms. Those terms are , and are also included as a .txt file in every data dump we produce.  Google now has  in search results. Also, you can :  The option to block a site appears when you click a search result and then navigate back to the search results page. Click the "Block" link next to that result to block all pages within the site's entire domain.   This post was created as an attempt to organize information originally posted . You may also be looking for .


I would like to obtain some clarifications about References and Pointers :   What are the points of similarities and Differences between References and Pointers? (Actually I am looking more about the "execution mechanism" kind of differences and not the theoretical ones) Is there any rule of thumb as to where either of them are to be used? Which of them is more useful compared to the other.   The reason for this question is that there is often confusion regarding the method of execution of statements containing references and pointers.  Thanks in advance.


Two pairs of AirPods, single charging case

I lost my AirPods (original, wired) charging case recently. Since I use these a lot during the day for work calls I'm frequently hitting periods where they are dead or I'm continuing with only one in my ear while trying to charge the second one up and swapping like that back and forth. So it would be kind of ideal to have two pairs, but what I'm curious of is if I bought a 2nd full pair of AirPods (with case), could I then use the new case to keep both new and old headphones charged? Will this cause any issues in terms of connecting them to my devices/syncing?


Let a, b be vectors. Show that $a \cdot b = \frac{1}{4} (|a+b|^2 − |a−b|^2)$

Let $a, b$ be vectors. Show that $$a \cdot b  = \frac{1}{4} (|a+b|^2 − |a−b|^2)$$   I am trying to write this proof for vectors and I am unsure how to start.   I know the magnitude of a vector U is the square root of the sum of the elements squared or (||U|| = sqrt(U • U))   However, I do not know any mathematical rules for ||a−b|| as compared to ||a+b|| and the significance of these magnitudes squared. I am definitely missing something.  I appreciate any and all help.


How to label a figure outside of the float environment?

I am trying to label a figure outside of the float environment. I am using the command \label{} and \ref{}. Unfortunately, Latex does print the correct number of the figure. Does someone know how to fix this? Thank you in advance! \documentclass{article} \usepackage[utf8]{inputenc}  \title{b} \author{} \date{February 2021}  \begin{document}  \maketitle  \section{Introduction}  \begin{itemize}     \item f     \begin{center}     \includegraphics[width=0.5\textwidth]{Versuchsaufbau.JPG}     \label{fig:Versuchsaufbau}     \captionof{figure}{nj}     \end{center} \end{itemize}  \end{document}


Let $\sum_{n=0}^{\infty}a_nz^n \in \mathbb{C}[[T]]$ be a power series over $\mathbb{C}$ with radius of convergence $R = \infty$, let $f: \mathbb{C} \to \mathbb{C}$ be the entire function given by $f(z) = \sum_{n=0}^{\infty}a_nz^n$. For every $z_0 \in \mathbb{C}$, let $$f(z) = \sum_{k=0}^\infty b_{k,z_0}(z-z_0)^k~~~\text{for } z \in \mathbb{C}$$ be the power series expansion of $f$ about $z_0$. Suppose for every $z_0 \in \mathbb{C}$, there exists $k \in \mathbb{N}$ (depending on $z_0$) such that $b_{k,z_0}=0$. Show that there exists $N \in \mathbb{N}$ such that for every $n \in \mathbb{N}$, one has $a_n = 0$, in other words show $f$ is a polynomial function.  I was trying to prove by contradiction that $f$ is not polynomial then $f(1/z)$ has essential singularity at $0$.  But really have no idea how to continue... Any one has any idea.


I am looking for good resources or books on Simple Harmonic Motion and Wave that doesn't require any prior knowledge of those topics. Books that consist    even the derivation of even the very basic equation would be nice.


I used to be able to do so, but something as simple as this fails now:  gksudo gedit   and this also fails:  sudo gedit   I receive the error:  Cannot open display.   I haved checked this:   .Xauthority and .ICEauthority have my user as owner and also read/write permissions As both files are binary, I cannot understand them and check if they are corrupted   Probably, I have some misconfiguration. I have read this  and many other guides before asking.  I'm using Ubuntu Precise 12.04 64-bit.


Frozen world results from machine that converts heat to electricity

The world is frozen as the long-term result of an invention that allows the conversion of heat to electricity. Thew few survivors each live alone; there aren't as many women as men, so the main character in this story has what amounts to a time-share arrangement with a woman. When he meets her for his year with her, she has a remarkable story to tell about a visitor from space, an alien who has come to warn the inhabitants of Earth to stop using the energy convertor. The planet's libido, he says, is nearly 1. "What?" he asks. "You mean its albedo?" Yes, she replies, it might have been something like that. Where is the alien now, he asks. In the freezer, she says. A few flakes of oxygen fall from the sky.  I read this story in English in an anthology published by the 60s or 70s.


How can I change the "References" to "Reference" in the thebibliography environment?

My problem is that I have only one reference. So I would like the head of this part to appear "Reference" instead of commonly "References". More generally, could we change the title "References" to an arbitrary name?  Thank you very much for your help!


Is there a Correlation metric for Categorical vs Numerical features?

I've been searching for some time for a correlation metric analogous to the Pearson correlation value for numerical vs numerical features, or Cramér's V for categorical vs categorical features, but this time for categorical vs numerical features.  This is my toy data example in Python, where the categorical variable is not ordinal and notice that the number of observations per class of the categorical feature is not the same:    pd.DataFrame({'numerical': np.array([19, 27, 31, 26, 39, 43, 32, 29, 19, 19, 27, 31]),                'categorical': np.array(['A', 'A', 'A', 'A', 'A', 'B', 'B', 'B', 'C', 'C', 'C', 'C'])})   I've seen a lot of answers referring Interclass Correlation (but I don't have a square matrix and also I don't have subjects being analysed by several judges...). Also, I've seen that the use of one-way ANOVA is also frequent, but it does not solve the problem because it does not translate in a clear strength of association coefficient as Pearson.  Can you suggest a metric or it is impossible to have one for this case?


Considering $X$ as a tychonoff space and $Y$ any metric space, and taking the fine topology on function space $C(X, Y)$ and $C(X, R)$. Then the continuous map $g \in C(Y, R)$ induces a function $g_* : C(X, Y) \rightarrow C(X, R)$, as $g_*(f) = \phi(f, g) = g\circ f, f \in C(X, Y)$.  How to prove the continuity of an induced map; $g_* : C(X, Y) \rightarrow C(X, R)$, induced from the map $g \in C(Y, R)$, endowed with fine topology.


Don't auto-delete questions from deleted users if there are positive score answers

Recently, when a user deleted his account on Lifehacks, his questions with negative scores and no accepted answers were deleted, including . However, some users .  I don't think it should have been deleted -- yes, the question had a negative score, no there wasn't an accepted answer....but there was an answer with a positive score. Why should positive score answers be deleted, ever?  In short:     Please protect positive score answers to deleted users' negative score questions from damaging deletion by the Roomba.


Example of continuous function which is not locally lipschitz

A lot of analysis theorems admit for hypothesis locally lipschitz functions. I am wondering how to imagine those functions except as continuous ones. I can only see the Weierstrass function or other "fractal" functions  as examples, but is there any simpler example (even in higher dimensional spaces, with more complicated metrics) that could be found in real problems (optimization,  statistics, or PDE for instance) ?


How can a negative multiplied by a negative give positive?

On first look this can seem weird. But I can explain what I am looking for.  We all know from elementary maths that $(-\times-)=+$.   Now, lets say there are 3 cows and I say they will become doubled after one year so $3*2=6$.  And lets say I have $-3$ cows(which is not possible, because I can show $3$ cows but not $-3$) and if I multiply it by $-2$, I get $-3\times -2=6$. How is it possible?, nothing multiplied by nothing equals something?  Some said the reason belongs to philosophy, if yes, what's the idea behind it?


How to retrieve an app that's already removed from the play store before factory reset?

I had my phone undergo factory reset because there was some kind of malware and worms but it didn't work so I had it professionally fixed. And when I was going to re-install an app but it's already removed from the play store and I don't want to download from unknown sources. Is there a way to retrieve this? If there's none, what could be a good alternative for Google Play? I'm scared from unknown sources because of what happened to my phone before it was fixed.


How to delete JPG files, but only if the matching RAW file exists?

My early (Canon G2) photos are all JPG, but when I got my Nikon D90 I initially shot in JPG, then switched to RAW+JPG, and now I would like to switch to RAW only.  I have literally thousands of photos on my HDD.  The photos are in sub-directories (by date) under a single directory called Import.  I am about to import all these photos into Lightroom 3.0, however, I would like to delete all the JPG files, but only where there is already a corresponding RAW file (ie. I no longer want to keep JPG and RAW versions of the same file).  If I can do this easily within Lightroom (after importing everything, including the duplicate JPG files) that would be great.  It would also be OK if there were an easy way to do this before importing the files (but hopefully this wouldn't involve having to visit every directory looking for filenames with both JPG and NEF extensions).  Does anybody know of a way to do this (in Lightroom, or with some tool/script in Windows)?


mysql PHPMyAdmin isn't accepting Arabic Language

I am using an android app that connects on php files that insert values in mysql database. the problem is the database isn't saving the arabic input correctly but in strange characters. I searched the internet and tried to set everything to UTF-8 .. but it seems there is something missing .. what is it?  edit: this is solved by adding the below command after connecting to the mysql:  $mysqli->set_charset('utf8mb4');    I changed the database collation to utf8_general_ci as per below pic:    (I don't know how to alter Latin1_Swedish_ci) ?!! changed the table collation to utf8_general_ci. Changed the column collation to utf8_general_ci. set the php auditor to utf-8. I put that in the php file start:  I also used utf8 in coding my variables in the android app before sending to php files.


How to disable the beep sound system-wide

If I want to disable beep sounds from stuff like bash, I add this line to "/etc/inputrc":  set bell-style none   Sadly, this doesn't work for some other events like GDM start-up and shut down. I thought that adding this line to "/etc/modprobe.d/blacklist.conf" would help:  blacklist pcspkr   That makes me wonder and doubt where the sound actually comes from.


An F grade (in a labor studies class) on the transcript will hurt my admission to mathematics grad school?

So, I'm a third year student studying mathematics. My goal has always been getting a PhD in math. I'm currently doing ok with my math (taking grad courses and stuff). However, as many other students, I have to take courses outside math. I'm currently taking a labor studies class right now. All the class talks about is how bad America is treating its workers, and why don't we raise minimum wage to 50 dollars per hours to help the poor workers and stuff like that. I don't agree with everything I learn in class, and I show my disagree. As a result, the professor gives me terrible grades for saying my opinions. My question is: Will that bad grad hurt my future? Can I explain my situation in my application?


According to Wiktionary:  Noun sir or Sir (plural sirs)  A man of a higher rank or position. An address to a military superior. Yes sir. An address to any male, especially if his name or proper address is unknown. Excuse me, sir, could you tell me where the nearest bookstore is?   I assume you'd not use this for young boys for example, and certainly not for girls or women. In what circumstances are sir the right one to use, and are there alternatives when it's not?


Google Services hogging data - how to stop it?

Note: there is a  to this, however it has no definitive answer.  Asking  in case anyone has discovered any solutions in the intervening period.  Onavo count continually reports that Google Services is hogging my data.  This seems a recent phenomenon - last few months or so.  I've switched off background sync and tried to restrict to wifi only.  All unsuccessful.  It continues to use   Phone is HTC desire Z running standard Android 2.3.3 (HTC Sense 2.1).  Phone was bought outright (i.e. not included as part of contract), running on SIM-only contract from O2 in UK.  Any suggestions for what's causing this?  And more pertinently, how to stop it?  Thanks.


I asked about it on  and they told me to post it here.  Probably need to add the :active to the :hover meta class or something like that.  Example:      Hammer Time


Cannot change the Terminal Shell in Mac OSX Catalina

I'm using mac Catalina and trying to change the terminal shell, but can't do it.   I did terminal => preferences => select command and type " /bin/zsh " => quit the terminal and re-open it => typed echo $SHELL on the terminal  I can see my username with -zsh on top of the terminal but after I run the command I can only see /bin/bash, not /bin/zsh.   Can anyone tell me how to fix this issue? I've been trying about ten times but still having the same problem...


Effect on length of day as the polar ice caps melt

If the polar ice caps of the Earth melt, how will the length of the day be affected?


At what angle does the stone need to be hit?

In curling, it is often necessary to hit and displace an opponent’s stone to win the end. Olivia would like to hit her opponent’s stone with her own stone. If she releases her stone at the hog line, it needs to travel another 87 feet before reaching her opponent’s stone. Olivia can be off by 11 inches in either direction and still hit her opponent’s stone. Assuming her stone doesn’t curl (change direction), within what angle, $\theta$, to the nearest tenth, must Olivia throw her stone to hit her opponent’s stone?    With this question, do you need to convert the 11 inches to feet, and then solve from there? And since both triangles are the same, do you only solve for one? $11$ inches = $0.916667$ Feet   $\tan (a) = a / b$  $\tan (a) = 0.916667 / 87$  $a = \arctan (0.105364022989)$  $a = 0.6037^\circ$


Dark souls 2 what to do with unused weapons

I have played games like diablo 2 or never winter nights, and there you could trade your weapons for gold.  I have been playing Dark Souls 2 in xbox but I can't find anyone to trade my useless weapons and armors.  what can I do with my unused stuff?


Autonumbering fields in versioned ArcSDE Geodatabase?

I want to have a field with autonumbering in ArcGIS.   I have a versioned ArcSDE for SQL Server geodatabase.   Thus, using the identity seed attribute in the SQL Server is not an option.   Is it not possible to autonumber your own columns in ArcSDE?


How to tell a client in a form that they can enter their email OR their tel # (but both are not necessary)?

In a contact form, I need either their number or email. I've thought of these ways:   Have field label be "Email or Tel #", or "Email / Tel #" Have the above, but placeholder text in the input saying "Either one is fine" Have the label be "Contact me by" and then have a dynamic message appear (Twitter style) when the field is put in focus Have a select box saying with label "Contact me by" and options "Phone", "Email". When one is selected, an input element below it will be revealed -- respectively Phone and Email   Which, if any, would you consider user-friendly if you were visiting a site?


Hello.  I have been studying Arguments and Predicate when I noticed that there are two different views over Predicators: Some say that it is the main verb of the Predicate, others say that it is the finite verb while others say that it is both the finite and auxiliary verbs.    I have been doing it - Predicator: "doing"; I have been doing it - Predicator: "have"; I have been doing it -  Predicator: "have been doing";   According to the representation above and bearing in mind that all representations might be correct to different perspectives, which one seems more accurate regarding most modern theories of grammar?


I have a JSON like this return from a php file  [  {"value":         {"longitude":"103.8439764",         "latitude":"1.0345","date":"Tue 04 Jun, 2013",         "time":"12:27"}},   {"value":        {"longitude":"104.8439764",         "latitude":"1.235","date":"Mon 03 Jun, 2013",         "time":"12:28"}},  {"status":         "his_loc"  } ]   How can I achieve the data like data.status or else ?


Currently, I am a Master's student, and I sent an email to a professor from another department in my university. The email was about a topic which could simply be answered as yes or no. But, I have not received an answer from the Professor yet, and since I use official university email account, I have no doubt that it was not classified as spam.  It will be nearly a week, what should I do next ? Should I go directly and talk with the Professor, assuming that he did not notice my email ? Even if I was not able to arrange an appointment with him via email, should I directly knock his door, will this be considered rude ? I don't think it should be difficult to say a simple no as an answer.


According to the , Yachiru disappeared leaving her belongings after the fight with Gremmy. She is said to be "gone" by Kenpachi in the penultimate chapter of the original series.  I use "original" because there might be extra chapters announced as the other big announcement.  So, what happened to her? Was she part of his Zanpakutou or something?


i am trying to compare results from last month to this month ... but when i try and query with month(Date) or extract(month) it isn't pulling any of the data. here is my query  $get_last_month = "SELECT *,                          sum(va_clicks) AS last_clicks,                          sum(va_imps) AS last_imps,                          sum(va_cost) AS last_cost,                          sum(va_convs) AS last_conversions,                         avg(va_posit) AS last_position,                         extract(MONTH FROM va_date) AS last_month                     FROM va_HomeLoans                     WHERE va_list_id='$get_last_camp_name'                     AND last_month = 11"; $run_last_month = mysqli_query($con,$get_last_month); $row_last_month = mysqli_fetch_array($run_last_month);   it keeps giving me the warning of parameter 1 to be mysqli_result. obviously meaning that it is an empty query. i know that i'm doing something wrong with the query. if i take out the 'AND' statement the query runs perfectly ... so there is something wrong with that statement, but i can't figure out what.   any help would be awesome, thanks in advance!   thought i figured it out ... but still having issues even with using HAVING rather than WHERE


I'm trying to understand model in a propositional logic. Assume I have a set of formulas $F$, and a formula $\psi$. What exactly does $F \models \psi$ mean here? Does it only require that I have a single formula in $F$, such that it is model of $\psi$? Then, if I have $\psi \in F$, it must hold that $F \models \psi$, right?  Also, assume I have a formula $\phi = q_1 \wedge \cdots \wedge q_n \rightarrow p$. Can I say $\phi \models p$, if we have that $q_1,\ldots,q_n = TRUE$, as $p$ is implied by $q_1,\ldots,q_n$?


Destiny 2 cross save between PC and XBone, do I need to buy expansions for both

I have Destiny 2 and the Forsaken expansion for PC, but I also like to play it on Xbox One.  I have cross save set up, so I can access my character from either console, but I have not bought Forsaken for Xbox One.  Would I have to buy Forsaken and/or Shadowkeep for both consoles?


I have some proprietary command line tool for Linux, but not sure how to run it. There is no common extension like executable debian files. File info show file file_name:  ELF 32-bit LSB  executable, Intel 80386, version 1 (SYSV), statically linked, for GNU/Linux 2.6.24, BuildID[sha1]=1e8f5c1fcec4949ff97cd55a4ac38f59d4188638, stripped   How to run it on Ubuntu?


Proving center of a tree consists of one vertex or two adjacent vertices

I am trying to use a technique where you take each vertex $v$ of $T$ and consider the path to the farthest vertex from it $v'$.  Orient the first edge of the path toward $v'$.  Assuming $T$ has $n$ vertices, then there are $n-1$ edges.  By Pigeonhole Principle one edge was oriented twice.    From here I am trying to show that one or both of 2 vertices connected to this edge that was oriented twice has minimal eccentricity.  I was thinking a contradiction argument would make sense where we assume some other vertex has minimal eccentricity and show that the path to the farthest element from that vertex must go through one of the 2 vertices connected to the edge that was oriented twice.  I can't seem to come up with a solid argument for this.


What's the word to describe someone who is trying to appear dumber than they actually are?

What would describe someone who puts on a façade of stupidity, but is actually much smarter than they appear? I would say that this is the oppposite of pretentious.  I have looked all over the web and Stack and I cannot find it. I was told that I once said it and that it was a noun, and that I said it was found in a book.


iPhone app crashes after update to iOS 14.2

After updating to iOS 14.2 it’s not possible to open the iPhone app anymore. The app crashes right after the start on an . Stack Exchange didn’t seem too eager updating the app in the past. But this is really more than a convenience feature.


Let $A, B$ be commutative rings with identity elements and let $\mathfrak{p} \subseteq B$ be a prime ideal. Let $\varphi: A \to B$ be an injective ring homomorphism.  I want to show that the induced homomorphism $\varphi_{\mathfrak{p}} : A_{\varphi^{-1}(\mathfrak{p})} \to B_{\mathfrak{p}}$ is also injective. Moreover: Why is the induced morphism of schemes $f: \text{Spec}(B) \to \text{Spec}(A)$ dominant?  The motivation of the first question: To show this is sufficient for showing that the induced morphism of sheaves $\mathcal{O}_{\text{Spec}(A)} \to f_{*}\mathcal{O}_{\text{Spec}(B)}$ is injective.


I have read that you should not store /tmp on a SSD, because the frequent writes will shorten the lifetime of the SSD.  But what about /var/tmp?  Is it reasonable for /var/tmp to be stored on a SSD?  Or should we avoid having /var/tmp stored on a SSD, to avoid killing the SSD prematurely?


«'s» or «of the» which one should I use?

I want to know if «'s» sounds more natural than «of the...». E.g.:  'My computer's keyboard' or 'The keyboard of my computer'. Thanks in advance.


I'm quite confused with the use of "would". Confusing use of would is below:   You use you would in negative sentences with verbs such as 'guess' and 'know' when you want to say that something is not obvious, especially something surprising.   ⇒ Chris is so full of artistic temperament you'd never think she was the daughter of a banker.   ⇒ Inside, he admits, his emotions may be churning, but you would never guess it.  Source:   What I'm confused(not understood) is as follows:  Why 'would' has been used in those examples? I don't know how to use 'would' in this way. Could you please interpret it?


If gravity is really the bending of space/time causing objects with mass to experience acceleration, is there a similar physical meaning to 'charge' besides 'a property of matter which causes it to experience a force when placed in an electric field.'  What exactly is charge?


Student Gmail account expiring, how to get Pokemon Go to accept new account

My student Gmail account that I used to create my Pokemon Go account is going to expire.  Is there any way I can get Pokemon Go to accept another Gmail account?  Someone commented to a similar post before, Does this work? :         Note an anonymous user says: Deleting the college email doesn't delete the Google account...go too accounts.google.com and change the email used to login where it says "Login options" (or something similar) Same Google account, different login info – Dragonrage Aug 4 at 16:31    Actually, I am focused on whether I could go to Google and change my username like the above email mentioned and log into Pokemon Go with my new username.


Is it possible to prevent stack allocation of an object and only allow it to be instantiated with 'new'?

Is it possible to prevent stack allocation of an object and only allow it to be instiated with 'new' on the heap?


Do invisible polygons influence rendering time using Cycles renderer?

TL;DR The number of polygons has negligible impact on rendering time. I'm having a furniture designed part by part using FreeCAD and exported as Wavefront OBJ (following ). This furniture is then placed in a very simple approximation of my apartment (also modeled using FreeCAD). The problem is with rendering time. With 8K resolution and 2048 samples this is ~14 hours on (not built for this purpose) entry level 8 core 2nd generation Xeon Scalable Processor. With this amount of samples noise is still clearly visible, especially in shadows. Going down to Full HD reduces time to some 50 min. This amount of time is in odds with what I found on the internet, where (apparently) much more rich models tend to render in an order of minutes. This makes me think about one thing: my furniture model is probably much more detailed than average model of object used for rendering in blender. In particular there is plenty of polygons inside the object which are clearly not visible. Do these still slow down the rendering? If yes, is there some tool which could automatically simplify FreeCAD models for rendering removing invisible polygons? Just for the record: I don't have any GPU capable of rendering. EDIT: I made one more super simple experiment: I removed all the furniture leaving just an empty apartment, light and camera. It had negligible impact on total rendering time (Full HD, 32 samples). In retrospect I could have done more to answer this question myself.


Why does Googling your Stack Exchange username show your questions and answers on non-SE websites in various languages?

I Google myself, and I would like to know why most of the 3120 search results for my username are rehashed questions and answers from Stack Exchange. What's the incentive for these website makers? Are there just a lot of knock off botsites that rehash everything Stack Exchange to steal clicks?          Biology fashion photo? What what?  -


Cleaning laptop fan with a vacuum cleaner

I have a Thinkpad T440p and the fan seems to be dirty from no hot air coming out of the laptop. All the disassembly guides show that I need to take the whole fan assembly out but I have no thermal paste left nor do I have any cans of compressed air.  Can I just take a vacuum cleaner to the fan and clean it that way?


Is there an interactive chat/service for Stack Exchange sites, like Discord?

Is there a place for just informal discussion for particular Stack Exchange communities? Maybe audio and video chats or making friends?


Displaying message through window alert in Django templates

I have a django template in which a logged in user can check his/her account balance. The balance is obtained in the django template through a form labelled as 'form0'. Now I want to display this user balance through an alertbox. Given below are the relevant files:  HTML:  {% extends "base.html" %} {% load bootstrap4 %} {% block content %} <form action="/profiles/userLogin/" method="POST">     <button  class="material-icons floating-btnz" name="form0" onClick='showMessage()></button> </form>  <script> function showMessage(){     alert("Your balance is " + balance); } </script> {% endblock %}   views.py:  if request.method=="POST":     if 'form0' in request.POST:         x = employee.objects.get(name = request.user)         y = x.balance         return render(request, 'profiles/userLogin.html', {'balance': y})   models.py:  class employee(models.Model):     name = models.OneToOneField(User, on_delete=models.CASCADE)     id = models.CharField(max_length=20, primary_key=True)     balance = models.IntegerField(default=0)   How can I implement this requirement in my system? Any help is appreciated.


People often use sans, the French word for ‘without’ in English.   What I don’t get, is when should that switch be made. When should I say sans when I really want to say without. Are there any general rules regarding usage, or is it kind of a person-to-person basis/feeling of flowerness.


In Net Framework 4.x I can get the start of week by:  dateStart = DateTime.Today.AddDays(-1); weekStart = dateStart.StartOfWeek(DayOfWeek.Monday);   But in Net Core the StartOfWeek function doesn't exist. Any idea how I can achieve this in Net Core 2?  Thanks


How to import CSV with addresses (no coordinates) into QGIS?

I have a CSV file with many address and I need to find the coordinates. I think to import the CSV into  hoping that it find those points, then I would like to export a KMZ to import it in QGIS?  Am I wrong in this thought? If this is the only way to solve it, how can I find info to create this CSV file?  I imported the file into mymaps and I can see the points on the map. Then I exported it in KML/KMZ.  When I go to layer/add layer, QGIS import only a table (with the orginal info from CSV file) not a point shape file.  In the picture below you can see information from my imported addresses KMZ (this is not a geometry point shape file) and a correct test create into mymaps.  I have to add that into mymaps app the dataset looks identical.


Replace string in a file with another where both are saved in variables

I want to replace a string found in a file with another string, but both have a special character (in this example it is a . char) e.g 1.0 and 2.0.  So this is the command currently used:  sed -i 's/1\.0/2\.0/g' /home/user1/file1.txt   What if 1.0 and 2.0 were saved in variables $i and $j? where i has the value 1.0 and j has the value 2.0, how can I still replace i with j?


What is the expansion for $\frac{1}{1+x+x^{2}}$?


I recently started playing the Kingdom Hearts series (for the first time - I realise this is a little delayed) and am kind of confused at the sheer number of games there are and the amount of platforms they are available on.  Could someone provide me with a SPOILER FREE timeline in which the games take place (im sure this information is out there some where - I'm just cautious to look it up because i've already ruined a few bits of the story for myself trying to do so).  Also am I right in saying that on Kingdom Hearts, Kingdom Hearts 2 and the upcoming Kingdom Hearts 3 (Dream Drop Distance) are the only games that are part of the 'CORE' story?


Why "Here COMES the bus!" but "Here he COMES!"?

What is the difference between:     Here he comes!   and     Here comes the bus!   Why in the first sentence "comes" is placed after the subject "he", but in 2nd one before the subject "the bus"?


Probability distribution of "large" number of independent events

it has been a while since I had to deal with any probability analysis. I will try to explain as best as I can, feel free to ask any clarification.  I have around 150 number of events (sales projects), each with its on Probability P of occuring (selling).  Each event has a value V of (sales price).  Now some events might occur others might not, depending on their P. I would like to establish a distribution where I can see the probability of reaching any possible total Value of all events.  for up to 10 events that is fairly easy, working out all possible combinations (n^2)-1, ranking them by total value of successes, working out the probability of the combination, then use Bayes law to work through the combinations.  This is impossible to do for 150 events. Is there an easier way or an approximation?  In the end I would like to be able to say the Probability of selling 50k worth of projects is xyz% or the P(75) this year is abc kUSD.  I hope this is vaguely understandable.  Many thanks and kind regards Joe


Java: Decrease value of primitive from getter or use setter?

Hello StackOverflow Community! I hope you're having a nice day.  I'm asking myself if I can just decrease an int obtained from a getXYZ() method of another class (the int should also be modified in the other class) or if I must use a setter?  for example:  Class: Monster  public int getHealth() {     return health; }   Class: Bullet  applyDamage(target);  private void applyDamage(Monster target) {      target.getHealth() - 1; // OR     target.setHealth(4);  }


What to do so text won't splitted on the edge of paragraph?

I don't know if my title is descriptive enough, but that is my problem. In justified paragraph some text will be splitted, like 'descriptive' become 'des-criptive' and the 'criptive' part is on the next line, I hope you understand.  Please  file for better example, I've included the lyx, tex, and pdf output. I don't want the text to be splitted, can I adjust some settings so it behave just like the default behaviour on LO Writer, Ms. Word, or another WYSIWYG text editor?  I'm using LyX on Linux.


Make axis intersection look nice with tikz and pgfplots

How can I improve, in a way ideally not requiring manual (automatic may be OK!) tinkering with (half) linewidths and scaling factors, the look of this axis intersection:  Here's what I have (left), and what I want (right):     And here's my MWE:  \documentclass[tikz,border=3pt]{standalone} \usepackage{tikz,pgfplots} \begin{document} \begin{tikzpicture}     \begin{axis}[         axis x line = middle,         axis y line = middle,         xtick = \empty,         ytick = \empty,         xmin = 0,         xmax = 1,         ymin = 0,         ymax = 1,         width = 2cm,         height = 2cm,     ]\end{axis} \end{tikzpicture} \end{document}


Are any of the eligible bachelorettes Bards?

Call me odd, but I've come to enjoy the occasional encounters with female bards in certain bars around Skyrim.  Something about their songs just seems to add a bit of coziness to the environment.  I'm aware that you can be married in Skyrim (I already have an Amulet of Mara), but only to a certain sub-set of the single women in the world.  Are any of these eligible bachelorettes Bards?  If so:   Which ones?   If I marry one and ask her to move in with me, will she sing and play her songs in my house?


Insufficient voltage to dryer receptacle; what next?

I just moved into a home and I am hooking up a used dryer (which I'm told works).  The dryer spins, but I get no heat.  I bought a multimeter, and it tells me that the receptacle provides insufficient voltage for both the dryer's spin and heat.  The receptacle is a NEMA 10-30.  Referring to the poles as listed in , I get the full 120V between poles W and Y, but only 45V between poles W and X (and 70V between X and Y).  I think, from these DIY questions ( ), that I should get 120V between W and X and 240V between X and Y.    I even took the receptacle off the wall, and I get the same readings from the bare wires.  So here's my question: is it time to call an electrician, or are there some other things I can investigate on my own?


How to prove the set of functions from the natural numbers to the natural numbers is equinumerous to the set of real numbers

I know how to prove that $^\omega$$\omega$ is uncountable, but how can we prove that it is, in fact, equinumerous to $\Bbb R$? Or at least that $^\omega$$\omega$ is equinumerous to $^\omega$$2$?


Compare two versions of a text file and find additions/removals with Ruby?

I am tracking changes in a web-page using Ruby. After I removed all html tags and blank lines, I get an array of lines which needs to be checked for additions/removals assuming that there may be repetitions. Could you recommend a good gem if it has been done already?  I could make the array lines unique and then the problem is avoided. But what if I need to track the repeated lines as well with respect to their position in the text?


Order of group $GL_{2}\left( \mathbb{F}_{p}\right) $

I'm having a hard time counting. I need to count the number of elements for the multiplicative group of invertible $2\times 2$ matrices $GL_{2}\left( \mathbb{F}_{p}\right) $ with elements from the field $\mathbb{F}_{p}$ where $p$ is any prime number. David S. Dummit and Richar M. Foote's Abstract Algebra (3rd edition) has a solution on page 413 but that approach is by counting the possible number of basis of vector spaces but I wanted to see if there was a direct way. The book says that $\left\vert GL_{n}\left( \mathbb{F}_{p}\right) \right\vert =\left( p^{n}-1\right) \left( p^{n}-p\right) ...\left( p^{n}-p^{n-1}\right) $ so my case reduces to $p^{4}-p^{3}-p^{2}+p$. For any matrix $\left(  \begin{array}{cc} a & b \\  c & d% \end{array}% \right) $ with $a,b,c,d\in \mathbb{F}_{p}$, I understand that $p^{4}$ is the total number of 2x2 matrices and that we need to subtract the possible combinations for $ad=bc$ (non-invertible elements) but I can't account for the rest. In particular, that plus sign is absolutely baffling. Any hint would be appreciated. I'd then take this up for the general $n$x$n$ case but first I need to dispose the 2x2 case.  P.S. I tried looking for a pre-existing answer and a related answer is present  but it's by the same approach as the book and I'd like to have an approach without resorting to linear independence. This , too, was a case for $p=3$ but I couldn't see the pattern.


I have the following code that's source-d by my .shellrc  PATH="${PATH}:${HOME}/perl5/bin" PATH="${PATH}:${HOME}/.bin" export PATH   but if I make changes to other code and then source this file, my path continues to get longer and longer with each source, each time appending these when they're already there. What can I do to prevent this?


Get a portion of text delimited by cariage return with regex

I have a text like:  This patch requires:  Patch 1.10-1 Patch 1.11-2  Notes:   I want to extract   Patch 1.10-1 Patch 1.11-2   with the following regex:  This patch requires\:[\r\n](.*)[\r\n]Notes\:   But nothing is matched.  Why ?


How do I assign different materials to different vertex groups

complete newb here. In short I'm trying to create a landscape with mountainous regions, with different height levels. I've created the different levels as vertex groups, but cannot figure out how to assign materials to them at all, or even if it's possible to do that! Various tutorials and other questions haven't helped me. Is anyone able to help, I realise there's probably something simple/basic I'm doing wrong but I'm at a complete loss. I'm trying it on cycles from what I can gather that seems to be correct? I'm running Blender 2.9 on windows 10.


Custom folder with subitems in Start menu in Windows 7?

Is it possible to pin a folder containing sub items in the Start menu in Windows 7?   I want my custom files to be visible to users via the Start Menu, much like recent files are shown as a sub menu from programs, etc., like Notepad. Is something like this possible?


Create a property of object with the value of variable

I don't know how to explain this, but I think the example is clear:  if($text == "libelle")     $obj->libelle = $valeur; else if($text == "numero")     $obj->numero = $valeur; else if($text == "commentaire")     $obj->commentaire = $valeur; else if($text == "date")     $obj->date = $valeur;   Well, what I'm looking for is replace the if-statement with something like this $obj->(the value of $text) = $valeur;


What constitutes 'Active' for a Question?

Why does some, many year old, questions with no apparent activity suddenly appear with recent activity. I've seen questions many years old that have no edits or comments of recent dates, but with 'Active 2 days ago' (or similar).  I've searched for an answer to avoid making a duplicate, but cannot seem to find what I'm looking for. I've seen advice on how to make an old question active, bumping it with an edit of the original question, but not how to bump 'invisibly'.  Since I'm new to StackExchange sites, much is new to me and I may have overlooked some very basic functionality. I apologize if so.  EDIT: I cannot see how this 'Duplicate' answers my question. It does have an "...etc" in it - which, by the way makes me wonder if the real answer is in the "...etc" part. But that leaves the actual question unanswered; How can a question (post) that has no edit/comment or anything visible that affects the post, make itself 'Active' again. From the possibly duplicate post;      Active means that it has a change: an edit, an answer, an edit to an   answer, bumped by Community♦ etc...   So what is the change when you cannot see it? What lies in the "...etc"? A possible definitive answer might be the comment from Jenayah, in which case a useful bump technique would be to comment on ones question and then delete it.


I work with this perimeter\area fields:    i created it with "Add geometry columns" vector tool. How can i create a dynamic perimeter\ area fields, so when i create a new feature or change existed feature- those fields will be change also.    I try to seek the solution by create a new area field and try to find the correct expression in the field calculation, but with no success.  I can use again the "Add geometry columns" vector tool, so the attribute table will be update- but this solution is very clumsy.


How to disable the Windows pop-up message "You need to format the disk..." without removing drive letter

I making a test program for my USB sticks but every time I plug in one of the USB's sticks Windows shows me the pop-up window "You need to format the disk...". Is it possible to let Windows not show this message without removing the drive letter (this is the solution I found but is not a solution for me because my drive needs to have a drive letter). When I replug the USB, Windows needs to mount my USB again, but just not show the message.  Thanks,


Angular Velocity About Instantaneous Axis of Rotation

If you consider a cone of half angle φ rolling without slipping on a plane with angular velocity Ω as shown in the figure. What would be the angular velocity about the Instantaneous Axis of rotation? And also about the axis of the cone? My try at the solution: Well first I found out that the Instantaneous Axis of rotation is the x axis and then and also the torque has to be provided by the friction alone as no other force is acting and finally I used torque equation as the cross product of vector(ω) and vector(L). But the answer given doesn't match my answer. The answer I got was Ωcosecφ and the textbook answer says Ωcotφ. Please help if I have gone wrong somewhere.


"Neither Mary nor John eat (eats?) beef" - singular or plural after 'neither .. nor'?

Neither Mary nor John eat beef.   Neither Mary nor John eats beef.     Which is grammatically correct?


Prove that $\sqrt[3]{2} + \sqrt{2}$ is irrational  This question is from Spivak’s book 18 of the third edition, but the solution is not intuitive. It suggests you to work out the first six powers of this number. Are there any more elegant approaches to this proof?


Our web server (Nginx, MySQL, PHP) is presently being attacked by DDOS.  Outgoing traffic is normal (avg 563 kb/sec) but incoming traffic is what is eating up our 1gbit port (avg 800Mb/sec).  In the Nginx access log, I noticed a POST request to a 499 error coming from 10-15 unique IPs very repeatedly to a support ticket system with have installed (/support/index.php - running OSTicket). I blocked INPUT/OUTPUT on these IPs in iptables. I don't think this did anything but it was odd none-the-less considering these IPs were repeating the POST request ever few seconds.  How can I pinpoint the problematic IPs and block them from sending massive incoming requests?  EDIT: Here is a printout of iptables -L -v


I am making a test where I am asked to add the missing words.     [...] chair is [...] useful piece of furniture.    I would have said that a is the missing word in both the cases, but the test says the words I should have added are the and a respectively.     [...] last time I saw [...] bear, I was travelling in [...] Europe.   I would have added: nothing, a, nothing. The correct answer is: the, a, nothing.  Why is the the correct article to use in both the sentences?


How to isolate bad sectors on a hard disk in Windows 7?

If I know that a hard disk has bad sectors, how can I "mark" them so that Windows 7 doesn't write to them when I copy files and stuff?


How do I diff two text files in Windows Powershell?

I have two text files and want to find the differences between them using Windows Powershell. Is there something similar to the Unix diff tool available? Or is there another other way I haven't considered?  I've tried compare-object, but get this cryptic output:  PS C:\> compare-object one.txt two.txt  InputObject                                                 SideIndicator -----------                                                 ------------- two.txt                                                     => one.txt                                                     <=


I read the answers on those questions ( && ), neither of them work for me!   % uname --operating-system --kernel-name --kernel-version --kernel-release  Linux 4.9.6-200.fc25.x86_64 #1 SMP Thu Jan 26 10:17:45 UTC 2017 GNU/Linux   I download/install st terminal (), and I would like to set it as my main terminal-emulator, but I did a huge mistake, which is running this command as root: % su -c 'chsh -s /usr/local/bin/st'.   Now, whenever I want to login/run a command as root, a message is printed: Can't open display. I tried the following commands (as shown below), but non of them work..  % env -i bash % su Password: Can't open display % su -c 'env -i bash' Password: Can't open display % su -c 'chsh -s /usr/bin/bash' Password: Can't open display % su -s bash Password:  su: using restricted shell /usr/local/bin/st Can't open display % su Password: Couldn't read from shell: Input/output error child finished with error '256' %    UPDATE: I tried to do as explained in the proposed answer   From the bootloader prompt, navigate to the regular entry you boot from. Instead of pressing Enter press e to first edit the kernel command line parameters In the editor that opens, use the arrow keys to find the line that starts with linux, go to its end and append init=/bin/sh to it. This will replace your init system temporarily by your system's shell and since init is started by root, this will be a root shell. Press CTRL+X to boot the modified entry run chsh again with the correct parameters   But when I did the step 4, I was faced with  screen!


What's the water volume of an horizontal cylinder when x<R

I have an horizontal cylinder that's filled with water, I need to get the water volume when the water level is x


How can I typeset this accented, dotless i?

See the rough sketch above. I am able to typeset the accented i shown in the middle (for which I used the \v macro) and, obviously, the plain and simple i shown on the left also. However, I can't figure out how to typeset the one shown on the right. How can I do that?


After Darth Vader was killed, did Luke tell anyone that he was his father?

Did it ever become "public" knowledge that Anakin was Darth Vader, after he died? There were of course several people at the Viking Jedi funeral of Darth Vader, but did the others (not including Leia) know he was Anakin and the father of Luke and Leia? EU or canon?


Is there a way to transfer ownership of a tamed pet in Minecraft?

In minecraft, there are many pets you can tame, in mostly different biomes. If you bring one of your pets that is already tamed to your base, can you somehow transfer ownership of the pet to one of the other players in your game?


In my course of algorithms we talk about time complexity with Big O Notation. And I am always confused when I try to calculate the Big O. I know for example when a function then it can be O(n) or O(n²). But I don't know the logical background and how to get this solution for each function.  int func1(int n){     for (int i=1; i<n; i=i*2)     printf("i = %d", i); return i;  }  int func2(int a, int b) {    int result=1;     while (b>0) {       result = result*a;        b = b-1;     }    return result; }  void func3(int n) {    for (int i=0; i<pow(2,n); i++)        printf("%d", i);   }


How to follow activity on favorite questions from Android app?

I know there is a way to  from the app, but I cannot find a practical way to  follow the activity on the questions I favorited.  The only way I found was to type infavorites:mine into the search box and sort by active. But there is no way to bookmark a search, and repeatedly typing this search command on a small screen is no fun.   I understand not all desktop site features can be built into the app. But following the activity on my favorite questions is precisely the sort of things I'm likely to do from a mobile device.


How to get IP Address using shell script?

Want to get the IP address using Shell script. Without knowing the eth0 or eth1 or eth2 How to get the particular IP address.  I am not interest to get localhost address, want to get private IP address.


What's the lightest Ubuntu desktop environment?

My computer has 1GB ram and a very end low graphics card, but I don't know how much power it has.  Unity is very slow on my computer, and I saw that there are many desktop environments which are much lighter and faster, even for a slow computer.  So, what's the lightest desktop environment?


can i use my android phone as a bluetooth receiver for my pc

is it possible to connect my phone with usb cable to my pc and use the phone as a Bluetooth receiver


What book is good in studying beginning optimization?

Recently, I heard some talks about Optimization. And I am beginning to love that field.  I want to study beginning optimization, what book can you recommend for me? Also what tips can you give to a beginner in studying this field?  Thanks a lot.


Sci-fi book about future of earth where the land has been submerged, and aliens use it to breed

1970's or 80's book about the future earth.  Aliens invaded, and sunk the land, now there are floating islands, and the aliens come back every so many years to plant eggs in the sea to hatch.  There are mer-people as well as normal humans.


How to generate a Commerce order from a CSV?

I'm using Drupal 7 with commerce. Is there a way to generate an order from a csv or similar? the idea is that users could upload a csv (sku and quantity for now) with the items they want and the system generate an order with that.  i'm trying with feeds and the entity processor but i can't import the line items and create de order in the some process (they have to be related with an order). If this is the way, it's not clear to me how to do that.


How can I list installed packages on a Debian based system that are NOT part of the base distribution

I have a Raspbian system which I need to list all the packages that have been installed since the machine was setup.   Obviously I can show what now is installed, but I'd like just a list of the packages that did not come with the distribution... ie the ones that have been installed since the machine had been setup.   Is there a way of doing this?


Equivalent statements to fixed-point theorem

I'm trying to show that they're equivalent statements:  1) $1_{S^1}$ is not homotopic to a constant map.  2) $S^1$ is not a retract of $D^2$ ($D^2$ is the closed unit ball).  3) Every continuous map $f:D^2\to D^2$ has a fixed point.  1)$\to$2) I suppose the opposite, then there exists $r:D^2\to S^1$ continuous such that $r(x)=x$ for every $x\in S^1$. How can we show that $1_{S^1}$ is homotopic to a constant?  2)$\to$3) I suppose that there exists $f:D^2\to D^2$ such that $f(x)\neq x$ for every $x\in D^2$, but I don't know how to prove that $S^1$ would be a retract of $D$.  3)$\to$1) Of course I tried to suppose that $1_{S^1}$ is homotopic to a constant, and show a map without fixed points.  Any hint? Thanks.