What is meant by a continuous-time white noise process?  In a discussion following a  a few months ago, I stated that as an engineer, I am used to thinking  of a continuous-time wide-sense-stationary white noise process  $\{X(t) \colon -\infty < t < \infty\}$ as a zero-mean process having autocorrelation function $R_X(\tau) = E[X(t)X(t+\tau)] =  \sigma^2\delta(\tau)$ where $\delta(\tau)$ is the Dirac delta or impulse, and power spectral density $S_X(f) = \sigma^2, -\infty < f < \infty$. At that time, several people with very high reputation on Math.SE assured me that this was an unduly restrictive notion, and that no difficulties arise if one takes the autocorrelation function to be $$E[X(t)X(t+\tau)] = \begin{cases}\sigma^2, & \tau = 0,\\ 0, & \tau \neq 0. \end{cases}$$  What engineers like to call a white noise process is a hypothetical beast that is never observed directly in any physical system, but  which can be used to account for the fact that the output of a linear time-invariant system whose input is thermal noise is well-modeled by a wide-sense-stationary Gaussian process whose power spectral density is proportional to $|H(f)|^2$ where $H(f)$ is the transfer function of the linear system. Standard second-order random process theory says that the input and output power spectral densities $S_X(f)$ nd $S_Y(f)$ are related as $$S_Y(f) = S_X(f)|H(f)|^2.$$ Thus, pretending that thermal noise is a white Gaussian noise process in the engineering sense and pretending that the second-order theory  extends to white noise processes (even though their variance is  not finite) allows us to get to the result that the output power spectral density is proportional to $|H(f)|^2$.  My query about the definition of a white noise process is occasioned by a  regarding the variance of a random variable $Y$ defined as $$Y = \int_0^T h(t)X(t)\ \mathrm dt$$ where $\{X(t)\}$ is a white Gaussian noise process. The  leads to $$\operatorname{var}(Y) = \sigma^2 \int_0^T |h(t)|^2\ \mathrm dt$$ (as I pointed out in a comment on the answer) if the autocorrelation function is taken to be $R_X(\tau) = \sigma^2\delta(\tau)$ (the engineering definition).  However, the OP on that question specified $R_X(0) = \sigma^2$, not $\sigma^2\delta(\tau)$, that is, the definition accepted by mathematicians.  For this autocorrelation function, the variance is $$\int_0^T \int_0^T E[X(t)X(s)]h(t)h(s)\mathrm dt\mathrm ds = 0$$ since the integrand is nonzero only on a set of measure $0$.  So, what is the variance of the random variable $Y$? and what do readers of Math.SE understand by the phrase white noise process?  Perhaps this question should be converted to a Community wiki?


C# Get a List of Classes in a Namespace per Reflection

I want to use Reflection to fill my Checkboxes dynamically.  I found an helping answer    And used it in my Code:      public static List<System.Type> getModuleList()     {         // fill with all Classes in Timestamp.View.UserControls.ModuleView per Reflection           List<System.Type> theList = Assembly.GetExecutingAssembly().GetTypes()                               .Where(t => t.Namespace == "Timestamp.View.UserControls.ModuleView")                               .ToList();           return theList;     }   I filled my Checkboxes like:      foreach (System.Type type in ModuleController.getModuleList())         {             cbModule1.Items.Add(type);             cbModule2.Items.Add(type);             cbModule3.Items.Add(type);             cbModule4.Items.Add(type);         }    Now i want to create a new Instance of the SelectedType    private void CbModule4_SelectionChanged(object sender, SelectionChangedEventArgs e) {     ucModul4.Content = //new Instance of Selected Item }    I could use Reflection to create a new Instance, but I dont know how.   I want to give every Class a String which will be shown as Item in the Checkbox. Is this possible, or do I need a Method to find a Class by its String?    EDIT: I need to argue why my question differs from   So first of all this question could only solve one of my Problems, but i found it earlier and it didn't helped me. I don't know how to get the type of the list and how i can give the class an alias.


Java: Parse String with starts with 0 sometimes

I am trying to parse a String to Long which sometimes starts with 0. I want that the result maintains the "0" at the beginning of the Long (e.g. 0247484 instead of 247484).  I have tried this Long.parseLong(city.getId()) but it deletes the first "0".  Thank you


I have Fluke 17B+ DMM. When trying to measure DC current, the readings are constantly fluctuating. I tried first with a 9V 1A AC-DC wall adapter and the readings were jumping between 0.485 to 0.300 and then down to 0 A. This pattern keeps on repeating. When I used the same DC source but with a 5V buck converter I get a stable 1A reading. I have tried with different probes and another similar DC adapter but this behavior persists. Unless I use a regulator or measure current in circuit, the current measurement is not stable. Is my DMM gone bad, or could there be some other issue?


How to explain $E=mc^2$ mass defect in fission/fusion?

What is the nature of nuclear energy? This is closely related to the correct explanation of mass defect.  I did some research of that topic and cannot come to a single comprehensive and consistent description.  Below are related statements I gathered or can think of, describing the problem area. To me, each of them seems to make sense, but some of them are contradictory, so obviously - wrong. Please kindly point out and explain these errors.   The more nucleons in a nucleus, the bigger the nucleus is, so the average distance of a nucleon to each another is higher, hence the long-distance electromagnetic repulsion tends to overcome short-distance strong nuclear force, up to the point of occasional alpha decay in elements of transuranic end of the spectrum. The less nucleons in a nucleus, the closer in average they are, so the strong force per each is higher and easily overcomes electromagnetic repulsion. Given (1) and (2), the smaller the nucleus, the stronger it is bound. The stronger the nucleus is bound, the higher its binding energy. The higher the binding energy of nucleus, the more energy is stored per nucleon in the system. The higher the binding energy per nucleon, the more difficult it is to split the atom. The more difficult it is to split the atom, the more stable the atom is. The more energetic a binding, the more difficult it is to break the binding, the more stable the atom made out of such bindings. Natural systems tend to evolve to lower, not higher energy states. The literature presents the binding energy chart per element, with its peak at iron (~56 nucleons). Both the lighter and heavier elements tend to have smaller binding energy. Iron is the most stable element. It is abundant in the universe, as natural atomic evolution tends to get close to it from both ends of atomic number spectrum. The surplus energy in the nuclear reaction is achieved when heavy elements are split (fission), or light element are fused (fusion).  The surplus energy is the energy taken out of the system, i.e. average energy per nucleus is higher before the reaction and lower after the reaction. After the reaction - the resulting elements are closer to the iron atomic number Mass defect is directly proportional to the binding energy. The stronger the binding energy per nucleon, the less mass per nucleon.   Example for neutron, proton and them bound together in deuterium: $$ \begin{array}{c} \begin{alignat}{7} m_\text{n}&=1.008665 \, \mathrm{u} & \hspace{50px} & m_\text{p}=1.007276 \, \mathrm{u}  \\ m_{\text{n}+\text{p}}&=2.015941 \, \mathrm{u} & & m_\text{d}=2.013553 \, \mathrm{u} \end{alignat} \\[5px] \Delta_m =0.002388 \, \mathrm{u} = 2.224\ \frac{\mathrm{MeV}}{c^2} \end{array} $$  The explanation of below (seemingly) contradictions somehow eludes me. Hope it is apparent to you:   why the lightest elements are not the ones which are most strongly bound? Possibly the peak at iron might be caused the geometry factor - i.e. when accounting for nucleons 3D positions, the average forces between them are no longer proportional to just the number of nucleons. why does iron seem to need in its properties: the highest energy per nucleon as the most strongly bound, most stable element; and on the other hand: the lowest energy per nucleon, for the surplus energy be given off when approaching iron in fission/fusion reactions from either side of atomic number spectrum?   Also - what is the definition and explanation of the mass defect:   mass defect is the surplus energy given off from fusion/fission and hence is the difference between total mass-energy of the system before and after reaction mass defect comes from different proportion of mass vs energy in an atom depending on its binding energy. When the binding energy is higher in an atom, the more of the total mass-energy of the system is stored in the binding of the nucleons and less in their mass - and the total stays the same. If so then why does the total mass-energy change after the split/fuse reaction?


Simple analysis problem that is giving me some grief.

I am given a function $f:\mathbb{R}\rightarrow\mathbb{R}$ that has the property that $f(u+v)=f(u)+f(v)$ for all $u,v\in\mathbb{R}$. Then we define $m=f(1)$ and I am asked to prove that $f(x)=mx$ for all rational numbers $x$.  This should be pretty straightforward but I can't quite seem to nug this one out.  What I wrote out so far is as follows: $$f(x)=f(\frac{p}{q})=f(\frac{1_1}{q}+...+\frac{1_p}{q})=f(\frac{1_1}{q})+...+f(\frac{1_p}{q})=pf(\frac{1}{q}).$$ This is where I am stuck.


How can I get a half point size in LaTeX? Many books use 10.5 pt. Setting point size to 10.5 seems to have no effect. Is there a package that can do that?


How to transfer Clash of Clans account from one Game Center user to another

This is not a question about transferring from one iOS device to another (straightforward and addressed at length in . This is a question about transferring from one Game Center account to another. It happens that in my case this is within a given device.  My kid has started to play Clash of Clans on my iPad - under my own Game Center account.   Now I have reconfigured this iPad for him to use, with his own account (which I created in order to use the Family Sharing features.   How do I transfer his CoC village from my Game Center account to his?


Is it "combinations between" or "combinations of" in the following context?

Which preposition should be used with combinations in the following sentence?     We should consider all possible combinations between/of different   versions of A on the one hand, and different versions of B on the other.   Generally, "combination of" seems to be way more popular.        But in the above context, we have different versions on each side of the combination, which is why I think maybe "combination between" is a better choice. So, notice please that the expressions on the one hand and on the other are crucial to the context and thus to my question.


Who is the root user in Ubuntu  or on any Linux based distribution? Is by default the rootpassword for every system running Ubuntu is same.Many documents over WEB supports not to enable root login manually or Graphically?as it has been said that let all applications should run on User level or with Administrative accounts only?


Characteristic function of product of normal random variables

I would like to find the characteristic function of the product of two independent brownian motions. This boils down to the characteristic function of the product of two normal random variables. This is known to follow the product-normal distribution:    but I haven't found an easy proof of this fact. This is proven making use of the Mellin transform, but this questions was in an assignment of a considerably lower level and no mention of the Mellin transform in the lectures either. I would be really happy if someone could help me.


How to compute the limit of the following product?

How to compute $$\lim_{n \to \infty}\frac{1}{n}\frac{2}{n}...\frac{n}{n} $$ ?  Thanks,


\documentclass[letterpaper,11pt]{article}    \vspace{-3pt}\item     \begin{tabular*}{\textwidth}[t]{l@{\extracolsep{\fill}}r}       \textbf{         London School of Economics and Political Science (LSE)       } &           London, United Kingdom \\       \textit{\small          Data Science and Big Data Analytics (Summer School); Grade: A       } & \textit{\small          July 2018 -- August 2018} \\          \end{tabular*}\vspace{-5pt}    \end{document}   How it looks like (see the left misalignment of the two rows)


How can I find unused functions in a PHP project

How can I find any unused functions in a PHP project?  Are there features or APIs built into PHP that will allow me to analyse my codebase - for example , ?  Are these APIs feature rich enough for me not to have to rely on a third party tool to perform this type of analysis?


Since gravity is several orders of magnitude weaker than the rest of the fundamental forces, the force of gravity acting on a single particle is almost *nonexistant. Since there is still a lot left for us to learn about gravity, is it possible that the force is fundamentally undetectable on a quantum scale? Does the Planck distance even correctly apply to this type of situation?


During a trip to Germany in May, I accrued (unknowingly) three speeding tickets from automated ticketing cameras throughout the picturesque countryside. The reason I know that the tickets exist is because of the three letters I received from the rental car company informing me that they will be levying a fee on my credit card, 20 euros for each ticket, for the service of passing along my address in the United States to the respective ticketing agencies. That was at the beginning of July.  Now, more than three months after the violation occurred, I have yet to see any mail regarding these tickets. Do I have any obligation that I'm not fulfilling by just waiting for the tickets to arrive? Will I be blamed for paying them late? Is there a way to pay a ticket that you haven't seen?  Out of curiosity, not because I want to utilize this route, what happens if I don't pay them? What leverage can the ticketing agency apply to get me to pay them? Would that prevent me from renting a car? anywhere or just in Germany?


how to dual boot ubuntu on a pendrive[USB stick ]?

So I have a pendrive with kali linux already installed on it. I want to make it such that i can dual boot kali and ubuntu on the pen drive. Is there any software that I can use?.   I know about xboot, but that only works on windows, and wine emulator can't seem to run it.  I can format and burn the iso through disk image mounter in kali (similar to how it works in ubuntu), by partitioning my pen drive and then burning the iso. Would the bootloader (I'm not sure, but I guess ubuntu default is Syslinux ) recognize it as a dual boot medium ?


Could I replace headphones NIMH battery with Lithium Ion phone battery of the same voltage?

Is it possible to replace a battery for headphones? I would like to replace a 052030 li po battery with a Nokia BL-5C Lithium Ion battery. The li po battery is rated at 130 mAh with 3.7v. The Lithium Ion battery, on the other hand, is 1 Ah with 3.7v.  Thank you for your help.


How do I remove songs from my iPhone 5s running IOS 8.3?

There is a U2 album on my iPhone which I didn't download & isn't on my Mac & I am unable to remove it.  I deleted all Music app storage from the phone, then re-synched with 1 playlist from iTunes on the Mac, but the album still appears on the phone under genres, artists & albums but not playlists.


Dystopian sci-fi where the ozone layer has been destroyed

I remember the novel being set in a somewhat dystopian near future (relative to the mid 80's!) where destruction of the ozone layer forced people to either stay indoor or wear protective clothing.  There was a middle aged female character who may have been a writer that used a cyber implant located around her vocal cords to dictate to her computer by "subvocalizing" her words.  This was considered a commonly used technology in the context of the novel.  Sadly I don't recall the plot, the title, the author or really ANYTHING that could help me find this story!


Protecting unpublished or under review papers from theft

Would you please guide me how can I protect my under review or under revision papers from theft. It is possible that my papers have been stolen and they will be submitted to another journal. maybe a person want to disturb me and submit my papers as I have submitted them. Is it possible to save my papers in a site that demonstrate they are my own papers and I haven't submitted them to another journal simultaneously?


Is 5/10/20/40 a valid mathematical expression?

The Wikipedia article on  says:     If, in a complex fraction, there is no unique way to tell which fraction lines takes precedence, then this expression is improperly formed, because of ambiguity. So 5/10/20/40 is not a valid mathematical expression, because of multiple possible interpretations [...]   The first sentence makes sense, but does the second sentence follow? WolframAlpha , as do popular programming languages.  Is the order of operations not accepted in formal math?


How to SELECT cells from mysql for a HTML table?

I have data for individual cells of a HTML (or excel) table as  CREATE TABLE table_cols ( column_id smallint(5) unsigned NOT NULL AUTO_INCREMENT, column_number tinyint(3) unsigned, title varchar(255), PRIMARY KEY(column_id) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_general_ci;  CREATE TABLE table_rows ( row_id smallint(5) unsigned NOT NULL AUTO_INCREMENT, row_number tinyint(3) unsigned, title varchar(255), PRIMARY KEY(row_id) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_general_ci;  CREATE TABLE table_cells ( row_id smallint(5) unsigned, column_id smallint(5) unsigned, content varchar(255), PRIMARY KEY(row_id,column_id) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_general_ci;   What is the best SELECT query to catch data to be displayed in a HTML table as

 columns titles

row title	 cells

   I don't expert to make the entire table by one query. I get the results by  PHP.


How to develop intuition for conditional probability?

In the video lectures from Harvard's Statistics 110:Probability course that can be found on iTunes and YouTube, I encountered   I tried to summarize it here:  Suppose we are given a random two-card hand from a standard deck.   What is the probability that both cards are aces given that we have at least one ace?   $$ P(both\  aces | have\  ace) = \frac{P(both\ aces, have\ ace)}{P(have\ ace)} $$  Since having at least one ace is implied if you have both aces, the intersection can be reduced to just $P(both\ aces)$  $$ P(both\  aces | have\  ace) = \frac{P(both\ aces)}{P(have\ ace)} $$  This is then just  $$ P(both\  aces | have\  ace) = \frac{4C2\ /\ 52C2}{1-48C2\ /\ 52C2}=\frac{1}{33} $$   What is the probability that both cards are aces given that we have the ace of spades?   $$ P(both\  aces | have\  ace\ of\ spades)=\frac{P(both\ aces, have\ ace\ of\ spades)}{P(have\ ace\ of\ spades)} $$  $$ P(both\  aces | have\  ace\ of\ spades)=\frac{(3C1*1C1)\ /\ 52C2}{2!*\frac{51}{52}*\frac{1}{51}}=\frac{1}{17} $$  Now, somewhere along these examples I got lost...  The latter is obviously just the same as $\frac{3}{51}$, which makes a lot of sense (to me) that this would be the answer. If you are told that you have the ace of (say) spades, then you know that there are $3$ more aces and $51$ more cards.  But in the former example, the math seems fine (and I believe the lecturer wouldn't give this example if it was incorrect...), but I can't wrap my head around this.  How do I get some intuition for this problem?


Why do some apps still get push notifications when there's no data?

I have both Facebook and Instagram blocked from using data on my phone (only WiFi), but I still get push notifications from them when not on WiFi. How and why is this happening, and how do I stop it?


If AB = BA, what shape must A and B have? Assume A and B are matrices.

I'm having a hard time trying to comprehend this. How do I even start on proving the shape?


The task is to find all the Homomorphisms from group $\mathbb{Z}_{20}$ to $\mathbb{Z}_{16}$. My teacher told be that there is an sufficient way to do this, however I've just brute forced it. Do you have any ideas? Would be grateful for the answer also, just to check my own one.


Prove $\sum_{n=2}^{\infty}{\frac{1}{n\ln (n)}}$ diverge

Prove that $\sum \limits_{n=2}^{\infty}{\dfrac{1}{n\ln (n)}}$ diverge  I know it's a well-known series, but all the proofs I've seen are based on the integral test and Cauchy condensation test. I need to prove it using only the following tests: Direct/limit Comparison, Root, D'Alembert, Leibniz, since they are all I have studied so far. Regards and thanks a lot.


How to protect liquid assets from risk of hyperinflation

I don't want to freeze my cash in any medium that would require me to look/wait for a buyer, wait for the collective investment fund to cash my shares as they take their allowance of time to cash them when they are cheapest, or risk the only office within 100km capable of turning my [specific asset] into cash is closed due to some local emergency.  I don't really care about turning profit on my savings, but I know better than leaving them on plain account in my country's native currency on percentage keeping up with current inflation - Hyperinflation has swallowed my long-term savings account once already, and the situation isn't really stable.  What asset is easy to liquefy (even in case of severe local crisis) but immune to local hyperinflation and strong against global crises, plus doesn't lose value over time, or at least loses it slower than cash?


I am a US citizen and want to travel across Europe by myself after graduation, but I wont be 18 yet. Would I have a problem traveling through countries? Is there anything specific I would need from my parents, like a note? Are there places I can stay that I can book by myself, like youth hostels? I want to take the eurorail the whole way, would traveling by myself be a problem?


Why did international wizards not come to help against Voldemort?

There's talk of wizards abroad and we see the students from Beauxbatons and Durmstrang, but if Voldemort really is trying to take over the world of magic, why was there never any sign of any wizard armies from abroad coming over to help?


Remove characters in string before specific symbol(including it)

at the beginning, yes - simillar questions are present here, however the solution doesn't work as it should - at least for me.  I'd like to remove all characters, letters and numbers with any combination before first semicolon, and also remove it too.  So we have some strings:  x <- "1;ABC;GEF2" y <- "X;EER;3DR"   Let's do so gsub() with . and * which means any symbol with occurance 0 or more:  gsub(".*;", "", x) gsub(".*;", "", y)   And as a result i get:  [1] "GEF2" [1] "3DR"   But I'd like to have:  [1] "ABC;GEF2" [1] "EER;3DR"   Why did it 'catch' second occurence of semicolon instead of first?


Is it correct to say that this set $E=(0,1]$ where $E\subseteq R$ (Where $R$ is the set of real numbers) is not closed?


How to use the return of regex match into another regex

text = "I have usd **12** only." var amount = text.match(\(?:USD|usd)\s+.?  \d+\.?[0-9]{1,2}\);    it returns   usd *12   I'm trying to grab the number only out of this return?  Is it possible to use "amount" again like this:  amount.match(\\d+\.?[0-9]{1,2}\);


I'm designing all the figures for a book and I wanted to be able to change the positioning [hbtp] of all of them with one macro/command. A solution in which I could override the existing positioning options would be even better. Is that possible?


I have a table with a primary key set on an id field that uses a sequence to generate numbers as its default value. When inserting records, this works fine and the sequence is correctly updated. However, if I insert records with an id field (e.g. an import from a backup), the sequence is not updated.   CREATE TABLE public.my_table (   my_id integer NOT NULL DEFAULT NEXTVAL('my_id_seq'),   name text,   CONSTRAINT my_primary PRIMARY KEY (myid) );  CREATE SEQUENCE public.my_id_seq    START WITH 1     INCREMENT BY 1     NO MINVALUE     NO MAXVALUE     CACHE 1;   This updates the sequence:  INSERT INTO my_table (name) VALUES ('Bart');   This doesn't:  INSERT INTO my_table (my_id, name) VALUES (12, 'Bart');   Causing problems when the sequence hits 12 and I try to insert without an ID.  Is there a good/standard way to do this automatically? I know MySQL does it in its AUTO_INCREMENT column (which is way I ran into this problem, I came from MySQL). I looked online and found some ways: using a trigger, or manually updating the sequence after inserting, but many of these resources are quite old. Perhaps version 9.1 has some features to address this?


Why do we use "gubernatorial" as an adjective?

Both "govenor" and its adjective form, "gubernatorial", originally derive from the same Latin word "gubernare" (to govern) yet we use root "govern" in all contexts ("govern", "government", "governor", "governing", "governmental"...) except for "gubernatorial."  Why is "gubernatorial" the odd man out?  Also, is this just an American thing? In Australia, we also have governors but I've never heard the word used outside of the context of American politics.


Google Search Console search analytics showing only a fraction of the traffic reported by Google Analytics

My Google Analtyics shows an steady audience of approx 180 visitors a day , most of them coming from organic search. However, Search Console queries show less than 40 clicks a month, which clearly doesn't match the data shown by Analytics.   About three months ago my site used to show more than 4000 clicks a month in Search Console queries, now it shows less than 40 and the audience has not changed, any idea on how to solve this issue?


Boot computer on schedule 2 times per weekday

My setup: I use Ubuntu 14.04 to perform a range of tasks. These tasks are performed whenever I execute a bash script. When it has finished the tasks the computer is automatically shut down (I don't want to suspend or hibernate).  My Question: What is the most convenient way of scheduling booting my computer? I want the computer to boot 2 times per weekday (let's say 9am and 5pm) and execute my script at startup.  I guess that combining rtcwake and crontab is necessary but I am not sure how to do this properly. I am powering of my computer with a python script but I could also execute rtcwake commands in this script if necessary. Also note that my computer cannot rely on wake-on-LAN.  edit: I have seen  but it does not address my question. I know how to boot my computer at a specific time. I would like to know how I can schedule my booting time two times a day only on weekdays.  edit: I have done it myself. I've written a python script that reads the weekdays, hours and minutes from a csv file and computes the number of seconds until the next entry of the list occurs based on the current time. I feed this number to rtcwake and execute the whole thing with python's subprocess module. I am thus able to boot my computer at arbitrary times if I power off my computer with this script. Unfortunately, this question is marked as duplicate. As long as this remains, I want make an effort to provide details.


Imported OBJ doesn't seem to render correct in object mode

i'm very new to Blender so keep in mind that this could completely be my fault ;).    What am I doing wrong, i can't seem to fix this problem. To me it looks like it is a rendering problem, and not a model issue.  I'm using blender on a macbook pro 2016, blender version 2.79b.


Boxcaring is removed from LWC components?

This question is the extension of .  While taking into consideration for LWC implementations, that we do not have equivalent of , I discovered that either imperative or wired apex calls are all invoked parallel and separately - this means there is absolutely no boxcarring. I was testing this in dev org which is still in winter 20 release.  Does this mean that salesforce has released an update which removes boxcarring from LWC? I did not find any documentation which says so.    Added the feedback from salesforce core team in answer


Send fax directly to or from phone without going through a web-based service?

Is there a way to send or receive faxes directly to/from the phone without routing through a web-based service?    There are times when I've needed to send or receive a document image without going through e-mail or a third-party service.  It may be a recipient without an e-mail option for a document I need to submit (e.g., a particular government agency) or it may contain sensitive information that I do not want going through other hands.  When I checked the app store, everything I found seemed to involve a web-based service (I could've missed one, though).  With a device that can take images and make phone calls, it seems like a natural extension of the capabilities to be able to communicate with a fax machine directly.


I'm using \documentclass[11pt]{beamer} with the package Tikzcd but it doesn't work properly with the frames. It gives me the error:     Package pgf Error: Single ampersand used with wrong catcode. \end{frame}


How to remove Ubuntu's automatic internet connection needs?

Imagine that, I have a fresh Ubuntu 18.04 installed. But there are some default packages or services that connects to the Internet without my consent. How to get rid of them completely or make them offline in an effective way?  As far as I now, they are:  popularity-contest - The Ubuntu Popularity Contest (or popcon, in short) gathers statistics determining which packages are the most popular with Ubuntu users.  unattended-upgrades - Automatically upgrades computer with the latest security updates.   apt-daily - Updates apt index every day automatically.   snapd - Updates snap packages automatically.  update-manager - Checks for release updates.  I could be missing something. Please post if you know...  The purpose: I want to have full control over the Internet, as in my case, Internet is limited. So, I wish to update or upgrade manually rather than automatically.


Is there a name in English language for the feeling of being happy something bad happened to someone else rather than you?

Is there a word in English language to express the feeling of being happy that something bad happened to someone else rather than you?   I can maybe describe it best as the opposite of , but I am really struggling to find the right term...    EDIT: There was a suggestion that my question is a duplicate of .  However, they are different in the way that in my question there is no sadistic component to it, or gloating at the misfortune of others. The focus of my question lies in the fact that you feel happy bad thing  happened to the other person and not you. That's why I described it as the opposite of .


What is the idea behind Pauli s exclusion principle?  Why should an electron or any particle having non integral spin obey this principle?


I have read a sentence from “Diary of a Wimpy Kid 4”:     The teachers have really been cracking down on kids copying off of each other this year.   How to understand "off of"? Please parse it.


could someone provide a nice explaination for the following problem. I´m repeating some old exercises and stuck with this one:  I have to prove via induction from $(n-1)$ to $n$ for all natural $n,m$ $\in$  $\mathbb{N_+}$ that relationship: (greatest common divisor)gcd$(2^n-1,2^m-1)=2^{gcd(n,m)}-1$,  and I have to use the Euclidean algorithm.....


Show that there exists no smooth function $f:\mathbb{R}^2→\mathbb{R}$,such that $f(x,y)\geq 0$ for any $(x,y)\in\mathbb{R}^2$, with exactly two critical points$(x_1,y_1)\in\mathbb{R}^2$, $(x_2,y_2)\in\mathbb{R}^2$ and $f(x_1,y_1 )=f(x_2,y_2 )=0$.


Is it possible to remap d to do something other than show the desktop?

I'm using Ubuntu 19.04 GNOME edition. I'm trying to remap d to run rofi instead of showing Desktop, but when I try to remap the keybinding in the Keyboard Settings, it prompts me to enter the keybinding, and when I enter d, it shows the desktop, and I am unable to bind the key to run rofi.


When using the Edge option on the renderer, it creates several-pixels wide borders.     When creating pixel arts, though, it is fundamental never to have 2 black pixels in a row:    How to achieve this effect on Blender?


Editing the question such that it answers itself

Please have a look at . When the question was asked by the OP, it had a scope related problem in the code snippet posted in it. 2 answers were posted for that question. But after the answers were posted, a friend of mine from Stack Overflow, edited the question(not sure with what intention) in such a way that the bug in the code was gone(it actually self answered the question). Please have a look at the question revision history, where I've rolled back the question to the original state, which has the problem in place.  My question is that, should such a practice be allowed/encouraged that an edit to a question renders all the answers posted for that question, totally irrelevant? As anybody who comes to have a look at the question later, will be highly confused as to why a question was asked without any problem and there were so many answers posted to it(not everybody cares to go through the revision history)? I happened to notice that, but not everybody would notice it.


What do I need to do to fix stripped door hinge screw holes?

The door to my basement broke. The bottom hinge has three screws; the top and bottom one turn endlessly. You can see the pictures .  I understand that there's a , where you can put glue and matchsticks or toothpicks into the hinge holes to get additional backing.   In my case, it looks like some pieces of the hinge backing are actually missing. There aren't holes in the wall that I can use cleanly and patch up with matchsticks.  What do I need to do to fix the hinge door -- add additional backing? What can I use, other than the obvious choice of real wood (eg. toothpicks, cardboard)?


Finding N,S,E,W lat/lon at a determined radial distance from an input lat/long

I am working on a project where I geocode a users address to get a lat/lon value. With that value, is there a way to find the latitude and longitude of points that are a set distance (eg. 100m) away in a circle?  This diagram might help explain what I am looking for:


Where to find info on the "service call" shell command?

Using adb shell or a terminal emulator on the device, entering this will clear all notifications (requires su)  service call notification 1   This will send an sms (doesn't require su)  service call isms 5 s16 "PhoneNumber" i32 0 i32 0 s16 "BodyText"   Where can I learn more about service call? I've found  on StackOverflow and appreciate the answer's breakdown as to what everything means. But where can I find info on what method notification 2 might be trying to call?  Running service call was incomplete and printed this usage:  Usage: service [-h|-?]        service list        service check SERVICE        service call SERVICE CODE [i32 INT | s16 STR] ... Options:    i32: Write the integer INT into the send parcel.    s16: Write the UTF-16 string STR into the send parcel.   I ran service list and it came back with 78 services for my device including isms and notification and for most services will print what seems to be a namespace (com.android.internal.telephony.ISms for isms and android.app.INotificationManager for notification). How can I use this information to find out what I can do with each of these services?


I am trying to use the glossaries package for Latex. I have a TexLive 2014 installation on Windows 7.   The CTAN page on glossaries page [ says that the package is contained in TexLive. But when I try to use the package, I get an error saying  LaTeX Error: File `glossaries.sty' not found.  I tried using TexLive manager, but the Glossaries package is not listed here. I couldn't find the glossaries package anywhere in the Texlive folder.  I downloaded the zip file of the glossaries package into my texlive\2014\texmf-dist\tex\latex folder, and ran the installer file (glossaries.ins) from commandline. Now I can see the glossaries.sty in this folder, but I'm still getting the same error.   Is there anything else I need to do to activate the glossaries package?


If $X=f^{-1}(Y)$, is it true that $f(X)=Y$?

Let $f:S\to T$. Let $S\subset X$ and $Y\subset T$. If $X=f^{-1}(Y)$, is it true that $f(X)\subset Y$? Is it true that $f(X)=Y$?   The first claim is true. Pick some $y_0\in f(X)$. Then there exists some $x_0\in X$ such that $f(x_0)=y_0$. By definition of inverse image, $X = \{s\in S: f(x)\in Y\}$. Thus, we have $f(x_0)\in Y$. That is, $y_0\in Y$. This implies that $f(X)\subset Y$.  But I'm not sure about the second claim?


Difference between live and neutral wires

In domestic electrical circuits, there are 3 wires - live, earth and neutral. What is the difference between the live and neutral wires?  As there is AC supply, it means that there are no fixed positive and negative terminals. Current rapidly switches direction. Does that not mean that both the live and neutral wires carry the same amount of current, alternatively? Why is the neutral wire called 'neutral'?


Show that the modulus of a complex number is a norm

For a function $\|\cdot\|$ to be a norm, it must satisfy the following: Let $X$ be a vector space over the field $F$. For any $x, y\in X$ and $r\in F$ N1) $\|x\|\geqslant 0$ N2) $\|x\|=0 \rightarrow x=0$ N3) $\|rx\|= |r|\cdot ||x||$ N4) $\|x+y\|\leqslant \|x\| +\|y\|$ We let $X$ and $F$ in this case to be the set complex numbers $\mathbb C$ I managed N1) to N3) but N4) the triangular inequality just doesn't seem to work for modulus of a complex number, how can I show this?


I can't see the Web page displaying properly. I have been trying to access it since morning but unable to do so because it's not displaying the web page properly. Yes, Meta Stackoverflow is working fine. I'm not even able to login into Stackoverflow.  Browser I'm using: Firefox Latest version on Windows 7 Professional  Attaching the Image of stackoverflow :


note: sorry about the bad formatting, I'm new to stack overflow If I had a piece of code that started like this,   import java.util.Scanner; public class MyProgram {   public static void main(String[] args)     {     Scanner Input = new Scanner (System.in);     System.out.println( "Write either yes or no." );     String message = Input.nextLine();    and wanted to check the String variable "message"'s contents in an if statements, how would I do that? I am thinking about something like this: if( message == "yes" )  By this, I mean checking what the user wrote when prompted to, which is stored as message.


I was trying to make the book in blender but when select 3 faces and trying to inset it evenly I got this that you can see in the picture. in my inset option i have only select offset even please help me...


Is there any way to view which applications are accessing the Internet on Mac OS X?

I think I remember a command line utility that did this, but I can't remember what it's called and a few Google searches turn up nothing.


For loop: my for loop is not executing properly

I'm having trouble getting a for loop in my program to wrok. I'm not sure what I'm doing wrong. I've been working on it for about 3 hours and still have no clue what to do.  I fixed the while statement. That is not the problem. The problem is with the for loop towards the bottom of the code.  Here is my code:      while(!(strSelection=("5")))     {         strSelection=JOptionPane.showInputDialog(                                                     null, "~~Please make a selection from the menu below~~"+                                                     "\n\n1. Add a new advisee"+                                                     "\n2. Update and advisee's information"+                                                     "\n3. Display all advisees"+                                                     "\n4. Display advisees who are cleared to graduate"+                                                     "\n5. Exit"+                                                     "\n\nWhat is your selection?", "Menu", 3);          switch(strSelection)         {             case "1":                  String strString;                 String strHours;                 int iHours;                 String strMajor;                 boolean blnMajor;                 String strIntent;                 boolean blnIntent;                  adv[iCount]=new Advisee();                 adv[iCount].setName(JOptionPane.showInputDialog(null,"What is the advisee's name?","Name",3));                 adv[iCount].setID(JOptionPane.showInputDialog(null,"What is the advisee's ID?","ID",3));                 adv[iCount].setConcentration(JOptionPane.showInputDialog(null,"What is the advisee's concentration?","Concentration",3));                 adv[iCount].setAdvisor(strAdvisor);                 strHours=JOptionPane.showInputDialog(null,"What are the advisee's completed hours?","Completed Hours",3);                 iHours=Integer.parseInt(strHours);                 adv[iCount].setHoursCompleted(iHours);                 strMajor=JOptionPane.showInputDialog(null,"Does the advisee have the major sheet?","Major Sheet",3);                 blnMajor=Boolean.parseBoolean(strMajor);                 adv[iCount].setMajorSheet(blnMajor);                 strIntent=JOptionPane.showInputDialog(null,"Does the advisee have the intent to graduate form filed?","Intent To Graduate",3);                 blnIntent=Boolean.parseBoolean(strIntent);                 adv[iCount].setIntentFiled(blnIntent);                 iCount++;                 iAccum++;                 break;              case "2":                 String strUpdateSelection;                 String strOutput="";                 String strAccumulator="";                 System.out.print(iAccum);                 for(iCount=0;iCount==iAccum;iCount++)                 {                     strOutput=adv[iCount].getName();                     strAccumulator+=strOutput;                 }                  strUpdateSelection=JOptionPane.showInputDialog(                                                                 null,"~~Please select which advisee's information you need to update~~"+                                                                 "\n"+strOutput+                                                                 "\nWhat is your selection?","Information Update",3);                  break;             case "5":                 System.exit(0);                 break;         }      }                                            } }


The Rule of Two dictates that when the Apprentice surpasses the Master in power, becoming the greater of the two Lords of the Sith, the Master has served his purpose. The Apprentice must challenge the Master in open combat, fighting to their utmost, as the final trial: killing the Master and taking his place is the final proof that the Apprentice is indeed more powerful.  This is how Darth Bane, founder of the Rule of Two, defines power when determining how to ensure each master is more powerful than the last.  Darth Sidious, however, violated the requirements of the Rule of Two: By killing his master, Darth Plagueis, in his sleep, he did not go through the trial of a duel to the death to prove he has indeed become the more powerful of the two.  As such, there is a need to search elsewhere for clues to the answer. Is Darth Sidious more powerful than Darth Plagueis, according to Darth Bane's definition of power being battle superiority?  Canon sources preferred.


Allow to re-vote after casting vote as "unclear what you're asking"

EDIT: This is a . Please don't vote to close this as a duplicate of questions which ask how to re-vote; I know you cannot and that's the whole point of this feature request.  Currently it's impossible to re-vote if you retract a vote, but I feel this is insufficient under certain conditions, especially but not only when voting to close as unclear what you're asking. E.g.:   User A posts gibberish nobody understands User B votes to close as unclear what you're asking User A edits and improves the question. It turns out to be a clever question but needs to be closed anyway but for a different and more specific reason, e.g. off-topic or too broad.   I assume that it's frustrating when your question gets closed for the wrong reason and I feel that once a question does get closed all cast votes should be as accurate as possible (if we didn't strive for this there would be no reason to offer different closing reasons to choose from in the first place).


Why doesn't the invisibility cloak block spells?

We know that when a curse hits an object, it bounces off/lights it on fire/makes it explode.  Another jet of green light flew from behind the silver shield. This time it was the one-armed  centaur, galloping in front of Dumbledore, that took the blast and shattered into a hundred pieces  However, we see spells being cast through the invisibility cloak:  Sturgis had Moody’s Invisibility Cloak, right? So, what if he was standing guard by the door, invisible, and Malfoy heard him move - or guessed someone was there - or just did the Imperius Curse on the off-chance there’d be a guard there?   “Petrificus Totalus!”  Without warning, Malfoy pointed his wand at Harry, who was instantly paralyzed. As though in  slow motion, he toppled out of the luggage rack and fell, with an agonizing, floor-shaking crash, at  Malfoy’s feet, the Invisibility Cloak trapped beneath him   He immobilized me, I couldn’t do anything, I  was under the Invisibility Cloak  We also see Harry cast spells through the invisibility cloak:  Harry raised the hawthorn wand beneath the cloak, pointed it at the old goblin, and whispered, for the first time in his life, “Imperio!”   Hidden beneath the Invisibility Cloak, Harry cast a Shield Charm between Neville and Voldemort before the latter could raise his wand.  So why do the curses pass through the invisibility cloak? Even Xenophilius Lovegood explains how powerful the cloak is:  “Ah, but the Third Hallows is true Cloak of Invisibility, Miss Granger! I mean to say, it is not a traveling cloak imbued with a Disillusionment Charm, or carrying a Bedazzling Hex or else woven from Demiguise hair, which will hide one initially but fade with the years until it turns opaque. We are talking about a cloak that really and truly renders the wearer completely invisible, and endures eternally, giving constant and impenetrable concealment, no matter what spells are cast at it. How many cloaks have you ever seen like that, Miss Granger?”  Although he's talking about the cloak's strong concealment, we can still understand how powerful the cloak is, and that it has the ability to block spells. So why don't we see the cloak acting like that?


Show that $\partial_\nu T^{\mu\nu} = - j_\nu F^{\mu\nu}$

In a theoretical physics homework problem, I have to show the following: $$\partial_\nu T^{\mu\nu} = - j_\nu F^{\mu\nu}$$  Where $T$ is the Energy-Momentum-Tensor, $j$ the generalized current and $F$ the Field-Tensor. We use the $g$ for the metric tensor, I think in English the $\eta$ is more common.  I know the following relationships:   Current and magnetic potential with Lorenz gauge condition: $$\mathop\Box A^\mu = \mu_0 j^\mu$$ Energy-Momentum-Tensor: $$T^{\mu\nu} = \frac1{\mu_0} g^{\mu\alpha} F_{\alpha\beta} F^{\beta\nu} + \frac1{4\mu_0} g^{\mu\nu} F_{\kappa\lambda} F^{\kappa\lambda}$$ Field-Tensor: $$F^{\mu\nu} = 2 \partial^{[\mu} A^{\nu]} = \partial^{\mu} A^{\nu} - \partial^{\nu} A^{\mu}$$ d'Alembert operator: $$\mathop\Box = \partial_\mu \partial^\mu$$ Bianchi identity: $$\partial^{[\mu} F^{\nu\alpha]} = 0$$   So far I have set all the definitions into the formula I have to show, but I only end up a lot of terms from antisymmetrisation and product rule. I also drew all what I have in , but I still cannot see how to tackle this problem.  Could somebody please give me a hint into the right direction?


I had to reset my Windows 8 laptop to factory settings because an application downloaded from the Microsoft official page totally ruined the OS and now I cannot activate Windows. When I enter product code in an elevated command prompt I receive a WindowsScriptHost error:     "Run slui.exe on a computer running Microsoft Windows non-core edition     0x2a 0x80070426 to display the error text".   Google told me to check for Software Protection service - when I try to start it, I get: Error 5-access denied, although I am administrator.  Can anyone please help - there must be a solution other than formatting? I am using Windows 8.1 64b on Dell Inspiron laptop.


Relation between omnibus test and multiple comparison?

says     Methods which rely on an omnibus test before proceeding to   multiple comparisons. Typically these methods require a significant ANOVA/Tukey's range test before proceeding to multiple   comparisons. These methods have "weak" control of Type I error.        The F-test in ANOVA is an example of an omnibus test, which tests the   overall significance of the model. Significant F test means that among   the tested means, at least two of the means are significantly   different, but this result doesn't specify exactly what means are   different one from the other. Actually, testing means' differences has   been made by the quadratic rational F statistic ( F=MSB/MSW). In order   to determine which mean differ from another mean or which contrast of   means are significantly different, Post Hoc tests (Multiple Comparison   tests) or planned tests should be conducted after obtaining a   significant omnibus F test. It may be consider using the simple   Bonferroni correction or other suitable correction.   So an omnibus test is used to test the overall significance, while multiple comparison is to find which differences are significant.  But if I understand correctly, the main purpose of multiple comparison is to test the overall significance, and it can also find which differences are significant. In other words, multiple comparison can do what an omnibus can do. Then why do we need an omnibus test?


$H,H'$ normal in $G,G'$ respectively and $G \cong G' $ and $H \cong H' $ $\implies$ $G/H \cong G'/H'$ ?

Let $H$ be a normal subgroup of $G$ and $H'$ be a normal subgroup of $G'$ such that $G \cong G' $ and $H \cong H' $ , then is it true that $G/H \cong G'/H'$ ? Denoting by $f$ the isomorphism between $G , G'$ I tried the map $g(xH)=f(x)H'$ , but this didn't work , I know I somehow also have to incorporate the isomorphism between $H,H'$ . Please help


Can I apply for Romanian and Bulgarian transit visas from Turkey as a non-resident?

I'm a Saudi national. I will ship my bike to Turkey and travel to it by air. I will have a Turkish visa of course. I will then travel on road to Bulgaria aiming to reach Romania. Do I have to apply for visa prior to reaching there or I can get it on road from both borders? I will stay travelling for a month at the most.


How to logout an user from connected app?

Note: 1) I dont want to use /secur/logout.jsp as it will log me out from all the active salesforce sessions. 2) I also dont want to use prompt=login, because if an user has a parallel active session, I want the app to use that session to log in the user automatically. Update: 3) I also tried revoking the access token, after which when I try to login, the previous user is automatically logged in without asking for the credentials.  I am developing a connected app in salesforce that allows users to login through salesforce credentials(using salesforce/services/authorize). However I am unable to find a way to log the user out or end that particular session.  Can someone please help me out on this?


1970s (?) sci-fi book based on Hinduism/Buddhism

Setting: The remnants of Earth (they called it something that started with a "U") Opening: I recall the book opening with someone with a long name who preferred to only keep the middle part of his name: "Sam." Important Plot Points: There is a spaceship which includes the word "India" (I can't remember the name). The crew of this spaceship manages to transfer souls into automatons, Percy Jackson-Daedalus style. Doing this creates an immortal race which recreates the caste system and puts them at the very top. I also remember that there are instances of Hindu gods and goddesses present in this book (I think people that sacrilegiously take their names). Potential Authors: I don't think it's by one of the giants (Bradbury, Asimov, Orwell), but it's by someone less well-known. I feel like I would have remembered the author had it been one of those three. Approximate Publication Date: Probably early 1970s. Read Date: Probably around 2008.


Workaround to create a "link" to a relative path

I've got a zip file in which is presente a folder containing another subfolder containing the executable.  I would like to create a link to the executable but links take only absolute path..  So I need a workaround.


Define a relation $\sim$ on $\mathbb{N}$ as follows. For any $m, n \in \mathbb{N}$, $m \sim n$ if and only if $mn$ is a perfect square. Show that $\sim$ is an equivalence relation. What are the equivalence classes? I have proven equivalence relation but not any sure about what the equivalence classes are.


What is the variance of the weighted mixture of two gaussians?

Say I have two normal distributions A and B with means $\mu_A$ and $\mu_B$ and variances $\sigma_A$ and $\sigma_B$. I want to take a weighted mixture of these two distributions using weights $p$ and $q$ where $0\le p \le 1$ and $q = 1-p$. I know that the mean of this mixture would be $\mu_{AB} = (p\times\mu_A) + (q\times\mu_B)$.  What would the variance be?    A concrete example would be if I knew the parameters for the distribution of male and female height. If I had a room of people that was 60% male, I could produce the expected mean height for the whole room, but what about the variance?


I want to write a batch file to execute a Cmd command with parameters:  @ECHO OFF .\someCommand.exe /log verbose.log   If I only provide the log file without a directory, then, for an undetermined reason, the command writes the logfile into some temporary folder.  So if I want to have logging into the file verbose.log in the same directory the command is in, I would have to call:  .\someCommand.exe /log C:\full\path\to\this\directory\verbose.log   However, that full path changes from system to system, and I want a single batch file that works on all systems (as long as the batch file is in the same directory as the someCommand.exe). How can I get that path into that command line parameter?


How to submit two separate works simultaneously to two conferences when the works are similar in a few parts?

I want to submit two separate works to two different conferences in CS field. The conference deadlines differ only by 3 weeks and one of them would be held in November while the other in September.   The problem is that i designed an algorithm and used that in both of the works. This algorithm is not the essential part of these papers, so i can introduce it completely in paper A as a novel method and just cite and use it in paper B; or vice versa!  But the problem is that at the time of submission, both of them are just submitted works, and i'm not sure if citing a submitted work is acceptable? Especially because if i only cite and use it in paper B, the reviewers cannot read paper A to see the complete proofs. And even i'm not sure which paper may be accepted/rejected!  Also if i introduce the method in both papers as a novel method, then if both of them get accepted they will consider it plagiarism!


Recognize URLs in angle brackets in comments

When I type a URL in angle brackets, such as <;, in a comment, the URL is not detected and linked.  Supporting this would allow links to be used more naturally in the flow of text in a comment.  This notation is recommended for embedding URLs in running text by ; quotes are also recommended (I do not know if quotes work or not).


Using Ubuntu Nautilus (File Manager), how do I get proper context menu items in list view?

I am running Ubuntu 20.04 and Gnome Files (Nautilus) v3.36.3-stable. I prefer the Ubuntu Files to display my files in a List View (with file details) instead of the icon view. However, when I want to right-click and get the context menu that shows more than the items for a specific file, I have to switch to Icon view so I can click "between" the files. File-specific Context Menu Here's a snapshot of the context menu I get in List View.  This is the context menu related to the specific file (and has some missing items).  Folder-Specific Context menu What I'm wondering, is how do I get the folder-specific context menu without having to switch back to icon view each time.  The only way I've found to get to the folder specific menu is to : 1. switch to icon view 2. click "between" the files  Are there other ways to get this (2nd menu shown) menu to show up?


How can I get maximum space to shrink from C drive

I have Bought new laptop which contains only C drive with 915.84 GB of space ,in which 874 GB is free ,when i want to partition the space ,the only available space  to Shrink is 467994 MB [467.994 GB],why it is like ,can any one help me in this ,I need to keep C drive as 150GB and remaining space i want to shrink it to new drives  Thanks in Advance.


How to run a comparison function on items in a list?

I have a list of GPS coordinates. I also have a function which compares two GPS coordinates and calculates a value.  I know I can create a nested loop to run the function on every pair, but this seem inelegant.   Is there a recommended way to run a comparison function on items in a list?  Thanks.


I would to know where can I find free 3d models like the following:   cyclette   monitor   piano  My goal is to make a very large render, where these parts are only small details, so I don't need (if I can find a faster way) to learn how to model them by myself. In other words, my render is an "architecture render" and these are only parts to enrich the render.  Some advice? In your opinion, should I learn how to build them or is there a website where I can take and import them to enrich my render? This question is because I am afraid of spend too much time to model them, when they are only details, not important how they are, I don't know if I am explaining well what I want to say. Thank you and sorry for my bad english!


Explain weird c++ compilation and syntax

Can someone explain why this block of code is valid syntax? Why does it compile?  void foo(){} enum class X { X1, X2 };  int main() {     auto s = X::X1;     foo(),s = X::X2;     return 0; }   Using Apple LLVM version 9.0.0 (clang-900.0.38).  Edit:  The line in question as Some Programmer Dude mentioned       foo(),s = X::X2;


AttributeError: 'int' object has no attribute 'name' while trying to sort a list in python

class Player:     def __init__(self, name, score):         self.name = name         self.score = score     def __str__(self):         return self.name +" " +str(self.score)  n = int(input()) data = [] for i in range(n):     name, score = input().split()     score = int(score)     player = Player(name,score)     data.append(player) sorted(data,key=getattr(player.score,'name')) for i in range(n):     print(data[i])   I am trying to sort a list by using the getattr function. When I try to pass the object in the arguments list I get the following error:   Traceback (most    recent call last):   File    "C:/Users/raghu/.PyCharmCE2018.2/config/scratches/demo2.py", line 15,    in <module>    sorted(data,key=getattr(player.score,'name'))   AttributeError: 'int' object has no attribute 'name'


Convert HTML entities to Unicode and vice versa

How do you convert HTML entities to Unicode and vice versa in Python?


WinXP dir command: 3 and 4 char extensions are the same?

I'm trying to recursively search a directory tree to find all of the .asp files using the following command:  dir *.asp /s   For some reason, this returns not only the asp files, but also the aspx files.  How can I force it to ignore the aspx files?


Why a line is said to have infinite number of points? Is this so because a line is ever lasting or we can not count how many points does it have?  Finite means: Having an end.  Infinite means: No end!  So, if the answer is the first reason viz., line is ever lasting then a closed figure like circle, ellipse etc and even a line segment must be said to has finite number of points that is, we can't count it but they have a limit or simply we can say it's indeterminate! Is that so?


Unable to install Canon Laser Shot LBP 2900B

How to install Canon lasershot LBP 2900b printer in Ubuntu 18.04 LTS 64 bits.


My professor told me recently that Area is a vector. A Google search gave me the following definition for a vector:  Noun: A quantity having direction as well as magnitude, esp. as determining the position of one point in space relative to another.  My question is - what is the direction of area? I can relate to the fact that velocity is a vector. The velocity of a moving motorbike for example, has a definite direction as well as a definite magnitude assuming that the bike is moving in a straight line & not accelerating. My friend gave me this explanation for the direction of Area vector. Consider a rectangular plane in space. He argued that the orientation of the plane in space can only be described by considering area as a vector & not a scalar. I still wasn't convinced. Suppose the plane was placed such that its faces were perpendicular to the directions, North & South for example. Now the orientation of the plane is the same irrespective whether the so called vector points to north or to the south. Further what is the direction of a sphere's area? Does considering area as a vector have any real significance? Please explain. Thanks in advance.


Let $X$ be a variety. Show that if $X$ is irreducible, then the constant abelian presheaf $\mathcal{F}$ with $\mathcal{F}(U)=\mathbb{Z}$ for every nonempty open subset $U\subseteq X$ and $\mathcal{F}(\emptyset)=0$ is a sheaf. Any leads? What does the word "constant" means here?


Better crit chance or crit damage or something else?

I have found when ROS went out a legendary ring with this stats:   429 vit ( rerolled ) 94 all res 7.0% atk speed   I don't remember which stat I rerolled into vit but I do remember I had only 4M thoughness so I was forced to find some survivability somewhere in the gear.  Now I can reach 9.0M thoughness, so I feel confident to reroll vit again into crit chance or crit damage. I don't have any spreadsheet and I'm too lazy to do the math so I'm asking: Which stat is better to look for? Will I get more dps with 6.0% crit chance or with 50% crit damage? Is it better, indeed, min-max damage or some plain dex - using Seize the iniziative as passive it could balance dps and thoughness?   Edit: Crit chance: 30.5% Crit damage: 392%


Theorem 3.6-2 in Erwine Kreyszig's "Introductory Functional Analysis with Applications:" Does the converse hold if the space is not complete?

First, a definition: Let $X$ be a normed space. A subset $M (\neq \emptyset) \subset X$ is said to be total in $X$ if the span of $M$ is dense in $X$. Now theorem 3.6-2 in Kreyszig states the following:  (a) If a subset $M \neq \emptyset$ of an inner product space $X$ is dense in $X$, then $M^\perp = \{ 0 \}$. (b) If $X$ is a Hilbert space and if $M$ ( $\neq \emptyset$ ) $ \subset X$ such that  $M^\perp = \{0\}$, then $M$ is total in $X$.  So far, so good! Now my question is, what if $M^\perp = \{0\}$, but $X$ is not a complete inner product space? Can we find a non-trivial  example of such a set $M$ which is not total in $X$?


Is it possible to get the source code of a (possibly decorated) Python function body, including inline comments?

I am trying to figure out how to only get the source code of the body of the function. Let's say I have: def simple_function(b = 5):     a = 5     print("here")     return a + b  I would want to get (up to indentation): """      a = 5     print("here")     return a + b """  While it's easy in the case above, I want it to be agnostic of decorators/function headers, etc. However, still include inline comments. So for example: @decorator1 @decorator2 def simple_function(b: int = 5):     """ Very sophisticated docs     """     a = 5     # Comment on top     print("here")  # And in line     return a + b  Would result in: """      a = 5     # Comment on top     print("here")  # And in line     return a + b """  I was not able to find any utility and have been trying to play with  for few hours now, but with no luck. Any help appreciated! Why is it different from  This question asks for a whole function source code, which includes both decorators, docs, def, and body itself. I'm interested in only the body of the function. I just love the fact that despite repeating it's not a duplicate, it still got marked as one <3


I am trying to simplify $E[YE[Y|X]|X]$ can I use this property:   $$E[E[Y|X]|X]= E[Y|X]$$  If yes I have never seen a Proof of this property (that seems very reasonable), could I have a reference? If I am right the correct result would be $$E[YE[Y|X]|X] = E[(Y|X)]^2$$


Software Updater requires installation of untrusted packages from unauthenticated sources

I use Ubuntu 14.04 Desktop Edition. Now I see Software Updater's message that it must be updated. Then I get a message  requires installation of untrusted packages from unauthenticated sources   What's going on here? How can I solve it?


How do I rename multiple files on Windows?

I have 2800 files, all of whose names start with a four-digit number followed by " - ", and I want to delete all those leading numbers from all the files, leaving only the alphanumeric file names1.  How can I do this? ________________ 1 Some of the filenames contain numerals after the " - ".


How to delete an array in an object in Javascript? For example I want to delete:  RandomObject.array = [];   So that when I use RandomObject in ways such as copying it into another object, the array is not included.


How to derive the formula for $\sum_{n=0}^{\infty}\tan^{-1}(\frac{x^{2}}{n^{2}})$

How to derive the formula   $$\sum_{n=1}^{\infty}\tan^{-1}\left(\frac{x^{2}}{n^{2}}\right)=\tan^{-1}\left[\frac{\tan\left(\frac{x\pi}{\sqrt{2}}\right)-\tanh\left(\frac{x\pi}{\sqrt{2}}\right)}{\tan\left(\frac{x\pi}{\sqrt{2}}\right)+\tanh\left(\frac{x\pi}{\sqrt{2}}\right)}\right]$$   Is the formula correct? How do I derive the above formula? I tried to apply the formula integral as the limit of sum formula.


With REST recursively retrieve file and folder directory structure

I have a site which is running under SharePoint 2013. Via REST I am trying to retrieve the file and folder directory for that site. There are several similar questions on this site related to recursively retrieving all of the files and folders for a given a folder:       The answers provided therein led me to the following URI:     /_api/web/Lists/GetByTitle('Documents')/Items?$expand=Folder&$select=Title,FileLeafRef,Folder/ServerRelativeUrl   Which from what I can tell does retrieve all of the files and folders from the given starting path.  However, I am missing something. When reading through the returned XML I cannot figure out where a given file goes. Meaning that I have info on how to retrieve file bros.pdf, but cannot determine that it is in the documents/super/mario/ folder.  For the file items I've tried to retrieve the ServerRelativeUrl property, but have not succeeded though the folders seem to. Is there some identifier in the XML that I am missing? When doing a recursive RESTful query how do I determine where a given file belongs?


block/restrict/Provide access to IP range in SP 2013

We have Internet facing site in SharePoint Online, we want to block some IP range and we want to provide access to certain IP range and also we want to restrict some IP range. Is it possible in SharePoint Online? or in in Windows AZURE (On-Premise)?


How to use all view and helper methods inside of Rails console for Rails 2.x and 3.x?

helper.method_name worked in some version of Rails... are there ways that work in both Rails 2.2.2, 2.3.5, and 3.0.1?  (to use all view and helper methods)


Is "you might have already had dinner" correct order-wise?

I said this to a friend of mine, but I am not sure whether it is correct or not, in terms of word order.  You might have already had dinner.  Or maybe the correct way is: You might already have had dinner?  Thank you.


Can I use spam and RA flags interchangeably?

If I flag trolling as spam, or flag spam as rude or abusive, will that be a big deal? Sometimes I come across a malicious post but at first glance I can't tell whether it's spam or trolling. In that case, should I flag it as either and move on, or spend time trying to determine whether it is spam, or whether it is offensive or trolling and flag it appropriately? If they can be used interchangeably, why are they distinct flags?


Not bounded function in $W^{1,1}(\mathbb{R})$

I have seen in page 627 (Exercise 1) of Taheri's book: Function spaces and partial differential equations that if $n\geq2$, then $W^{1,n}(\mathbb{R}^n)$ does not embed into $L^\infty(\mathbb{R}^n)$. But, can we say when $n=1$? Is there any not bounded function in $W^{1,1}(\mathbb{R})$?


How to derive a general formula about the number of n*n nonsingular matrix under one constraint?

If there is an n-by-n matrix, each element in the matrix can only be 1 or 0. We assume that an n-by-n matrix is nonsingular, then we do the two's complement at only the diagonal of the matrix. After I do the two's complement at the diagonal, an n-by-n matrix is still nonsingular. How many numbers of this kind of matrices can be found in an n-by-n matrix??? Can we derive a general formula?? If n=2, I can derive the number of this kind of matrices is 2, n=3, the number of this kind of matrices is 48. But I have no idea whether it exists a general formula when we expand to the n-dimensional matrix.


Using a command to test when a player eats something

Is there some kind of command that I could use to test when the player eats something, then after the player has eaten that thing, give them 2 hearts? I have a feeling it might be a testfor command....


In a ring $R$ with identity 1, show that $$a(-1) = (-1)a = -a \qquad\forall\, a \in R$$ I have started with $a + (-a) = 0$ but cant proceed from here.


Is keeping a laptop connected to power supply harmful for its battery?

I heard that charging a Li-Ion battery all the time is practically harmful for the battery and significantly reduces its useful capacity over time. Is this true? Should I disconnect the power cord from my laptop every time it isn't used for a long period of time, for example, at night?  If the answer is yes, does it apply to only bigger batteries or to smaller ones (for example, cellphone, tablet) too?


UK visa for parents and sister from Ghana to attend graduation refused V4.2 (a) and (c) - should we reapply now?

I applied for a visitor visa for my parents and sister to attend my PhD graduation in July and to visit my family for 3 weeks but they have all been refused under V4.2 (a) and (c) - see refusal letters below. Some of the reasons are simply mistakes on my part and that of my parents/sister. I am just wondering whether addressing these issues and reapplying is worth it. For instance I forgot to add my birth certificate to show that they are my parents and my parents did not add their bank statements and land/house documents because apparently they were not asked at the VAC. Is there any hope with reapplying? My graduation is on 17th July and I very much would like for them to be here and to see their grandchildren (which I also stated in the cover letter).   The relevant portions of my parents refusal letter are:      Should we go ahead and reapply now with the right documentations or is it a waste of money and hope? I feel we can easily address their issues but I do not know if that will be enough or they will come up with some other grounds. We plan on adding the land title certificate, rent income book and house valuation as evidence of my parents' ties to Ghana. Will there be grounds to say they do not earn enough money even though there is monthly pension payment for my Dad? I have a very small time window before my graduation is up.


Why is it that if I multiply a certain number of consecutive primes starting from $2$ and add $1$, I get another prime?   This property is used it prove that there are infinitly many primes, but why is it correct?


"Notes from my heart", what do you call these writings in English?

There are many blogs in which people including who are in love, write their own opinions, stories ,... about life, love ,... ( good or bad aspects)      We call these kind of writings "notes from (my )heart" in Persian, and it implies:" I have written these words just for the sake of my own heart and from the bottom of my heart, no one is obliged to accept or read them!"    PS: These people /bloggers might write to the God, to an imaginary beloved, to a dead person, ..., and they don't necessarily write love notes, they might complain, or confess, or just simply report their daily life events. Actually,they don't care for the number of visitors of their blogs, they write because this gives them, kind of, tranquility.  What do you call these kind of writings?   Something like this:   Please don't close my question!, I'm not looking just for "Billet Doux" , I want to know a more general phrase!


Setting variable to .getWidth() method returning nullPointerException

In my program, I'm trying to set x and y values to game.getWidth() so that I can access those variables elsewhere. The issue is that when I run the program those variable declarations throw a NullPointerException. I'm not sure exactly why these are causing an error. Is there a way I can fix it?   package data;  import java.awt.Color; import java.awt.Graphics2D;  public class Star {  private float mass;   public Star(Game game) {     this.game = game; } private Game game;  //These variables cause the NullPointerException  private int x = game.getWidth() / 2; private int y = game.getHeight() / 2;    public void paint(Graphics2D g) {     g.setColor(Color.WHITE);     g.fillOval(x, y, 12, 12);     g.setColor(Color.BLACK); }   public float getMass() {     return mass; }   public void setMass(float mass) {     this.mass = mass; }   public int getX() {     return x; }   public void setX(int x) {     this.x = x; }   public int getY() {     return y; }   public void setY(int y) {     this.y = y; }  }


Derivation of Family of Circles Meeting at Two Points

We know the formula of "family of circles intersecting at two points" as follows: $$x^2 + y^2 + D_1 x + E_1 y + F_1 + \lambda (x^2 + y^2 + D_2 x + E_2 y + F_2) = 0, \qquad \lambda \setminus \{-1\} \in \mathbb{R}$$ I could not find any rigorous derivation of the formula, which might involve theorems (linear independence, orthogonality of vectors by dot product) from linear algebra, vector algebra, etc., other than simply multiplying one of the circle equations known to intersect at two points by $\lambda$.  Question: How can we can derive the formula in a more rigorous way if possible?


NullPointerException when setting onClickListener in a Fragment

I am trying to create a DatePicker dialog that opens when a button in my dialog made from a custom layout is pressed. I have tried many different configurations of code and the result when the button is pressed is always either a NullPointerException or the button does nothing. I am pretty new to android programming but my best guess is that findViewById is not able to find the button because I am working in a Fragment and the content view is not specified. I tried to use setContentView but that wasn't working. Hopefully someone can figure this out and let me know how they did it!  NewTaskDialogFragment.java:  public class NewTaskDialogFragment extends DialogFragment implements         android.view.View.OnClickListener {     public int mYear, mMonth, mDay;     public static final int DIALOG_ID = 0;     private Button btn;     private View dialogView;       public Dialog onCreateDialog(Bundle savedInstanceState) {         Context context = getActivity();           AlertDialog.Builder builder = new AlertDialog.Builder(context);           LayoutInflater inflater = LayoutInflater.from(context);          dialogView= inflater.inflate(R.layout.new_task_dialog, null);         builder.setView(dialogView)          ;         btn =(Button) dialogView.findViewById(R.id.datePickerDialogButton);         showDialogOnButtonClick();          return builder.create();     }     public void showDialogOnButtonClick(){            btn.setOnClickListener(new View.OnClickListener() {             @Override             public void onClick(View view) {                 getActivity().showDialog(DIALOG_ID);             }         });     }      private DatePickerDialog.OnDateSetListener dpickerListener             = new DatePickerDialog.OnDateSetListener() {         @Override         public void onDateSet(DatePicker view, int year, int monthOfYear, int dayOfMonth) {             TextView dateDisplay = (TextView) getActivity().findViewById(R.id.dateDisplayBox);              mYear = year;             mMonth = monthOfYear;             mDay = dayOfMonth;             dateDisplay.setText(mYear + mMonth + mDay);         }     };      @Override     protected Dialog onCreateDialog(int id){         if(id == DIALOG_ID) {             return new DatePickerDialog(getActivity(), dpickerListener , mYear, mMonth, mDay);         }else{             return null;         }     }       @Override     public void onClick(View view) {      } }


Recently I am getting some referrals traffic which are everyday changing their name (I am blocking them everyday from GA). First few days their name was example.xyz but now they are using various name. All the traffic's are coming from Russia. They are only landing to / and nowhere. How can I identify that it's a spam traffic or not?


How to avoid multiple "of-phrase" in a sentence?

I am writing a scientific article, Please suggest me an alternative to sentence below to avoid "of" phrase multiple times.      The polarization and rotation angle of BO6 octahedron of some   perovskite materials are listed in table


When asking questions, guidelines sidebar overlaps with footer when scrolled down

Related:      When asking questions on Meta Stack Exchange, sidebar overlaps with footer and since its background is transparent, its text is not legible. In most SE sites, like Stack Overflow, it has an opaque background so there's no problem, but on Meta Stack Exchange itself, it doesn't have a background. See these two pictures:  Asking a question on Stack Overflow:    Asking a question on Meta Stack Exchange:


getting error in jfree chart , getting null vaue from xyplot (what can be return by xyplot and dateaxis method)

Exception in thread "main" java.lang.NullPointerException: Cannot invoke "com.Users.np.JFreeChart.getXYPlot()" because "this.chart" is null at com.Users.np.NewMain.loop(NewMain.java:277) at com.Users.np.NewMain.main(NewMain.java:132)


How To precisely identify my Beep sounds? BIOS Beep Codes for Desktop Boards - What do these actually sound like?

Trying to sort through a bunch of old machines with various errors and variety of sounds while booting, including BIOS beep sounds.   At times, instead of clearly pointing to one "condition", I have to place the beep sounds in various (ambiguous) buckets, leaving me confused.    Is there a reference audio repository for this entire list?      Can someone point to an actual clear recording of these sounds?        BIOS Beep Codes for Desktop Boards   Last Reviewed: 10-May-2016   Article ID: 000005473        The BIOS uses audible beep codes or visible blink patterns to signal   status messages and error messages indicating recoverable errors that   occur during the POST.        Click  on the questions to expand the content:         Audible beep codes   Visible LED blink patterns   Beep codes for discontinued (legacy) desktop boards      PS: The linked duplicate is for a specific sound on a specific piece of hardware.   I am/ was looking for an Audio reference, not just a textual reference of how "ALL codes" sound as I have a bunch of machines down that need to be checked and the textual chart (Intel link) is not always clearly translatable from the variety of Audio sounds that at times are not a clear one to one on the text/ table reference. Looking for a General Audio reference chart if any.


How do I resolve samba share to IP address or host name

I have a list of hosts in the network providing shares via SAMBA. How can I determine either IP address or the host name of one particular host, e.g. the one with the name “SASAK02”.  The output of smbtree is as follows  WORKGROUP     \\SASAK02                    \\SAURA-PC1                  \\PC-VAN-DAMME


How does the power button shut the computer down without root permission?

When I try to shutdown the computer from a command line or terminal I must have root privileges:  amy@amy:~$ shutdown now shutdown: Need to be root   and  amy@amy:~$ halt halt: Need to be root   but when shutting down using the graphical user interface, i.e. shutdown button, or the hardware shutdown button, I'm not asked for the password to do so. What does that shutdown for the graphical interface, and why it doesn't need the password or root privileges?   I'm using Ubuntu 11.04 Natty.


Books / Guides / Courses for mixed model?

I have started working for a pharmaceutical firm as a junior statistician recently . In the daily basis I work with lots of studies where I have to apply the mixed models in order to demonstrate the equivalence or difference between 2 groups, given the experimental design (with presence of random factor, repeated measures, etc). Tbh I feel a bit lost, that is why I am looking for some books / courses so I can learn more about the mixed model. Below are what I would like to achieve:  For a given design, know what to put in the model (e.g in SAS know how to write the model with the right syntax). I would also like to know how to set up a specific design in order to respond the request of the client. Understand the formulas and calculation, be able to interpret the results and to troubleshoot if there are problems.  Any suggestion would be greatly appreciated. Thank you


Can computer power supplies use North American 240V (hot-hot-ground)?

Simple question: Most computer power supplies are auto-sensing between 110V/120V and 220V/240V. This begs the question, can they use 240V in North America i.e. connected to both hots (red and black)?


When writing a letter to officials you don't know the sex of, do you say Dear Madam / Sir or Dear All?  How do you avoid the fact that you don't know the sex of the official(s) to whom you are writing?


Get the reference to the class object of an anonymous inner class

How do you get the reference to the class object of an anonymous inner class in Java?  With non-anonimous class it is done with ClassName.class.


How to determine how good our generator of random numbers is

I am using SecureRandom class in java with default constructor and after i run it four times and each times i will take back 4 "supposed highly secured random numbers" .  First run : -35 -43 -127 12  Second run:-123 114 4 55  Third run:39 -19 3 -51  Fourth run: 111 -48 -50 55  Now i want to know is there any statistical analysis which i can decide if these generator provide me "good" random numbers . Or i just simply can decide it by eye just seeing that in each run we will not take let say the same value twice or three times . According to Scott Adams and others is impossible to proof how good a generator of random numbers is but if it produce you let say for numbers in range 0-15 and you roll this four times and get 4 nine than it probably is not so good. Anyway i am not sure how to determine if my generator is good or not and i will appreciate any feedback,  Thanks in advance


BibLaTeX - change how citing shows the pages

I'm using the code in the end and I'm having this result:   I'd like to change the format of the pages just in the citation, and not in the bibliography, to:  (Nunes, 2013: 6-7)  I've tried reading the biblatex package pdf and even looking at the biblatex_.def but my LaTeX knowledge is small and failing me.  PS: Why is the space missing before the google maps link?  \documentclass{article} \usepackage[portuguese]{babel} \usepackage{csquotes} \usepackage[backend=biber,style=authoryear,dashed=false,backref=true]{biblatex} \renewcommand\nameyeardelim{\addcomma\addspace} \DefineBibliographyStrings{portuguese}{%   url={Disponível em}, } \DeclareFieldFormat{url}{\bibstring{url}\addcolon\space\url{#1}} \DeclareFieldFormat{urldate}{\mkbibbrackets{#1}}  \addbibresource{\jobname.bib} \usepackage{filecontents}  \begin{filecontents}{\jobname.bib} @online{WHO1,     author = {World{\ }Health{\ }Organization},     shortauthor = {WHO},     title = {The Ottawa Charter for Health Promotion},     year = {1986},     url = {http://www.who.int/healthpromotion/conferences/previous/ottawa/en/},     urldate = {2015-03-31}, }  @online{Google,     author = {Google{\ }Maps},     note = {Servico online},     year = {2015},     url = {https://maps.google.com/},     urldate = {2015-04-01}, }  @thesis{Nunes,     author = {Nelson Filipe Nunes},     title = {Planeador colaborativo de deslocacoes de bicicleta em meio urbano},     year = {2013},     institution = {Instituto Superior Tecnico, Universidade de Lisboa},     location = {Lisboa, Portugal},     note = {Dissertacao para obtencao do Grau de Mestre em Engenharia Informatica e de Computadores},     pages = {10-20}, } \end{filecontents}  \begin{document}  \parencite{WHO1} ... \parencite[6-7]{Nunes} ... \textcite{Google}  \printbibliography  \end{document}


How to remove duplicates from a given sample string?

s = "aadarsh , aravind aadarsh," st=s.split() lst=[] for i in st:     if i not in lst:          lst.append(i) print(' '.join(lst))  this is my program but am not able to get my desired output My sample string is s = "aadarsh , aravind aadarsh," and my output should be -> aadarsh , aravind and all the duplicates should be removed including commas as well how to do it.


Defining new unit (year, century) in siunitx

I'm having a hard time figuring out the LaTeX commands to define new units of year and century in siunitx.  I'd like to write \SI{3}{\cm\per\year} and have it show: 3 cm yr-1, or \SI{42}{\micro\meter\per\century} become 4.2E-5 m/century


I set all my power settings to "always on", but the power to my monitor is turned off routinely after ten minutes.  I've tried everything from settings in the control panel to settings in monitors - nothing affects this, including the "automatic sleep inhibitor" I keep on the taskbar.  Any suggestions?  I would like to be able to watch a long video without having to move the mouse every ten minutes.


if its already open, show the existing application instead of opening another one

I have an application that minimizes to icon state when user press close. I want to make application show again when user tries to open the app, instead of just opening the app again. I thought of using settings: A boolean value, true if the app is opened and false if it isn't but that would mean you should set it to false when user closes app and true in the load function. But since close event doesn't run when program crashes, that would make program un-openable (:D?), and i have no idea how to call events between two programs. TL;DR: Show the app to user instead of opening it twice when user opens program again, just like Discord. Thanks!


Compactness and sequential compactness in metric spaces

I've got a question: I'm trying to prove that every metric space is compact if and only if the space is sequentially compact. In all the proofs I have found, they used the Bolzano-Weierstrass theorem. Is there a way to prove this fact without using Bolzano-Weierstrass?  Thanks so much!!


How do I plan a long range product with microcontroller that needs long term support?

I need to use a microcontroller on a system that must stay working without major changes for a long time (decades). To ensure that there always will be replacement parts, I need a microcontroller that will be long run produced or produced by some manufactures in a firmware binary and encapsulation pin compatible way. What can I do to ensure that the microcontroller I choose meets these criteria?  The application doesn't need much computing power. Its aim is to control motors and other industrial systems. A microcontroller of 8 bits capable of changing the state of about 8-16 IO pins at a frequency of 0.5-1 MHz is OK. An ADC may be valuable, but can be replaced by a simple external comparator.


How can one validate 'recordEditForm' fields before submitting them to the platform?

In a custom lightning component where one is using the recordEditForm tag, how can one validate fields that are filled by the user?  For example, in a quick action to create a Case record, we can have the following line inside the recordEditForm:  <lightning:inputField aura:id="caseAccount" fieldName="AccountId"/>   How can one enable or disable a button if certain fields are assigned by the user? Like if the account is specified, then a button on the component is enabled for the user.  Making the field required is not an option.


why "Exception in thread "main" java.lang.ClassCastException" in this case?

base.buffer.length in the main method throws an exception, whereas isFull method works, can someone please help me understand what is going on?  package chp14;  public class BaseBoundedBuffer<V> {     private final V[] buffer;     private int head, tail, count;      public BaseBoundedBuffer(int capacity) {         this.buffer = (V[]) new Object[capacity];     }      public boolean isFull() {         return buffer.length == count; // But this works     }      public boolean isEmpty() {         return count == 0;     }      public static void main(String[] args) {         BaseBoundedBuffer<String> base = new BaseBoundedBuffer<>(10);         System.out.println(base.isFull());         int count = base.buffer.length;         // This line throws an exception, but the method isFull works, why?         // Exception in thread "main" java.lang.ClassCastException:         //      java.base/[Ljava.lang.Object; cannot be cast to java.base/[Ljava.lang.String;         //          at chp14.BaseBoundedBuffer.main(BaseBoundedBuffer.java:21)      } }


java socket programming - java.lang.nullpointerException

I have implemented a server client chat program using GUI. When the server is run, the client tries to connect to the server. When connection established, each one sends a message first, then chat, i.e, in my case, the client send the server a msg "client" and then the server sends a msg "server". Then they can chat. Problem is the server receives the msg "client" and the client does not receive the msg "server". At client console, nullpointerexception is occurred. And after that, only the server can send messages to the client and it is displayed at client side.  The codes are shown below and an image is attached for the GUI. Both client and server have same interface. Note that codes for GUI components are not shown for simplicity. The method private void msg_sendActionPerformed is for the SEND button - see the GUI image.   error: Exception in thread "main" java.lang.NullPointerException at chatapp.client.main >> chatmate.setText(sss);   import java.io.*;  import java.net.*;   public class server extends javax.swing.JFrame {   static ServerSocket ss; static Socket s=null; static PrintStream p; static BufferedReader b;   private void msg_sendActionPerformed(java.awt.event.ActionEvent evt) {                                                String m;     m=msg_text.getText();     p.println(m); }                                               /* Create and display the form */     java.awt.EventQueue.invokeLater(new Runnable() {         public void run() {             new server().setVisible(true);         }     });      String msgin;     ss = new ServerSocket(444);     s=ss.accept();      p = new PrintStream(s.getOutputStream());     b = new BufferedReader(new InputStreamReader(s.getInputStream()));     String sss = b.readLine();     chatmate.setText(sss);     p.println("server");      while (!(msgin=b.readLine()).equals("exit"))     {           msg_area.setText(msg_area.getText()+"\n"+msgin);       } }   }   package chatapp;   import java.net.*;  import java.io.*;  public class client extends javax.swing.JFrame {  static Socket s; static PrintStream p; static BufferedReader b;   private void msg_sendActionPerformed(java.awt.event.ActionEvent evt) {                                              // TODO add your handling code here:     String m;     m=msg_text.getText();     p.println(m); }                                                /* Create and display the form */     java.awt.EventQueue.invokeLater(new Runnable() {         public void run() {             new client().setVisible(true);         }     });      s = new Socket("localhost",444);     p = new PrintStream(s.getOutputStream());     b = new BufferedReader(new InputStreamReader(s.getInputStream()));     p.println("client");     String sss= b.readLine();     chatmate.setText(sss);     String msgin;     while (!(msgin=b.readLine()).equals("exit")) // waits until gets msg     {          msg_area.setText(msg_area.getText()+"\n"+msgin);       }  }   }


How can I check if two lines (created with function love.graphics.line) are crossing themselves? I may use this ability to create procedural maps via graphs.


Running python script in current python file

I am making a program that uses python and the Weather.gov API found  that can fetch active weather alerts. I have that system working, and posting all active alerts to Discord.   What I want to do now is to have my other python script that makes the alert tones for my radio equipment automatically take the information (E.G. a Tornado Warning) and automatically generate whenever an alert is found.   Ths issue is that I need to run a python file from another one, and all the examples seen  use functions within the script. I need to run the file as a whole.   my current code takes the data from the API like so:  url = "https://api.weather.gov/alerts/active?status=actual&message_type=alert" response = requests.get(url) weatherFeed = json.loads(response.content) weatherFeed2 = weatherFeed['features'] updated = weatherFeed2[0]['properties']['id']  #Use this line to debug if no data is coming through the line... ##print(weatherFeed)   firstAlert = open("WP.txt", "w") firstAlert.write(updated) firstAlert.close() firstAlert = open("WP.txt", "r")   print("First Alert - Recieved at " + time.strftime("%m-%d-%Y %H:%M:%S", time.gmtime()) + " GMT  -  ID: "+updated) print(''' ==========================================================  ''' + weatherFeed2[0]['properties']['event'] + '''  Sent: ''' + weatherFeed2[0]['properties']['sent']) if (weatherFeed2[0]['properties']['ends'] != None):   print("Ends: "+weatherFeed2[0]['properties']['ends']) print("") if (weatherFeed2[0]['properties']['description'] != None):   print("Event Description:"+weatherFeed2[0]['properties']['description']) if (weatherFeed2[0]['properties']['instruction'] != None):   print("Instructions: "+weatherFeed2[0]['properties']['instruction']) print(''' SAME Codes: ''' + ' '.join(map(str, weatherFeed2[0]['properties']['geocode']['SAME'])) + '''  ========================================================== ''')   And I need to use the data I get, specifically the alert type weatherFeed2[0]['properties']['event'] and the SAME codes weatherFeed2[0]['properties']['geocode']['SAME'] to run another python file like so:  easencode.py -o WXR -e (EVENT CODES) -f (SAME CODES) -d (DURATION) -t (CURRENT TIME) -c "WACN    " -x yes "%cd%\Output\ALERT.wav"  How would one go do this?


Convert pdf text with only superscript and subscript formatting elements to LaTeX

I have a long text in pdf with lot of sub and super scripts and need to have it in LaTex.  Sorry I could not find something working in previous answers on converting pdf to latex. (OS Windows 7)  Now I found that both abiword and Writer2LaTeX works good with sub and superscripts. The confusion for me was how to use them starting from pdf. Sorry for everybody who spent time for my question and THANKs.


I have installed in several computers (windows 10) Ubuntu 16.04 using a boot USB. Until now I have used the default settings for the partitions during installation. That is, in the picture below I choose the first option (Install Ubuntu alongside Windows) and let Ubuntu do the job.     However I have a computer with 250 GB hard disk. 100 GB are used already so they remain 150 GB from which I want 30 GB for Ubuntu.  How can I do this? I guess through the last option in the picture (Something else) but still I cannot figure out the proper and safe way.


Could anyone offer a proof that  $$ \cos^2(x)\cosh^2(y) + \sin^2(x)\sinh^2(y) = -1 + \sin^2(x) - \sinh^2(y)? $$


What do we know about black hole and its existence?

Yesterday, I had an exchange with my colleague about a black hole. His theory was that black holes were merely an imaginary construction that is purported to have some mathematical meaning. Is what he said true? If not, how do we know about black holes' existence and what properties do we know about them?


What is significance of silver smoking apparatus during Order of the Phoenix?

In Order of the Phoenix, Dumbledore uses a small silver instrument that puffs pale green smoke and shows him a snake, to which he then says, "Naturally, naturally, but in essence divided?" It then turns into two snakes. What exactly is the significance of this? And what is the function of the instrument?  This happens right after Harry has a vision of Mr. Weasley being attacked by the snake in the Ministry of Magic.