There is currently a question from the personal finance stack in HNQ, titled:  Getting $10,000 and have $16,000 balance on two credit cards - How to allocate payments?   However, this renders like:    This appears to be a consequence of , and odd to see since ... is it possible to fix this without changing the MathJax delimiter again? (Have other MathJax-enabled stacks noticed this issue too?)  To be honest, I doubt this bug comes up often enough to warrant much attention, but being a software developer, I thought it would be good to at least document it :)

Related to  and .  This :    looks like this in the 'Hot Network Questions' section of e.g. :    I think Latex formatting of question titles should be disabled if the question comes from a site that don't use Latex formatting.


int a,b; while (cin>>a>>b, a) {     some task; }  I don't understand the while loop condition here. I understand that I am taking input of a and b. But what is with the , a part?


Sorry, I don't recall much, this is very faint UK memories from the 1970's, I think it was a novella in an anthology.  The protagonist is (I think) a native bearer with an Earthmen hunting party.  He is on a diaspora colony world that has, a few years before he was born, been found again by an expanding Terran Empire.  On this world there is a fierce creature (zero memory of a description) and, to be classed as an adult in their society, you have to single handedly kill one of these creatures. Once you kill one you get a dot tattooed on your forehead, some veterans have three or four dots. .  Once Earthmen heard of this their big game hunters excitedly came from all around the galaxy and soon there was a shortage of the beasts, the planetary rulers imposed quotas and tariffs to ensure a steady income, what this means is people like the protagonist can't afford to hunt a creature and thus attain adulthood.  The other bearer's on the safari sneer and call him Blanky (or Blankie?) I think (not sure) that a crisis happens and he then shows his bravery in what will become a new adulthood ritual.

Interstellar explorers have discovered what looks like a very suitable planet for human colonization. The climate is good, there are no pathogens, and a beautiful forest grows abundantly. A charming aspect of the flora is that leaves can detach themselves and fly off like flocks of multicolored butterflies. When they land on humans, the fliers take a tiny genetic sample as a sort of hello. Some of the biologists at the research station are disturbed that this idyllic scene will soon be plowed under.   To make the planet ready for settlers, an island has been cleared of native vegetation and inroads are being made on the mainland as well. But the forest that covers the mainland resists mightily, creating solid rings of wood around cleared areas that are planted with terrestrial vegetation. And it's hard to keep an area cleared when the trees can distribute themselves as flying leaves. The woody rings can be blasted open to allow terrestrial plants a foothold, but more rings form, and from the air the scars are very evident.  The forest is really all one organism. Eventually a pair of characters finds it possible to communicate chemically with this world-straddling forest. In the process, they become symbiotic with it.  I probably read (and reread) this story in an English-language anthology during the 70s, a time when ecologic concepts were becoming widespread in science fiction.


In my terminal, I did   $su nextuser   and logged in to that account. Now, when I try to open a text file in the home directory of that user by  $gedit test.c   I get  No protocol specified Cannot open display:  Run 'gedit --help' to see a full list of available command line options.   How can I use the graphical text editor to display files on the new user's account?

I defined 2 user accounts:   one with admin privilege (with sudo right) => lets call it adminuser. a 2nd one without any privilege => lets call it normaluser and I configure the autologin on this 2nd user normaluser.    So when I open a normaluser session and want to run an application with admin privilege,  I open a terminal Ctrl+Alt+T and:   su adminuser sudo anyapplication ...   It works fine, without having to quit the normaluser session (no need to open a adminuser session).    But what should I do if the application needs to run with a GUI (Graphic User Interface) ? I though about that:  su adminuser gksu anyapplication ...   but I get  ** (gksu:9122): WARNING **: the connexion is closed No protocol specified No protocol specified (gksu:9122): Gtk-WARNING **: cannot open display: :0.0


"For someone used to the tiny creatures we get in England it was something of a shock."  I think, in this sentence, relative pronouns before some words have been omitted. I know rules of omitting relative pronouns, but in this case I have failed to understand before which words relative pronouns can be placed to understand the sentence perfectly, which has been stated above. Please, explain the rules of omitting relative pronouns with the help of the sentence stated above, so that I can be able to understand this type of sentences easily. You can also use other sentences to explain this fact clearly.  Thanks to everyone.

He will understand that I was not joking.   He will understand I was not joking.  Which of the sentences is correct? Are there any specific rules about the use of "that" in the sentences I reported as example?


I have a class structure like this:  Entity Creatures and Tiles are Entities Players and Enemies are Creatures    My problem comes in a header file that includes both enemy.h and tiles.h. I'm not really sure what the problem is, but it will only compile properly if I don't include one of the headers. This is a stripped down version of what I have.  #include "enemy.h" #include "tiles.h"  class foo {   public:     list<Entity>* GetTiles();     list<Entity>* GetEnemies();   private:     list<Entity>* tilesList();     list<Entity>* enemiesList(); }   Before I threw in enemy.h and the enemy functions, it compiled properly. enemy.h includes creature.h which includes entity.h. tiles.h includes entity.h  I'm really not all that familiar on how #include really works, but it's obvious that it's the problem. How can I fix this?

I often find myself in a situation where I am facing multiple compilation/linker errors in a C++ project due to some bad design decisions (made by someone else :) ) which lead to circular dependencies between C++ classes in different header files (can happen also in the same file). But fortunately(?) this doesn't happen often enough for me to remember the solution to this problem for the next time it happens again.  So for the purposes of easy recall in the future I am going to post a representative problem and a solution along with it. Better solutions are of-course welcome.     A.h  class B; class A {     int _val;     B *_b; public:      A(int val)         :_val(val)     {     }      void SetB(B *b)     {         _b = b;         _b->Print(); // COMPILER ERROR: C2027: use of undefined type 'B'     }      void Print()     {         cout<<"Type:A val="<<_val<<endl;     } };       B.h  #include "A.h" class B {     double _val;     A* _a; public:      B(double val)         :_val(val)     {     }      void SetA(A *a)     {         _a = a;         _a->Print();     }      void Print()     {         cout<<"Type:B val="<<_val<<endl;     } };       main.cpp  #include "B.h" #include <iostream>  int main(int argc, char* argv[]) {     A a(10);     B b(3.14);     a.Print();     a.SetB(&b);     b.Print();     b.SetA(&a);     return 0; }


My toddlers like to have ice-cream, candy, sweet, and high sugar cookies. I just worried it could lead to sugar addiction. What are persuasive techniques to reduce sugar intake?

For a pre-adolescent child, what strategies can I use to control the quantity of sweets and junk food that make it into his diet?


Let $m$ be a $\sigma$-finite measure on sigma-algebra $A$ of subsets of $X$.     How do I prove that there exist probability measures $(m_n)_{n\in \mathbb{N}}$ on $A$ and coefficients $c_n>0$ such that $$m(U)=\sum_n c_nm_n(U)?$$   I know that a $\sigma$-finite measure means that there exist subsets $(X_n)_{n\in \mathbb{N}}$ such that $X=\cup_n X_n$ and $m(X_n)<\infty$. And a probability measure is such that $m_n(X)=1$. But how can I use these to prove the statement?

Let $\mu$ be a $\sigma$-finite measure on a $\sigma$-algebra $\mathcal{A}$ of subsets of $\Omega$. Show that there exists probability measures $\mu_n$ on $\mathcal{A}~(n \in \mathbb{N})$ and $a_n>0$ such that for every set $A \in \mathcal{A}:$ $$\mu (A)= \sum_{n=1}^{\infty} a_n \mu_n (A).$$  Is there anyone can give me hints or show how to start proving this question?


I wish to prove that for any coprime (and positive) Pythagorean triple $(x,y,z)$, where $x$ is even, $x+z$ is always a square number.  By inspection, this appears true; $(3,4,5)$ gives $9$,  $(5,12,13)$ gives $25$, $(8,15,17)$ gives $25$, $(7,24,25)$ gives $49$ et cetera. Yet I am stuck on the proof.  I do not know the original source of the problem.

I'm looking for formulas or methods to find pythagorean triples. I only know one formula for calculating a pythagorean triple and that is euclid's which is:  $$\begin{align} &a = m^2-n^2 \\ &b = 2mn\\ &c = m^2+n^2  \end{align}$$  With numerous parameters.  So are there other formulas/methods?


So I've taught myself how to code, currently enrolled in a free online course about introductory java and I have some few questions about objects.   Why is it that I was able to use the reference variable for invoking methods of an object like,   Vptemp plan = new Vptemp();  plan.intro(); plan.budget(); plan.area();    My second question is about Inheritance, why is it that the reference object "GameObject" and the actual object "Player" can be both different when creating an object like,      GameObject player = new Player();     GameObject menu = new Menu();      player.draw();     menu.draw();   Correct me if I'm wrong, my understanding about the code above is that I am creating a Player Object and I want to use GameObject as a reference, why is it that I was able to invoke the specific implementation of the abstract method  draw() from my subclasses even though I am using GameObject as a reference were the implementation is not there? In short i want to understand the difference between the code above and this one below that produces the same output.      Player player = new Player();     Menu menu = new Menu();      player.draw();     menu.draw();       Output     Player draw     Menu draw   I know that Player and Menu is a GameObject if we talk about Inheritance, what do we exactly mean if we mention the above code thank you!  Correct me if I've mention wrong terms.

I have seen this mentioned a few times and I am not clear on what it means. When and why would you do this?   I know what interfaces do, but the fact I am not clear on this makes me think I am missing out on using them correctly.   Is it just so if you were to do:  IInterface classRef = new ObjectWhatever()   You could use any class that implements IInterface? When would you need to do that? The only thing I can think of is if you have a method and you are unsure of what object will be passed except for it implementing IInterface. I cannot think how often you would need to do that.   Also, how could you write a method that takes in an object that implements an interface? Is that possible?


I have this sum: $1+3+5+...+(2n+1)$, where $n$ is a natural number. I have to calculate it and interpret geometrically. Well, it's easy to find out that it equals $(n+1)^2$. But how to interpret it geometrically? I don't think it's about a graph(parabola). could you please give me at least an idea?

Prove that for all integers $n$, $n \geq 1$,   $$1 + 3 + 5 + \cdots + (2n - 1) = n\cdot n$$   How would I go about proving this?


I have tried to uninstall and reload windows but I can't. I have tried everything in other posts and nothing seems to work.  Even tried to just clean partition and then reinstall got the grub rescue screen. Even tried to do that didn't work. I have now reinstalled so can you give me step by step instructions on how to do it please.  UPDATE  I have discovered that Windows 8.1 computers do not come with recovery discs.  They have the software on a virtual drive on the HDD.  When you get the machine you are supposed to do a back up of it on either several DVD's or on a 16GB USB drive.  The product code is part of the Bios of the machine.  So when you install Ubuntu on a Windows 8 machine you need to partition FIRST!  The installer will not do it automatically for you.  Something I have found out to my cost as I now have to pay for a recovery disc from Acer.  :(

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


I have seen a problem recently. It says that every finite division ring is a field. How to show this?

On wikipedia (division algebra page), it says "Wedderburn's little theorem states that if D is a finite division algebra, then D is a finite field."  I've just been through a proof this theorem, but this proof proves that if D is a finite division ring then it is a finite field. Is wikipedia wrong, or does this amount to the same thing?  What I mean is, does the fact that any finite division ring is a field imply that any finite division algebra is a field?  If the above were true, it would imply that for any division ring D, if D forms an algebra then this algebra is a division algebra.  I feel like my trouble understanding this stems from a lack of understanding of vector spaces. If I have a set S and it forms a vector space over a field F, can F-linear combinations of elements of S be outside of S? If they can't, then I think my problem is solved.  Apologies for the poorly phrased question.


Let me first start by clarifying, I believe there is a point that has been missed in this question before. Consider that before marking it a repeat:  What is the precise differentiation between a bonus action and an action?  I believe that the combination of two weapon fighting and Extra Attack (granted at Level 5 Paladin) allows for a total of 4 attacks. Can anyone confirm this? Let me outline.  Extra attack: "Beginning at 5th Level, you can attack twice, instead of once, whenever you take the Attack action on your turn."  Two Weapon Fighting: "...you can use a bonus action to attack with a different light melee weapon...".  Most answers I've seen say three attacks, i.e. You get the Attack Action, which includes 2 attacks, and the bonus Action which includes 1 attack.  However, I believe the correct breakdown is first to thinking You get the Attack Action, which grants a Bonus Action (Attack Action). Now both of these Attack Actions should benefit from Extra Attack, giving 4 (lower case a) attacks within 2 (upper case A) Attack Actions. Thoughts?  The rules seem clear, that a bonus action is an action. And an action used to attack is an attack action. Thus, a bonus action used to attack is an attack action.  If this is not the case, where is there a clear distinction between bonus action and action?

While I know you can't cast 2 spells of first level or higher in a turn, and actions can't just be used as bonus actions, is the reverse true?  Say there's a barbarian cleric that rages as a bonus action: can they use healing word as an action, when it normally takes a bonus action? Can bonus actions be used as actions in the case of using a bonus for something else such as rage?


Is there any mechanism for playing youtube in background? When i am playing just audio songs from youtube, i need to play it as on background, since there is no video in it.

The stock YouTube app (here on 2.1-eclair, but applies to all android versions) stops playing when I minimised, switched to another application or even when I lock the phone. And when I resume it restart downloading the clip from the beginning. Is there any way that I can play YouTube clips in the background? Note, I only the audio to continue playing.


"Enable Wifi" is missing on my Ubuntu 16.04. This happened after I upgraded from 14.04. It was all fine on 14.04  The driver is enabled already in Additional Drivers (BCM43142)  I have tried many suggestions from AskUbuntu. Some suggested restarting the network service manager to get temporary solution but even that doesn't work.  $ lspci  00:00.0 Host bridge: Intel Corporation Haswell-ULT DRAM Controller (rev 0b) 00:02.0 VGA compatible controller: Intel Corporation Haswell-ULT Integrated Graphics Controller (rev 0b) 00:03.0 Audio device: Intel Corporation Haswell-ULT HD Audio Controller (rev 0b) 00:14.0 USB controller: Intel Corporation 8 Series USB xHCI HC (rev 04) 00:16.0 Communication controller: Intel Corporation 8 Series HECI #0 (rev 04) 00:1b.0 Audio device: Intel Corporation 8 Series HD Audio Controller (rev 04) 00:1c.0 PCI bridge: Intel Corporation 8 Series PCI Express Root Port 1 (rev e4) 00:1c.1 PCI bridge: Intel Corporation 8 Series PCI Express Root Port 2 (rev e4) 00:1c.2 PCI bridge: Intel Corporation 8 Series PCI Express Root Port 3 (rev e4) 00:1c.3 PCI bridge: Intel Corporation 8 Series PCI Express Root Port 4 (rev e4) 00:1c.4 PCI bridge: Intel Corporation 8 Series PCI Express Root Port 5 (rev e4) 00:1d.0 USB controller: Intel Corporation 8 Series USB EHCI #1 (rev 04) 00:1f.0 ISA bridge: Intel Corporation 8 Series LPC Controller (rev 04) 00:1f.2 SATA controller: Intel Corporation 8 Series SATA Controller 1 [AHCI mode] (rev 04) 00:1f.3 SMBus: Intel Corporation 8 Series SMBus Controller (rev 04) 08:00.0 Network controller: Broadcom Corporation BCM43142 802.11b/g/n (rev 01) 09:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8101/2/6E PCI Express Fast/Gigabit Ethernet controller (rev 08) 0a:00.0 3D controller: NVIDIA Corporation GM108M [GeForce 840M] (rev a2)   $ sudo lshw -c network    *-network UNCLAIMED             description: Network controller        product: BCM43142 802.11b/g/n        vendor: Broadcom Corporation        physical id: 0        bus info: pci@0000:08:00.0        version: 01        width: 64 bits        clock: 33MHz        capabilities: pm msi pciexpress cap_list        configuration: latency=0        resources: memory:b5500000-b5507fff   *-network        description: Ethernet interface        product: RTL8101/2/6E PCI Express Fast/Gigabit Ethernet controller        vendor: Realtek Semiconductor Co., Ltd.        physical id: 0        bus info: pci@0000:09:00.0        logical name: eth0        version: 08        serial: 6c:c2:17:65:7c:a1        size: 10Mbit/s        capacity: 100Mbit/s        width: 64 bits        clock: 33MHz        capabilities: pm msi pciexpress msix vpd bus_master cap_list ethernet physical tp mii 10bt 10bt-fd 100bt 100bt-fd autonegotiation        configuration: autonegotiation=on broadcast=yes driver=r8169 driverversion=2.3LK-NAPI duplex=half firmware=rtl8106e-2_0.0.1 04/23/13 latency=0 link=no multicast=yes port=MII speed=10Mbit/s        resources: irq:41 ioport:4000(size=256) memory:b5404000-b5404fff memory:b5400000-b5403fff   *-network        description: Ethernet interface        physical id: 3        logical name: enp0s20u6        serial: 06:5e:2b:de:58:2c        capabilities: ethernet physical        configuration: broadcast=yes driver=rndis_host driverversion=22-Aug-2005 firmware=RNDIS device ip=192.168.42.138 link=yes multicast=yes   Need help!

This issue happens only on UEFI systems with enabled Secure Boot.  When I try to install DKMS modules like VirtualBox, Nvidia, or Broadcom drivers, they do not install and I get Required key not available when I try to modprobe them.  VirtualBox complains that vboxdrv is not loaded.  Broadcom wl driver is shown in lspci -k as a kernel module but is not in use. sudo modprobe wl throws Required key not available.  Also this issue may happen when I install some kernel modules from git sources.  This issue may appear after a kernel update as disabled wireless adapter, black screen after a reboot, etc.   How can I fix it?


I've always wondered about certain kinds of nouns, a particular example is worth. As in: It is worth 100 dollars, It is worth it, It is not worth anything.  In which they handle direct objects, like transitive verbs. This isn't applicable for nouns like, say, 'cat' or 'monster'.  Worth can also be used in embeds. Eg: The car worth ten thousand finally sold.   I can't think of any use alone apart from the idiomatic 'It has some worth'.  Am I misled? Or is this a thing like I think it is? Is there any information and other examples?

The question  got me thinking about what part of speech, or lexical class, the word 'worth' takes?  A comment in  advises to treat 'worth' as an adjective, but I'm not sure that's right. 'Worthy' is an adjective, but that's not the same as 'worth'.  In the title question you could replace 'worth' with the phrase 'of comparable value to'; what part of speech would that phrase be considered?  Are the word and the phrase in the same lexical class?  Edit:  Just to throw another option out, after a stimulating discourse under the answer provided by @Henry:   mentions that used in the context of this question, 'worth' is considered an adjective, but it also notes that      The modern adjectival senses of worth compare two noun phrases, prompting some sources to classify the word as a preposition. Most, however, list it an adjective, some with notes like "governing a noun with prepositional force."   It also notes that      Joan Maling (1983) shows that worth is best analyzed as a preposition rather than an adjective.   If viewed as a preposition, then it is easy to replace 'worth' with another preposition of somewhat equal meaning, such as "Is this apple about $3", "Is this apple under $3", or "Is this apple over $3".  Adjective, infinitive, or preposition?  ...or is this a rare case of an old language usage that straddles multiple lexical classes in modern language?


With accelerated expansion of universe which is same in all direction we know that dark energy increase with time because space between any two point in space time increases with time. So after some finite time we can not see nearby galaxy cluster which we can see now. So doesn't that violate conservation of energy which says energy neither can created nor can destroyed. Because with expanding universe energy in the form of dark energy increases with time so if we consider whole universe (visible + invisible) as isolated system then energy of whole universe increase means energy is created from nothing. Am I missing something over here?

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


Steps to reproduce:  Switch to mobile web (in the footer)  Select any question and tap "Post Your Answer" button while post body is clear. You will see an error message "Oops! Your answer couldn't be submitted because: Body is missing."  Tap "Full site" link (in the footer)  See the following:

Being on mobile web and trying to post an answer with empty body properly shows me an error:        This looks fine and friendly, until you switch to the full site from the bottom link on this page. This leads to a server error:


so this is my first post over here.   I install WSL linux on my windows to use gnuplot.  but i plot something i get this message anyone is familiar with such a problem   qt.qpa.xcb: could not connect to display   qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.  and please if so write the commands i should write because i'm still beginner in using bash scripting   `

I searched around, and currently there are two methods suggested; installing an enhancement for Windows Subsystem for Linux and installing an XServer.  I want to know which method is the most hassle-free (easy to install AND to use), and which one is less memory-heavy.  I just want Synaptic and CMake. Why couldn't that be a builtin feature?


I've been searching extensively through this and other forums without success about the topic. I am interested in using a new camera model consisting of a normal perspective model, but where the image plane is tilted with respect to the lens plane (scheimpflug principle). I can't find how to modify a normal Cycles camera in order to include such "simple" modification.  Cheers  Pep

I basically want to rotate the DoF-Plane just as a real tilt-shift lens does, so that the depth influences the blur and not a gradient. Is there a way to recreate this effect in blender?


I was in a course of Abstract Algebra, and the teacher asked some interesting questions at the end of a course on the material we had seen. I found the answer to the first question, but the other two leave me perplexed. Could you give me your opinion on the answers (2) and (3)?  (1) Is the function $f : \mathbb{N} \to \mathbb{N} $ such that $$f= \begin{pmatrix} 1 & 2 & 3 & 4 & ...\\ f(1) & f(2) & f(3) & f(4) & ... \end{pmatrix} = \begin{pmatrix} 1 & 2 & 3 & 4 & ...\\ 2 & 3 & 4 & 5 & ... \end{pmatrix}$$ is a permutation?  (2) Is there a function $ f \in S_E$ with $E = \mathbb{N}$  that is factorisable into disjoint cycle of infinite order such that $\mid \{n \in \mathbb{N} : f(n) \not= n\}\mid < \infty$ ?  Definitions :    $S_E$ is the set of all permutation of $E$.  Let the set $E \not= \emptyset$. We say that a map $f : E \to E$ has an inverse function, if there is a mapping $g : E \to E$ such that both composition $f \circ g$ and $g \circ f$ are the application identity for each $x \in E$. We say that $f$ is a permutation (bijection) of $E$ .    (3) Does the subset of functions $\in S_{\mathbb{N}}$ ($S_E$ with $E=\mathbb{N}$) consistent with $\{n \in \mathbb{N} : f(n) \not= n\}$ (the permutations that move only finitely many numbers) form a group?  Answers  (1) No, because $1$ isn't an element in the image.  (2) $$ \underbrace{\cdots \mapsto 6 \mapsto 4 \mapsto 2}_\text{even} \mapsto \underbrace{1 \mapsto 3\mapsto 5\mapsto \cdots}_\text{odd} $$ $$ n\mapsto \begin{cases} n-2 & \text{if $n$ is even and $n\ne 2$}, \\ 1 & \text{if }n=2, \\ n+2 & \text{if $n$ is odd.} \end{cases} $$ (3) If $f$ and $g$ move only finitely many numbers, then so does $f\circ g$.  Consider the intersection of the set of all fixed points of $f$ and the set of all fixed points of $g$.  That is the set of all numbers fixed by both $f$ and $g$.  Only finitely many numbers are not among these because the intersection of the complements of two finite sets is the complement of the union of the two finite sets, and the union of two finite sets is finite.  If $f$ moves only finitely many numbers, then so does $f^{-1}$.  Can we prove this last statement?  Then can we see that the two assertions here are all you need?

I'm actually in a course of Abstract Algebra, and the teacher asked some interesting questions at the end of a course on the material we had seen. I found the answer to the first question, but the other two leave me perplexed. Could you give me your opinion on the questions (2) and (3)?  (1) Is the function $f : \mathbb{N} \to \mathbb{N} $ such that $$f= \begin{pmatrix} 1 & 2 & 3 & 4 & ...\\ f(1) & f(2) & f(3) & f(4) & ... \end{pmatrix} = \begin{pmatrix} 1 & 2 & 3 & 4 & ...\\ 2 & 3 & 4 & 5 & ... \end{pmatrix}$$ is a permutation? Answer : no, because $1$ isn't an element in the image.  (2) Is there a function $ f \in S_E$  that is factorisable into disjoint cycle of infinite order such that $\mid \{n \in \mathbb{N} : f(n) \not= n\}\mid < \infty$ ?  Definitions :    $S_E$ is the set of all permutation of E.  Let the set $E \not= \emptyset$. W say that a map $f : E \to E$ has an inverse function, if there is a mapping $g : E \to E$ such that both composition $f \circ g$ and $g \circ f$ are the application identity for each $x$ element of $E$. We say that $f$ is a permutation (bijection) of $E$ .    (3) Does the subset of functions $\in S_{\mathbb{N}}$ ($S_E$ with $E=\mathbb{N}$) consistent with $\mid \{n \in \mathbb{N} : f(n) \not= n\}\mid < \infty$ form a group?


If i have Two dates then i get the difference between them in days Like this .    How to detail that in the following view :  convert the days to (number of years,number of months and the rest in the number of days)

I want to calculate the age of a person given the date of birth and the current date in years, months and days relative to the current date.  For example:  >>> calculate_age(2008, 01, 01) 1 years, 0 months, 16 days   Any pointer to an algorithm that does that will be appreciated.


If $16^2 = 16 \times 16$ and if $16^1 = 16$ why doesn't $16^0 = 0$? I don't  understand the rationale. Does $16^0$ express the idea that $16$ is multiplied by nothing and therefore is $1$?

I have been a witness to many a discussion about numbers to the power of zero, but I have never really been sold on any claims or explanations.  This is a three part question, the parts are as follows...    1) Why does $n^{0}=1$ when $n\neq 0$?  How does that get defined?  2) What is $0^{0}$?  Is it undefined?  If so, why does it not equal 1?  3) What is the equation that defines exponents?  I can easily write a small program to do it (see below), but what about in equation format?    I just want a little discussion about numbers to the power of zero, for some clarification.    Code for Exponents: (pseudo-code/Ruby)  def int find_exp (int x, int n){     int total = 1;     n.times{total*=x}     return total; }


The number of injuries at a college football game has the following probability distribution:  Probability 0.14 0.33 0.23 0.17 0.09 0.04 Number of injuries 0 1 2 3 4 5  The coach must file a report whenever there is more than one injury in any game.  Calculate the expected number of football games to be played before the first game in which there are at least four injuries.

The number of injuries at a college football game has the following probability distribution:      $$\begin{array}{|l:l|} \hline \textrm{Number of injuries} & 0 & 1 & 2 & 3 & 4 & 5 \\ \hdashline \textrm{Probability} & 0.14 & 0.33 & 0.23 & 0.17 & 0.09 & 0.04 \\ \hline \end{array}$$      The coach must file a report whenever there is more than one injury in any game.      a. Calculate the expected number of reports filed in the next 20 games.      b. Calculate the standard deviation of the number of reports filed in the next 20 games.      c. Calculate the expected number of football games to be played before the first game in which there are at least four injuries.


I am reading data from a file and passing the data (three Strings, one float) into objects that I created via setters.  I keep on getting a NullPointerException and cannot figure out what to do, even after researching the topic online.  I have attached pictures of both my main function as well as the code for the class that I am trying to use the setters with.

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


When I copy a hard drive I often use the dd command I have one question about monitoring. To see the progress of the copy I do like this sudo dd if=$source of=$pathToUsb bs=4M conv=fdatasync status=progress  and I get the following message: 2969567232 octets (3,0 GB, 2,8 GiB) copiés, 22 s, 134 MB/s  if i want to retrieve only the number of bytes how can i proceed ? sudo dd if=$source of=$pathToUsb bs=4M conv=fdatasync status=progress > capture.txt 2>&1  I also tried this sudo dd if=$source of=$usb bs=4M conv=fdatasync 2>&1 | awk 'END {print ($0+0)}'  But it doesn't work Any ideas ?

Here is my script :-  sudo mate-terminal --geometry=50x10 -x sh -c "dd if=/dev/sda of=/dev/sdb status=progress 2>&1 | tee log.txt | md5sum > hash.txt | sha1sum > hash1.txt"   I've seen people giving this suggestion all the time; putting 2>&1. But this will only display the progress in the log.txt file and the terminal will display nothing. Here's a picture of what the progress look like on the log.txt file.    If I remove 2>&1 and just go with  command | tee log.txt   Only the terminal will show the progress and nothing will display in the log.txt file  I've also tried:-  (command 2>&1) | log.txt  command 2> | log.txt   and many more I can't recall. So can someone help me?


I want to send an array as an Ajax request:  info[0] = 'hi'; info[1] = 'hello';  $.ajax({   type: "POST",   url: "index.php",   success: function(msg){     $('.answer').html(msg);   } });   How can I do this?

I need to  an object to . I'm using . Is there a "standard" way to do this?  My specific situation: I have an array defined as shown below:  var countries = new Array(); countries[0] = 'ga'; countries[1] = 'cd'; ...   and I need to turn this into a string to pass to  like this:  $.ajax({     type: "POST",     url: "Concessions.aspx/GetConcessions",     data: "{'countries':['ga','cd']}", ...


I need to proof that $\sqrt{3} + \sqrt{2}$ is irrational, without using the fact that an irrational number plus a rational number equals irrational. also, i can't use the rational root theorem. that's why i posted a new question..  thanks for help!

Can the expression $\sqrt{n} + \sqrt{m}$ be rational if neither $n,m \in \mathbb{N}$ are perfect squares? It doesn't seem likely, the only way that could happen is if for example $\sqrt{m} = a-\sqrt{n}, \ \ a \in \mathbb{Q}$, which I don't think is possible, but how to show it?


For this string  Some AB, Author C., Names DEF. The title string. T journal name 2018;10:560-564   I would like to get just the authors. So I tried to split for . (dot and space).  But using the regex /^(.*)(?:\.\s).*/ doesn't match for my expected Some AB, Author C., Names DEF, instead I do get also the title as my first match.  I don't understand why. Maybe someone can explain what I'm doing wrong.

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


I am wondering because I was told that it is, but from what I've seen it's pretty widely used.  Thanks!

For a while, using but to start a sentence was largely frowned upon. But, I think it is possible to use but at the beginning of a sentence, as long as it isn't overused.  Am I right?


I want to install Ubuntu 14.10 64bit version in my pc alongside Windows 7 64bit OS. So I have installed Windows 7 and now when I tried to install Ubuntu, it doesn't detect any OS and shows it doesn`t have any OS. What to do now?

Whenever I startup from the LinuxLive USB, and try to install Ubuntu 12.04, it only gives me two options instead of the usual 3 or 4. My options are "Replace Windows 7 with Ubuntu" and "Something Else". Whenever I go into "Something else", it looks extremely confusing. How do I install it side-by-side while using the "Something else" section? These are my partitions.   /dev/sda /dev/sda1 ntfs (104Mb, System Required Partition) /dev/sda2 ntfs (1000097Mb, Windows 7 Partition)   Or should I try reinstalling my installer on a CD rather than USB and maybe then it will have the "Install alongside" function?


Say i have a class, TestClass. What I want to do is to have a function which i can pass a instance of TestClass into, which will set the attribute test_function of the object to a new function, which takes in self as the first parameter. How would I do this? Example: class TestClass:     def __init__(self):         self.t = "t" #irrelevant  object = TestClass()  def assign_function(object):     object.test_function = #????????  assign_function(object)  object.test_function() #I want this line to be able to run and for test_function to be able to access the attributes of object  I've already tried some options but I can't seem to find anything that works. For most of my solutions, the function requires an extra parameter, so for a function like def func(self, text):     print(text)  I would still have to pass something in as self, rather than it being done automatically like class functions are

I've read that it is possible to add a method to an existing object (i.e., not in the class definition) in Python.   I understand that it's not always good to do so. But how might one do this?


I have a SQL Server database on a production server (Windows server 2012, Intel Xeon, 24 GB RAM). The same database is present on my computer (Windows 10, Intel I3, 8 GB RAM).  When I'm querying the databases the response time is ~2 times longer on the production server.  The size of the databases and log files are identical.

I have a piece of SQL that seems to run really fast in Environment A, but the exact same query runs really slow in Environment B!  Environments are supposed to be the same, so what should I do and/or where should I look in order to see why the query doesn't perform the same?


Prove that the empty set is a subset of every set.   I don't really know where to start other than the fact that I know a symbolic representation  of the empty set and that it is included in every set.

Ever since day one of of my Mathematical Logic course, this fact has really bothered me. I cannot wrap my head around how an empty set is a subset of every possible set. Could someone kindly explain how this is true? Any help is appreciated!


I was recently sold an iPad by someone on the net. We met to do the exchange. When I tried to set up, she couldn't remember the ID or the password. Now I can't get hold of her and am stuck with an iPad that doesn't function. What can I do?

I bought a used iPhone 4.  The previous owner re-set the phone, but did not remove the device from their iCloud.  It is asking me for their iCloud information when I try to set-up the phone.  I don't have contact with the previous owner anymore.  Is there a way to remove the device from their iCloud so I can use a new one?


public SuperClass{     protected int a1; }  // Consider that two classes are in different package. public SubClass extends SuperClass{     void m1(){         SuperClass sp = new SuperClass();         sp.a1 = 1; // Error: Subclass.a1 is not visible     } }   I think that protected member a1 is visible to SubClass. In addition, field a1 belongs to SuperClass. So why it's not visible?

In Java, are there clear rules on when to use each of access modifiers, namely the default (package private), public, protected and private, while making class and interface and dealing with inheritance?


Please tell me all the files I need to open,find and/or edit in order to check this.

If I want to use two mods together, e.g.  and  (which don't state compatibility with one another), how can I tell if they will work together (and not break Minecraft - forcing me to re-download a fresh copy)?


Some Linux binaries end with a "d", for example sshd, httpd, ppd, etc.  Why is this so?

I observed some of the binary files and configuration filenames end with a d. What is reason for putting a d at the end of the file name?   Like httpd, ospfd, pppd, syslogd, telnetd, pptpd, inetd, bootlogd and dhcpd.


If I were to hit an anvil with a hammer (let's say a 1 kg hammer at 1 m/s) how would the force of the impact be calculated?  So, where I'm at with this is that I know the deal with f = mv, so the force would be equal to 1N/s. My problem is with the time that it takes for the energy to be transferred from the hammer to the anvil. If you could see the time it takes for the collision to happen (say 0.1s) that would be easy (10N).  The hammer with the anvil is purely just an example. I've heard people mention of using a dirac delta function, but that just feels unrealistic since it's obviously not instant. Is there an inherent limit to the amount of time that it takes for the force to be applied (say the speed of sound?)  (also like to note that I have absolutely 0 idea how to use a dirac delta function. From the looks of it it's just an integral but I do not understand it)  EDIT: Thanks for the answers. I've been googling for about a week now, watching every video I could find on impulsive force, all of them say to measure it physically. You can understand why this is a very unsatisfying answer, and none of the posts answer this particular question.  Energy is not transmitted instantly. If I were to have a stick 2 lightyears long, put a button at the end of the stick, and push the stick from earth, the button would not be pressed instantly. I was curious if there's anything that determines the rate of energy transfer.

What is a good and easy way to compute and/or measure the force of a hammer blow, not using any fancy or specialized equipment?  If the hammer is swung by hand through an arc, it is not obvious to me how to measure the speed the hammer will be when it strikes the metal.  Also, when the hammer strikes the metal, the heavier it is, the more force there will be persistent and the less rebound. Also, the smith may use what is called a "dead blow" hammer to reduce the rebound. Thus, measuring the force is not just a question of the instantaneous force of the hammer, but how much it "presses" after that first instant, its impetus so to speak.  Now, one idea I had was to use a teeter-totter. You could place a heavy weight on one end of the teeter-totter and then hit the other other with the hammer and see how far it moved. Of course, what will happen is that when the hammer hits the pad, the teeter totter will accelerate, reach a peak, then decelerate, and the profile of this curve of acceleration will be the measurement of the instantaneous force of the hammer over time. Perhaps this could be measured by an accelerometer, but it is hard to see how to make the measurement with no special instrument.


I'm writing a letter with class newlfm and I have a somewhat big issue, the second page does not seem to have the bottom margin.  First page bottom:    Second page bottom:    This is my code:  \documentclass[12pt,stdletter,orderfromtodate,sigleft]{newlfm} \usepackage{lipsum, xfrac} \usepackage{amsmath} \usepackage[shortcuts]{extdash}   \newlfmP{dateskipbefore=-100pt} \newlfmP{sigsize=0pt} \newlfmP{sigskipbefore=0pt} \newlfmP{sigskipafter=0pt} \newlfmP{sigsize=0pt}  \newlfmP{Headlinewd=0pt,Footlinewd=0pt}  \namefrom{name Surname}  \dateset{May 6, 2019}  \greetto{To Whom It May Concern,}  \closeline{Respectfully yours,}  \begin{document} \begin{newlfm}  \lipsum \lipsum  \end{newlfm} \end{document}   Thank you in advance

I updated to TeXLive 2017 and couldn't get newlfm.cls to work without errors.  Here is a minimal example:  \documentclass{newlfm} \begin{document} \begin{newlfm} \end{newlfm} \end{document}   LaTex is throwing undefined control sequence errors on \fancy@reset, \f@ncyolh, and \f@ncyorh.  What causes the errors?  What am I missing?


What is the point of the initialization vector in cryptographic modes like AES-CBC when it is sent in the public? Cant any attacker just listen and reverse the IV? and as such defeating its purpose? EDIT I already know . My question was: Can't any attacker just listen and reverse the IV? And as such defeating its purpose? So, by using IV, the message 'hello' becomes (XXXX) and (yyyy), but since both have a copy of their respective IVs in the public such that (XXXX)123 and (yyyy)456, why can't I use 456 to make (yyyy) back to (XXXX) (to clarify)? I am assuming that the decrypter of (yyyy)456 transforms the message in the following ways (yyyy)456 -> f(456) -> (XXXX) -> f(key) -> 'hello'. So why an attacker can't just (yyyy)456 -> f(456) -> (XXXX) if 456 is already known?

What are the main differences between a nonce, a key and an IV? Without any doubt the key should be kept secret. But what about the nonce and the IV? What's the main difference between them and their purposes? Is it only that, in literature and in practice, an IV is being used as "initiator" of a block cipher encryption mode which should be unique? And the same property should hold for a nonce as well, but since it doesn't instantiate something we call it a nonce? I.e: in AES-CTR mode the IV is a nonce+counter. And both are put in plaintext format in the beginning of the ciphertext.


how do i login with root account and get root desktop environment in ubuntu 14.10  Pls advise .  Reg, Sufi

I don't care if I mess up the system (which is likely if I do things like this), or the potential security issues that this could imply. Note, that I don't just want to "", but run my GUI from bottom-up as root. I don't want to type my password for anything but just for login and have total control over it.  Of course, I want any application running as root, like Firefox, LibreOffice, etc. without having to mess up with the terminal. So, how do I do this?     This question tries to address users that do not like the current permission system with root being separated from normal users. I do not endorse such behaviors, but if a user wants to, for whatever reason, this question should fit their corncerns.   Not advisable for new users


In trying to derive Maxwell's equations from $$S=\int d^4 x\left(-\frac 1 4 F_{\mu \nu}F^{\mu \nu}\right)$$ Where $$F_{\mu \nu}=\partial_\mu A_\nu-\partial_\nu A_\mu$$ I'm trying to show that $$\frac{\partial (F_{\mu \nu} F^{\mu \nu})}{\partial (\partial_\lambda A_\beta)}=4 F^{\mu \nu}$$ But there seems to be something wrong with how I'm going about doing this. My work currently: $$\frac{\partial F_{\mu \nu}}{\partial(\partial_\lambda A_\beta)} = \frac{\partial F^{\mu \nu}}{\partial(\partial_\lambda A_\beta)}=\delta_{\lambda \mu}\delta_{\beta \nu}-\delta_{\lambda \nu}\delta_{\beta \mu}$$ Where $\delta$ is the Kronecker-Delta function. From this we find that $$\frac{\partial}{\partial(\partial_\lambda A_\beta)}\left(F_{\mu \nu}F^{\mu \nu}\right)=(F^{\mu \nu}(\delta_{\lambda \mu}\delta_{\beta \nu}-\delta_{\lambda \nu}\delta_{\beta \mu}))+(F_{\mu \nu}(\delta_{\lambda \mu}\delta_{\beta \nu}-\delta_{\lambda \nu}\delta_{\beta \mu}))=(F^{\lambda \beta}-F^{\beta \lambda})+(F_{\lambda \beta}-F_{\beta \lambda})$$ Asserting that $F^{\mu \nu} = -F^{\nu \mu}$ and renaming the dummy indices we get $$\frac{\partial}{\partial(\partial_\lambda A_\beta)}\left(F_{\mu \nu}F^{\mu \nu}\right)=2(F^{\mu \nu})+2(F_{\mu \nu})$$ Which is a bit off target. Did I go off course somewhere in my current work or am I just missing a few final steps?

My problem is mostly with notation. When we apply the Euler-Lagrange equation to the Lagrangian scalar $$\mathcal{L}= -\frac{1}{4}F^{\mu\nu}F_{\mu\nu}$$ Where $$F_{\mu\nu} = \partial_\mu A_\nu -\partial_\nu A_\mu= \nabla_\mu A_\nu -\nabla_\nu A_\mu$$ and I start with $$\frac{\partial\mathcal{L}}{\partial A_\mu}=\nabla_\nu\left(\frac{\partial \mathcal{L}}{\partial(\nabla_\nu A_\mu)}\right).$$   Now I rewrite the lagrangian as $\mathcal{L} = -\frac{1}{4}g^{\mu\alpha}g^{ \nu\beta}(\nabla_\mu A_\nu-\nabla_\nu A_\mu)(\nabla_\alpha A_\beta-\nabla_\beta A_\alpha)$ $$\mathcal{L}= -\frac{1}{4}g^{\mu\alpha}g^{\nu\beta}\left[(\nabla_\mu A_\nu)(\nabla_\alpha A_\beta)-(\nabla_\mu A_\nu)(\nabla_\beta A_\alpha)-(\nabla_\nu A_\mu)(\nabla_\alpha A_\beta)+(\nabla_\nu A_\mu)(\nabla_\beta A_\alpha) \right]$$ My problem is calculating $\frac{\partial \mathcal{L}}{\partial(\nabla_\nu A_\mu)}$, how are the rules of partial derivatives generalised to covariant ones? Also, is $\frac{\partial\mathcal{L}}{\partial A_\mu}=0$, is that correct ?


If $1\div0=\infty$, then $1\div(1\div0)=0$. Does this mean $1\div\infty=0$? Or is it always close to zero?  Please let me know what is correct: either it's zero or always close to zero.

Since $\infty>0$, so $1/\infty >0$, thus I think $1/\infty$ should be infinitesimal, but the calculus book says  $$\lim_{x \to \infty} \frac{1}{x}= 0$$  So is $1/\infty$ zero or infinitesimal ?  P.S. I mean are $1/\infty$ and $\lim_{x \to \infty} 1/x$ the same thing here?


Elections generally have a meta question, linked to in bold at the top of the election page with the text "The candidates answer your questions."    Can we include, in each candidate's nomination box, a link to the candidate's answer on that particular meta question, appropriately labelled?   I noticed in the , there are some candidates whose nomination text includes a link saying something like "," which appears to have been edited in by the candidate directly.  However, when an election has no primary (e.g. the ongoing election at ), it's impossible for a candidate to edit that in because that meta question .    Yes, one can get to it indirectly through "meta posts" or through the bold link above the list of candidates, but the percentage of voters who figure out that the election Q&A is really just a meta question and that answers are "posts" might not be that large, even among the subset of voters who know what meta is.

As part of our project to make it easier for our  to run moderator elections for our Stack Exchange sites, we've just released new functionality related to creating, answering and reading the candidate questionnaire. For most elections, we ask the community to contribute questions they want the moderator candidates to answer in a . The community managers compile these suggestions into a  that the candidates respond to. Until now, using the questionnaire was inefficient and inconvenient for all involved:  Community managers had to manually copy and paste the suggested questions into a separate Meta post that contained the final questionnaire. Candidates were asked to fill out a form to create their intro statement, then go to the questionnaire Meta post to answer the questionnaire (which involved copying and pasting) and then manually edit their intro statement to include a link to their questionnaire answers. Voters were asked to switch back and forth between the Election page where voting takes place and the questionnaire Meta post as they made their decisions.  We've introduced functionality to solve all three issues. Community managers can now generate the questionnaire with a button click We've built a UI for the community managers that lets them pull in the top questions from the community and quickly edit them into the final questionnaire.  Instead of living in a separate Meta post, the final questionnaire is now published directly on the Election page.  Candidates can now answer the questionnaire in one place When candidates nominate themselves or edit their nomination, their candidate statement and questionnaire appear in the nomination UI.  Voters can now see questionnaire answers in context As voters evaluate the candidates on the Election page, the candidates' questionnaire answers appear underneath their intros. Because the answers can get lengthy, we show a snippet of each questionnaire, along with a "Read more" link that expands it.  More to come We are continuing to work on this project and will be releasing additional features in the coming weeks. Look for updates with the   and  tags.


In my report, I am using too many abbreviations. I am using nomenclature structure to create and print them in my document. I want to make roman page numbering up till list of abbreviations. Since my list of abbreviations has gone up to two pages, LaTeX now print arabic page number on the second page of list of abbreviations, which looks very odd to me. I want to write roman letters on the second page.  Any help?

In my Master thesis, I would like to have the title page without any page number and an acknowledgments section and the table of contents with roman numbers. The rest of the document should be numbered arabic.  I have tried this, to have roman numbers for the Table of contents and normal numbers for the rest.  \documentclass[12pt,ngerman,openany]{report} \usepackage{titlesec} \usepackage{titletoc} \usepackage{cite} \usepackage[a4paper]{geometry} %\usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} \usepackage[ngerman]{babel} %\usepackage{ngerman}{babel} \usepackage[T1]{fontenc} \usepackage{graphicx} \usepackage{float} \selectlanguage{ngerman} \usepackage{amssymb} \usepackage{amsmath} \usepackage{url} \usepackage{epstopdf} \usepackage{scrhack} \usepackage{listings} \usepackage{caption} \titleformat{\chapter}{\rmfamily\huge}{\textbf\thechapter.}{25pt}{\huge\textbf} \defcaptionname{ngerman}{\lstlistingname}{Code} \defcaptionname{ngerman}{\lstlistlistingname }{Codeverzeichnis}  \lstloadlanguages{R}  \lstset{% general command to set parameter(s)    basicstyle=\sffamily\footnotesize, % print whole listing small    keywordstyle=\sffamily\footnotesize\bfseries, % ubold black keywords    identifierstyle=, % nothing happens    commentstyle=\sffamily\footnotesize\slshape, % green comments    stringstyle=\sffamily\footnotesize, % typewriter type for strings    showstringspaces=false, % no special string spaces    numbers=left,    numberstyle=\sffamily\footnotesize,    stepnumber=1,    numbersep=10pt,    showspaces=false,    showtabs=false,    frame=lines,    morecomment=[l]{\%},    float=htbp,    numberbychapter=true  }   \begin{document} \let\cleardoublepage\clearpage   \pagenumbering{roman}  \tableofcontents  \clearpage  \vspace*{75mm} \chapter{Einleitung} \section{Motivation} bla bla bla \section{Ziel}  bla bla \chapter{Stand der Technik zur Mustererkennung} \section{Die Zeitreihen} bla bla \subsection{Beschreibung} bla bla \subsection{Erklärung}  bla bla  \subsection{Vorhersage} bla bla \subsection{Kontrolle} bla bla \section{Feature Extraktion} bla bla \subsection{Autokorrelation} \subsection{Was ist Autokorrelation?} bla bla   \subsection{Autokorrelation und Zeitreihen} bla bla  \subsubsection{Zeitreihe-Diagramm}  bla bla \subsubsection{Lagged Streudiagramm} bla bla  \subsubsection{Autocorrelation-Function (Korrelogramm)} bla bla \subsection{Spektralanalyse} \subsection{Was ist Spektral-Analyse} bla bla \end{document}


I am fairly new to Java, and even newer to coding within Android Studio. I'm trying to read a basic .txt file located in the Assets folder of my practice project. My main goal is to grab a random line from the file after pressing a Button and to have that line printed in the TextView of my MainActivity. However, whenever I run the app on my phone via USB, the app crashes (after the button is pressed).   I have included a snippet of the code I have so far(), as well as a shot of the Logcat showing the error code ().  public class MainActivity extends AppCompatActivity {  @SuppressLint("WrongViewCast") @Override protected void onCreate(Bundle savedInstanceState) {     super.onCreate(savedInstanceState);     setContentView(R.layout.activity_main);      Button btn1=findViewById(R.id.buttonShowText);     btn1.setOnClickListener(new View.OnClickListener(){         @Override         public void onClick(View view){             try {                 AssetManager as=getResources().getAssets();                 InputStream is=as.open("insult1.txt");                 BufferedReader br1=new BufferedReader(new InputStreamReader(is));                 StringBuilder out=new StringBuilder();                 String line1;                 while((line1=br1.readLine())!=null){                     out.append(line1);                 }                 String dissFinal=out.toString();                 br1.close();                  TextView text1=findViewById(R.id.mainTextView);                 text1.setText(dissFinal);             } catch (IOException e) {                 e.printStackTrace();                 System.out.println("Exception Reached");                   }  02-21 14:39:08.076 30321-30321/com.asmodeus.practice E/AndroidRuntime: FATAL EXCEPTION: main                                                                    Process: com.asmodeus.practice, PID: 30321                                                                    java.lang.NullPointerException: Attempt to invoke virtual method 'void android.widget.TextView.setText(java.lang.CharSequence)' on a null object reference                                                                        at com.asmodeus.practice.MainActivity$1.onClick(MainActivity.java:47)                                                                        at android.view.View.performClick(View.java:5637)                                                                        at android.view.View$PerformClick.run(View.java:22434)                                                                        at android.os.Handler.handleCallback(Handler.java:751)                                                                        at android.os.Handler.dispatchMessage(Handler.java:95)                                                                        at android.os.Looper.loop(Looper.java:154)                                                                        at android.app.ActivityThread.main(ActivityThread.java:6126)                                                                        at java.lang.reflect.Method.invoke(Native Method)                                                                        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:886)                                                                        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:776)   Again, I am relatively new, so take it easy on me! Thanks :)

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


I am encounter this question, I don't know how to start. Can you guys help me on this? $N$ is a positive number. I randomly pick a number, $K$, from $[0, N-1]$. If $K = 0$, the process ends, otherwise we keep picking a number from $[0, K-1]$ until we pick $0$. What is the expected number of picks to end the game?

Consider a game where one would roll a random integer between $1$ and $N_0$ where $N_0 \ge 1$. The newly randomly generated number is now the new "upper limit" of the game, the game continues by rolling a random number between $1$ and the randomly generated number. This game continues until the randomly generated number is 1. Here is an example of how it can look like. Consider $N_0 = 1000$ $$N_1 = Random(1, N_0) = Random(1, 1000) = 623$$ $$N_2 = Random(1, N_1) = Random(1, 623) = 366$$ $$N_3 = Random(1, N_2) = Random(1, 366) = 303$$ $$N_4 = Random(1, N_3) = Random(1, 303) = 190$$ $$N_5 = Random(1, N_4) = Random(1, 190) = 52$$ $$N_6 = Random(1, N_5) = Random(1, 52) = 13$$ $$N_7 = Random(1, N_6) = Random(1, 13) = 1$$ $$END$$ The Length of the example game was 7, it took 7 rolls to reach 1. Given the Starting Upper Limit $N_0$, what is the average amount of rolls needed to reach 1? I have tried to write Python code to help with this problem and it seems this follows a Logarithmic Pattern with the function to approximate the amount is $f(N_0) = 1.0168287465013466\ln(N_0) + 1.4731706151125865$


it seems my bash-completion got corrupted. Every time I try to use command substitution, for example when I type  ls $(ls Deskto<Tab>   ..result is..  ls $(ls Desktobash unexpected eof while looking for matching ")".   I tried removing my .bashrc file and cp /etc/skel/bashrc ~/ to get a new one. That works until I add something into my new bashrc. Even when I do echo '#" >> ./.bashrc it breaks again. Removing my bash_aliases did not help either.  Also sudo apt-get install --reinstall bash-completion did not do the trick.  However there are some threads about similar problem, nothing works.  ANY hint will be greatly appreciated! :)

I've been using kill $(pidof ) to terminate programs for a while, and since last night, every time I try to use tab completion inside the $() it throws an error,   bash: unexpected EOF while looking for matching `)' bash: syntax error: unexpected end of file   Tab-completion works fine outside of command substitution.  I guess my question is where are the configuration files for tab-completion located on an Ubuntu system? If anyone has had this specific problem, or can see plainly what I cannot, how to fix this, and/or why this would occur? (I always want to know why.)  and if not that, even where and how I should begin my investigation into this problem, would be greatly appreciated.  UPDATE  tab completion following $(pidof is no longer throwing an error, but is now not working at all. I've never really messed with any bash internals before, but am not afraid to get my hands dirty. Any guidance greatly appreciated.


I created a guessing game application. When the user enters a letter it crashes. I want the textbox to only have integers. I was trying to create a validation so when the user enters a letter it will display a message only integers only. How can I add a validation to the program so where the user can only enter an integer?  I tried using this code but it still crashes:  double input = Convert.ToInt32(txtInput.Text);  if (Double.TryParse(txtInput.Text, out input)) {     txtInput.Text = Convert.ToString(input); } else  {     MessageBox.Show("Please enter a valid number."); }     using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms;  namespace WindowsFormsApplication2 {     public partial class Form1 : Form     {         public Form1()         {             InitializeComponent();         }          double guess;          private void Form1_Load(object sender, EventArgs e)         {             Random rand = new Random();             guess = rand.Next(1, 101);         }          private void Clickbutton_click(object sender, EventArgs e)         {             double input = Convert.ToInt32(txtInput.Text);              if (Double.TryParse(txtInput.Text, out input))             {                 txtInput.Text = Convert.ToString(input);             }             else             {                 MessageBox.Show("Please enter a valid number.");             }              if (input == guess)             {                 lblMessage.Text = "You Are Corrrect, You Win" + " " +                     " \r\n Random Number was =  " + Convert.ToString(guess);             }             else if (input > guess)             {                 lblMessage.Text = "Number is too High, Try Again";                 txtInput.Clear();             }             else if (input < guess)             {                 lblMessage.Text = "Number is too Low, Try Again";                 txtInput.Clear();             }         }     } }

I have a windows forms app with a textbox control that I want to only accept integer values. In the past I've done this kind of validation by overloading the KeyPress event and just removing characters which didn't fit the specification. I've looked at the MaskedTextBox control but I'd like a more general solution that could work with perhaps a regular expression, or depend on the values of other controls.  Ideally this would behave such that pressing a non numeric character would either produce no result or immediately provide the user with feedback about the invalid character.


I am working on the exercise: prove that a right continuous function $\mathbb{R} \to \mathbb{R}$ is Borel measurable. I found that for every $x \in f^{-1}((a,b))$ we must have $$ [x, x + \delta_x) \subset f^{-1}((a,b)), $$ for some $\delta_x > 0$ depending on $x$. Consequently $$ \{ [x, x + \delta_x) \mid x \in f^{-1}((a,b)) \} = f^{-1}((a,b)). $$ I know that intervals are Borel measurable, but to prove that $f^{-1}((a,b))$ is measurable I would have to prove that $f^{-1}((a,b))$ is a countable union of such intervals. Could anybody give me a hint on how to do this?

I have a follow-up to another question here on math.stackexchange, .  The thread was a couple of years old, so I hope it's okay if I start a new question.  The person who answered the question claimed that the preimage of an open set under a right-continuous function $f: \mathbb{R} \to \mathbb{R}$ is a Borel measurable set because it is the countable union of half-open intervals.  I was trying to think through the "countable union" part.  If we have an open set $U \subseteq \mathbb{R}$, and let $A = f^{-1}(U)$, then certainly by definition if we take $A \cap \mathbb{Q}$, then for every $a \in A \cap \mathbb{Q}$, there is some $\delta > 0$ such that $[a,a+\delta) \subseteq A$, and thus $\bigcup_{a \in A \cap \mathbb{Q}} [a,a+\delta) \subseteq A$.  But then, why does the reverse containment hold (or does it hold at all)?  I tried to prove that $A \subseteq \bigcup_{a \in A \cap \mathbb{Q}} [a,a+\delta)$ using contradiction, but didn't get anywhere.  The best I could come up with was that if $b \in A$ and $b \notin \bigcup_{a \in A \cap \mathbb{Q}} [a,a+\delta)$, then because of the density of the rationals in the reals, we could write $\{ b \} \cup \bigcup_{n \in \mathbb{N}} [a_n,a_n+\delta_n) \subseteq A$, but this clearly didn't get me anywhere...


I'm trying to write this if statement \def\x{y} if x==y yes else no end  How can I write such a code in latex

I am using \if condition in a custom command in my LaTeX document. I would like to know where I can find some good explanation about \if command. I followed a  but it's just an example; there are not any explanation.


I'm having this issue where the user interface(x server) won't start, and the login screen is extremely laggy.  Specs: MSI Z97i, I5 4690, GTX1060 8gb, 8gb ram, dual boot with freshly installed Win10  Issue: It's a fresh install of Ubuntu 18.04, never actually got to start GUI. When I somehow type in the password, shows me the GUI for a second, but comes back to login screen.   Also, the purple background of the login screen seems to be "snowy" like when there's no signal on the analog television.  What I tried: Multiple installs from usb stick, both from lili and rufus. Live version works fine.    Tried using the lightweight login manager, worked fine, but still no desktop environment.  Also tried installing KDE Plasma through the terminal. Login works fine, but the gui never loads, only black screen.    I'm thinking maybe it has to do with graphic drivers?

My Ubuntu is stuck in a login loop when trying to enter my desktop. When I login, the screen gets black and soon after that the login screen comes back.   I've read that the problem might be caused by an error depending on the graphics, here's my graphics card: ATI Radeon 7670M


The following query  EXPLAIN SELECT c.global_id FROM centers_res17 AS c LEFT JOIN regions_res17 AS r ON ST_Contains(r.wkb_geometry, c.wkb_geometry) WHERE r.global_id IS NULL;   says that a Parallel Sequential Scan on centers_res17 will be used. This is good and the query is fast (8 workers are used, and the CPU is busy)  Now, if I do a SELECT c.global_id INTO foo the query plan indicates a Sequential Scan, which is much slower.   I tried to:   CREATE the foo table before (also as a TEMP) Wrap the above statement in a WITH clause and then select its results into foo. CREATE foo AS (^^Above statement^^)   None of the above uses multiple workers to do a Parallel Sequential Scan (according to the query plan and actually running the query). I could just make the select statement 'as is' and then copy-paste the values from my results window ... not optimal.  Please explain to me, why the Parallel Sequential Scan is not used, or how to modify my query to have the results selected into foo.   I am using PostgreSQl 9.6 on Win10.

According to ,      "Even when it is in general possible for parallel query plans to be   generated, the planner will not generate them for a given query if any   of the following are true:       The query writes any data or locks any database rows. If a query contains a data-modifying operation either at the top level or within   a CTE, no parallel plans for that query will be generated. This is a   limitation of the current implementation which could be lifted in a   future release."   Indeed, when I try to insert result of a parallel SELECT query into a table (either by SELECT.. INTO either by WITH..SELECT..INTO, the query is not executed as parallel query.  My question is: Is there any way to trick the Postgresql so that a SELECT query is executed as parallel query and then its result inserted into a table?


I have Windows 7 and I want to boot Linux from a memory stick without installing it as I would like to run two OSs on the same PC without losing all my files.   Does anyone know how to get into the OS selection menu on a Dell Inspiron duo?

I wanted to replace windows 7 with Ubuntu.   Is it possible to try Ubuntu from USB, like a fully functional Ubuntu?, want to test sound, WiFI connectivity etc. Is there an option to exit from the above option, in case I dont want to install Ubuntu, try it later after fixing something?


Hello maths community!  One day I was solving a geometry problem and I thought I had found a way of solving it. When I was solving the problem, I kind of invented a new way of finding an area of a shape that is related to circle but just recently I realized that I was wrong. The method I invented was invalid but I just don't understand why wouldn't it work... I won't describe the problem here but I am going to show an example of the method I invented.  Warning. The following methods are invalid!  To find the area of a circle with my method is to first split the circle in half and first find the area of that and then multiply it by 2 in the end to make our life easier.  A half circle is made out of bunch of vertical "lines" and I thought one could use integrals to add these "lines" up to get the area. To do this we need to find a function to get the length of one "line" and then integrate the function. If we draw a right triangle inside the half circle, the task will become easy.      Now, to get $l$, we use sine: $l=r\cdot \sin(φ)$  Then we take the integral with respect to $φ$. I guess this part is the one causing problems...  $$\int_{0}^\pi l \, dφ=\int_0^\pi r\cdot \sin(φ) \, dφ=r\int_0^\pi \sin(φ) \, dφ = r (-\cos(\pi) +\cos(0))=2r$$  Well we know already that the area of a half circle is definitely $2r$  and if we multiplied it by $2$ we would get $4r$ and $4r \neq \pi r^2$  With my logic this would seem very valid and I would just like to know why this doesn't work. Thanks!

I was looking for proofs using Calculus for the area of a circle and come across this one $$\int 2 \pi r \, dr = 2\pi \frac {r^2}{2} = \pi r^2$$  and it struck me as being particularly easy. The only other proof I've seen was by a teacher and it involved integrating $x = \sqrt{r^2 - y^2}$ from $-1$ to $1$, using trig substitutions and then doubling the area to get $\pi r^2$ but the above proof seemed much more straight forward.  Is it a valid proof, or is it based on circular logic or some other kind of fallacy?


What does     I can't not get the song out of my head   mean?  I have looked on this site for clarification but still can't find my answer.

This is a quote from a  where she talks about her miscarriage:     "It was awful," she told the Daily Mail's You magazine. "It happened really late, and I wasn't expecting it at all. "For a long time I just couldn't understand that it had happened and why. I was like 'But I can't not be pregnant. I'm already past the first trimester, and I have three car seats in my head.' To this day I feel like I'm missing that kid. But it wasn't meant to be and you have to trust the universe. "   What does she mean by saying "I can't not be pregnant?" Is this "can't not" construction a grammatical and common usage?


I need to convert é this into readable form in drupal 8 .The character is shown as � instead of é. Which function can be used to display é in the html while fetching value from database.?  I tried using many functions but did not suceed in implementing it

I'm setting up a new server and want to support UTF-8 fully in my web application. I have tried this in the past on existing servers and always seem to end up having to fall back to ISO-8859-1.  Where exactly do I need to set the encoding/charsets? I'm aware that I need to configure Apache, MySQL, and PHP to do this — is there some standard checklist I can follow, or perhaps troubleshoot where the mismatches occur?  This is for a new Linux server, running MySQL 5, PHP, 5 and Apache 2.


$$J(d \vec x') = \left(1 - \frac{i \vec p \cdot d \vec x'}{\hbar}\right)$$  This is the infinitesimal translation operator, as defined on p. 46 of Modern Quantum Mechanics by Sakurai & Napolitano.   How is this equation derived?  In particular, I am wondering why it is necessary for this operator to have an imaginary number.

I am currently trying to follow Leonard Susskind's "" lecture series on quantum mechanics. (I know a bit of linear algebra and calculus, so far it seems definitely enough to follow this course, though I have no university physics education.)  In general, I find these lectures focus a bit too much on the math and not really on the physical motivation behind it, but so be it (if there are other courses aimed at those with reasonable math skills that focus more on physical meaning, let me know!). However, that's only indirectly related to what my question is about.  In , Susskind sets out to derive an expression for what he earlier labelled the time-development operator $U$:  $$|\psi(t)\rangle = U(t)|\psi(0)\rangle$$  He starts out as such:  $$U(\epsilon) = I + \epsilon H$$  which makes sense because the change in time will have to be small, i.e. on the order of a small $\epsilon$. However, he then goes ahead and changes this into:  $$U(\epsilon) = I - i\epsilon H$$  which of course is still fine, because we still don't know what $H$ is supposed to be. Now my problem lies with the fact that Susskind then proceeds to derive an expression for $H$ and, subsequently, the Schrödinger equation in which it figures, from the above equation. The $i$ never gets lost and ends up in that equation.  Could we not just as easily have left the $i$ out, or put a 6 or whatever there? Why put $i$ there? I finished the entire lecture hoping Susskind would get back to this, but he never does, unfortunately. (Which is, I guess, another symptom of this course, with which I'm otherwise quite happy, occasionally lacking in physical motivation.)   For those of you who know this lecture, or similar styles of teaching: am I missing something here? Alternatively, a general answer as to why there is an $i$ in the Hamiltonian and the Schrödinger equation?


EDIT: This is a duplicate question, but I had trouble understanding the wiki page despite reading the accepted answer there. I just added an answer to that question, which also covers the time complexity for the average case and amortized worst case scenario.  This  says that when you pass in an argument to a list's pop method that its worst case time complexity is O(k) with k referring to the number passed in for k or the number of elements in k.  However, if say I pop the 3rd index of a list of 11 elements wouldn't everything after the 3rd element of the list have to be re-adjusted making the average time complexity O(n-k) And since you could remove the first element of a list wouldn't the worst case time complexity be O(n)?  list1 = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k'] list2 = list1 print(list1[3]) # d list1.pop(3) print(list1) # ['a', 'b', 'c', 'e', 'f', 'g', 'h', 'i', 'j', 'k'] print(list1[3]) # e print(id(list1) == id(list2)) # True (They're still the same item in memory)   Is there some unique way Python implements lists under the hood that I'm not understanding? Or is the wiki wrong?

I wonder what is the time complexity of pop method of list objects in Python (in CPython particulary). Also does the value of N for list.pop(N) affects the complexity?


I had Ubuntu and Windows 7 dual boot in my Sony Vaio SVE15115ENW. I thought of factory resetting my laptop and started the VAIO recovery system. During the resetting process, it did format the disk and some other copying of files and the system had to reboot for completing the recovery.  During the reboot, it got stuck in grub rescue mode as boot loader has not changed. Also, I can't choose any Linux partition as all the disk were formatted. To add salt to the wound, I am not able to enter the BIOS as well. This model has ASSIST button and whenever I try to turn on the laptop using ASSIST button instead of the power button, it gets stuck in a black screen instead of the Vaio Care Rescue Mode.   I guess as the recovery was not completed properly, the Vaio Care Rescue Mode is not available. And because of that, I am unable to enter the BIOS to change the boot device.   1. Is there any way to continue my recovery bypassing grub rescue?   2. How can I access my BIOS now?

I have a laptop with Ubuntu installed as the only OS. I also have a USB stick with a Windows 7 installation on it. I want to install Windows from the USB stick on my laptop but when I try to restart the laptop to get access to BIOS, I can't seem to find the command for it, its like it skips everything and just says Ubuntu and then takes me to the login screen.  How do I change the boot priority to USB in Ubuntu?


Do I need a transit visa through Zurich with a Canadian visa travelling from Botswana?

Do I need an airport transit visa through Switzerland if I have no Schengen visa? Am traveling from Cairo to Moscow via Swiss Air


The output of:  var x = 5; typeof (x) //will give number type as output   But for the below code it returns false:  var x = 5; x instanceof Number; //will give false as output   Can anybody please explain the difference between number and Number. And how do I make the second one work?

Just curious:    4 instanceof Number => false new Number(4) instanceof Number => true?   Why is this? Same with strings:    'some string' instanceof String returns false new String('some string') instanceof String => true String('some string') instanceof String also returns false ('some string').toString instanceof String also returns false   For object, array or function types the instanceof operator works as expected. I just don't know how to understand this.  [new insights]  Object.prototype.is = function() {         var test = arguments.length ? [].slice.call(arguments) : null            ,self = this.constructor;         return test ? !!(test.filter(function(a){return a === self}).length)                : (this.constructor.name ||                   (String(self).match ( /^function\s*([^\s(]+)/im )                     || [0,'ANONYMOUS_CONSTRUCTOR']) [1] ); } // usage var Newclass = function(){};  // anonymous Constructor function var Some = function Some(){}; // named Constructor function (5).is();                     //=> Number 'hello world'.is();           //=> String (new Newclass()).is();        //=> ANONYMOUS_CONSTRUCTOR (new Some()).is();            //=> Some /[a-z]/.is();                 //=> RegExp '5'.is(Number);               //=> false '5'.is(String);               //=> true


I have a .json with multiple geometry types within it.   It's actually 'open' data:   Any tips on converting to a shapefile or similar? Do I have to break the JSON file into different files, one per geometry type?  I'm open to Python or similar.     fails - not sure why.   The ESRI tool: JSON To Features won't work, probably because it has multiple geometry types.

I have a GeoJson file that I want to convert to ESRI Shapefile using ogr2ogr in FWTools.  I tried using   ogr2ogr -F "ESRI Shapefile" filename.shp geojsonfile.json OGRGeoJSON   I got output      ERROR 6: Can't create fields of type StringList on shapefile layers. ERROR 1: Attempt to write non-polygon (POINT)   geometry to  type shapefile. ERROR 1: Terminating translation   prematurely after failed translation of layer OGRGeoJSON   GeoJSON input we are giving is in standard geojson format.  content of geojson are like  {to share I took only a part from features array }  {"id":1223, "properties":{"name":"3","level":2}, "map_version":11,"type":"FeatureCollection","x_id":1234,"obj_type":"LevelGeometry", "features":[  { "my_area":[131.40093253528894,33.58879853190332,6.515867411008615,3.490549810987222,-0.6237271428108215], "id":1984791, "location":{"type":"Point","coordinates":[131.4009325,33.5887985]}, "properties":{"display_name":"xyz"}, "type":"Feature", "geometry":{"type":"Polygon","coordinates":[[[131.4009508,33.5888314],[131.4008895,33.5887946],[131.4009148,33.5887653],[131.4009761,33.5888020],[131.4009508,33.5888314]]]}, "obj_type":"Geometry" }  ] }


Test.h   typedef enum oflags_t : uint8_t {     FLAG_CREAT = O_CREAT     , FLAG_RONLY = O_RDONLY     , FLAG_RDWR = O_RDWR   } oflags_t;  template <uint8_t flags> class Test {  public:      template <uint8_t flags_in = flags>     Test(const std::string &p_name);  };  using Test_1 = Test<FLAG_RONLY>;   Test.cpp  template <uint8_t flags> template <uint8_t flags_in> Test<flags>::Test(const std::string &p_name) {  }  template class Test<FLAG_RONLY>;   main.cpp   Test_1 obj1("Obj");   When i try to build this, i get linker error "unresolved external symbol...".   What can i do to solve the issue? Thank you.

Quote from :     The only portable way of using templates at the moment is to implement them in header files by using inline functions.   Why is this?  (Clarification: header files are not the only portable solution. But they are the most convenient portable solution.)


I would like to generalize Paul Teetor's , which uses prcomp() to determine the  ratio between two variables. I am hoping to generalize this to multiple variables, but am having trouble finding anything in the literature. Any suggestions?

I always use lm() in R to perform linear regression of $y$ on $x$. That function returns a coefficient $\beta$ such that $$y = \beta x.$$  Today I learned about total least squares and that princomp() function (principal component analysis, PCA) can be used to perform it. It should be good for me (more accurate). I have done some tests using princomp(), like:  r <- princomp( ~ x + y)   My problem is: how to interpret its results? How can I get the regression coefficient? By "coefficient" I mean the number $\beta$ that I have to use to multiply the $x$ value to give a number close to $y$.


I wrote a PHP script that connects to a distributor's server, downloads several inventory files, and creates a massive .csv file to import into WooCommerce. Everything works except for one thing: when I look at the exported .csv file, the "x" character in my "caliber" column is always converted to the string "Ã—".  updateInventoryFunctions.php:  function fixCalibers($number, $attributesList) {      $calibers = array (         # More calibers...         "9×23mm Winchester" => '9X23'     );      $pos = array_search($attributesList[$number], $calibers);     if ($pos !== false) {         $attributesList[$number] = $pos;         return $attributesList[$number];     } elseif ($attributesList[$number] == "40SW") {         $attributesList[$number] = '.40 S&W';         return $attributesList[$number];     } # More conditionals...  }   updateInventory.php:  # Code that connects to the distributor's server, downloads files, and places headers into the .csv file.  if (($localHandle = fopen("current_rsr_inventory.csv", "w")) !== false) {      # Code that defines arrays for future fixes and creates a multidimensional array of attributes...      foreach ($tempInventoryFile as &$line) {          $line = explode(";", $line);          # Code that fixes several inconsistencies from the distributor...          $matchingKey = array_search($line[0], $skuList);         $attributesList = array();         if ($matchingKey !== false) {              # Code that fixes more inconsistencies...              if ($attributesList[18] === "" || $attributesList[18] === null) {                  array_splice($attributesList, 18, 1);                  include_once "updateInventoryFunctions.php";                 $attributesList[17] = fixCalibers(17, $attributesList);              } # More conditionals...              # Code that fixes more inconsistencies...              foreach ($attributesList as $attribute) {                 $line[] = $attribute;             } // End foreach.          } // End if.          fputcsv($localHandle, $line);      } // End foreach.  } // End if.  # Code that closes files and displays success message...   The caliber "9×23mm Winchester" is displayed as "9Ã—23mm Winchester" in the .csv file. I've tried placing single quotes around the array key and escaping the character "x". There are multiple instances of this mysterious switch.  Thanks in advance for any help!

I'm setting up a new server and want to support UTF-8 fully in my web application. I have tried this in the past on existing servers and always seem to end up having to fall back to ISO-8859-1.  Where exactly do I need to set the encoding/charsets? I'm aware that I need to configure Apache, MySQL, and PHP to do this — is there some standard checklist I can follow, or perhaps troubleshoot where the mismatches occur?  This is for a new Linux server, running MySQL 5, PHP, 5 and Apache 2.


If mobiles internert is off and i saved any contact on google account,then where it is stored actually before getting sync?

Settings -> Applications -> All tells me that "Contacts Storage" uses 2.5MB which must be my contact data.  Since I had to revert to 4.03 after a faulty update to 4.1 my contacts seem inaccessible although the data seems to be there.  Could you please tell me where to find the associated data(base) for Contacts Storage? My phone is rooted. And no, my contact data is not on GMail and I honestly don't know why...


I want to know the difference between calling a method within the same class using 'this.MethodName' and just the 'MethodName' in C#. First Option public class Transaction     {         public bool PerformTransaction(Model model)         {             //Calling the method name using 'this'             var refNumber = this.GetTransactionReferenceNumber(model);             //Method Implementation         }                  private string GetTransactionReferenceNumber(Model model)         {             //Method Implementation         }     }  Second Option public class Transaction     {         public bool PerformTransaction(Model model)         {              //Calling the method using it's name(without using 'this' keyword)             var refNumber = GetTransactionReferenceNumber(model);             //Method Implementation         }                  private string GetTransactionReferenceNumber(Model model)         {             //Method Implementation         }     }  Which option should I use to call methods within the same class?. What is the difference between both options? and what is the best practice?

I was curious about how other people use the this keyword. I tend to use it in constructors, but I may also use it throughout the class in other methods. Some examples:  In a constructor:  public Light(Vector v) {     this.dir = new Vector(v); }   Elsewhere  public void SomeMethod() {     Vector vec = new Vector();     double d = (vec * vec) - (this.radius * this.radius); }


The rule on  states:     A spell cast with a bonus action is especially swift. You must use a bonus action on your turn to cast the spell, provided that you haven't already taken a bonus action this turn. You can't cast another spell during the same turn, except for a cantrip with a casting time of 1 action.   I'm wondering what the effect of removing this rule would be.

In my group I was planning on making some house rule changes to the section on bonus action spells, as I'm not a fan of how it's currently written. I'd prefer the normal action(spell) + bonus action(cantrip) combination to be valid:     If you use your bonus action to cast a spell, you can't cast another spell during the same turn, except for a cantrip with a casting time of 1 action.   Instead, I was planning on having it be:     If you use your bonus action to cast a non-cantrip spell, you can't cast another spell during the same turn, except for a cantrip with a casting time of 1 action.   For example under the normal rules a caster could not cast  (a bonus action spell) on the same turn as  (a normal action spell). Under my house-rule the character would be allowed to since Shillelagh is a cantrip.  This feels more streamlined to me, but I'm wary of unintended consequences. Would wording it this way break the game in a way I'm not thinking of?


I see the following error:     Sorry, something went wrong when trying to upload that image. Try again?    when attempting to upload an image using the Stack Exchange Android app installed from the Play Store at   Below is the corresponding screenshot that I had to manually upload to imgur.com in order to post:    (Side note: I noticed that clicking on the upload image icon resulted in a link being inserted and not one that in lines the image as shown above.)  It does not seem to be related to the size of the image.  As far as I can tell, there is nothing wrong with my internet connectivity from the phone. I'm using the same app to post this question to Meta Stack Exchange.  The phone is a stock Samsung Galaxy Note 8 (the cell phone carrier is Google Fi).  Below is a screenshot of the kernel version and other Android version info from the settings on the phone:    Application information for the Stack Exchange app is below:  App info Version  1.0.95 Updated on  Jun 30, 2017    I just now noticed "Jun 30, 2017" above and it is now in November 2019. The phone should update the app automatically, correct? Is the phone simply too old for the app?

Spent a half hour on this. Android 5.1.1 latest version SE app (Play Store won't let me update so latest).   Tried to upload photo into an answer. "Something went wrong".  Did tricks to reduce photo size to 275k -- same.    45k rep on the stack.  Here is the photo..... oh wait.  How do I solve?


I have tried trying to find a pattern but i don't believe that the right way. If you help me it would be great.

Find the value of $\sum_{k=1}^{n}k\binom{n}{k}$ ?    I know that $\sum_{k=0}^{n}\binom{n}{k}= 2^{n}$ and so, $\sum_{k=1}^{n}\binom{n}{k}= 2^{n}-1$ but how to deal with $k$ ?


I have read a lot about it, but most of them are outdated so that's why I am going to ask it here.  I have two websites:   Website about politics   Website about sports   They have nothing in common, at all, yet I have just one Google Adsense account and I'd like to use this account to make ads for them.  My question is: is this even possible? Can I use my Google Adsense code for both of the websites? Let's say I have created an ad unit: can I just use this exact same piece of code (so the exact same ad) on both of the websites?  In other words: what should I do to achieve what I want? The reason I am asking this, is because I want to avoid being blocked by Google.

I set up Google AdSense last year for a technology blog that I own. When registering, I had to say what the site was about, so I obviously choose technology as my website's subject.  Now I have set up another website about music so need to set a different subject choice for this particular website.  So can you setup another website and apply different settings to it from your other sites, or do you have to setup another AdSense account?


So when you hold an action using the Ready action you use your reaction to act when the trigger happens. however you're able to ignore the trigger. So while you are using the Ready action, are you able to take a DIFFERENT reaction before the trigger (or after if you ignored it) at the cost of losing the readied action?  Scenario: Fighter is fighting a bird and a goblin. The goblin is in melee range. The fighter readies a sword attack for when the bird comes into range. The goblin acts before the bird and leaves the fighter's range. Can the Fighter take an attack of opportunity - expending his reaction, and thus unreadying the attack on the bird?

Merle the Wizard is fighting enemies with his friends on a bridge. He wants to cast a spell on the BBEG, but they are currently out of range and so he uses his action to ready a spell for when the BBEG is in range.  However, before that happens one of Merle's friends is knocked off the bridge. Can Merle ignore the spell he had readied and use his reaction to cast feather fall?


I have a Bard 4/Sorcerer 1 that is going to continue levelling in the bard class. When he reaches Bard 5/Sorcerer 1 and he learns his first 3rd level spell, can he take from the sorcerer list or just the bard list?

The "Your Spellbook" sidebar for the wizard includes the following line:  Copying a Spell into the Book. When you find a wizard spell of 1st level or higher, you can add it to your spellbook if it is of a level for which you have spell slots and if you can spare the time to decipher and copy it.  Does this mean that a Wizard 1/Cleric 19 can copy any wizard spell they find into their spellbook? Is there anything preventing them from casting these spells?


I have a problem with derivation of some function. This is related to computing the Poincare Map of Logistic Population model with Periodic harvesting. This function is:  $\phi(t,x_0) = x_0 + \int_{0}^{t} f(s,\phi(s,x_0)) ds \ (1)$  where $\phi(t,x_0)$ is a function: $\mathbb{R}  \times \mathbb{R} \rightarrow \mathbb{R}$.  I'm trying to differentiate  equation of this function both sides  with respect to $x_{0}$. In book from this equation comes from the result of this differentiation is:  $\frac{\partial \phi}{\partial x_0} (t,x_0) = 1 + \int_0^{t} \frac{\partial f}{\partial x_0} (s, \phi(s,x_0)) \cdot \frac{\partial \phi}{\partial x_0} (s, x_0)ds$.  I can't understand expression under the integral. In this book it is explained that it is clear from chain rule. When I'm trying to apply the chain rule I have expression under integral such as:  $\frac{\partial }{\partial x_0} f(s, \phi(s,x_0)) = \frac{\partial }{\partial \phi(s,x_0) } f(s, \phi(s,x_0)) \cdot \frac{\partial }{\partial x_0} \phi(s,x_0) $  Could someone explain to me why in my expression first I have derivative respect by $\partial \phi(s,x_0)$ and then by $\partial x_0?$ In solution there are in both expressions $\partial x_0$ Why?  Maybe important is here additional information that differentiable function $(1)$ is solution of differential equation:  $\frac{\partial \phi}{\partial t} (t,x_0) = f(t,\phi,x_0))$, where $\phi(0,x_0)=x(0).$   I will be grateful for your help Best regards

I have a problem with derivation of some function. This is related to computing the Poincare Map of Logistic Population model with Periodic harvesting. This function is:  $\phi(t,x_0) = x_0 + \int_{0}^{t} f(s,\phi(s,x_0)) ds $,  where $\phi(t,x_0)$ is a function: $\mathbb{R}  \times \mathbb{R} \rightarrow \mathbb{R}$.  I'm trying to differentiate  equation of this function both sides  with respect to $x_{0}$. In book from this equation comes from the result of this differentiation is:  $\frac{\partial \phi}{\partial x_0} (t,x_0) = 1 + \int_0^{t} \frac{\partial f}{\partial x_0} (s, \phi(s,x_0)) \cdot \frac{\partial \phi}{\partial x_0} (s, x_0)ds$.  I can't understand expression under the integral. In this book it is explained that it is clear from chain rule.Could someone explain to me this transformation in easy way? I will be grateful for your help Best regards


I'm very new in the world of photography, and I want to know the name of this problem.    I know there is a word and I searched but I could not find it. If someone knows the word then please enlighten me.

I don't remember the name of this problem and it drives me crazy. I googled everything similar to "lines in photo" but I didn't find the solution.  The problem is that on my PC monitor I don't see anything, but when I download the photo on my smartphone I see these lines that surround the source of light. I know that some of the problem is my not-top-quality smartphone screen, but I also know this problem has a name and it comes out, for example, when you save an img in really low quality.   I attach the screenshot I took on the smartphone (the only way I can see the problem also on the PC monitor):