regex to validate emails which allows only these two special symbols .,- before @ symbol

I have used below regex for email validation.  var reg = /^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;   How can i validate the below two email id like    hello!%#%^world@gmail.com  helloworld@-gmail.com   Vaild Email ids:   hello-world@gmail.com hello.world@gmail.com   InVaild Email ids:   hello!#%#@gmail.com helloworld@-gmail.com   Special characters should not be allow before @gmail.com  Below is my JavaScript code  var re = /^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;  if (!re.test($(this).val())) {     errmsg.push($(this).attr('placeholder') + ' is invalid'); }


When redirecting both stdout and stderr to a file, why must the redirection of stderr to stdout come last?

In order to redirect both stdout and stderr to a file: curl 'https://example.com' > myfile 2>&1  This works correctly, but why must the redirection of standard error to standard output be at the very end? Why can't it be: curl 'https://example.com' 2>&1 > myfile  I don't understand why this alternative does not work; it does not redirect stderr to the file. Reading from left to right: "download the web page, redirect stderr to stdout, and redirect stdout to a file", but this is apparently not how Bash interprets the commands. Bash expects 2>&1 to come last. Why must the 2>&1 come last?


I used to copy deb packages from /var/cahe/apt/archives to make my own local repository. Now I realized that apt cleans up /var/cahe/apt/archives after each package installation. How can I force apt to keep downloaded files?  Distro: Kubuntu 17.10  PS  Pleas note that  is different. Removing packages immediately after download (rather than using an age, size restriction) is quite different policy controlled by different configuration parameters.


Media test failure: incorrect BIOS settings, faulty hard drive or weak CMOS battery?

I have an Windows 7  laptop and I am using it almost everyday. Then last night, I am using it as usual, then suddenly all programs stop responding, only the mouse cursor is moving. Then after sometime, it turned off. I opened it then I noticed that the splash screen "Acer" shows up longer than before, then this message appear:     Copyright (C) 2000-2010 Broadcom Corporation      Copyright (C) 1997-2000 Intel Corporation      All rights reserved.      PXE-E61: Media test failure, check cable.      PXE-M0F: Exiting Broadcom PXE ROM   Then a second message appears:     Operating system not found   I checked the BIOS. The hard drive model and serial number is missing. I also saw HDD 0: in the boot order second to the CD Drive. I suspect that cable of the hard drive is faulty. After sometime, I was able to boot the OS two times last night and able to backup some files. But later on, same problems occur: programs not responding, powers down, same error messages.  Do I have the right speculations? Any help what to do?


Which complex exponent can turn x into a -x?

Actually that is, I would like to use a complex exponent to turn a number x into an -x just by applying some complex exponent to x. I think I would have to use some ln, π and so one, but I am actually stack and cannot find the correct path to solving it.  For example, let's say for 2 we choose the real part to be equal 1, what would be the solution for y in this special case.  $$ 2^{1 + iy}=-2 $$  What would be the solution for the imaginary part of z if the real part must be 0.5?  $$ x^{0.5 + iy} = -x $$  $$ x^{0.5} * x^{iy} = \sqrt{x} * -\sqrt{x} = -x $$  What is y in this case?  Is there maybe a general solution for  $$ x^{z}=-x $$


Why are so many sites in Area 51 still on public beta, even if they have completed the beta phase?


Newton's method for unconstrained minimization

Let $f(x) = \frac{1}{2} x^T Q x + b^T x + c.$ Prove that Newton's method finds a critical point after a single iteration.  Here $Q$ is positive definite. For this:   I need to find first of   $\nabla f(x) =  $  $\nabla^2 f(x) = $  I am confused about how do I get gradient of this function. Once I know the gradient, I think I can do it. Any help would be appreciated


I suggested this on UserVoice, but with the discontinuation of that site wanted to move the suggestion and discussion here.  A list of all comments on the User Tab would be useful. Recent comments are available from the recent tab but I'd like to have access to all comments. I would envision something very close to the list of Answers already present on the profile page.


Static field problem (error CS0120) in c#

I have to vrite an override function for my function DajGlos(), but I get back error CS0120 (An object reference is required for the non-static field, method, or property). How can I fix this? My code:  static void Main(string[] args)         {             Pies pies = new Pies("Reksio", "ssaki", "lądowe", 50);              Pies.Przedstaw("Reksio", "ssaki", "lądowe");             Pies.DajGlos();         }       abstract class Zwierze     {         private static string Rodzina { get; set; }         private static string Grupa { get; set; }         private static string Imie { get; set; }          public static void Przedstaw(string Imie, string Rodzina, string Grupa)         {             Console.WriteLine("Jestem " + Imie + ", rodzina: " + Rodzina + ", grupa: " + Grupa);         }          public abstract void DajGlos();      }      class Pies : Zwierze     {         public Pies(string Imie, string Rodzina, string Grupa, int dlugoscOgona)         {                      }         int dlugoscOgona;          public override void DajGlos()         {             Console.WriteLine("Bark!");         }     }```


\documentclass[tikz,border=3.14mm]{standalone} \usepackage{tikz} \begin{document} \begin{tikzpicture}  \node[rectangle, draw, minimum height=1.5em, minimum width=1.5em] (I) {X};  \end{tikzpicture} \end{document}   Is there a way to personalize the thickness of the lines conforming a rectangle node?


When I went into my Minecraft the first thing I saw was a log in with your email and password I wrote my password, email, and username on paper but when I tried it, it said that it was wrong. I never changed computers and I never reset my password in case it would delete my Minecraft servers and worlds. Help?


I am trying to install KDE on Ubuntu 15.04. I ran sudo apt-get install kubuntu-desktop and got this output: $ sudo apt-get install kubuntu-desktop^ Reading package lists... Done Building dependency tree        Reading state information... Done You might want to run 'apt-get -f install' to correct these: The following packages have unmet dependencies:  kde-telepathy-desktop-applets : Breaks: kde-telepathy-legacy-presence-applet but 1.1-0ubuntu1 is to be installed  kde-telepathy-minimal : Depends: kde-config-telepathy-accounts (>= 15.04.0) but it is not going to be installed  libksgrd5 : Depends: libkf5sysguard5-data (= 4:5.2.2-0ubuntu1) but it is not going to be installed  libksignalplotter5 : Depends: libkf5sysguard5 (= 4:5.2.2-0ubuntu1) but it is not going to be installed                       Depends: libkf5sysguard5-data (= 4:5.2.2-0ubuntu1) but it is not going to be installed  libktpotr9 : Breaks: libktpotrprivate8 (< 15.03.80) but 0.9.0-0ubuntu3 is to be installed  libprocesscore5 : Depends: libkf5sysguard5-data (= 4:5.2.2-0ubuntu1) but it is not going to be installed  libprocessui5 : Depends: libkf5sysguard5-data (= 4:5.2.2-0ubuntu1) but it is not going to be installed E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).  I ran sudo apt-get -f install and got this output: $ sudo apt-get -f install Reading package lists... Done Building dependency tree        Reading state information... Done Correcting dependencies... Done The following packages were automatically installed and are no longer required:   linux-headers-3.19.0-15 linux-headers-3.19.0-15-generic   linux-headers-3.19.0-21 linux-headers-3.19.0-21-generic   linux-image-3.19.0-15-generic linux-image-3.19.0-21-generic   linux-image-extra-3.19.0-15-generic linux-image-extra-3.19.0-21-generic   linux-signed-image-3.19.0-21-generic Use 'apt-get autoremove' to remove them. The following extra packages will be installed:   kde-config-telepathy-accounts The following NEW packages will be installed:   kde-config-telepathy-accounts 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. 602 not fully installed or removed. Need to get 0 B/121 kB of archives. After this operation, 712 kB of additional disk space will be used. Do you want to continue? [Y/n] y (Reading database ... 371396 files and directories currently installed.) Preparing to unpack .../kde-config-telepathy-accounts_15.04.1-0ubuntu1~ubuntu15.04~ppa1_amd64.deb ... Unpacking kde-config-telepathy-accounts (15.04.1-0ubuntu1~ubuntu15.04~ppa1) ... dpkg: error processing archive /var/cache/apt/archives/kde-config-telepathy-accounts_15.04.1-0ubuntu1~ubuntu15.04~ppa1_amd64.deb (--unpack):  trying to overwrite '/usr/share/accounts/services/google-im.service', which is also in package account-plugin-google 0.12+15.04.20150415.1-0ubuntu2 Errors were encountered while processing:  /var/cache/apt/archives/kde-config-telepathy-accounts_15.04.1-0ubuntu1~ubuntu15.04~ppa1_amd64.deb E: Sub-process /usr/bin/dpkg returned an error code (1)  Would someone take a look at those and give me any pointers?


QGIS Atlas map composition to show only points inside Polygon?

I want to create an atlas map where I have some 40 polygons, 100 points and 200 lines as different shapefile. Now I want to automate the atlas map preparation for each polygon and needs to show the points and lines which is falling inside of the polygon.   Can anyone help me?


Suppose $Y$ is one observation from a population with a Beta $(\theta,\ 1)$ pdf. Use the Karlin-Rubin theorem to find a UMP level $\alpha$-test (based on $\mathrm{Y}$) of $H_{0}$ : $\theta\leq 1$ versus $H_{a}:\theta>1.$  I know that the sufficient statistic for this distribution is $\prod Y_i$, so we can say that we will reject $H_0$ if $\prod y_i > k$. I'm not sure where to go from here. I know that I want to specify my $k$ such that $P(\prod y_i>k)=\alpha$ but I don't know how to go about doing that.


Citing a preprint - which year to include?

When citing a preprint (which has been published on arXiv), which is the correct year to put? Options that seem reasonable include:   The year the first version made it to arXiv (that's when the theorem was originally published), The year the current version appeared on arXiv (that's the closest to "official published version" of the paper), Current year (that's the best available approximation of when the paper will be published),  Some way to indicate that the paper is forthcoming, such as "2017+", "forthcoming", etc. No year at all (just say it's a preprint).   Which of these, if any, are acceptable? If more than one, which is the best option?   I am especially interested in the case when the paper appeared quite a while ago, and it is by no means obvious that it will end up being published.  Some related questions:   - this concerns a paper which was already published by journal, and discusses more subtle issues such as establishing precedence. The accepted answer states:         If a paper has been published, always cite the published version.       - this one concerns a paper which was published at several conferences.   - this one is concerned with choosing a particular arXiv version to cite, but it does not address the fact that the paper will probably be eventually published by a journal. The answer accepted answer states:     I would cite the exact version you are referring to in your work.   This is not very helpful if the versions are very similar modulu irrelevant technical details, but I suppose it gives priority to (current version) over (first version).


I had a dual boot in my laptop Windows 7 & Ubuntu 13.04. I recently deleted the Ubuntu drive but it shows "error: unknown filesystem. grub rescue>" while booting. It is also not detecting any Windows bootable CD. How do I remove this grub rescue error?


Is surjectivity equivalent to the existence of a right inverse?

My question is : is the following reasoning correct ?  Let $X$ and $Y$ be two Banach spaces and let $T:X\rightarrow Y$ a bounded surjective operator. Then $T^{\ast }$ $:Y^{\ast }\rightarrow X^{\ast }$ is a bounded below operator and hence it has a left inverse $R^{\ast }$ $:Y^{\ast }\rightarrow X^{\ast }$, that is $R^{\ast }T^{\ast }=Id_{Y^{\ast }}$ then $% TR=Id_{X}$ and hence $T$ has a right inverse.  Or must $X$ and $Y$ be reflexive to do like ?  Thank you !


I'm studying pendulums, and the units have me a bit confused.  In a pendulum, Iw^2=mgL.  Putting together the units of the left side of the equation, we get gm^2 (rads^-1)^2=g(m^2)(s^-2)(rad^2).   But the units of the right side of the equation equal g(m^2)(s^-2)  Where does the unit radian fit in? How do I deal with the unit radian when dealing with measures of linear speed?


Why small planets are not attracted by larger planets due to gravitational force?

Gravitational force means"the force experienced between two heavenly bodies".A body falls on any planet due to gravitational force.But smaller planets are not attracted by larger planets or stars(sun) due to this force. What is the reason for this?


What is the equation for the tension on the ends of a cable suspended at different heights?

I'm looking for an equation to find the tension on the ends of a cable suspended between two poles (one higher than the other) with no load but the cable itself.    I determined that the tension would be different on each end, that the shape of the suspended cable would be a  truncated at one end, and that the following would be the variables necessary in the equation:   cable weight cable length vertical distance between ends horizontal distance between ends   Some links that could be helpful:


No document classes available in Lyx, Linux

I just installed Linux Mint on my computer and I'm having a problem with the Lyx application which I never had with Windows. I downloaded it via the software manager, so I was hoping that there wouldn't be any complications during the installation, yet I'm unable to view my document in .pdf format or even save it as one. Also, under Documents->Settings->Document Class, all classes are grayed out and marked as unavailable.  I searched around a little, but I could only find solutions concerning the WIndows and Mac environments, and being a Linux noob, I thought I should ask here since I can't find a solution for the life of me. Is there a way I can solve this?


Where can I purchase video codecs for Ubuntu?

Where can I purchase video codecs for Ubuntu rather than downloading video codecs from an unknown source? I would like to purchase it.


Does the assertion that every two cardinalities are comparable imply the axiom of choice?

If, for any two sets $A$ and $B$, Either $|A|<|B|, |B|<|A|$ or $|A|=|B|$ holds, does the axiom of choice holds? Why?


I'm interested in trying out Ubuntu. I installed 12.04 i386 on usb stick, but can't get it to boot

I am currently running Windows 7. I'm not quite sure how to get this to boot into Ubuntu. I have the usb stick in drive, and I restart the computer, but nothing changes. I tried f12 before the windows startup prompt, still nothing. I downloaded 12.04 i386 using the steps in "Pen Drive USB Linux's installer" on this site. I can go into "devices" and browse files on the usb, but I can't get the option to "try Ubuntu". What am I missing?  Also, in the usb download, there was 12.04 i386 and 12.04 amd. What's the difference? What am I missing? Thanks.


Why wasn't Fluffy's chamber locked with anti-Alohomora charm?

Fluffy's chamber on the third floor didn't have any special lock. It could easily be unlocked using Alohomora.  Alohomora was a basic spell which even first years could use and that's how our heroes got into the Fluffy's chamber.  Instead of instructing students to not go into forbidden area on third floor, why wasn't the door simply locked with anti-Alohomora charm? It could also keep the thieves away.  Talking about feasibility of anti-Alohomora charm, in the quest to Philosopher's Stone, the trio found Alohomora not working on a door whose key was flying around. It means that doors can be locked in such way that Alohomora couldn't work.  Why wasn't the first door locked such way? Dumbledore himself could carry its key in his pocket.


In lectures , I learned that an ODE of the form :  $$a_n(x)\frac{d^ny}{dx^n}+a_{n-1}(x) \frac{d^{n-1}y}{dx^{n-1}}+...+a_1(x)\frac{dy}{dx}+a_o(x)y=g(x) $$  is defined to be homogeneous if $$g(x)=0$$ but when solving this ODE for example $$x^3y'+8x^2yy'+4xy^2-y^3=0$$ we said it is homogeneous since $$f(tx,ty)=t^{3} f(x,y)$$  So I want to know when an ODE is said to be homogeneous ? do we have to check which condition?  $$g(x)=0\  \ \  \ \ OR\ \ \ \ \ \ f(tx,ty)=t^{k} f(x,y)$$


I've been writing some stuff to my English classes, and in between them, I found myself with a question. There are a lot of ways to divide a word, meaning for example at the end of the sentence - when the space is over, it is a well-known criteria to break-up the syllables, as in any dictionary.   However, I've always been taught that words in English could NOT be separated (as Spanish and Portuguese - my birth languages), and when I began reading and studying the language closer, I noticed that YES! They can be. So, in conclusion, my teachers always said I was never to divide them, which means I do not have a lot of knowledge about this.  Running through the question (which is the main point here), how do I break a word if it's a verb terminating in -ING?  For example:     She was talking.   Can I say the infinitive verb and follow it by a hyphen, allocating the -ing on the line under? E.g.,     She was talk-   ing.   Or am I supposed to don't do anything, and continue dealing with them as it is impossible to divide them?   (Making my test look a little bit messy and informal).  I hope some of you can help me, I really struggled to find this information on the internet.


Issues with tree based learners for Boosting Machines or RFs

I'm wondering if tree based methods are capable of making predictions that are larger in magnitude than the largest training observations? Given my understanding of decision trees and partitioning feature space, I would guess it's not possible for predictions from GBMs or Random Forests to exceed the largest values found in training data. Assuming the above is true, how do modelers deal with these tree-based limitations. If tree based algorithm predictions are bounded by what's observed in training data, I would imagine this would result in prediction problems for applications where unprecedented values are feasible. Other than employ a different algorithm, is there a different way to handle this boundedness of predictions?


Torus object stretched in array curve modifier

I have a chain object. And i have a curve it follows. I got it to work for following curve, but chain object is not circles but both parts are more like stretched circles (ovals). Object i made with 2 toruses one rotated 90 degrees and then joined them together. I tried single torus too. But same issue. on a curve it just looks stretched oval. What can be the issue?   Thanks


I want to make brown paper bags of popcorn kernels and flavouring to give as gifts, but i can't seen to get the popcorn flavouring to stick to the unpopped kernels.  How do companies that sell microwave popcorn make sure it's flavoured when it's popped in the microwave? I don't want to add anything after, just have it already flavoured when it's popped.


Rømer's determination of the speed of light

I am trying to understand  ($c$). The geometry of the situation is shown in the image below. The determination involves measuring apparent fluctuations in the orbital period of Io. (Jupiter's moon)    The Earth starts from point A. $r(t)$ is the distance between the Earth and Jupiter. $r_e$ is the radius of the (assumed) circular orbit of the Earth around the Sun, while $r_0$ is the same for Jupiter. $T$ is the period of the Earth's orbit.  Under the assumption that the Jupiter-Io system is stationary, $r(t)$ can be expressed as  $$r(t) = \sqrt{r_E^2 + r_0^2 -2r_0 r_E \cos \left(\frac{2\pi t}{T}\right)}$$  If we further assume that the period of Io's orbit around Jupiter, $\Delta t$ is much smaller that $T$, then it can be shown that the distance the Earth moves, $\Delta r$ when Io completes one orbit is:  $$\Delta r = \frac{2\pi r_E \Delta t}{T} \sin\left( \frac{2\pi t}{T} \right)$$  The point I am stuck is about why is there an apparent fluctuation in Io's orbit as observed on the Earth? And how can we derive the observed delay using these expressions?


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


How exactly does curved space-time describe the force of gravity?

I understand that people explain (in layman's terms at least) that the presence of mass "warps" space-time geometry, and this causes gravity. I have also of course heard the analogy of a blanket or trampoline bending under an object, which causes other objects to come together, but I always thought this was a hopelessly circular explanation because the blanket only bends because of "real" gravity pulling the object down and then pulling the other objects down the sloped blanket. In other words, to me, it seems that curved space wouldn't have any actual effect on objects unless there's already another force present.   So how is curved space-time itself actually capable of exerting a force (without some source of a fourth-dimensional force)?  I apologize for my ignorance in advance, and a purely mathematical explanation will probably go over my head, but if it's required I'll do my best to understand.


I am not sure what I did, but the run dialogue keeps clearing itself after execution. Before, if I typed "cmd" and opened a second time, it would stay there, now it always opens a with an empty entry field. How can I make it so that it remembers the last command I executed?


I am trying to mirror an object and the original is symmetrical along all axis, but when I attempt to mirror across the y axis, the mirrored side is tilted to a different angle.


Why the electric field of an infinity line is dependent on distance?

A very common question about Gauss law is being asked in schools or Internet:      Why the electric field of an infinite plane is independent on distance?     Actually I was one of who asked this question and I found an answer,  and I will explain it in the next paragraph.  A very important thing we have to remember when think about this kind of problems is that the electric field is a vector, and the $Ex$ vector only effect on it because $Ey$ is cancelled by another charge.  Since we go further. the electric field is being weaker, also the angle $θ$ is being less too So $\cos θ$ is getting larger so that compensated the lack of electric field.   Now, why we cant apply this argument on an infinite line, as you see in the picture?    Please don't explain it using Gauss law because it's hard to visualize it, because the number of imaginary concepts like : (Flux,  Electric field,  epsilon ... etc.) So it's hard to realize.  Finally,  please don't mark my question as a duplicate because I didn't understand Eeko explanation.


My code reads a number ("4") from a .txt file, in sd card, then It is supposed to compare this number against "5". but It is not letting me, It says  "operator '<' cannot be applied to java.lang.stringbuilder"  this is how I read-    StringBuilder serverApkVersion = new StringBuilder();         try {             BufferedReader br = new BufferedReader(new FileReader(VerFileDirectory));             String line;             while ((line = br.readLine()) != null) {                 serverApkVersion.append(line);                 serverApkVersion.append('\n');             }             br.close();         } catch ( IOException e ) {             Toast.makeText(context, "error reading ver file", Toast.LENGTH_LONG).show();         }   this is how I compare-     if (serverApkVersion > 5) {   PS:: I have tried this -  int serverApkVersion = Integer.parseInt(String.valueOf(serverVersion));  but it force closes, log says "invalid int "5" "


can I use granulated sugar in place of brewing sugar?

I've got my first home brew kit for blackberry wine, can I use normal household granulated sugar instead of brewing sugar?


JavaScript snippet containing multiple dollar signs is corrupted

As part of , I posted a stack snippet that uses jQuery and ran into a problem. Take for example the following snippet:  !-- begin snippet: js hide: false -->        $(function() {       alert($('body').length);     });              The initial portion, starting with the first dollar sign and ending with the second dollar sign, seems to have been replaced with a GUID, like this:    I worked around the issue by adding a //$$ line at the beginning of the JavaScript snippet.  Interestingly, the snippet works fine until I save my answer, and I , until I tried indenting the snippet's Markdown code as a code block (to post it here) and got the following even before saving:
7167001d-945a-95b7-7930-180c7f7ee9f5
   And yet after saving, a snippet inside a code block!        $(function() {       alert($('body').length);     });           Why is this happening? It seems like a bug in the parser. Can it be fixed?


Why does a photon colliding with an atomic nucleus cause pair production?

I understand that the photon needs to have enough energy to produce a lepton and it's antimatter partner, and that all of the properties are conserved, but why does the photon do this in the first place? What's going on "behind the scenes" to transform a single, neutral particle (the photon) into two charged particles (i.e. electrons)? Why is the nucleus necessary?


Chart mouseover shows more rep than I have at edge

The chart at the edge is showing me a mouseover popup with more rep than I actually have. Alt-Print Scrn didn't catch the mouse pointer, so I drew in one by hand. I presume this affects all Stack Exchange sites.


Of what use is Arcane Recovery to an Elf Wizard?

My reading of  is that elves recover spell slots after a 4-hour long trance.  However, if that is the case, then what good is Arcane Recovery to an Elf Wizard?


I put my usb stick into my asus router and enabled the content to source as dnla  How do I get the xbox one to play movies shared as part of the dnla share?


I added a comment to  but something strange is happening. The end code reads "); but SO decided to change that to ";);.    I did not add a ; in front of the ).  To further explain what's happening here, the following:  "http://example.com/." http://example.com/. "http://example.com." http://example.com. "http://example.com" http://example.com   renders as:


Why is $\aleph_0$ the smallest cardinal number?

It is a well-known fact that $\aleph_0 = \vert \mathbf{N} \vert$ is the smallest infinite cardinal number. But I'm wondering why; does anyone know a proof?  Thanks!


Understanding this C Array syntax - 3[arr]

I'm reading Head First C and going well so far but I'm having trouble with this example -   int doses[] = {1, 3, 2, 1000}; printf("Issue dose %i", 3[doses]);   Result = "Issue dose 1000"  I know what this does, it accesses index 3 of the doses array. More technically my understanding is that it adds the size of three integers to the pointer address for the first element in the array ( the doses variable )   The book explains that it works because   doses[3] == *(doses + 3) == *(3 + doses) == 3[doses]   I'm with it up until that final jump between *(3 + doses) == 3[doses]. Given that doses[3] is easy for me to grasp maybe I'm not understanding the significance of the [] correctly?


$X$ is said to have a Cauchy distribution iff $X$ has a probability distribution of the form:  $$f(x)= \begin{cases}  \frac{a}{\pi(ax^2+x^2)} & \text{,$x>0$} \\ \ \ \ \ 0 & \text {,otherwise} \end{cases}$$ where $a>0$  How can I show that $X$ has no mean?


What happens to my music if I unsubscribe from Apple Music?

What happens to all the music I have accumulated during the time I have been using Apple Music if I choose to unsubscribe? As I have been paying for those songs, do they remain available for listening once I unsubscribed?


What effect does upgrading RAM or the Processor have on the performance of a computer?

I am considering buying a macbook pro and have the budget to upgrade either the RAM to 16 gb or get the faster processor, but not both. So I wonder: In what sort of tasks is the performance improved if I upgrade RAM vs. if I upgrade the processor?  Ps: My only really heavy weight application which I use is Lightroom and sometimes Photoshop


Clerical error in UK visa application, but form already submitted - what should I do?

I'm from the Philippines, and I plan on travelling to the UK with my sister to visit a relative.  I have just submitted my visa application and have already paid online, when I noticed that I've made a clerical error. In the 'visit or stay' portion of section "Do you have any friends or relatives in the UK?", I clicked the 'no' box, instead of 'yes'.  My sister's application is correct. She selected 'yes'. Our appointment is due next month. I am planning to email them about this, and also inform them on the day of application submission.  Is this the right path to take?


Using Replace Geometry to replace selected feature with circle in ArcGIS Desktop?

I have a polygon shapefile and I want replace every irregular polygon with a circle.  I think I can do it with the Replace Geometry tool. But once the Replace Geometry tool is selected, draw a polygon mode is immediately entered. If I select the circle tool in the Draw tool window, the Replace Geometry tool becomes inactive.  Is there any way to use the Replace Geometry tool to draw a circle polygon?


Dynamic initialization of custom visualforce components

Visualforce has initialization of visualforce components in apex. For example MyCustomComponent component: ApexPages.Component customComponent = new Component.c.MyCustomComponent();  Is that possible to pass dynamically the component name instead of using Component.c.MyCustomComponent? I want to build a method that can get component name dynamically from the custom setting and initialize new ApexPages.Component.


Cannot start WampServer without admin privileges

I have installed WAMP server in students labs. It is working fine through admin login. But when student login though their account in  Windows 7 , it doesn’t not working. It only works after admin login and I have start the services automatically and also add in startup. But this also could not solve the problem.   I do not want to give admin rights to student group. Please help me to solve this problem.


String argument in a method doesn't working

final EditText d1n = (EditText) findViewById(R.id.d1n);   AA coming from edittext.  NotHesapla(d1n.getText().toString());    returns -1. if I try to   NotHesapla("AA");   working succesfully.  public double NotHesapla(String not) {     double puan;     if (not == "AA") { puan = 4; }     else if (not == "BA") { puan = 3.5; }     else if (not == "BB") { puan = 3; }     else if (not == "CB") { puan = 2.5; }     else if (not == "CC") { puan = 2; }     else if (not == "DC") { puan = 1.5; }     else if (not == "DD") { puan = 1; }     else if (not == "FD") { puan = 0.5; }     else if (not == "FF") { puan = 0; }     else { puan = -1; }     return puan; }   How can I solve this issue? Thank you


While reading a book, I found:     Objective-C supports the same conventions as does C.   I've thought "... as C does" is correct. For example,     As time goes by, we come to forget almost everything.   Why were subject and verb replaced in the first sentence?


Is there a special word for purposely misspelling a word?

I was thinking the other day about Kleenex, which is purposely misspelled from clean-ex, if that makes sense, and I was wondering if there was a word  for purposely misspelling a word, or name.


I was trying to find the simplified form of ${100 \choose 0} + {100 \choose 1} + \ldots + {100 \choose 99} + {100 \choose 100}$. I was having a hard time finding a simple way to express the solution and I did not know how to do so without writing out the complete number. Does know what form I have to use?


What does "user was removed" mean and why did my reputation change because of it?

Message appearing when a user was removed.     It seems I lost 1765 reputation points on Stack Overflow yesterday. The reason given in my history is "removed", with the description of "User was removed ()". I don't understand what that means. What caused this?


I keep getting NullPointerException in the following code. The exception appears at this line System.out.println(myHeros.toString());  public class test {  public static void main(String[] args) {      Hero A = new Hero("Archer");     Hero B = new Hero("Bacca");     Hero C = new Hero("Chester");     Hero D = new Hero("Teemo");     Hero E = new Hero("Garen");      MyStack myHeros = new MyStack(10);      System.out.println(!(A instanceof Hero)); // Output: false;      boolean debug = true;     try {          myHeros.push(A);         if(debug) {             System.out.println("lalala");         }     }     catch(notAHeroException e) {         //e.printStackTrace();     }      System.out.println(myHeros.toString());   //This is the line that throws nullPointerException;      System.out.println(myHeros.getTop()); //(Debug) Output: 1, the Hero was actually pushed into myHeroStack;            }   }  This is the class containing the toString method. I really cannot see where possibly can cause a NullPointerException.  public class MyStack implements Stack{  public Hero[] myHeroStack; //instance field; can be from this class to the whole world; int top;                   //The combination of these instance fields represent all you know about your object and all you can use about your object;  public MyStack() {     myHeroStack = new Hero[5];     top = 0;  }  public MyStack(int numOfHero) {     myHeroStack = new Hero[numOfHero];       top = 0; }  @Override public void push(Hero h) throws notAHeroException{     //check the input;     boolean checkType = !(h instanceof Hero);     if (checkType) {        //if (!(h instanceof Hero))         throw new notAHeroException("Check again what did you add?!");     }      else {         myHeroStack[top] = h;         top = top + 1;     }  }  @Override public void pull(Hero g) throws emptyStackException { //check whether the element you want to throw actually exist;     //check whether the element exist     if(myHeroStack[top - 1] == null) {         throw new emptyStackException("You do have this hero in you stack!");      }     else {         Hero heroToPull = myHeroStack[top - 1];         System.out.println(heroToPull.getName());         myHeroStack[top - 1] = null;         top = top -1;      }  }  @Override public void peek(Hero p) {     System.out.println(p.getName()); }  public int getTop() {     return top; }  public String toString() {     //check whether the stack is null     if(top == 0) {         return ("You hero stack is empty");     }     else {         String AllMyHero = "";         for(Hero hero: myHeroStack) {                        AllMyHero = AllMyHero + "All my hero is " + hero.getName()+ "%n"; //hero is null point         }         return AllMyHero;     }   }   }  This is the Hero class, which is quite simple.  public class Hero {      private String name;      public Hero(String name) {         this.name = name;     } }   Thank you for all who takes a look at this question!


What are my options for supplying power to an M140 M-Type JAPAN 2+ W laser diode running off of a 5A constant current laser driver?

Background: I am building a laser that is running off of an M140 M-Type 2+ W 445 nm laser diode and an adjustable constant current driver.  Here are the specifications for both the driver and the diode as stated by the seller.  DRIVER 8 - 12V Operation Adjustable Constant Current Output up to 5A (preset to 500mA) Suitable for Laser Diodes up to 7W+ 0 - 5V TTL/PWM Input Control 0 - 150kHz Frequency 2x 12V Fan Driver Delayed Startup - <10 Seconds Includes 2-pin JST-XH Crimp Connectors Driver is ON by default when powered.   DIODE This listing is for ONE Brand New Nichia M140 M-Type Japan 445nm 2+  Watt 5.6mm Laser Diode mounted in 12mm x 30mm Metal Housing Module  w/ G-2 Glass Lens, ~6" 22AWG Silicone Leads. The diodes are   meticulously extracted from a new laser diode array. Recommended    current is 1 to 1.6 Amps. A constant current driver must be used to  power the diode. Do not connect directly to battery or unregulated  power supply!    As of now, I have the diode in module with a lens and leads, the driver, and a heat sink which is currently on its way.  Problem:  What I need to do now is supply power to the driver. Since the driver is operational up to 12V, I am considering running 3 18650 batteries rated at 3.7V in series. This will give me a total voltage of 11.1 volts. My concern, however, is that I am unsure if the current of these batteries running in series matters. I know that the current remains the same, however, does the input current need to match the preset current on the driver (500mA)? Does the input current need to be more? If so, how much more? What is a safe amount of current that can be driven to the driver so that it does not break down. I am having trouble understanding how a constant current driver steps down the incoming current without messing up the driver. I apologize if these questions seem silly, but I am genuinely interested in this project, and I would like to power it properly and safely.  Also, how can I calculate the output power of the laser diode? If Watts is equal to voltage * amps, and the driver is sending 500mA to the diode with 11.1 volts, the output power SHOULD be 5.55 Watts. However, this doesn't sound right since the diode is rated at 2 Watts AND since the seller recommends a current between 1.0 to 1.6A. Is my calculation wrong?  Note: My major is in chemical engineering. I am very unfamiliar with electronics. I have tried my hardest to learn everything there is to know in order to successfully build a high-powered laser. If there is anything wrongly stated, please correct me.


Creating the personality of a character different from myself

I am a newbie in playing role-playing games, and after several games, I've come to the conclusion that character personality creation poses a bit of a problem for me.  I mostly tend to create and describe somebody with whom I feel rather comfortable. This makes for the personality, the alignment, the world view, the race, and so on. As a result I always end up with almost the same character, which very much resembles me myself IRL, or at least me the way I'd like to see myself. The point is - it's not some other character, some "mine" character, - it is precisely me put in the game world like in a dream.  I feel that despite some variations that I can bring in, with this approach my characters are pretty repetitive and actually reflect me very well. I don't find it interesting to invent some "artificial" character, with no real connection with me, just for the sake of it. I can understand other possible configurations - why they are who they are, and what are their world views, their biases - but I am not interested in being them. Trying to do so quickly becomes boring as doing something I am not really interested to be doing.  Hence my question - is that normal among roleplayers? Do you create your characters to be like you (with some possible modifications, like, maybe, gender, race, some minor biases), or do you usually create a completely different person and inhabit it? If the latter is the case, then how do I do that, and how do I get into playing that role?


The techniques used/are used by the author in his last book are    quite different from those in his previous works  I came across this question in a textbook and I don’t really understand it.I thought that the relative clause was the subject of the sentence and since it’s the subject it can’t be omitted.So the answer should be sth like ”that are used” or “which are used” But they weren’t in the given options. Let’s assume that the relative clause is the object of the sentence then what makes ”used” the true answer? I get that we omit “that” but why we also omit “are”? I also have a hard time differentiating between subject and object clauses because the rules are a bit different from the ones in my native language.


I'm trying to make an 64x64 tilemap using Super Tilemap Editor & Unity but my tiles looks terrible. I did my research about pixel perfect 2D and all of the solutions were for pixel art, they didn't work for me.  I have the following tileset I made in Adobe Illustrator as an example    Tiles looks like this when placed in game (1x zoom)    I'm pretty sure they're not 64x64 in game, they also look pixelated probably because they're smaller than they actually are on camera.  So my question is, how can I calculate the correct camera size for 64x64 tiles and do I have to make any changes in order to make sprites look pixel perfect? I'm currently using 1080/64/2=8.4375 (vertical resolution / PPU / 2) as camera size.


Chapter, sections, etc. in capital letters?

Should I write "headers" like chapter, section, etc. with capital letters?  I think I have seen both; therefore I am not sure.  As an example, if I write something and want to refer to a specific chapter/section (they are numbered):     "As we have seen in chapter/section [x]..."


I have a Linux server (Ubuntu 12.04) I'm using to learn as much as I can about server management. I've got as far as getting a full LAMP setup running, but have hit a dead end trying to get a domain name to point to my server.  I've set up a virtual host in an Apache .conf file, and set up the IP address in the hosts file with the domain name, and have pointed the A record to the IP address with no luck. I've also installed bind9, but thought I'd see if I'm going in the wrong direction rather than messing anything up with that.  What is the best way to get a domain name up and running - ideally in a way that would be production ready rather than a temporary setup  EDIT: Thanks for the tips - just to better inform the situation - I have a few spare domain names registered that I can use, and I'm renting a VPS to play with. Currently I have the DNS * and @ A record pointing to the IP, but the nameservers are with the registrar if that makes a difference?


I want to my statement to say u = g in Omega.  I tried coding $$u=g in \Omega$$, but this results in no spaces around the word 'in'.  How can I insert them?


I started my component orientation when I suddenly see those white outlines around my components. And as I zoom in, they increase in number. Even when I tried to move my components elsewhere, they stayed right where they were. What are these? What's going on?


what is the difference between bagging and boosting in random forest?

I understand what is bagging and how it is applied to random forest. But how is bagging different from boosting. If boosting is different from bagging, how can boosting be applied to random forest?


For a finite group $G$ and its subgroup $H$. Show that there is a subset $T$ which is simultaneously a transversal for the left and right cosets of $H$.  Further ,if we consider any two partition of $G$,and the sets have the same cardinality.Can we find a transversal for both of them?  I get the answer as the comments tell me how to do it.Considerating the left cosets as point in left,and right cosets in right.Two points are adjacent when they are in different sides and have common elements.Then I realized that if there exists a complement match,then I can prove it.The condition of Hall's theorem is easy to be seen as it will lead to a controdiction of the cardinality as they are partitions with the sets of same cardinality.  However,when it comes to the sitiation of infinte cardinality of  G,what can we say about it?


Is it possible to use a template on a constructor, for example:  class Class {     public:         template<typename T>         Class(T arg); };   And the cpp file:  #include "class.h"  template<typename T> Class::Class (T arg) {     // do something }   The constructor is called with:  int a = 0; Class c {a};     When compiling this code, I get the following error:  /usr/bin/ld: /tmp/ccNzp4z7.o: in function `main': main.cpp:(.text+0x1c): undefined reference to `Class::Class<int>(int)' collect2: error: ld returned 1 exit status     The use for this would be a constructor like:  Class(std::unordered_set<T> choices, std::unordered_map<Direction, std::function<std::string(T)>> mapping);   Where each object in choices would be iterated over for each Direction in the map and passed to the corresponding function, in order to generate the object. In this case, the type used has no bearing on the class after the constructor finished executing, so I don't think that it makes sense to use a template on the entire class.


htaccess redirect all traffic on specific domain to another domain, exclude folder and filetype

Multiple alias domains pointing to the same cPanel account are sharing the same .htaccess file. I need a domain-specific rule that redirects all traffic from aliasdomain.com to https://www.domain1.com only if:   HTTP_HOST is currently aliasdomain.com (with or without WWW and http/https) exclude folder /medias/ - it must still be accessible from aliasdomain.com exclude all *.jpg, *.jpeg, *.png and *.gif files (even if the files are in root of aliasdomain.com) always redirect to https://www.domain1.com root, no wildcard redirect and no redirect to non-ssl http domain1.com needs to be excluded so if the same .htaccess file is on domain1.com it won't interfere.   I tried to adapt various code snippets found on StackOverflow but failed horribly getting it to work :( I asked a question there but mods told me to ask on ServerFault instead so here i am... Help would be really appreciated!


My lens Nikon AF 85mm 1.8 will only focus at 22 otherwise I get a fEE flashing on the top display. Any suggestions? I use a D80.


How to fix the error "a non-static method can't be referenced from a static context"?

I am trying to calculate the factorial of some integer number (from 0 to 21) by using recursive method. I created a separete method outside the main class. But while printing the factorial in main method it shows an error. How to fix that?  package looping;  import java.io.PrintStream;  public class Looping {     public long fact(long num)     {         if(num<=1)         return 1;         else             return num*fact(num-1);     }     public static void main(String[] args) {          for(int i=0;i<=21;i++){          System.out.printf("%d!=d\n",i,fact(i));         }      } }


Run script defined in PATH location in the current shell

I have a bash script that is located in one of my PATH locations. When I run the script it ends with a cd /some/location but since the script is run in its own subproccess it doesn't change the location in the shell.  I know I can run the script using . ./the/script.bash and can even set that up as an alias but I would like to know if there is a way to get a command run from a script in my PATH to execute in the current shell.  --EDIT--  Apparently there was some confusion about my initial question so let me give an exact example.  I have a script called windows located at ~/bin/ and my .profile adds /home/$USER/bin to my PATH environment variable. The script windows mounts my windows partition (I dual boot) and then changed directories to the home file on my windows partition. The script looks like this:  #!/bin/sh  mount_point="/media/$USER/windows" if ! grep -q "[[:space:]]$mount_point[[:space:]]" /proc/mounts; then     sudo mount -t ntfs /dev/nvme0n1p3 "$mount_point" fi cd "$mount_point"/Users/Justin   So now when when I type the command windows into my terminal it runs this script, but since the script is not run in the current shell the cd does not change my current shells directory.  My question was is there a way to make this run in my current shell (so that when I run the command windows it changes my directory) without using an alias to call the script preceeded by a .


Has or will Bug #1568490 ever be addressed?

I am an old and ornery guy that has had the window controls on the right of window since the Windows 3.1 days. Along comes this new fandangled Unity thing and it moves the buttons to the left. I would love to give this Unity a chance, but my mind just will not let me look for the window controls on the left. Seriously, has  been/or will ever be addressed or is my choice to go with another DE?


I would like to be able to pass the type into a generic method where I only know the name of the type.  I want to do something like the following, but I am getting an error.  var type = typeof(name); var result = MyGenericMethod<type>();   Is this possible?  Currently I am doing a switch statement, but this is less than ideal as I need to update each time I need to add a new class.  switch (name) {     case "TypeName1":         result = MyGenericMethod<TypeName1>();         break;     case "TypeName2":         result = MyGenericMethod<TypeName2>();         break;     ... }


I have users that login automatically via ssh to a script I defined instead of a shell. The script basically launches a program which has a shell-escape in it which would allow the user to execute commands outside of the program. If I can disable all commands of a user, then that shell-escape function won't matter. How can I disable all commands to be executed from any given user? For clarity, in /etc/passwd, the shell is set to /usr/user.sh and in user.sh, a program is launched.


Is there any method to detect hotkey binding on Windows 7? AltGr+N should display a } sign on my localized keyboard, but it doesn't display anything or do anything. This behaviour is application independent, doesn't work system wide. Although if I login to a remote server with remote destop from the same computer, this keybinding works flawlessly on the remote machine.  Any idea?  Hubi


Is there really no English equivalent to German's “Fachidiot”?

There was the following paragraph in the article that came under the title, “GOP and the rise of Anti-knowledge” written by  (October 29, 2015):     “English unfortunately doesn’t have a precise word for the German   “Fachidiot,” a narrowly specialized person accomplished in his own   field but a blithering idiot outside it. In any case, a surgeon is   basically a skilled auto mechanic who is not bothered by the sight of   blood and palpitating organs. We need the surgeon’s skills on pain of   agonizing death, and reward him commensurately but that does not make   him a Voltaire.”    In Japanese we have a word, 専門バカ, of which literal translation is “specialist idiot” meaning exactly same as defined the above - a narrowly specialized person accomplished in his own field but a blithering idiot outside it.  I’m really curious about the absence of short descriptions of the specialist who knows nothing more than his specialty area in English like German “Fachidiot,” and Japanese "専門バカ."  Isn’t there really any short word counterpart to “Fachidiot,” specialist’s ignorance, for instance, in English?  P.S.  I found "narrow-minded specialisit" as a German-to-English translation of "fachidiot" in the web site, Interglot translation dictionary.


Let $\{e_j\}_{j\in\mathbb N}$ be some subset of a Hilbert space $H$. If  $$\|f\|^2=\sum|\langle f,e_j\rangle|^2$$  for every $f\in H$, how may I show that  $$\sum\langle f,e_j\rangle e_j$$  converges for every $f\in H$?


Recovering data from a hard drive with bad sectors

A friend of mine recently gave me a laptop that wasn't booting past the Windows screen. I replaced the hard drive with a new one and put the old hard drive in my comp. to try and recover the data.  Windows 7 didn't recognise the main OS partition indicating some filesystem corruption (disk manager showed it as a RAW drive instead of NTFS). Incidentally, the hard drive has two other partitions: the small 100 MB one was fine in Windows and the 10 GB Recovery partition was fine after Windows ran a disk check).  Then I booted up with a Linux live CD (Slax) and the filesystem was recognised fine. However, when trying to copy files, many files would cause errors each one holding up the copy process by about a minute. I'm copying about 120 GB of data with thousands of bad files so this means it takes forever to copy.  There are big files (videos and photos) and small files (documents).  What I need is a way to copy files from a dying HD so:   if a file is bad, it fails silently (not interactively) it fails quickly (< 1 seconds ideally) it optionally deletes the bad file from the destination (not necessary)   so that the process can be done overnight.  Do you know a live CD where copy behaves like that or parameters to cp I can use or the settings for ddrescue I need to use or some other method to do this (I'm a linux noob)?  Alternatively, do you know a way to mount a broken filesystem in Windows (it looks like there are errors in important locations so Windows doesn't recognise it as NTFS). Then I can try xcopy.


If you played someone in a game of ping pong, and wanted to refer to the game later, you could refer to it as "our game". For instance:  "It was after our game."  But if I were talking to a different person about this, I might find myself inclined to refer to the other person and me specifically, such as:  "It was after John and me's game"  But that doesn't sound right and also doesn't quite make sense. I almost more want to say:  "It was after John and my's game"  But I don't think that's correct either. Despite this, I don't feel like expressing it like this should be completely impossible. Is there any way to convey something about a possession that belongs to two people in this way?


Prove that: $ \cot7\frac12 ^\circ = \sqrt2 + \sqrt3 + \sqrt4 + \sqrt6$

How to prove the following trignometric identity? $$ \cot7\frac12 ^\circ = \sqrt2 + \sqrt3 + \sqrt4 + \sqrt6$$  Using half angle formulas, I am getting a number for $\cot7\frac12 ^\circ $, but I don't know how to show it to equal the number $\sqrt2 + \sqrt3 + \sqrt4 + \sqrt6$.  I would however like to learn the technique of dealing with surds such as these, especially in trignometric problems as I have a lot of similar problems and I don't have a clue as to how to deal with those.  Hints please!  EDIT:  What I have done using half angles is this: (and please note, for convenience, I am dropping the degree symbols. The angles here are in degrees however).  I know that $$ \cos 15 = \dfrac{\sqrt3+1}{2\sqrt2}$$  So,   $$\sin7.5 = \sqrt{\dfrac{1-\cos 15} {2}}$$ $$\cos7.5 = \sqrt{\dfrac{1+\cos 15} {2}} $$  $$\implies \cot 7.5 = \sqrt{\dfrac{2\sqrt2 + \sqrt3 + 1} {2\sqrt2 - \sqrt3 + 1}} $$


null object refrence when I try to call method from diffrent class

I keep getting an error every time I try to call updateList() from my adapter class. When I change updateList() to public static void it seems like it would work, but then I can't use this as context and I don't know an alternative.   I'm new to android and would really appreciate the help.  MainActivity.class       public class MainActivity extends AppCompatActivity { public void updateList(){         listitems = new ArrayList<>();         adapter = new MyAdapter(listitems, this);         recyclerView.setAdapter(adapter);}}   MyAdapter.class  public class MyAdapter extends RecyclerView.Adapter<MyAdapter.ViewHolder> { MainActivity main = new MainActivity();  holder.setOnItemClickListener(new ItemClickListener() {             @Override             public void onClick(View view, int position, boolean isLongClick) {  if{  AlertDialog.Builder altdial = new AlertDialog.Builder(context);                     altdial.setMessage("Gelukt?").setCancelable(true)                             .setPositiveButton("Yes", new DialogInterface.OnClickListener() {                                 @Override                                 public void onClick(DialogInterface dialogInterface, int i) {                                     if (listItem.getColor() == Color.BLACK) {                                           if (shared.loadDoneState() == 1) {                                             hoi[0]--;                                         } else if (shared.loadDoneState() == 2) {                                             hoi[1]--;                                         } else if (shared.loadDoneState() == 0) {                                             hoi[2]--;                                         }                                     }                                       shared.setDoneState(1);                                     shared.Recast();                                     dialogInterface.cancel();                                     Toast.makeText(context, "GOOD JOB :D", Toast.LENGTH_SHORT).show();                          /*-->*/    main.updateList();   2019-08-28 19:49:05.413 30203-30203/com.reaper.newlife E/AndroidRuntime: FATAL EXCEPTION: main     Process: com.reaper.newlife, PID: 30203     java.lang.NullPointerException: Attempt to invoke virtual method 'void android.support.v7.widget.RecyclerView.setAdapter(android.support.v7.widget.RecyclerView$Adapter)' on a null object reference         at com.reaper.newlife.View.MainActivity.updateList(MainActivity.java:142)         at com.reaper.newlife.Logic.MyAdapter$1$2.onClick(MyAdapter.java:189)         at com.android.internal.app.AlertController$ButtonHandler.handleMessage(AlertController.java:172)


Let $E$ be a non-empty subset of $R$, let $n ≥ 1$ be an integer, and let $L<K$ be integers. Suppose that $K/n$ is an upper bound for $E$, but that $L/n$ is not an upper bound for $E$. Show that there exists an integer $L<m≤ K$ such that $m/n$ is an upper bound for $E$, but that $(m−1)/n$ is not an upper bound for $E$.  (Hint: prove by contradiction, and use induction. It may also help to draw a picture of the situation.)   The picture: --------$x_{n-k-1}$-$L/n$-$x_{n-k}$...------$x_{n-1}$-$(m-1)/n$-$x_n$-$m/n$---$K/n$  Following the hint lets induct on $n$. The contradiction of the proposition will be that for any integer $L<m≤ K$ such that $m/n$ is not an upper bound for $E$, $(m−1)/n$ is an upper bound for $E$.   Then I think I should induct on $n$.  However, the contradiction of the proposition is itself faulty I think, because it dose not make any sense. Can you help me at least to start?   I have seen several discussions on the same question but none of them seems to me proceed the way the author suggested.


Instead of looking up , how can I calculate Lux from EV?


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?


Tensors which are symmetric and antisymmetric in overlapping groups

Say I have the following tensor $T_{abc}$ such that $$ T_{(a[b)c]} $$ Ergo, it is symmetric in indices $a$ and $b$ and antisymmetric in $b$ and $c$.  Keeping in mind the various properties that (anti-)symmetry entails such as switching and the like, can $a$ and $c$ actually be switched around?  I am trying to show that tensors having such a property vanish, but I get stuck when I get $T_{bac}$.


Prove $(x+y)^a\leq x^a+y^a$ if $0<a\leq1$ and $x,y\geq0$  I need to prove this step for a bigger question. It should be quite basic but I just have no idea...


Why is frosted glass reflective at an angle?

I have a Pixel 3, and the back of the phone is frosted glass. I noticed today that if I look at the back from a wide angle it becomes reflective, whereas it is opaque when looking directly on.  What causes this phenomenon?


Are there tests of the existence of false vacuum?

False vacuum is a hypothesis that there exist a state that is a local minimum, but not the lowest energy state.  Why do we think such a state as false vacuum really exist?


I understand the basics of pointers and references, but the biggest issue I have is in deciding when they should be used (and which). The main example I will give is one of a basic game. Assume the setup is something like:   new World  Camera Map    World is a pointer because every time the game starts a new save or loads an existing one, it deletes world and loads a new one. But inside of World, only one existence of Camera and Map should ever exist and only for the duration of World. If World is destroyed, then obviously they should be as well. However.. lets say Map needs to access camera (but so do other objects), should Camera be passed by reference into Map or as a pointer, or? For instance, if its supposed to be by reference, should it be:  map = Map(&camera); (inside map class) Map(Camera camera) {...}   Or more like:  map = Map(camera); (inside map class) Map(Camera &camera) {...}   Also, lets say Map holds a 2D vector of tiles called grid. Something like:   std::vector< std::vector< Tile > > > grid;   Now lets say I have a PathFinder class that needs that grid passed in. It needs to edit the tiles directly to change f, g, etc values (for pathfinding). Should that 2D vector be just a normal 2D vector of Tile's and the entire thing passed by reference to the PathFinder? Or should it be a 2D vector of Tile pointers?  Also, NPC's and Player will have a currentTile which is the tile they currently are on. They will need to have a reference or pointer to that tile so they can also set themselves as an occupant on that tile via something like this inside the NPC/Player classes:  currentTile = tile; currentTile->SetOccupant(this);   The other concern comes in when I then destroy that grid to load a new map, how do I easily handle making sure nothing is pointing to Tiles that no longer exist. Do I simply have to loop over those classes and set the currentTile to NULL?  This is where I started to really get confused by this stuff. Any help is appreciated as I'm obviously pretty nooby. @_@; And sorry if this isn't really game topic related. If it needs moved to a different stackexchange, just let me know or move it (if you can). >_<


$X_n$ are r.v.s, is it true that $E[\sum_{n=1}^{\infty} X_n] = \sum_{n=1}^{\infty} E[X_n] $?  My feeling is that this is not necessarily true. But cannot come up with an example.  Can someone provide a counterexample or give a proof for this statement?


Whenever I copy something from another application and then go to paste it into vim, it messes up the indentation.   For example, just now I tried to copy the manifest.json file from the hello-world tutorial for creating chrome extensions.  It looks like this:  {   "manifest_version": 2,    "name": "One-click Kittens",   "description": "This extension demonstrates a browser action with kittens.",   "version": "1.0",    "permissions": [     "https://secure.flickr.com/"   ],   "browser_action": {     "default_icon": "icon.png",     "default_popup": "popup.html"   } }   but, when I paste it into vim, it looks like this:   My vimrc is as follows:  "se t_Co=256 syntax enable  set nowrap set mouse=a set tabstop=4 set softtabstop=4 set shiftwidth=4 set expandtab  set number set showcmd set cursorline set showmatch  execute pathogen#infect() "filetype plugin indent on  "folding settings set foldmethod=indent   "fold based on indent set foldnestmax=10      "deepest fold is 10 levels set nofoldenable        "dont fold by default set foldlevel=1              set clipboard=unnamed  "share one clipboard for everyhting       It has something to do with this line:  execute pathogen#infect() "filetype plugin indent on   If I comment it out, The problem is resolved. However, this is what I use to achieve auto-indent for when I am coding in python. Is there another way to get auto-indent?


Links to publications in .bib file get printed as plain text on moderncv

My moderncv-created resumé compiles without any sort of error: the list of publications regularly appears in its own section, no problems on that side. However, even though I have inserted the urls of my journal papers in my .bib file, publication entries in the resulting pdf document are typed in plain text, devoid of any link. Links work fine in all other sections of my CV. Bibtex handles my bibliography file. A MWE: \PassOptionsToPackage{dvipsnames}{xcolor}   \documentclass[11pt,a4paper,sans]{moderncv}  \moderncvstyle{banking} \moderncvcolor{black}  \usepackage[latin1]{inputenc}   \usepackage[scale=0.8]{geometry} \usepackage[final]{pdfpages} \usepackage{xpatch} \usepackage{url} \setlength{\footskip}{33pt}  \name{I am}{Lingo} \address{Job title}  % I have put my job title in the address section \extrainfo{address}  % and my address as extrainfo  \phone[mobile]{+1(234)567890}                 \email{lingo@lingo.org}  \AtBeginDocument{\hypersetup{     pdftitle={CV},      pdfauthor={Lingo},      colorlinks=true,     linkcolor=gray,     urlcolor=gray }}  \begin{document} \makecvtitle  \section{Education} \cventry{year--year}{Degree}{Institution}{City}{\textit{Grade}}{Description} \cventry{year--year}{Degree}{Institution}{City}{\textit{Grade}}{Description}  \section{Experience} \cventry{year--year}{Job title}{Employer}{City}{}{Description line 1} \cventry{year--year}{Job title}{Employer}{City}{}{Description line 1}  % other sections  \nocite{*} \bibliographystyle{plainyr} \bibliography{publications}   \end{document}       and my publications.bib file has entries such as @article{Lingo2016,     title = {A generic {Title}},     journal = {Yellow Pages},     url = {\url{https://www.google.com}},     year = {2016},     volume = {3},     pages = {251-266},     author = {\textbf{Lingo, I A.} and Doe, J.} }


Scifi novel where aliens replicate humans from a signal from Earth

I am trying to identify a novel that I read several years ago and cannot recall the author or title. I recall that the book is the first of two novels. The plot was this: Plant-like aliens receive a signal from Earth that includes our genetic code. The aliens use that information to make humans on their planet. One human whose name I cannot recall (the main character) wants to go back to Earth but due to Earth being so far away he would never survive the flight. So the challenge is that he must find a way to do so.


What precautions would a D&D court be expected to take?

The party in the game I'm running is being taken to court, in a reasonably big city. I'm trying to figure out what sort of measures would be used in a courtroom where magic is available. I've already established that there will be a zone of truth in effect, that everyone will be expected to allow to affect them. However, I've said that alignment detection and the like is probably not admissible. On the other hand, they'll likely have most of their magical effects/items removed.  Specifically, I'm looking for two main things:   Is there anything beyond zone of truth that would likely be employed by the court to ensure an honest and fair trial? Assume access to at most 4th level spells. What sort of measures for security would be reasonable to implement? Mostly to prevent violence or people charming the jury.


Why does the p-value of a composite null hypothesis have a supremum attached it?

I noticed that there is a definition of the p-value in my textbook. It is defined as the p-value of a composite null hypothesis and it says the following:    I have no idea why it is written with a supremum. I've spent hours pondering this, does anyone have enough of a background to help me with this? Thank you!


how to call second superclass methods from subclass in java

class A {   public void display()   {     System.out.println("Class A display!!!");   } }  class B extends A {   public void display()   {     System.out.println("Class B display!!!");   } }  class C extends B {   public void display()   {     System.out.println("Class C display!!!");     super.display(); // will call B's display() method     // how to call A's display() method here?   } }   public static void main(String args[]) {   C obj = new C();   obj.display(); // will call C's display() method }  }   How can I call A's display() method from C's display() method? Is it possible to somehow call A's display() method using super?


Seemingly impossible double integral reduction

Show that $\int_{0}^{1}\int_{0}^{1}(xy)^{xy}dxdy = \int_{0}^{1}y^{y}dy$  I have tried the method used in the Gaussian integral, polar coordinates, exp(.) and ln(.) of both sides of the integrand...  Gaussian integral:   I have also looked at the sophomore dream function, but I am not sure how to proceed that way in this case.  Sophomore dream function:    Now I am stuck. Any help would be appreciated.


Why does `//` only display for first level directories?

For the root directory a // will display in the prompt:  ─────────────────────────────────────────────────────────────────────────────── rick@alien:~$ cd / ─────────────────────────────────────────────────────────────────────────────── rick@alien:/$ cd // ─────────────────────────────────────────────────────────────────────────────── rick@alien://$ cd /// ─────────────────────────────────────────────────────────────────────────────── rick@alien:/$    You can change to // directory. But when you change to /// directory it takes you back to /.  Sub-directories don't display the same way though:  ─────────────────────────────────────────────────────────────────────────────── rick@alien:~$ cd /usr ─────────────────────────────────────────────────────────────────────────────── rick@alien:/usr$ cd /usr//src ─────────────────────────────────────────────────────────────────────────────── rick@alien:/usr/src$  ─────────────────────────────────────────────────────────────────────────────── rick@alien:/usr/src$ cd //usr ─────────────────────────────────────────────────────────────────────────────── rick@alien://usr$  ─────────────────────────────────────────────────────────────────────────────── rick@alien://usr$ cd ///usr ─────────────────────────────────────────────────────────────────────────────── rick@alien:/usr$    As you see // is automatically converted to a single / in sub-directories. However the rule doesn't apply to first level directories.  Why is // displayed for top level directories but not sub-directories?


Javascript: Why to use define prototype method for inheritance if inheritance can be achieved without it?

I referred   question/answer to understand prototypical inheritance.  I got to know to extend a method , we need to define Person.prototype.getName in base class. So that in child class it can be called as myCustomer.sayMyName();  Code in the answer can be summarized as follows :      function Customer(name) {         this.firstName = name;     };     function User() {           }      Customer.prototype.hi = function() {         console.log('Test method of parent');     }       User.prototype = new Customer('shaadi');     var myUser = new User();     myUser.hi();     But the question is if I can call the same with following syntax, why should I use prototype?  My code:    function Customer(name) {         this.firstName = name;         this.hi= function() {             console.log('Test method of parent');         }      };     function User() {           }     User.prototype = new Customer('shaadi');     var myUser = new User();     myUser.hi();     I could use the method of parent without defining Customer.prototype.hi, then why/when should Customer.prototype.hi be used?  If both solutions give me access to parent's method, why should I choose former?


Schema.org and violating the search engine rules

The Schema.org is a great tool to attract people. As I found from few sources, it doesn't provide any SEO benefits, besides the neat UI from search engines, though I wonder whether Google or any other search engine will ban website from excessive usage. For example if site has more than 10000 articles and all they marked 5 star, does this violate the usage of Schema.org and is it possible to get ban from search engines


Today I updated from 13.04 to 13.10. Then sudo apt-get autoremove removed all 32bit packages.  How to get them back? How do I install ia32-libs again?  This is what I get if I try to install them back :  output$ sudo apt-get install ia32-libs Reading package lists... Done Building dependency tree        Reading state information... Done Package ia32-libs is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source However the following packages replace it:   lib32z1 lib32ncurses5 lib32bz2-1.0  E: Package 'ia32-libs' has no installation candidate


How do I get all articles from the database?

i am new on Drupal 8 ,in my case i want to get all articles from database filtered by name i have done dome code but it doesn't work for me can anyone help me please ? public function getArticles(){     $database = \Drupal::database();     $query = $database->select('node', 'nd','article');     return $query;   }  update : <?php  namespace Drupal\mymodule;   class ServiceValues{      public function getArticles(){     $storage = \Drupal::service('entity_type.manager')->getStorage('node');     $my_entity_ids = $storage->getQuery()       ->condition('type', 'article')       ->condition('status', 1)       ->execute();     $my_entities = $storage->loadMultiple($my_entity_ids);     return $my_entities;   } }


Does the Star Trek `reboot` mean that Star Trek TNG (et. al.) never happened?

I've been afraid to care very much for the "reboot".   Does the Star Trek Movie reboot mean that Star Trek TNG (et. al.) never happened?  If so, the implications of liking it are that I put aside my beloved series. (Although the pacing on Voyager's final episode was so wrong that I felt betrayed.)  What does it mean? What are the implications that I haven't thought of? Thanks!


Want to cancel a 'Pending Erase' on iphone... Any suggestions?

I lost my phone on vacation and activated 'Lost Mode' for a couple of days. The night before heading home I decided to do the Remote Erase ´cause I thought there's no way I'd get it back, I also called my carrier and canceled the data service on my number. The phone has been offline ever since but the hotel just called to say they found my phone at the spa and they are mailing it back to me. So I want to cancel the 'Pending Erase', all I care about is recovering all the pictures from that trip that I hadn't backed up on iCloud yet... Will removing the device from my iCloud account work?  And if I don't have service on the phone, will the 'Erase iPhone' command still go through when I turn it on?  Please help! I have two days to figure this out


Date field in FormAPI, remove Day field?

Using a 'date' field in the FormAPI, is there something I can set to hide the day field from showing?


There was , which I've tried. But there is one problem: the textarea doesn't shrink if you delete the content. I can't find any way to shrink it to the correct size - the clientHeight value comes back as the full size of the textarea, not its contents.  The code from that page is below:  function FitToContent(id, maxHeight) {    var text = id && id.style ? id : document.getElementById(id);    if ( !text )       return;     var adjustedHeight = text.clientHeight;    if ( !maxHeight || maxHeight > adjustedHeight )    {       adjustedHeight = Math.max(text.scrollHeight, adjustedHeight);       if ( maxHeight )          adjustedHeight = Math.min(maxHeight, adjustedHeight);       if ( adjustedHeight > text.clientHeight )          text.style.height = adjustedHeight + "px";    } }  window.onload = function() {     document.getElementById("ta").onkeyup = function() {       FitToContent( this, 500 )     }; }


Why is my terminal invisible after minimizing it and how can I find it?

I minimized my terminal after doing a repo sync.  I cant find it on any desktop now! Please help.


I don't understand why I see these edges when rendering my model. They don't appear in object mode, but when I render.       And the topology seems dense enough to not produce these edges?  Here are some images of the topology and lighting, which is only an hdri of a photo studio:


Rutherfords alpha scattering conclutions?

Please can some one give me rutherfords observations and his conclutions from each onbservation, I have looked in text books but they only give them sepratly with no direct link betweeen which observation led to which conclution thus this is what i am looking for. THanks


apt purge not working with regex on Ubuntu 20.04

I am trying to remove all the nvidia packages from my system using regex. But it gives me an error: E: Unable to locate package nvidia-*  Here's the command I am running: sudo apt purge nvidia-*  I don't know if I am doing something wrong or this simply isn't supported anymore. Would appreciate some help, thanks!


Understanding the proof of a formula for $p^e\Vert n!$

This is a proof from a book on number theory I'm reading. I'm having a hard time following. I think there's a variable here that means two different things at two different times...  Theorem:  If n is a positive integer and p is a prime, then $p^e \vert\vert n!$, where $e=\lfloor\frac{n}{p}\rfloor + \lfloor\frac{n}{p^2}\rfloor + \dots + \lfloor\frac{n}{p^r}\rfloor$ and r is determined by n by the inequality $p^r \le n <p^{r+1}$  Proof:  For a given integer k, the multiples of $p^k$ that do not exceed  n are $p^k, 2p^k, \cdots, qp^k$ , where q is the largest integer such that $qp^k \le n$. But this says that q is the largest integer not exceeding $n/p^k$, so that  $q= \lfloor n/p^k \rfloor$. Thus, $\lfloor n/p^k\rfloor$ gives the number of positive multiples of $p^k$ that do not exceed n.     Interlude:      I understand the proof so far. We've simply chosen some power of p   and shown that $\lfloor n/p^k \rfloor$ is the largest integer that we can multiply by $p^k$ and stay under n. Here's where I start to get confused.   Now, if $1 \le m \le n$, then $m=qp^k$ with $(q,p) = 1, 0 \le k \le r$, and m contributes precisely k to the total exponent e with which p appears in the canonical representation of n!     Interlude 2:      How exactly does $m=qp^k$ follow from $1 \le m \le n$? Also, this q seems to mean something other than $\lfloor n/p^k\rfloor$ since we seem to be considering the set of all numbers less than or equal to n and greater than or equal to 1 that have the form $m=qp^k$?   Moreover, m is counted precisely k times by the sum  $\lfloor\frac{n}{p}\rfloor + \lfloor\frac{n}{p^2}\rfloor + \dots + \lfloor\frac{n}{p^r}\rfloor$,   once as a multiple of p, once as a multiple of $p^2$, ... , once as a multiple of $p^k$, and no more. Of course, if $k=0$, then m is not counted in the sum. Therefore, the sum above accounts exactly for the contribution of each m between 1 and n to the exponent e as claimed.     Interlude 3:      What exactly is meant here by counted? I really don't understand the last part of this proof at all...


AC: Why differentiate between Ground and Neutral?

Current flows through a conductor connecting points at different potentials.  Leaving aside multi-phase details, common/conventional AC systems use a 3-wire setup:   Wire-1: a line/live/hot/phase wire presenting a point that oscillates between 2 potentials. Wire-2: a neutral wire presenting a point of unknown/unspecified and varying potential, that nevertheless presents some fixed/specified potential difference to Wire-1 at least some of the time. Wire-3: a ground/earth wire presenting a point at 0V potential difference to its immediate physical surroundings.   Wire-1 and Wire-2, in addition to some device that is to be powered, are used to construct a closed electrical circuit. Wire-3, leaving aside EMI/shielding concerns, is used to ensure that current will flow through it, rather than the device's user, if there ever occur any faults and the device's user comes in contact with Wire-1 or Wire-2.  Additionally to this however, Wire-2 and Wire-3 are at some point connected. This is done to ensure that Wire-2's potential remains close to that of Wire-3 .. which seems to be important for some reason.  Now the part I don't understand is why there needs to be a distinction between Wire-2 and Wire-3 at the power socket, if there is none a few meters further down the line.  I have tried to look this up, but all answers I could find so far seem incomplete. The answers depend on how the question is phrased:   If the question is phrased as "Why do we need Wire-3 in addition to Wire-2" the answer is because "Wire-2 may be at a substantial potential difference to its surroundings/user and thus endanger him/her if he/she ever comes in contact with it or Wire-1". If the question is phrased as "Why do we need Wire-2 in addition to Wire-3" the answer is because "Wire-2 is needed to form a closed electrical circuit" or phrased somewhat differently "Wire-2 is needed to create a potential difference to Wire-1 and thus for current to flow" .. with the argument further being that when taking practical considerations into account Wire-3 can't provide a reliable/stable potential difference to Wire-1 like Wire-2 can.   This doesn't really answer why there's a need to differentiate between Wire-2/Wire-3 though, considering how    Wire-3 remains Wire-3 and maintains 0V potential difference to its surroundings/user, regardless of whatever else happens around it .. since that is what it's supposed to do, or phrased differently, since that is the reason for Wire-3 being useful in the first place .. right?   and   Wire-2 is connected to Wire-3   What am I missing here?    Why is it safe to touch Wire-3 but not Wire-2, or why can Wire-3 provide a level of protection that Wire-2 can't?  Why differentiate between Wire-2 and Wire-3 at the power socket but then connect them further down the line?


longtabu and floats: wrong table breaks on pages with floats

I noticed that the tabu package seems to have problems with its longtabu environment, if it is placed on a page, where a float already is placed.  Consider the following MWE:  \documentclass[10pt]{article} \usepackage{longtable,tabu} \usepackage{lipsum}  \begin{document}      \begin{table}         \begin{tabular}{ccc}             Row 1 & Row 1 & Row 1 \\             Row 2 & Row 2 & Row 2 \\             Row 3 & Row 3 & Row 3 \\             Row 4 & Row 4 & Row 4 \\             Row 5 & Row 5 & Row 5 \\             Row 6 & Row 6 & Row 6 \\             Row 7 & Row 7 & Row 7 \\             Row 8 & Row 8 & Row 8 \\             Row 9 & Row 9 & Row 9 \\             Row 10 & Row 10 & Row 10 \\         \end{tabular}     \end{table}      \lipsum[1-2]      \begin{longtabu}{X[l]X[c]}         Test & Test     \end{longtabu}      \lipsum[10]      {         \footnotesize         \begin{longtabu}{|X[-4,l]|X[r]|X[r]|X[r]|}             \hline             Col 1 & Col 2 & Col 3 & Col 4 \\\hline             Lorem ipsum dolor sit & 0.000019 & 0.000000 & 0.000000 \tabularnewline\hline             Lorem ipsum dolor sit & 0.000012 & 0.000000 & 0.000000 \tabularnewline\hline             Lorem ipsum dolor sit & 0.000173 & 0.000000 & 0.000000 \tabularnewline\hline             Lorem ipsum dolor sit & 0.000011 & 0.000000 & 0.000000 \tabularnewline\hline             Lorem ipsum dolor sit & 0.012992 & 0.000000 & 0.000000 \tabularnewline\hline             Lorem ipsum dolor sit & 0.000031 & 0.000000 & 0.000000 \tabularnewline\hline             Lorem ipsum dolor sit & 0.000068 & 0.000000 & 0.000000 \tabularnewline\hline             Lorem ipsum dolor sit & 0.000018 & 0.000000 & 0.000000 \tabularnewline\hline             Lorem ipsum dolor sit & 0.029689 & 0.000000 & 0.000000 \tabularnewline\hline             Lorem ipsum dolor sit & 0.000055 & 0.000000 & 0.000000 \tabularnewline\hline             Lorem ipsum dolor sit & 0.000004 & 0.000000 & 0.000000 \tabularnewline\hline             Lorem ipsum dolor sit & 28.276892 & 0.405603 & 1.560010 \tabularnewline\hline             Lorem ipsum dolor sit & 0.957158 & 0.234002 & 0.702005 \tabularnewline\hline             Lorem ipsum dolor sit & 0.000011 & 0.000000 & 0.000000 \tabularnewline\hline             Lorem ipsum dolor sit & 0.000002 & 0.000000 & 0.000000 \tabularnewline\hline             Lorem ipsum dolor sit & 0.000013 & 0.000000 & 0.000000 \tabularnewline\hline             Lorem ipsum dolor sit & 0.000336 & 0.000000 & 0.000000 \tabularnewline\hline             Lorem ipsum dolor sit & 0.000004 & 0.000000 & 0.000000 \tabularnewline\hline             Lorem ipsum dolor sit & 0.000003 & 0.000000 & 0.000000 \tabularnewline\hline             Lorem ipsum dolor sit & 0.000003 & 0.000000 & 0.000000 \tabularnewline\hline         \end{longtabu}     }  \end{document}   Note that the last table is broken in a wrong way at the bottom of page 1. I guess that the wrong offset for the table break is exactly the vertical dimension of the first table, which is enclosed in a floating environment.  However, I don't know how to fix the wrong table break. I have many pages containing floating tables, but at some places I would like to have long tables with longtabu, as exactly as in the MWE.  Can anybody tell me how to fix the wrong table break?


A specific file on our production servers is being modified at apparently random times which do not appear to correlate with any log activity.  We can't figure out what program is doing it, and there are many suspects.  How can I find the culprit?  It is always the same file, at the same path, but on different servers and at different times.  The boxes are managed by , but the puppet logs show no activity at the time the file is modified.  What kernel hook, tool, or technique could help us find what process is modifying this file?    lsof is unsuitible for this, because the file is being opened, modified and closed very quickly.  Any solution that relies upon polling (such as running lsof often) is no good.      OS: Debian testing Kernels: Linux, 2.6.32 through 3.9, both 32 and 64-bit.


This Super User answer  has got me so far, but now that I have tried many solutions and seen every SO link out there, it's time to ask you all for help.  I am trying to crossfade 2 videos that are 10 seconds each in ts format with audio and video at the same time.   The steps are:   Add complex filter black screen Fade out video 1 after 9 seconds, with 1 second fade duration Fade in video 2 at 9 seconds, with 1 second fade duration Trim black filter output to 19 seconds   This works fine for just video alone, but when I attempt to add audio, I can't get past this error message:     Output pad "default" with type audio of the filter instance "Parsed_asetpts_4" of asetpts not connected to any destination   It appears I'm not connecting the audio output properly. I think I need to alter the [over] lines to include audio. But how do I do this?  `ffmpeg -i vid1.ts -i vid2.ts -f lavfi -i color=black -filter_complex \ "[0:v]format=pix_fmts=yuva420p,\ fade=t=out:st=9:d=1:alpha=1,setpts=PTS-STARTPTS[v0];\ [0:a]\ afade=t=out:st=9:d=1,asetpts=PTS-STARTPTS[a0];\ [1:v]format=pix_fmts=yuva420p,\ fade=t=in:st=0:d=1:alpha=1,setpts=PTS-STARTPTS+9/TB[v1];\ [1:a]\ afade=t=in:st=0:d=1,asetpts=PTS-STARTPTS+9/TB[a1];\ [a0][a1]amix=inputs=2;\  [2:v]scale=720x406,trim=duration=19[over];\ [over][v0]overlay[over1];\ [over1][v1]overlay=format=yuv420[outv]" -vcodec libx264 -y -map [outv] final.ts`


Can Shazam retain full strength even after sharing it with many people?

After sharing powers with his friends Shazam (Billy Batson) still seemed to have all his powers in the movie. Was this the case? Does this mean he can share his powers and create heroes without losing his own?


Suppose $\dim V >\dim W$. Then no linear map from $V$ to $W$ is injective

I know this is fairly trivial but how is $\dim\operatorname{range}T > \dim W$? Basically, can someone explain the first inequality (as well as the second)?  $\mathbf{3.23}$ A map to a smaller dimensional space is not injective Suppose $V$ and $W$ are finite-dimensional vector spaces such that $\dim V>\dim W$. Then no linear map from $V$ to $W$ is injective.  Proof$~$ Let $T\in\mathcal L(V,W)$. Then \begin{align*} \dim\operatorname{null} T  &= \dim V-\dim\operatorname{range} T \\ &\ge\dim V-\dim W \\ &>0\,, \end{align*}


If you start a background program in the terminal with the & option. Will it stop when you close the terminal?


I have a private Github repo, in which I was using .env file. Now I want to make the repo public and I created a commit with removing the .env file so my commit history looks like:   my-repo [master●] % git log --oneline 71846d4 Remove env file. 0e28737 Add README file with some assets f1f672a Stop tracking .env file   Now since I removed the .env content, the modifications still can be seen by checking 71846d4 commit.   Is there anyway I can just remove the commit so we won't be seeing the content of the changes there?


Trouble trying to use Windows Search to search for file with a question mark in the content

It seems that Windows Search is having trouble when I specify a question mark character as the content that I'm searching for within my files.  I've tried:   content:? content:"?" content:"\?" content:\? content:%3f content:"%3f" content:\3f content:"\3f" content:\00\00\00\3F   but each of these yield no results when I do indeed have files that contain ? within the scope of the search. If I instead search for something like content:happy it will indeed find all files with the phrase "happy" within those same files.  My assumption is that Windows Search is treating some characters such as the question mark as a special character likely for the purpose of wild card expressions. To test this theory I've also searched for files containing an asterisk * and indeed I have the same issue as when searching for content of question mark. What I'm wondering is whether there is any way to get a search to work where I can search for a literal expression without any type of wildcard matching or at least a way to escape the special characters within the expression.  By the way I'm using Windows 7 Enterprise.


How can I create QR codes in Ubuntu 16.04?


Binding JQuery click behavior to Ajax returned elements

I'm trying to bind a two-stage click behavior to paragraph elements returned from an ajax call. This is NOT a question about using on(), I get that. I'm trying to figure out why the second part of my statement isn't working.  HTML is:

         <input type="hidden" name="lesson-id" value="25360">         <input type="hidden" class="lesson-day-number" value="25">         25 Lovely Lesson Name         ¥18,000
                  1:30pm - 3:30pm

   JQuery is:  // bind click function // click on lesson to select, click again to de-select jQuery('p.lesson-text').on("click", function() {       if (jQuery(this).not('.lesson-selected')) {            // reset all selections for this day           var dayValue = jQuery(this).children().next('.lesson-day-number').val();           jQuery('p.lesson-text.lesson-selected.' + dayValue).removeClass('lesson-selected');            // add selected class           jQuery(this).removeClass('deselected');           jQuery(this).addClass('lesson-selected');            // set all other lessons for that day to deselected           jQuery('p.lesson-text.' + dayValue).not('.lesson-selected').addClass('deselected');       } else if (jQuery(this).is('.lesson-selected')) {            // reset all selections for this day, remove all deselected           var dayValue = jQuery(this).children().next('.lesson-day-number').val();           jQuery('p.lesson-text.lesson-selected.' + dayValue).removeClass('lesson-selected');           jQuery('p.lesson-text.deselected.' + dayValue).removeClass('deselected');     }   }); // end click function   So the click behavior works fine for the first click. The user clicks on the lesson desired, and the "lesson-selected" class is added. If the user clicks on a different lesson, also no problem. The "lesson-selected" class is added, and all other lessons for that day are marked "deselected". So it seems the top part of the JQuery is working fine.  However, when I click on a p.lesson-text that already has the "lesson-selected" class, nothing happens. It should be clearing the class on that p.lesson-text, and clearing all the other "deselected" p.lesson-text elements as well. What am I doing wrong here? Please help!


Geoserver GeoTiff Raster Layer Turns Shade Pink (Not Pink Error Tiles)


Checking whether a given space is indiscrete or not

Problem  Let X be an infinite set and τ a topology on X with the property that the only infinite subset of X which is open is X itself. Is (X,τ) necessarily an indiscrete space?  So I have to prove that set contains only two elements namely X and $\emptyset$ . It can be shown that sets like X-{x} are not in topology.   How to proceed?


Loop over text file with URLs and execute ping on each

How can I execute four ping requests for each URL from a text file that includes URLs, calculate the average respond time and store the results in another text file?


Modifying private instance variables in Java

So, I came across an example in a Java book I found:  public class Account {     private String name;     private double balance;     private int acctNumber;      public Account(){}      public boolean equals(Account anotherAcc) {         return (this.name.equals(anotherAcc.name)                 && (this.balance == anotherAcc.balance) && (this.acctNumber == anotherAcc.acctNumber));      }   }   We see that the equals method is overloaded and is passed with another  Account object to check if all instance variables are equal. My problem with this piece of code is that it seems as thought we're directly accessing  private variables in the anotherAcc object, which doesn't seem right, but it works. The same thing happens when I make a main method in the same class where I somehow gain access to the private variables.   Conversely, when I create a main method in another class, it's only then I get  a visibility error. My question is, why does Java allow private instance variable to be accessed in a object that is passed in a method? Is it because the object is of type Account and the method being passed to is part of a class called Account?


SharePoint Server 2013 Prerequisites installer on Win Server 2012 R2

I'm trying to install the Prerequisites by running the prerequisiteinstaller.exe but i'm stuck at this Application Server Role, Web Server (IIS) Role: configuration error    I have tried the following:   Do windows update (done with about 60 somthing MB) Adding the roles manually through Server Manager but it turns out that they already been added! Failed with installing KB 2771431, got this msg The update is not applicable to your computer. Tried to do the alternative method Method 2 as mentioned  and also nothing happened    I'm running this test environment on VMWare with 8 G.B of RAM and 120 G.B Hard drive capacity  Please suggest.


How to integrate $ \int \frac{x^2}{(x \sin(x)+\cos(x))^2} \mathrm{d}x$

Evaluate $$\displaystyle \int \frac{x^2}{(x \sin(x)+\cos(x))^2} \mathrm{d}x$$  Can someone just tell me the necessary manipulations? Hints will be enough. Can it be done by integration by parts?


The Wifi is frequently disconnecting in Ubuntu 15.04. My Wireless interface of Ubuntu is RT3290 Wireless 802.11n 1T/1R PCIe  When wifi is disconnected, on iwconfig I got the following  eth0      no wireless extensions.  wlan0     IEEE 802.11bgn  ESSID:off/any             Mode:Managed  Access Point: Not-Associated   Tx-Power=20 dBm              Retry short limit:7   RTS thr:off   Fragment thr:off           Power Management:off  lo        no wireless extensions.   After each disconnection I have to restart network for reconnection by     sudo service network-manager restart


How to swap section number with section title?

is it possible to swap the numbering of the section block with it's title.  \section{Section}   like     Section 1   instead of     1 Section   I use  \documentclass[fleqn,12pt]{article}


Java equal vs == (String Instance Variable)

As I know == basically compares memory location, So I totally understand that line 1 is returning true. But we have not overridden the equal method in class , then why line 2 is  returning true?  private String category = "procedura1"; public static void main(String[] args) {     Lang obj1 = new Lang();     Lang obj2 = new Lang();     if (obj1.category == obj2.category) {  ///  Line 1         System.out.println("Equal");     } else {         System.out.println("Not equal");     }     if (obj1.category.equals(obj2.category)) {  /// Line 2         System.out.println("Equal");     } else {         System.out.println("Not equal");     } }   And Why line 3 of following  returning false?      String a1 = new String("String 1");     String a2 = new String("String 1");      if (a1 == a2) {      // Line 3         System.out.println("True");     } else {         System.out.println("False");      }      if (a1.equals(a2)) {         System.out.println("True");     } else {         System.out.println("False");      }


Passing arguments to LuaLaTeX with LuaSQL

I am using LuaLaTeX with LuaSQL and I have two files which are test.tex and test.lua. When I compile with lualatex test.tex, first test.lua is ran and it reads user values from my database for rows where variable id_user = 3. This variable is set inside test.lua.   So currently every compilation returns values for same user, but I would like to pass user ID at compile time as an argument, like:  lualatex test.tex 2399   This would be for user with id_user = 2399. So the problem here is that I have to pass values to lualatex and not lua itself! How can this be done? Can anyone provide a MWE?


What is the difference between : 1- He was working. 2- He has been working.  I am confused.