Need to generate random number using Mat.random and use the number to find factorial using threads in Java

this is my code in which i need generate a random number and store in numb variable and pass it to another thread to get the factorial. Need output like this:  Number : 2  Factorial of 2 : 2  Number : 5  Factorial of 5 : 120  run this for 5 times  public class assignment1 {      public static void main(String args[])     {         static int numb=0;          for(int i=0;i<5;i++)         {         Thread t1 = new Thread()                  {              public void run()             {                 numb = (int) Math.random() * 10;                 System.out.println("Number : "+numb);             }                 };          Thread t2 = new Thread()                 {             int fact = 1;             public void run()             {                 for(int x=1;x<=numb;x++)                 {                     fact=fact*x;                 }                 System.out.println("Factorial of "+numb+" is "+fact);             }                 };                 t1.start();                 t2.start();          }        }


What is Difference between Static Variable and Static method and Static Class?

I was in interview, the interviewer asked me this question, I couldn't satisfy him with proper answers he was looking for, Need help, Thanks


Under what conditions does a matrix $A$ have a square root? I saw somewhere that this is true for Hermitian positive definite matrices(whose definition I just looked up).  Moreover, is it possible that for some subspace $X \subset M_n(\mathbb R)$ of $n\times n$ matrices over $\mathbb R$, the map $A \mapsto \sqrt{A}$ is continuous? People who want to consider more generality can also look at matrices over $\mathbb C$.  Thank you.


Is the Earth negatively or positively charged?

The Earth carries a negative electric charge of roughly 500 thousand Coulombs. Does that mean the Earth is negatively charged?


I don't understand how can the CPU utilization of my Linux system be 101 for a process on Linux system. What does the %CPU actually indicate if it is not percentage utilization? USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME  COMMAND ubuntu    2504  101 89.3 70072464 56086520 pts/1 Rl+ 18:40 277:26 python xyz.py


Hello all i'm trying to do is get this sphere   to be unwrapped as a perfect square to fit into the image i've been playing around with the uv settings can't seem to figure it out if anyone here knows how to do that please let me know thanks.


If gravitational waves travel at the speed of light, how can they escape black holes?

It is known that gravitational waves travel at the speed of light, and are themselves subject to lensing by gravity. My question is, how then do the waves escape the black hole they came from in the first place?


I am going to do an overseas internship in Canada next month. Since I have never worked with foreigners before, so now I wonder what I should call my boss or colleagues.   My supervisor is a Chinese, I don't know her English name, she is much older than me and I do know she is married.  Her family name is Liu (not her husband's). So may I call her Ms. Liu, or Mrs. Liu, I am not sure which one is correct. How about other foreigner supervisor? Should I call them MR. XX, MS. XX, or just call them first name directly. Can I ask them directly "Can I have your name or What should I call you"  For the colleagues which are older than me, I think I just need to call them first name?  Thanks.


How do I remove HTTPS results from Google after the domain has been redirected and the SSL certificate taken down?

I need to remove HTTPS results from Google search rankings for the domain A that has been redirected to another domain B. So domain A does not have any pages on it at the moment and it will not have in the future. Customers still go to Google and type company domain A, Google gives them HTTPS version of it as SSL certificate was installed at some point in the past. When they click on it (HTTPS version), redirection does not work as I can't redirect HTTPS but only HTTP.  So how do I remove or ask Google to remove HTTPS version? My client does not know whether HTTPS site was submitted through webmaster tools before and does not have any Gmail accounts for me to check what has happened in the past.


Methods for avoiding bash history logging?

What are some tricks for avoiding bash history being logged in a fascist logging environment that does not involve modifying .bashrc or deleting content from within the history file?


Vertical padding in tabularx cells without using tabular or table

The problem is that there is not enough space between the rules on top of each cell and its content.  The use of \arraystretch doesn't work in my example because I don't put my tabularx inside a tabular or table environment.  I am not sure if this is something about my use of \parbox or \mutlirow. That is why I keept it in my MWE here.  \documentclass{scrartcl} \usepackage{xltxtra} \usepackage{polyglossia} \setdefaultlanguage[spelling=new]{german}  \usepackage{multirow} \usepackage{tabularx} \usepackage{calc} \newlength{\mrwidth}  \begin{document} \newcommand{\mytext}{And then it happened… a door opened to a world…     rushing through the phone line like heroin through an addict's veins, an     electronic pulse is sent out, a refuge from the day-to-day incompetencies is     sought… a board is found.}  \setlength{\mrwidth}{0.2\textwidth-2\tabcolsep} \renewcommand\arraystretch{1.1}  % <-- doesn't work here  \begin{tabularx}{\textwidth}{|X|X|X|X|X|}     \hline     \multirow{2}*{\parbox{\mrwidth}{\mytext}}         &b&c&d&e\\\cline{2-5}     &\parbox{\mrwidth}{\mytext}         &c&d&e\\\hline \end{tabularx} \end{document}


Jedi/Sith using force in combat with other Jedi/Sith?

Before reading this, bear in mind my knowledge of the Star Wars universe is solely from the films, so apologies if I say things that are incorrect.  So this has been bugging me lately -- Could Jedi/Sith use the force on other Jedi/Sith during lightsaber fights? If so, why don't they? I'm not talking full-out breaking their opponent's necks or throwing them across the room, but more like just pushing them off balance using minimal force push/pulling.  From other topics I've read, it seems the popular opinion is that force-users can block the use of the force on them by other force-users, and thus it is incredibly hard and requires great concentration in order to apply major force-manipulation to another force user (ie. breaking a neck). This leads me to believe that BOTH sides must be concentrating on use of the force to attack/defend.  I'm imagining this kind of scenario, but a mental battle:       Now, given that during a lightsaber battle the individuals involved are most likely concentrating more on the fight and not on protecting themselves from the force, theoretically could a force-master -- during a fight with someone less accomplished with the force -- use periodic pushes and pulls to knock their opponent off balance?  Some might say they would have no reason to, but, as someone who has trained in martial arts, if I was trying to sword-fight (for lack of a better verb) someone, and the whole time I was being pushed around, I would lose pretty damn quick.  Another argument I've seen is that Jedi don't like to use the force in battles because it brings them closer to the dark side, which is acceptable, but why not Sith then?  Edit: The proposed duplicate seems to be asking more about a heavily concentrated push of the entire Jedis' bodies into the chasm, I'm suggesting more of a nudge off balance which I believe would require much less focus.


Let $X$ and $Y$ be independent random variables with respective densities: $f_X (x) = xe^{-\frac{x^2}{ 2}} 1_{]0,+\infty[} (x)$ and $ f_Y (y) =  \frac{1}{\pi \sqrt{1-y^2}} 1_{]-1,1[} (y)$  Let $U:=XY$ and $V:=X\sqrt{1-Y^2}$  I try to check whether U and V are independent and which law they follow.  What I did:  After some calculations, I found the density of $(U,V)$:  $ f_{(U,V)}(u,v)=\frac{1}{\pi } e^{-\frac{u^2}{ 2}}1_{\mathbb{R}}e^{-\frac{v^2}{ 2}}1_{\mathbb{R}_+^* }$ Which mean that $(U,V)$ follows a $ \mathcal{N}(0,1)$ law (because $u^2+v^2=x^2$) and that  U and V are independent because $f_{(U,V)}$ can be factored as the products of densities of $U$ and $V$  My question:  There is a factor $\frac{1}{\pi}$ and I don't know to which density it will belong: to $U$ density or to $V$ density?  Many thanks!


how to make Ubuntu compatible with arabic

I'm a newbie to Ubuntu.  Is there some way to make Ubuntu compatible with Arabic language?  I don't mean the keyboard layouts  , I mean when open an exiting windows text file it's like this:    But when I create, type, save, re-open the text file Arabic works fine:


I have installed a vlc in centos 6.5. I want to run it as root. But I get the following error,      "VLC is not supposed to be run as root. Sorry. If you need to use   real-time priorities and/or privileged TCP ports you can use   vlc-wrapper (make sure it is Set-UID root and cannot be run by   non-trusted users first)."


How do I ignore the question mark in a regular expression? For example: xxx.com/supplier.php?id=500  I want to write something like: xxx.com/supplier.php?id=.*  Therefore I need to ignore the question mark.


I can install Ubuntu for Samsung Galaxy Mega 6.3?

I just wanna know if I can put ubuntu on my Galaxy Mega 6.3. I like how it's works and the difference between android and ubuntu.


How to launch shell scripts from XFCE desktop?

They will only open in a text editor. "Open With" doesn't offer an option to execute. The shell scripts are +x so they should run normally.   As a workaround, I set them to be opened with the terminal emulator, but it is not ideal.


How to achieve 100% test coverage for the below code? --Schedule Apex and it's test class shown below

The schedule Apex code is shown below:  global class DailyLeadProcessor implements Schedulable {       global void execute(SchedulableContext ctx){         List<Lead> leadList = [Select id from Lead where LeadSource = null LIMIT 200];         System.debug('LeadList will null LeadSource:' + leadList);             List<Lead> emptyList = new List<Lead>();          if(!leadList.isEmpty()){             for(Lead l : leadList){             l.LastName = 'SchedulableList';             l.Company = 'YourSongs';             l.LeadSource = 'Dreamforce';             l.Status='Working - Not Contacted';             emptyList.add(l);          }         update emptyList;         }     }  }     Looks everything fine but don't know the exact reason why it is not covering 100% test coverage. I tried other way around too to make it 100% but all went in vain and finally have to ask in stackexchange.


Heavy Rider (300lb+) - Please recommend a 26" tyre to avoid tyre pinch

I ride a hybrid on 26" rims currently fitted with hybrid tires.  As I am 300lbs+ the rear tire runs permanently deformed/flat and the rims ride over the rubber causing tire pinch.  Can anyone recommend the tyre tube combination that I should try to obtain that will stop this happening?


Can I use a card from Eighth Edition in Modern Format?

If I'm playing Modern Format, can I use an Eighth Edition Air Elemental?


I just have installed Koha on Ubuntu 16.4. But due to some reasons I have uninstalled it. Now I am trying to install it again but now it is telling E: unable to locate package. Please help.  Results of sudo apt update:  E: Could not get lock /var/lib/apt/lists/lock- open (11: Resources temporarily unavailable).  E: Unable to lock directory /var/lib/apt/lists/


Cannot Boot To Ubuntu After Installing Windows

I installed Ubuntu 16.04, and after that I installed Window. After installing Windows, I cannot boot into Ubuntu. Both were installed into one hard drive, on two separate partitions. I did not format the partition I installed Windows. How can I boot Ubuntu?


Short story ID: Alien invasion from Sigma Draconis

Not much information about this story, read in the 60s or 70s in an English-language anthology. Humanoid aliens having superior technology take over the Earth, and people mostly buckle under peacefully. No one knows where the aliens came from. At the end, humans stage a successful coup, capture the space fleet, and threaten retribution on the aliens' home world. When the alien chief smugly tells his captors that they'll never learn where it is, the coup leader says it's Sigma Draconis. The alien is shocked to hear this and demands to know how they found out. It turns out that over the past twenty or so years, humans pointed out one star after another to members of the invasion force, who were always happy to say, "No, that's not our star," and Sigma Draconis was determined by a process of elimination.   Sigma Draconis is a 4.7-magnitude star, only 19 light-years distant from Earth, so it makes a plausible home for alien civilizations. But it's arguable that aliens are unlikely even to learn the terrestrial names for stars.


Displaying verbatim content with \tl_to_str:*

\documentclass{article} \usepackage{expl3} \ExplSyntaxOn \begin{document} \tl_to_str:n { testing _ things }  \par  \tl_set:Nn \l_tmpa_tl { testing _ things } \tl_to_str:N \l_tmpa_tl \end{document}   gives a strange result (testing ̇things).  How can I get testing_things?  I basically want verbatim content (with line breaking).


How to make a Nexus 4 a wifi access point / repeater without using mobile data

I have a spare Nexus 4 phone after recently upgrading to a Nexus 5. I would like to root the device and use it to share a wifi connection. To be clear, I am not talking about the stock android wifi hotspot functionality which shares a mobile 3G/ 4G data connection wirelessly. I would like to connect to a wifi hotspot from the device and then share that wifi connection to other devices, creating a WLAN. So wifi in, wifi out.   Does the Nexus 4 support this? Can it be done without rooting / installing a custom rom? If not, what ROM / apps do people recommend?


RegEx expression into a constant variable

I'm not very strong with RegEx but I am using a small regex expression and need assistance. The expression works, but I have been asked to turn the regex expression into a constant variable.  What's the best way for me to do this? Here is the code in question.    const storeNameDetails = (store) => {     const truncStoreNo = store.storeNo?.padStart(4, '0');     return STORE_LIST[truncStoreNo]?.replace(/ *\([^)]*\) */g, '');   };


how to extract part of a filename before '.' or before extension

I have files in format below:  abc_asdfjhdsf_dfksfj_12345678.csv hjjhk_hkjh_asd_asd_sd_98765498.csv hgh_nn_25342134.exe   I want to get the value before the . and after the last _.  The  result would look like:  abc_asdfjhdsf_dfksfj_12345678.csv   ----> 12345678 hjjhk_hkjh_asd_asd_sd_98765498.csv  ----> 98765498 hgh_nn_25342134.exe                 ----> 25342134


Allowframebreaks not working on beamer references

Slides are not breaking on beamer references.  \documentclass{beamer} \usetheme[compress]{Berlin}  \usepackage{filecontents} \begin{filecontents}{\jobname.bib}  @article{Author1, author = {Authorr1}, journal = {Journall - 1AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA}, pages = {1--2}, publisher = {Publisherr - 1AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA}, title = {{titlee - 1AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA}}, volume = {1}, year = {2017} }  @article{Author2, author = {Authorr2}, journal = {Journall - 2AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA}, pages = {1--2}, publisher = {Publisherr - 2AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA}, title = {{titlee - 2AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA}}, volume = {1}, year = {2017} }  @article{Author3, author = {Authorr3}, journal = {Journall - 3AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA}, pages = {1--2}, publisher = {Publisherr - 3AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA}, title = {{titlee - 3AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA}}, volume = {1}, year = {2017} }  @article{Author4, author = {Authorr4}, journal = {Journall - 4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA}, pages = {1--2}, publisher = {Publisherr - 4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA}, title = {{titlee - 4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA}}, volume = {1}, year = {2017} }  @article{Author5, author = {Authorr5}, journal = {Journall - 5AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA}, pages = {1--2}, publisher = {Publisherr - 5AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA}, title = {{titlee - 5AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA}}, volume = {1}, year = {2017} }  \end{filecontents}  \usepackage[backend=bibtex,style=authoryear]{biblatex} \addbibresource{\jobname.bib}  \begin{document}  \section{References} \begin{frame} \cite{Author1}  \cite{Author2}  \cite{Author3}  \cite{Author4}  \cite{Author5} \end{frame}  \section{References}  \begin{frame}[label=ncurrent,allowframebreaks]{\secname}%WORKAROUND REMOVES HERE \printbibliography[heading=none] \end{frame}%WORKAROUND ALSO REMOVES HERE  \end{document}     The workaround I got is to remove \begin{frame} \end{frame} that surrounds \printbibliography, but then I lose the section title.


Convolution of Two i.i.d. Exponential Distributions

I have $X,Y$ random variables, both equally distributed under the exponential distribution. However, for some reason the convolution seems to vanish: $$Z = X+Y $$ Therefore, $$f_Z := \int_{0}^{x}f_X(x-t)f_Y(t)dt  $$ $$f_Z = \alpha_1\alpha_2\frac{e^{-\alpha_1 x}-e^{-\alpha_2 x}}{\alpha_1-\alpha_2},\hspace{6mm} \alpha_1 = \alpha_2 $$ The Algebra behind the convolution says $Z$ vanishes. But I don't find any intuitive reason on why this happens.


I am parsing a string to an integer and it works fine until certain values. After that the result is not exact. The code will be like below  parseInt(someString);//this string will have any value.   For example when i execute the below code i get result as 18446744073709552000  parseInt(18446744073709551616) //result 18446744073709552000   But I am expecting the result to be 18446744073709551616.  Can any one tell what is wrong? And how do I accomplish what I want.  I need to check if a string exceeds the maximum value or not. So how is that possible?


$$\int_{0}^{x} \frac{t^2}{1+t^4} dt=2x-1, x \in [0,1]$$ This equation is known to have one real root in $[0,1]$, but when I d.w.r.t. $x$ by apploying Lebnitz rule, I get $$\frac{x^2}{1+x^4}=2,$$ this equation has 4 non-real roots. I would like to know my mistake as I  am not getting a real root. I would line to know the correct solution of this problem.


Let $f$ be three times differentiable on $[a,b]$. $f'''$ is continuous. Show that there is a $c\in[a,b]$ such that $$f(b)-f(a) =((b-a)/2)\cdot(f'(a)+f'(b))-((b-a)³/12)\cdot f'''(c)$$  This looks like a combination of Mean Value Theorem and Taylor's series. but how to solve it, i don't know. Thanks for any answers!


Using the mkfs.ext 4 command with -c switch

I am currently using Ubuntu from a Live USB and in Gparted can see that my internal hdd has 1 partition /dev/sda1 size: 931.51 Gb, file system unknown.. I want to prepare this hard drive to install Ubuntu onto, but the disk utility tells me there are 798 bad sectors (which from doing a bit of research is approximately 0.00004%). Doing some reading in other forums, apparently running  mkfs.ext4 -c /dev/sda1   will create file system to which I can install Ubuntu and avoid the bad blocks in doing so. I really have no clue about this sort of thing, so just want to know if this will work or if it is the right way to go about it at least.   The reason I ask is because it is going to be a very time consuming process, as after 1h 35 mins it is only 0.08% done..  I am a complete linux n00b so please be as straightforward as possible in your responses, and thanks in advance for your help!


I would like to know, which console command shows me the current proprietary amdgpu driver version installed. Somehow -after a bit of research- it is a bit of a secret.


What's the modus operandi when encountering a not-an-answer?

I am a non-20k-er on many sites. What am I supposed to do when I encounter a not-an-answer?   Flag it as not an answer? Downvote it? All of the above?   I have 20k reputation on one of the sites. What am I supposed to do when I encounter a not-an-answer there?   Flag it as not an answer? Downvote it? Vote to delete it, if it has negative score? All of the above?   And if the answers to these two questions are "all of the above", why do we need to separate it into multiple actions? Why not have flagging as not-an-answer automatically issue a downvote and, if possible, a delete vote?


Add custom command in the open with dialog?

In earlier versions of Ubuntu (10.10-) there was an option in the "open with" tab in the properties window, to add a custom command to open a file. However, this is no longer the case in Ubuntu 11.10. Is there any way that I can add these file type associations with a command of my choice rather than the applications detected by the system.


Why can't I reassign a LinkedList reference that was passed to a static method?

When I pass this static method a linked list from main and remove the duplicates, the list remains un-changed. I assume this is because of some weird pass by value problem...Anyone know why?  public class LinkedListHelper{  public static <T> void eliminateDuplicates(LinkedList<T> list) {     LinkedList<T> temp = new LinkedList<>();     temp.add(list.peekFirst()); //initialize this list with first element        ListIterator<T> itr1 = list.listIterator();     ListIterator<T> itr2 = temp.listIterator();      while(itr1.hasNext())     {         T element = itr1.next();         boolean found = false;          while(itr2.hasNext() && !found)         {             T current = itr2.next();                         if(element == current)                 found = true;                            }          if(!found)             temp.add(element);          itr2 = temp.listIterator();     }      list = temp; //Why does this not work????  }   }


Why $\dim(\hom(V,W))=\dim(V) * \dim(W)$?

I have found that the question I want to ask someone had asked, here is the website:    Here is my question: Why $\dim(\hom(V,W))=\dim V * \dim W $?    Thanks for explanation~!


What do you call an event that occurs only once in its environment?   For instance, birth and death are two events that occur only once in the lifetime of a living thing.  I am looking for a word or phrase that would be synonymous to "non-repeating".


Proof of $\sum_{0 \le k \le a} {a \choose k} {b \choose k} = {a+b \choose a}$

$$\sum_{0 \le k \le a}{a \choose k}{b \choose k} = {a+b \choose a}$$  Is there any way to prove it directly?  Using that $\displaystyle{a \choose k}=\frac{a!}{k!(a-k)!}$?


Can I see a plain TeX source file please?

all the LaTeX-tutorials tell me how LaTeX is an extention simplifying the building of TeX documents. Understandably, no one uses plain TeX anymore, right?  But I seem to learn better when I grasp the link between TeX and LaTeX. Does someone have a link to example files in plain TeX? I'd like to know which commands, macros etc. are LaTeX-specific.


I say "hack" in the most favorable light. It's a clever idea and theoretically beneficial.  I noticed that an old question of mine suddenly started getting a lot of renewed attention. The question had been answered, with an answer accepted. But another user added a well reasoned and insightful answer to the list. He also opened a +100 bounty on that question.  The resulting increased attention quickly got his answer quite a lot of up-votes. Well more than the 100 points he had spent on the bounty. Therefore, he gets a net rep profit out of the transaction.  So here's the hack:   Find an interesting question Research and provide a very good answer Open up a bounty on that question to attract attention and votes to your new answer Profit!!!   2 and 3 may be out of order--I didn't see the timing of it. But either way, assuming he gets more than 10 votes, he still gets increased rep out of the deal.  I don't think this is necessarily bad for SO - it does generate some useful discussion and insightful answers. Plus you can increase your own rep very rapidly by making your answers highly visible, and therefore frequently voted upon.   However, it does slightly change the meaning and purpose of bounties away from starting a discussion and toward self-promotion. Still, interesting.


Why can't I use my internal microphone at the same time as my headphones?

I have a Samsung Series 7 NP700-Z5A, which has a dual-purpose mic/headphone jack.  In both Ubuntu 12.04 and Windows 7, whenever I plug in my headphones the internal mic goes completely dead. When the headphones aren't plugged in, the microphone is fine.  The hardware is Realtek HD audio and the driver version 6.0.1.6428 (on Windows, at least).  I have an inkling that it thinks my headphones are a microphone, but there seems to be no option (in either OS) to adjust this.  Why can't I use my laptop's internal microphone while my headphones are plugged in?


Remote control of iPad (from a PC ideally)?

I've had a quick look through the search results, and am not able to find a suitable answer.   My scenario is this - my mother in law in her 70s, is not all that keen on technology. She's also self-isolated thanks to Corona.   We're sending an iPad her way, that we can get 'set up' in advance... but what we really need to be able to do is remote-support it, because we can't go and see her in person.  To that end, I'm wondering what the best option would be for remote support. We have available an iPhone, a PC and an Android phone.   I'm currently contemplating something like teamviewer (the 'quick support' looks to allow screen viewing which would be a start), but if there's a free option out there that'd be better still.


Splitting polygons with line grid in QGIS?

I have a polygon vector layer and a line vector layer in a form of grid (they are both in the .shp format). I need to split polygons by these lines.   I tried digitizing tools but the problem is that it deals only with 1 line at a time and I have more than 52,000 lines. It will take a ridiculously long time to split it manually. How can it be done for all the lines?   I have QGIS 2.18.


AJAX request from Chrome Extension to Wordpress Website

I developed a chrome extension which extract some data from the user visiting page and I want to transmit them to my database by an AJAX call (my website is a basic wordpress website).  The point is that the ajax response is error 400 and I do not understand where is the problem as I tried to modify my ajax request the best I could.  Here is my AJAX request from content.js  /* Popup clicked */  $('#myOwnCustomToolBar_TT91 #message_to_click form.groupio_form #subscribe').on('click', function(){      chrome.runtime.sendMessage(product_infos);   });    Here is the new background.js file :    chrome.runtime.onMessage.addListener(function(response, sender, sendResponse){          jQuery.ajax({          type:"POST",         url: "https://www.groupio.fr/wp-admin/admin-ajax.php",         contentType: 'json',         dataType: "JSON",         responseType:'json',          data: {             action : "itempricingfunction",             ean : "EANTEST0101010"         },          success:function(data){              alert(data);          },          error: function(errorThrown){             console.log(errorThrown);         }         });  });    Here is my function called itempricingfunction inside the functions.php file of my wordpress theme file  function itempricingfunction(){   $product_ean = (isset($_POST['ean'])) ? htmlentities($_POST['ean']) : NULL; echo json_encode(array('product_ean' =>$product_ean));       exit; }  add_action("wp_ajax_nopriv_itempricingfunction", "itempricingfunction"); add_action("wp_ajax_itempricingfunction", "itempricingfunction");    And finally, when I go to the product page and click on the chrome extension, the response of the ajax call is Error 400.  Thank you very much for your help !


I have spare 1060 as I recently upgraded to 3070 and was wondering if using both of them will improve rendering times


I was just taking care of my vault and out of the corner of my eye it looked like someone was standing in the back of the storage room once I saw him he disappeared and then this weird music started to play like dun dun daaaaaa I waited for awhile and I herd that music again but I didn't see it in time. Who is this figure?


Prevent positioning of figures before mentioned in the text

I'm currently working on my master thesis and my specification states that images are included at the top, bottom or their own page only after mentioned in the text. So I tried to use [tbp] for placement modifiers of my figures, but it happens that images are placed at the top of the current page, which is obviously before any text that mentions the image.  I want to position the images at the bottom of the current page, the top of the next page or their own page if everything else fails. I've looked at this question  which doesn't really say how to change the default behavior and I've looked at the afterpage package, but it looks that it won't regard the bottom of the current page as a possibility.  So that in the following example:  \documentclass[12pt, parskip=full, bibtotoc, twoside, BCOR=5mm, draft=true]{scrartcl} \usepackage[ngerman]{babel} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc}  \usepackage{graphicx}  \begin{document} \section{Example Section} Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua (See \ref{image}). At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.   \begin{figure}[tbp] \centering \includegraphics[width=0.66\textwidth]{example.png} \caption{Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.} \label{image} \end{figure} \end{document}   The image would not be included before the new section but rather at the bottom of the page, or the top of the next page (if there would be more text) or it's own page.


I was introduced to table top RPGs last year, but then I got to move. The place where I live now is a very "cold" neighborhood. Houses are big and the land around them even bigger, so each family is kind of an isolated unity. I'm looking for a way to continue playing, but so far I had no luck, so I decided to check if there are online communities for playing RPGs. Could any of you give me some pointers on how I can do this? I'm 14 years old, male, don't know much about RPGs yet, but I have a genius IQ (160) so I can probably learn any set of rules relatively fast.


"Command 'gksu' not found" error on Ubuntu 18.04

While running   gksu gedit /etc/udev/rules.d/somefile.rules   I am getting this suggestion.  Command 'gksu' not found, did you mean:    command 'gosu' from deb gosu   command 'ksu' from deb heimdal-clients   command 'ksu' from deb krb5-user  Try: sudo apt install <deb name>


How to share Android "Reverse-tethered" internet via Android WiFi?

Before going into main question, we do know that :   we can do Reverse Tethering from PC into android () And we can share current phone internet connection via Portable WiFi hotspot (or similar apps in Google Play)   Now the question is :  "Is there a way to share the reverse-tethered internet (as we known connected via usb0 interface) via "Android WiFi Hotspot?"  To make it easier, here's the schema:   Schema of my setup (click image for larger variant)  *Additional Notes :   Actually I don't give a limit which version of the Android (so if it's just compatible in higher version e.g. 4.2, it's okay for me), but I prefer it works on 2.3.x (Gingerbread) Some explanations of how to make APN (Infrastructure Mode) on Android (just like Wireless Router/[netsh wlan hostednetwork] on Windows 7/8) might be really helpful too. And also some explanations about how to masquerade (internet sharing) between two interfaces in Android. (such as ICS in Windows or Masquerade/iptables thingy in Linux-based)


compute the L^2-distance of a given function to the set of Gaussian functions

I am faced with the following question: given a probability density function $f$ over  $\mathbb{R}$ with $\int_{\mathbb{R}}f(x)x^2dx=\sigma^2$ given, I am trying to find the "nearest" Gaussian to $\sqrt{f}$ in $L^2$, i.e. compute $$\inf_{a\in \mathbb{R}, b > 0}\|\sqrt{f}-G_{a,b}\|_2^2$$ where $G_{a,b}(x)=a\exp(-bx^2)$ and the $\|\cdot\|_2$ is the classical $L^2$-norm over $\mathbb{R}.$  If one replaces the $L^2$-distance by the relative entropy $H(f|G_{a,b})$, it is easy to check that the infimum is a minimum given by the centered gaussian with variance $\sigma^2.$ For the $L^2$-distance, it seems more involved......


Is there a way to add pagination to only a tableselect returned from ajax callback?

Have a simple form with few inputs as a filter criteria. Selecting these and clicking on a submit button executes a callback function that returns a table and a pager.  Code:  //submit button $form['action'] = [ '#prefix' => '
', '#name' => 'ajax_action', '#type' => 'button', '#value' => $this->t('Submit'), '#ajax' => [ 'callback' => '::setMessage', 'wrapper' => 'scrollable', 'method' => 'replace', 'effect' => 'fade',      ], '#suffix' => '

', ];   //table element     $form['table'] = array(    '#prefix' => '

View Data
',    '#type' => 'tableselect',    '#header' => $header,    '#options' => $options,    '#disabled' => $disabled,    '#attributes' => array('id' => 'sort-table'),    '#empty' => t('Select criteria and search data'),     );  //pager element       $form['pager'] = array(   '#type' => 'pager',  '#suffix' => '
',   );   //function to obtain #options               if ($form_state->getTriggeringElement()['#name'] == 'ajax_action') {                 $options = array();         $header = [             'subject_id' => t('Subject ID'),             'ct_availability' => t('CT Availability'),              'sex' => t('Sex'),              'race' => t('Race'),              'cardiovascular_disease' => t('Cardiovascular Disease'),              'registration_age' => t('Registration_Age'),                 ];                $options = $this->getOptions($form_state); //function to get #options          $form['table']['#header'] = $header;         $form['table']['#options'] = $options;         }   //callback function  public function setMessage(array $form, FormStateInterface $form_state) { return (array($form['table'], $form['pager']));   }  This gives the ajax response including a table with the data and a pager The pager has rendered fine but the problem here is that, clicking on it would redirect leading to an error:  "An unrecoverable error occurred. The uploaded file likely exceeded the maximum file size (125 MB) that this server support."  Which I believe is due to the url leading to invalid redirection as below:     hostname/search_data_form?ajax_form=1&_wrapper_format=drupal_ajax&page=1   I've referred to a similar problem form this   But here I'm not theming the form in any twig file and have a challenge to understand how to make the pagination work within the area having table as an ajax response.  Have also referred to another    which suggests to replace the url but the whole page gets reloaded with such approach.  Is there a suitable working approach to have a table with pagination as an ajax response?


Queries in two tables without "inner join"

I wonder what is the difference of these two queries and which one hás the best performance?  SELECT employee.*, company.name  FROM  company, employee WHERE employee.company_id = company.id AND company.id = '365'   or  SELECT employee.*, company.name  FROM  company  INNER JOIN employee ON employee.company_id  = company.id WHERE company.id = '365'


If I were looking to create my own language are there any tools that would help me along? I have heard of yacc but I'm wondering how I would implement features that I want in the language.


What happens if a double-faced card that is copying a different double-faced card transforms?

We are getting  in M19. What if I enchant my , copying my opponents . Then I pay the cost on my Bolas (previously a Delver) to activate his transform ability.  What will happen? I can think of 3 possibilities:   My Delver is exiled and the aura goes to the graveyard. My Delver is transformed, aura goes to the graveyard, but the Delver transforms into  My Delver is transformed, aura goes to the graveyard, and the Delver transforms into


Removing noise from lines with regex in python

Please take a look at this: . I'd like to remove this kind of "noise" between paragraphs. I cannot really avoid them due to irregularities in the documents I'm processing.   The pattern above yields the result I seek, but if implemented in my code it does not.  import re  txt = re.sub(r'/^.{1,16}\n/gm', r'', txt)    # no txt = re.sub(r'^.{1,16}\n', r'', txt, re.M)  # no txt = re.sub(r'^.{1,16}\n', r'', txt)        # no   Any idea?


I had Java 11, then decided to change to Java 8. I uninstalled 11 and installed 8. Then have added these lines into ~/.bashrc:  export JAVA_HOME="/usr/lib/jvm/java-1.8.0-openjdk-amd64"     export PATH=$PATH:$JAVA_HOME/bin   Executed source ~/.bashrc. javac -version gives 8, but java -version still shows 11. I tried to use sudo update-alternatives --config javac and set it to 8, but still...


Why this line doesn't work:  $db_Table = "myTable";  $pdo->prepare("INSERT INTO :db_Table VALUES (...  $query->execute(array(     ':db_Table' => $db_Table,     Whereas this one works:  $pdo->prepare("INSERT INTO myTable VALUES (...   How can I solve it ?


xmllint usage - having a hard time getting xml attributes

I'm in the process of retreiving some data from a xml file, it is actually a SSIS package file (dtsx).  I've read about using xmllint, however I'm having a hard time retrieving what I want.  I'd like to ask some helps from folks here.  This is what my xml looks like:  <?xml version="1.0"?> <DTS:Executable xmlns:DTS="www.microsoft.com/SqlServer/Dts"   DTS:refId="Package"   DTS:CreationDate="7/22/2019 4:18:27 PM"   DTS:CreationName="Microsoft.Package"   DTS:CreatorComputerName="ADMIN-8DF005D47"   DTS:CreatorName="ADMIN-8DF005D47\Administrator"   DTS:DTSID="{8CCA1D42-642A-4932-AAEC-E02175A4B2DB}"   DTS:ExecutableType="Microsoft.Package"   DTS:LastModifiedProductVersion="15.0.2000.68"   DTS:LocaleID="1033"   DTS:ObjectName="HardestNestedWorkflow2"   DTS:PackageType="5"   DTS:VersionBuild="12"   DTS:VersionGUID="{FDD9B190-1A03-4A19-8794-FA86F4F46A93}">   <DTS:Property     DTS:Name="PackageFormatVersion">8</DTS:Property>   <DTS:ConnectionManagers>     <DTS:ConnectionManager       DTS:refId="Package.ConnectionManagers[ADMIN-8DF005D47.AdventureWorks]"       DTS:CreationName="OLEDB"       DTS:DTSID="{A32A68DF-3D53-4057-AF80-1B8D524F82BC}"       DTS:ObjectName="ADMIN-8DF005D47.AdventureWorks">       <DTS:ObjectData>         <DTS:ConnectionManager           DTS:ConnectionString="Data Source=ADMIN-8DF005D47;Initial Catalog=AdventureWorks;Provider=SQLNCLI11;Integrated Security=SSPI;Application Name=SSIS-HardestNestedWorkflow2-{A32A68DF-3D53-4057-AF80-1B8D524F82BC}ADMIN-8DF005D47.AdventureWorks;Auto Translate=False;" />       </DTS:ObjectData>      <!--snipped-->      </DTS:ConnectionManager>   </DTS:ConnectionManagers> </DTS:Executable>   I'm looking to get the value "8" out of this line  <DTS:Property     DTS:Name="PackageFormatVersion">8</DTS:Property>   so, what I did was to issue a command  xmllint --xpath "//*[local-name()='Executable']/*[local-ame()='Property']/text()" HardestNestedWorkflow2_latest.xml   .. and it was good, I was able to extract the value "8"  Now, I wanted to extract the value   Data Source=ADMIN-8DF005D47;Initial Catalog=AdventureWorks;Provider=SQLNCLI11;Integrated Security=SSPI;Application Name=SSIS-HardestNestedWorkflow2-{A32A68DF-3D53-4057-AF80-1B8D524F82BC}ADMIN-8DF005D47.AdventureWorks;Auto Translate=False;   I issued this statement  xmllint --xpath "//*[local-name()='Executable']/*[local-name()='ConnectionManagers']/*[local-name()='ConnectionManager']/*[local-name()='ObjectData']/*[local-name()='ConnectionManager']" HardestNestedWorkflow2_latest.xml   and it returned this   <DTS:ConnectionManager DTS:ConnectionString="Data Source=ADMIN-8DF005D47;Initial Catalog=AdventureWorks;Provider=SQLNCLI11;Integrated Security=SSPI;Application Name=SSIS-HardestNestedWorkflow2-{A32A68DF-3D53-4057-AF80-1B8D524F82BC}ADMIN-8DF005D47.AdventureWorks;Auto Translate=False;"/>   how can I omit the tags DTS:ConnectionManager DTS:ConnectionString?  I'm sorry I'm not much knowledgeable on using xmllint.  Thanks in Advance


Is there a replacement for unistd.h for Windows (Visual C)?

I'm porting a relatively simple console program written for Unix to the Windows platform (). All the source files include "unistd.h", which doesn't exist.  Removing it, I get complaints about misssing prototypes for 'srandom', 'random', and 'getopt'. I know I can replace the random functions, and I'm pretty sure I can find/hack-up a getopt implementation.    But I'm sure others have run into the same challenge.  My question is: is there a port of "unistd.h" to Windows? At least one containg those functions which do have a native Windows implementation - I don't need pipes or forking.  EDIT:  I know I can create my very own "unistd.h" which contains replacements for the things I need - especially in this case, since it is a limited set. But since it seems like a common problem, I was wondering if someone had done the work already for a bigger subset of the functionality.  Switching to a different compiler or environment isn't possible at work - I'm stuck with Visual Studio.


Can expired orange juice be used in baking

Wanted to use up expired orange juice in muffins or cake.


I currently have ubuntu 12.04 installed on my computer, but i wan't to change back to Windows 7, but when i tried to install Windows 7 via a DVD/CD, it couldn't install on any of my hard drives. This is mainly because my hard drive's file system is "ext4" and not "ntfs." Also i have tried to format the drive, but it shows up with an error stating that my hard drive is "busy."


How to find $\lim \dfrac{4xy^2}{x^2+y^2}$?

My book uses epsilon to solve this and the answer should be zero but I'd like another easier way  $$\lim_{(x,y) \to (0,0)} \frac{4xy^2}{x^2+y^2}$$


In Drupal 8 you can load an entity with:  $node = \Drupal::entityManager()->getStorage('node')->load(123);   This looks for the entity definitions and finds that node is defined by Drupal\node\Entity\Node - so (I guess) Drupal\node\NodeStorage will instantiate a new Drupal\node\Entity\Node instance.  What I'd like to achieve is subclassing Drupal\node\Entity\Node and being able to instantiate this subclass when it's appropriate. For example if I have a node bundle article, there would be a class:  namespace Drupal\my_module\Entity\Article; class Article extends Drupal\node\Entity\Node { }   And I'd call:  $node = \Drupal::entityManager()->getStorage('node_article')->load(123);   And the return would be my Article subclass.  I can achieve this by creating a new entity type and wiring it back to another existing entity definitions, for example the node-article example would be this class:  namespace Drupal\my_module\Entity; use Drupal\node\Entity\Node; /**  * @ContentEntityType(  *   id = "node_article",  *   label = @Translation("Content"),  *   bundle_label = @Translation("Content type"),  *   handlers = {  *     "storage" = "Drupal\node\NodeStorage",  *     "storage_schema" = "Drupal\node\NodeStorageSchema",  *     "view_builder" = "Drupal\node\NodeViewBuilder",  *     "access" = "Drupal\node\NodeAccessControlHandler",  *     "views_data" = "Drupal\node\NodeViewsData",  *     "form" = {  *       "default" = "Drupal\node\NodeForm",  *       "delete" = "Drupal\node\Form\NodeDeleteForm",  *       "edit" = "Drupal\node\NodeForm"  *     },  *     "route_provider" = {  *       "html" = "Drupal\node\Entity\NodeRouteProvider",  *     },  *     "list_builder" = "Drupal\node\NodeListBuilder",  *     "translation" = "Drupal\node\NodeTranslationHandler"  *   },  *   base_table = "node",  *   data_table = "node_field_data",  *   revision_table = "node_revision",  *   revision_data_table = "node_field_revision",  *   translatable = TRUE,  *   list_cache_contexts = { "user.node_grants:view" },  *   entity_keys = {  *     "id" = "nid",  *     "revision" = "vid",  *     "bundle" = "type",  *     "label" = "title",  *     "langcode" = "langcode",  *     "uuid" = "uuid",  *     "status" = "status",  *     "uid" = "uid",  *   },  *   bundle_entity_type = "node_type",  *   field_ui_base_route = "entity.node_type.edit_form",  *   common_reference_target = TRUE,  *   permission_granularity = "bundle",  *   links = {  *     "canonical" = "/node/{node}",  *     "delete-form" = "/node/{node}/delete",  *     "edit-form" = "/node/{node}/edit",  *     "version-history" = "/node/{node}/revisions",  *     "revision" = "/node/{node}/revisions/{node_revision}/view",  *   }  * )  */ class Article extends Node { }  // Results my Article sub type. $node = \Drupal::entityManager()->getStorage('node_article')->load(123);   This works fine (as much as I can see); however, it smells. It adds a new entity type, which is not true, and might cause other troubles in the future.  How do I define a subclass for an entity bundle so that loading the entity would return an object of that class?


Where can I have a genuine Ainu cultural experience in Hokkaido? (or Tokyo!)

I've asked similar questions in the past about how to immerse in or at least experience in an authentic way, the indigenous cultures of the  and the .  I've now been in Hokkaido (northern Japan) for a couple of weeks and when it comes to , have only seen a few nicknacks in odd places. I'm sure there are some museums and perhaps even some "Ainu World" type tourist traps. But what about for genuinely interested people who want to meet real Ainu who are proud of their culture and trying to keep it alive?  I have heard that the Ainu finally gained official recognition from the Japanese government as an indigenous people of Japan as recently as 2008. I'm wondering if there are some things that have come about since then?  I also just learned from  that many Ainu felt so repressed in Hokkaido that they moved to Tokyo. So perhaps it's just as likely that there is some contemporary Ainu cultural pride movement there that welcomes foreign visitors. It seemed to be hinted at in the video.  Finally, having languages and linguistics as a hobby, I'd be very interested to be able to visit any kind of  revitalization effort - I know there are only a tiny handful of fluent native speakers left.


Explain $\Delta x = v_0t + \tfrac{1}{2}gt^2$ please?

$g = \Delta v/t$, so $\Delta v = gt$. $v = v_0 + \Delta v$, so $v = v_0 + gt$. So if $\Delta x = vt$, then $\Delta x$ should be $v_0t + gt$. Why the $\tfrac{1}{2}gt^2$? I'm really confused, so this question is also probably very confusing. Sorry and thanks in advance!


Pre-1996 YA fantasy - female cat burglar

I have been trying to remember the title/find this book for over a decade. The main character is an orphan. I think she is slightly psychic? She becomes a thief but hates stealing; at one point she steals a button instead of an expensive coin when pick-pocketing. She also steals a peacock feather glove from a princess or something?


Is there a broad map, guide or list of all or most of math's fields?

Has someone ever garthered all the different fields in maths (single variable function analisis, multivariable analisis, complex number analisis, number theory, graphs, succesions, etc) and made a (vague at least) map of what is needed to know what or at least what are the names of all the different things and concepts that are known to mathmaticians?  I would like to know at least the names of the stuff that i am still ignorant about so that i can look up a book or something about it and read it up.


What do I use the curse and coin randomizer cards for?

I have the big box Dominion which includes Prosperity and Alchemy. It came with randomizer (purple-backed distinct) cards for curses and coins. What are these used for?   I understand the Kingdom randomizer cards can be used for playing with unknown Kingdom cards sets.


Boot Camp External Drive only able to connect to my computer

I followed these instructions () to install Windows 10 to my external SSD (Samsung T3). I followed Alex Lambert's guide (the one with most upvotes & correct answer), and was able to install and boot Windows 10 successfully.  I ran to a problem today, as I was connecting the drive to another Mac I have until I noticed that my drive was not being seen from the boot menu (option key), although I could see both of my drives (my drives are partitioned in half: 250GB for Windows (NTFS) and 250GB for Data for both OSes, Windows and OS X (exFAT)) in OS X on the other computer.  Please help!  Thanks.


Want to install Ubuntu on Intel x86 32-bit. Machine has MS Vista (wish to maintain) is disconnected from Internet. Which procedure should I follow? Which file to download on a USB, possibly?


The difference between head & tail recursion

I'm trying to get the difference between these 2 recursive strategies.  The definition I was told is the following:  Tail Recursion: A call is tail-recursive if nothing has to be done after the call returns i.e. when the call returns, the returned value is immediately returned from the calling function  Head Recursion: A call is head-recursive when the first statement of the function is the recursive call.


$$\int x^3\sqrt{4-x^2}dx$$ I tried changing the expression like this: $$\int x^3\sqrt{2^2-x^2}dx=\int x^3\sqrt{(2-x)(2+x)}dx$$ And that's where I got stuck. I tried integration by parts but it doesn't simplify the expression.


Notify-send won't show notification unless run with sudo

I have just tried to use notify-send on my 13.10 machine and can't get it to work without using sudo with it.   I don't know what details can I provide with this issue.   My notify-osd version :   $ ii  notify-osd      0.9.35+13.10.20130917.1-0ubuntu1-leolik~ppa0  amd64        daemon that displays passive pop-up notifications   On regular version for 13.10 there was the same issue.  EDIT   $ ll /usr/bin/notify-send -rwxr-xr-x 1 root root 14720 wrz 10 16:12 /usr/bin/notify-send


Panel on Ubuntu 16.04 LTS - some very newb questions regarding customising or turning off

The Panel on the top of the screen is giving me a running commentary on any tab I have active in my web browser.      Is there a way to make it stop giving a running commentary on whichever browser tab I have active? ... or   Is there a way to hide this menu bar? Alternatively - If I could add the icons on the top right (circled in green in my screenshot) to the taskbar thing that would be ideal. Is there an alternative desktop were this isn't an issue?


Cannot SSH: debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY

We have a server XXX ON Amazon EC2.  SSH is running on a standard (22) port.  I placed my pubkey at the /.ssh/authorized_keys file  The fun thing is that YESTERDAY it was working great!   But today, I don't know what happened! I just can't log in.     ssh -vvvv servername   is stuck on     debug1: expecting   SSH2_MSG_KEX_DH_GEX_REPLY   I checked my pubkey and it's there! (how I checked?? I asked the other guy to check)  and then I used another computer (windows 7 + putty) and placed my new pubkey. ANd what? I was able to log in! And that's another computer with Win7 is ont the same LAN which menas that the external IP is the same.  My private key works for other servers but not with this.  Please help!


(16.04) How can I remotely control an Ubuntu desktop outside of its local network using another Ubuntu?

Tried Remmina (VNC) but only managed to do it on the local network.


I'm trying to find out where does the word OK come from?


How do I pass the forest stage on Candy Box 2?

I cannot pass the forest stage on Candy Box 2. The dogs and forest mosquitos kill me fast.  My stats and equipment are:   220 health Polished silver sword (7 damage, also have the trolls bludgeon; 12-16 damage) Leather boots and gloves (no stat bonus) Basic and advanced spells from the witch across the bridge   On another save I also increased my health to 1000 and still could not pass the forest stage, any advice?  Thanks.


I'm looking for way to open registry editor and show some specific key or value. For example, if I pass "HKLM\\SOFTWARE\\Skype\\Installer" I want to get such a result:   All suggestions except system() calls are welcome.


Why does a radio station play through my speakers when the laptop runs on battery?

Every fortnight, on a schedule, I disconnect the charger from my laptop (which is largely stationary anyway) and let the battery run down.  As soon as I disconnected the battery earlier today, I noticed that I could hear a radio station playing through my speakers at a low volume (say, about 1).  Obviously, I was surprised, because I can positively guarantee that I don't have any music or radio programmes playing in the background (or foreground).  When I plug in the power supply, the low volume playback goes away, but as soon as the laptop begins to run on battery, the radio station becomes audible.  I cannot find any suspicious programmes.  The virus checker has completed its scan and not reported anything.  What could be causing this strange phenomenon?  And should I be worried?    P.S. Not that it makes a difference, but the scheduler is actually set on a monthly schedule.  I just felt like using the word "fortnight."  The rest of the posting is true.


Why does \noindent have such an effect on \rlap and \llap.?

Without \noindent, \rlap and \llap seem to move down by \baselineskip every time.  Is this deliberate?  \documentclass{article} \usepackage{xcolor}  \begin{document} \color{red} \rlap{\rule{.25in}{1ex}}\rlap{\rule{.25in}{1ex}}\rlap{\rule{.25in}{1ex}}  \color{blue} \noindent\rlap{\rule{.25in}{1ex}}\rlap{\rule{.25in}{1ex}}\rlap{\rule{.25in}{1ex}}  \color{green} \llap{\rule{.25in}{1ex}}\llap{\rule{.25in}{1ex}}\llap{\rule{.25in}{1ex}}  \color{black} \noindent\llap{\rule{.25in}{1ex}}\llap{\rule{.25in}{1ex}}\llap{\rule{.25in}{1ex}} \end{document}


Prove that $x * y = \frac{x+y}{1+xy}$ is a stable part of $G=(-1, 1)$

I have to prove that the result of $x * y \in G$ so $\frac{x+y}{1+xy} \in (-1, 1)$. So $x > -1$ and $y > -1$ at the same time $x < 1$ and $y < 1$.  If I multiply the first 2 expressions I obtain $xy < 1$ which is true, and if I sum up the last 2 I get $x + y < 2$. At this point I am not sure if I am doing well. How should I continue this problem?


I have been making a donut (with blender guru on YouTube) and something happened and I have no idea what it is. I think it has something to do with the subdivision surface modifier because when I applied it changed (still not good). I noticed it also was always the same in the layout area (but not in sculpting and others). Here are some pictures: in layout (is the same for after the modifier was applied)  in sculpting (before modifiers were applied)  in sculpting after modifiers were applied)  I also noticed that when I pressed 'command z’ it looked like the one in layout but took all of the tools away. please help if you can - thanks (:


Can a set of 6 sided die, simulate any other die?

So suppose I only have 6 sided dice, or D6. I want to play an RPG where a D20, or D10 is required. Can I simulate a D20 or D10 or any other sided die, using one or more D6?


Trying without success to solve the following: what is the sum of $\binom{80}{0}-\binom{80}{1}+\binom{80}{2}-\binom{80}{3}...-\binom{80}{79}+\binom{80}{80}$  any help will be greatly appreciated


Recommended books or articles as introduction to Cluster Analysis?

I'm working on a small (200M) corpus of text, which I want to explore with some cluster analysis. What books or articles on that subject would you recommend?


save user's registration date using only SQL

I know getting a user's registration date should be pretty basic using php, but I was wondering if this was possible directly through mySQL.  I use apache's phpmyadmin and when creating a new column I noticed the type DATE and the default value CURRENT_TIMESTAMP, so I was wondering if it would be possible to add a type of column that automatically set the current date when a new line is created (so when a new user is registered) ?  If this possible and is there any constraints to this ? How can I do this ?  Thanks !


There is a Linux (Manjaro) PC without an audiocard. Is it possible to create a virtual audio device? The usage idea is the following: virtual audio device process a sound, then there is a server connected to our sound channel and it transfer the sound to the client (smartphone).


Can I give away unused steam games as gifts?

I got a pack with a couple of games. I accepted the pack, but one of the games I don't want to play, and I never have. Does it work to give only that game back? If it helps; the game is Need for speed Shift 2


If $c_i=a_ib_i, c_j=a_jb_j,$ $a_i$ and $a_j$ are independent, $b_i$ and $b_j$ are dependent, what about $c_i$ and $c_j$? Are $c_i$ and $c_j$ independent? ($A, B, C$ are r.v.s., $A$ and $B$ are independent as well) Thanks!


Impact of a 5th fundamental force discovery

Recently released paper that hints to a fifth fundamental force       The UCI work demonstrates that instead of being a dark photon, the particle may be a “protophobic X boson.” While the normal electric force acts on electrons and protons, this newfound boson interacts only with electrons and neutrons — and at an extremely limited range. Analysis co-author Timothy Tait, professor of physics & astronomy, said, “There’s no other boson that we’ve observed that has this same characteristic. Sometimes we also just call it the ‘X boson,’ where ‘X’ means unknown.”   I'm trying to get a gauge on what this discovery (if true) would imply to our current understanding of particle physics and which discipline within physics would the impact be seen the most.    Also of interest, would this force be strong enough to have an effect on the standard GMm/r^2 formula (IE it would now be GMm/r^2 + newforce)?


Under what circumstances should the data be normalized/standardized when building a regression model. When i asked this question to a stats major, he gave me an ambiguous answer "depends on the data".   But what does that really mean? It should either be an universal rule or a check list of sorts where if certain conditions are met then the data either should/ shouldn't be normalized.


Knowing $|z|$ and $|w|$ (and possibly $z\overline{w}$), what are $|z+w|^2$, $|zw|^2$, $|z-w|^2$, $|z/w|^2$?

Question 1: Let $z$ and $w$ be complex numbers satisfying $|z| = 4$ and $|w| = 2$. Then enter in the numbers $$ |z+w|^2, |zw|^2, |z-w|^2, \left| \dfrac{z}{w} \right|^2 $$ below, in the order listed above. If any of these cannot be uniquely determined from the information given, enter in a question mark.  I plugged in $4$ and $2$ to each equation and got $36$, $64$, $4$, $4$, for question one. It was wrong.  Question 2: Let $z$ and $w$ be complex numbers satisfying $|z| = 5, |w| = 2,$ and $z\overline{w} = 6+8i.$ Then enter in the numbers $$ |z+w|^2, |zw|^2, |z-w|^2, \left| \dfrac{z}{w} \right|^2 $$ below, in the order listed above. If any of these cannot be uniquely determined from the information given, enter in a question mark.  I don't know how to even start on question 2 because of the $z\overline{w}$.


Person A: Did they eventually  sign to a booking agency?   Person B: Yes, but after I had stopped managing them   I just would like to know if past simple would be possible and is past perfect here to explain that the band sign to a booking agency because but they did not have a manager to establish a strong link between them


If $E$ is measurable and $0(1-\epsilon)m(I)$

Prove that is $E$ is measurable and $0<m(E)<\infty$, then for any $0<\epsilon<1$ there is an open interval $I$ such that $m(E \cap I)>(1-\epsilon)m(I)$  How would I solve this without using The Lebesgue density theorem


So i have this integral   $$\int_{\sqrt[3]{4}}^{\sqrt[3]{3+e}}x^2 \ln(x^3-3)\,dx.$$  I was thinking of using u subsitution to make everything easier.   I made $u = x^3-3$ and $du = 3x^2dx$.  So I would then re-write my integral as   $$1/3\int_{\sqrt[3]{4}}^{\sqrt[3]{3+e}} \ln(x^3-3)\.$$  How would I proceed from here. Should I plug in the integral values? Wouldn't I need to integrate the $\ln()$? Should I use u substitution again? Please help!  I already asked this question, so don't mark it as a duplicate. Unfortunately I couldn't understand what other people were writing.


What is the maximum theoretical limit on how much a HDD can store

I was wounding what was the maximum theoretical limit on how much a HDD(with 5 platters and a 3.5 inch size drive) can store because they have 6 (not to be confuse with )  Because most people do.  There is a limit on how close they can put the hard to the platter due to Quantum tunnelling.


How to draw this circuit with circuitikz

I am a total newbie to circuitikz. I want to draw these two circuits      I want to know how to do this. Thanks for all the help.


How to compute azimuth between QgsPointV2s?

The  class has an azimuth() method but the new  class does not. What's the best way to compute the azimuth between QgsPointV2s? I couldn't find a convenient way to convert V2 to the old version, so my fallback is to construct a QgsPoint from the V2's x and y:   self.traj = QgsLineStringV2(...)     p_i = self.traj.pointN(self.i) # this returns a QgsPointV2 p_j = self.traj.pointN(self.j) a = QgsPoint(p_i.x(),p_i.y()).azimuth(QgsPoint(p_j.x(),p_j.y()))   Is there a better way?


On July 14, 2018 our Spirit Airline Flight #263 was delayed for over 4 hours. We were flying from BWI to Seattle, WA. The flight was supposed to leave at 7:20 AM. I would like to know what time the flight actually took off.


I'm getting some odd table alignment issues with a table that I'm constructing inside of a \whileboolexpr.  The .tex file is the following:  \documentclass{article}  \usepackage{etoolbox}  \newcounter{pcnt} \setcounter{pcnt}{0}  \newenvironment{defineperson}[1] {\csgdef{person\thepcnt}{#1}} {\stepcounter{pcnt}}  \newcommand\persontitle[1]{\csgdef{persontitle\thepcnt}{#1}} \newcommand\personmail[1]{\csgdef{personmail\thepcnt}{#1}} \newcommand\showperson[1]{\textbf{#1}}  \newcommand\maketabular[1]{\begin{tabular}{| l | l | l |} \hline #1 \end{tabular}}  \newcounter{nada}  \newcommand\makepersonrtable{%   \setcounter{nada}{0}%   \maketabular{%   \whileboolexpr     { test {\ifnumcomp{\value{nada}}{<}{\value{pcnt}}} }%     {\showperson{\csuse{person\thenada}} & \csuse{persontitle\thenada} & \csuse{personmail\thenada} \\ \hline \stepcounter{nada} }   }}  \begin{defineperson}{Mr.}   \persontitle{Wall Eye}   \personmail{weye@gmail.com} \end{defineperson}  \begin{defineperson}{Mrs.}   \persontitle{Perch}   \personmail{perch@gmail.com} \end{defineperson}  \begin{defineperson}{Mr.}   \persontitle{Brook Trout}   \personmail{btrout@gmail.com} \end{defineperson}  \begin{document}  \makepersonrtable  \end{document}   This does generate a table as I would have expected, but the alignment is off - e.g.,   Notice that the first "Mr." is not aligned with the second row.  Also notice the extra vertical lines at the bottom.  Any idea what's going on here? I know there are other ways of making tables, but this I'm trying a few alternatives as a learning exercise.


Any way to customize tile size in Windows 8?

Any way to set a custom tile size via the registry in Windows 8?  Now I don't mean I want to change the tile size of x tile to "small", "medium" or "large". I want to be able to set the exact size of a tile to whatever I damn well please.


passing argument to addEventListener gives 'undefined'

I am rendering some HTML elements using an array but when it comes to adding an event listener and passing relative arguments to it I appear to lose my binding and am unsure how to get it back. In my example below when I click on a rendered Div it gives me an alert of 'undefined'. Any help appreciated!    const results = [{     name: 'john',     surname: 'smith'   },   {     name: 'jake',     surname: 'brown'   } ] // create a div element for each item in array results.forEach((result) => {   const resultDiv = document.createElement('div')   resultDiv.textContent = result.name   resultDiv.addEventListener('click', (result) => {     alert(result.surname)   })   document.querySelector('#results-area').appendChild(resultDiv) })


keeping clients up to date with server state in an mmo-like game

I'm making an online RPG that could classify as an MMO, but I'm keeping the project scope very small by making the game's systems simple, and focusing mostly on what I want to learn: real-time networking.   The problem I'm facing is that that I don't want to update every player about every other player, all the time. This is a huge waste of bandwidth, and may even be impossible without a really beefy connection.  My solution is:   Keep track of which entities are in the client's visibility range Send a "full entity state" packet when the client enters the world Send a "create entity" packet for any entity that enters the visibility range Send a "delete entity" packet for any entity that leaves the visibility range Send a "update entity" packet for any entity that updates within the visibility range   I don't like the fact that when the client moves, I have to update the list of entities it can see, because it means I still have to loop over every entity. Is there anything better? Can this solution be improved somehow? If so, could you provide further reading, or possibly even sample implementations?


I am removing multiple segment from a video using ffmepg I am referring to this link -  I am executing below command:  String []complexCommand={"ffmpeg","-i","/sdcard/A.mp4","-filter_complex","[0:v]trim=duration=30[a];[0:v]trim=start=40:end=50,setpts=PTS-STARTPTS[b];[a][b]concat[c];[0:v]trim=start=80,setpts=PTS-STARTPTS[d];[c][d]concat[out1]","-map", "[out1]","-acodec","libmp3lame","-vcodec","mpeg4","-b:v","1024k","/sdcard/temp1.mp4"};       Executing this command creates a working Video but no audio can be heard. How do I enable audio. Or is there another way to remove multiple segments in ffmpeg.


Remove vote UI elements beside own question and answer posts

Currently, the system makes you think you can upvote/downvote your own question/answer but then you get notified that you can't. Why have the up/down vote buttons there then?   In general, if some operation is not allowed, then don't put UI for that up or make it disabled so it is apparently disabled - no post operation error panels please?  ps: hope this is not a dupe, but if so, just comment it and I will remove  (+a joke: a user notification panel message: I deleted this file. Is this a problem? Yes/No.)


Did Q torment anyone else besides the crew of the Enterprise, Voyager, and DS9?

I was surprised to be reminded that while Q appeared many times on The Next Generation and Voyager, he also appeared in one Deep Space 9 episode "Q-less".  Obviously, this is pretty lucky that he happens to have interacted with exactly the three crews we have TV shows about.  We know he interacted in the past with the El-Aurians (Guinan), the Borg, and any number of single-reference species.    But the obvious ones I can think of are throwaway references or backstory.  Are there any canon references to Q interacting in a more concrete way, in contemporary times with a major race (from our point of view) such as a Federation member, another Federation ship, the Klingons, Romulans, Ferengi, etc?


Let's say I have a cube, and that cube breaks apart into 100 different unevenly sized pieces.   How can I get the volume of each of those pieces compared to the cube's volume?  Using this in order to get the mass of each piece; for example, if the large cube is 100 mass, then the largest piece might be 30 and there might be some that are 0.2, etc...  Using C# and Unity with Rigidbodies


cannot remove old kernels to free space on /boot

i get these messages  sudo apt-get purge linux-image-4.15.0-45.48 E: Could not get lock /var/lib/dpkg/lock-frontend - open (11: Resource temporarily unavailable) E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), is another process using it?   thank you


Why does Meta Stack Exchange have privileges that don't have any effect?

On Meta Stack Exchange, I've noticed two privileges that don't make any difference on this site, but that are still listed on the .  One of these is the  privilege. This privilege is irrelevant on meta since there still aren't any ads on meta, as stated in the help center:     Meta sites have no advertisements so this privilege is not relevant for them.   The other such privilege is the  privilege. This privilege is irrelevant to Meta Stack Exchange since this site itself is meta and has no other meta site associated to it.  However, both these privileges are listed on the privilege page of Meta Stack Exchange and can be tracked as the next privilege on the profile page. Is there any reason to this?


When quoting a quotation, how do you handle the double quotes?

Assume there is original source text:     This restaurant is amazing with "delicious lasagna" and great service.   Make sure you go 6-7pm for the quietest times.   I want to quote "delicious lasagna" but not sure how to handle the outer double quotes.  If I was quoting more than just that quotation (e.g. is amazing with "delicious lasagna" and great service) I'd just do:     "...is amazing with 'delicious lasagna' and great service."   However, when quoting just that quotation, it looks like:     "'delicious lasagna'"   Is this the correct way or is there something better?


I am a software developer trying to understand how computers work at a lower level.  I have managed to create a few simple circuits, one which lights up an LED.  I have noticed that all the instructions advise you to connect the components in a certain way.  Please have a look at the circuit .  The LED is connected to column E and column F.  Why can't you just connect the LED to G7 and H7 and the black cable to F7? Why does the LED plug in across the gap?  I seem to remember something about this from school.  I have checked my GCSE textbook and also two textbooks which I am working through.  I have also Googled it but I cannot find an answer and hence the reason for this very basic question.


Number theoretic olympiad question involving a diophantine equation

I don't know the exact source of this question, but here it goes:  Find all ordered pairs $(x,y)$ such that $x,y \in \Bbb{N}$ and satisfy the relation: $$y^3=x^2+2$$  Of course $(x,y)=(5,3)$ is a solution but proving that infinitely many exist or none other exist is the part I'm stuck at.  I tried to work an infinite descent with congruent modulo but due to difference in degree one coefficient always vanishes. I am not that good at olympiad number theory, so do help me out here.


How do I interpret the statistics of a memtest run?

I have a notebook here that I suspect has a faulty memory module. I therefore downloaded  and let it run.  Note that the screenshot is not my actual one, it's provided by memtest86+    How do I interpret the numbers on the screen? I've let it run for about four hours and now I'm in pass 7.  Especially, what does   the test number the count of Errors the count of ECC errors   indicate? What are sane values for memory errors? At which point should I consider replacing memory?


Show that the product of all group elements is $e$ or $u$ if $G$ has exactly one involution $u$

Let $G$ be an finite abelian group, define $s= \Pi_{g\in G} g$, show that $s = e$ unless $G$ has exactly one involution $u$, in this case $s=u$.   I have the start of a proof, but I get stuck at a point.   Proof  Write $G$ as $G = \{e\} \cup I \cup \{g_1, g_1^{-1}, \ldots, g_n, g_n^{-1}\}$ where $I$ is a set of the all the groups involutions.  Since $G$ is abelian $\Pi_{g\in \{g_1, g_1^{-1}, \ldots\}} g = e$ we just need to examine $\Pi_{u\in I} u$  Now:   If $|I|=0$ then the theorem holds, If $|I| = 1$ then $I=\{u\}$ and $s= u$, the theorem holds If $|I| = 2$, requires closer examination:  Let $I = \{u_1,u_2\}$ be the set of all involutions (not equal to $e$), then $u_1u_2$ is also an involution (since $G$ is abelian).   If $u_1u_2 =e$ then $u_1=u_2$, contradiction, if $u_1u_2 = u_1$ then $u_2=e$, contradiction. $u_1 u_2=u_2$ results in the same contradiction. This means that the case $|I|=2$ is not possible. the case $|I|=3$ is possible, let $I = \{u_1,u_2,u_3\}$ then it's easy to prove $u_3 = u_1u_2$. The theorem holds.   How should I continue? I've tried splitting $I$ as   $$I=\{u_i: u_i \not = u_ju_k (\text{for a certain }j\not = k)\} \cup \{u_i = u_ju_k (\text{for a certain} j \not = k)\}$$ but I still get stuck.  Also the case $|I|= 4$ seems contradictory once again..


I can't find References section in my LaTeXed pdf file

First, I exported my references list from EndNote X7 using 'BibTeX Export' and saved the text file as 'first_paper.bib'. Then I included the following code into my TeX file.  \newpage % BibTeX users please use one of %\bibliographystyle{spbasic}      % basic style, author-year citations \bibliographystyle{spmpsci}      % mathematics and physical sciences %\bibliographystyle{spphys}       % APS-like style for physics \bibliography{first_paper}   % name your BibTeX data base   This code is included in the template TeX file provided by the journal and I only edited the database name to 'first_paper'. This 'first_paper.bib' file is located at the same folder as the TeX file.  I complied this code twice but I can't find References section in the final PDF file. What's wrong with this?


With screens getting larger and/or wider (some with aspect ratios over 21:9 nowadays), the typical way to snap windows to half the screen on the left or right becomes pretty useless.  That is, none really wants to have a text editor window that is half the screen on a 34" wide monitor with 3440 x 1440 resolution! (That would be a text window that is 1720 x 1440 or almost 40cm wide!)    To make better use of the screen real state, I have created a few scripts to make windows full height but only a portion of the whole screen (say, one third or one quarter).  I then assign each of those scripts to a specific key combination.  I am using xdotool to do all this so before you try you may want to install is using: sudo apt-get install xdotool.  Help for xdotool can be .  Here is one of the scripts.  This one is for the first window on the left taking only 25% of the screen width and 100% of the height:  #~/.resize_window_location_1 #!/bin/bash  xdotool getactivewindow windowsize 25% 100% # width and height xdotool getactivewindow windowmove 0 0      # Moves to 100,y   Then, for the second one, I use is:  #~/.resize_window_location_2 #!/bin/bash  xdotool getactivewindow windowsize 25% 100% # width and height xdotool getactivewindow windowmove 320 0      # Moves to 100,y   And so on and so forth with the last line changing based on the position (as an example these could be 0, 320, 640, and 960).  Note that in this case I had to manually add the position as 320 as I was unable to use percentage of the screen size.  I am not sure what units the 320 refers to (maybe characters) as it is does not seem to be pixels.  Then I go to: All settings > Keyboard menu and on the Shortcuts tab I create new custom shortcuts.  I use Shift+Ctrl+Super+Fn, that run one of the command: ~/.resize_window_location_n (for n=1,2,3, and 4).  All this works quite well except for one small annoyance: the first window which, in spite of me specifying its position as 0 0, it is always put a few characters to the right of the launcher.  I have tried setting the position as negative without any luck, instead, it is always placed a few characters to the right of the launcher.  Do any of you know a more elegant way of doing this AND/OR a command-line to move the window all the way to the left, just next to the launcher.


I've read of solutions, with let's say points $P(1,2,3)$, $Q(3,1,2)$, $R(2,3,1)$, where one subtracts point $P-Q$ and $P-R$ to get two vectors:  $\begin{pmatrix}1\\2\\3\end{pmatrix}-\begin{pmatrix}3\\1\\2\end{pmatrix}=\begin{pmatrix}-2\\1\\1\end{pmatrix}$  $\begin{pmatrix}1\\2\\3\end{pmatrix}-\begin{pmatrix}2\\3\\1\end{pmatrix}=\begin{pmatrix}-1\\-1\\2\end{pmatrix}$  to now get the cross-product:  $\begin{pmatrix}-2\\1\\1\end{pmatrix}\times\begin{pmatrix}-1\\-1\\2\end{pmatrix}=\begin{pmatrix}2\\-1\\2\end{pmatrix}$  hence the equation is $2x-y+2z=d$   by inserting, for example, point P we get  $2\times1-2+2\times3=d=6$  and thus  $2x-y+2z-6=0$  which can be transformed to  $z=-x+\frac12y+3$  so when I put in any point it should work right? When I put in R though, I get:  $1=\frac52$  So, what did I do wrong?


Get meta data from a previous version of a document through webservice in MOSS 2007

Is it possible to get metadata information from a previous version of a document in a document library using a SharePoint webservice?  I know I can use the _vti_bin/Versions.asmx webservice to get information about a previous version, but can I get the previous versions metadata?  If it's not possible through webservice is it possible using Client Object Model?


I've read somewhere that === is more secure than == So should I use something like this:      if ($user === "") {     echo "you are not logged in";     }   instead of      if ($user == "") {     echo "you are not logged in";     }   ? The question is probably stupid, but I never really used === so I don't know much about it from security standpoint.  I am strictly interested in why === is more secure than == The duplicate doesn't address that.


Win10 50% of memory being used on nothing

Lately, I've noticed that my memory usage is nearing almost 100% while playing games such as Overwatch, Rocket League, and Fortnite, and it's causing my game to stutter and crash. After booting, I noticed that my memory usage is around 50% while it used to be only at <=30%. The processes that are displayed in Task Manager are no where close to adding up to 4GB of RAM usage.        I've updated all of my drivers, and still no luck. I've looked around but most problems associated with this are associated with high non-paged pool memory and memory leaks.


ffmpeg - Create a video from image frame with a start and a count

Using ffmpeg, I made a video from multiple images with the below, which works, however I don't want to use all 200 images in my folder, wanting the video to contain only images from 1 to 100: ffmpeg -start_number n -i test_%d.jpg -vcodec mpeg4 test.avi  How can I specify the number of frames to include in the video, or the number of the ending frame?


Q: Suppose $a$, $b$, $c$ and $d$ are real numbers, prove $[a,b] \sim (c,d]$. My thought: If the question was "prove $[a,b] \sim [c,d]$" then take the first interval on the x-axis and the second one on y-axis. Then we can define a function like $y=c+ \frac{d-c}{b-a}(x-a)$ that maps all the points in $[a, b]$ to $[c,d]$. However the interval in the question is different. I don't know how to apply the idea to this. Thank you.


How do I determine the best Stack Exchange site for my question before posting?

I'm not sure where to ask my question. What would be the best protocol to follow to find out which Stack Exchange community would be best for my question?   Should I just make an educated guess and post there? Or can I first post here on Meta.SE and ask where I should post my actual question? Is one of Meta Stack Exchange's roles to give such guidance?


Finding center and radius of circumcircle

Find the center and radius of the circle which circumscribes the triangle with (complex) vertices $a_1,a_2,a_3$. Express the result in symmetric form.   I'm not sure where to start in this question. The circumcenter is the intersection of the perpendicular bisectors, but I don't know how to calculate the line equation of the perpendicular bisectors yet. As for the radius, after we find the circumcenter $c$ we can calculate it using $|c-a_1|$ (or $|c-a_2|$ or $|c-a_3|$; all three should be equal.) So how can I calculate the circumcenter?


How to find integral of: $$\int xe^x\sin(x)$$ I know it should be repeated integration by parts, but i do not know how many times i should do this and when to stop.


Org-level authentication towards an external service via Resource Owner Password Flow

Named credentials are a very useful tool to protect company-wide and personal credentials and as far as I know, Salesforce offers first class support to interpolate them in headers and body. I have to integrate with this external application using OAuth2 Resouce Owner Flow, which requires username and password to be set in the query string. What's the best way to handle this need?


"Unchecked or unsafe operations" error when compiling

I am novice at Java programming, and I'm trying to add a list of files to a crude little media player. Seemingly I've succeeded in achieving what I want with this:  public class MusicPlayerGUI     implements ActionListener {     private static JFileChooser fileChooser = new JFileChooser(System.getProperty("user.dir"));      private JList tracklist;     private MusicPlayer player;     private FileOrganizer organizer;     private List<String> tracks;     private JFrame frame;  public MusicPlayerGUI() {     player = new MusicPlayer();     organizer = new FileOrganizer();     tracks = organizer.listAllFiles();     makeFrame(); }  //Some methods omitted  public void play() {     int fileToPlay = tracklist.getSelectedIndex();     String filenameToPlay = organizer.getFile(fileToPlay);     player.play(filenameToPlay); }  public void setupList() {     tracks = organizer.listAllFiles();     String[] fileList = listAllTracks(tracks);     tracklist.setListData(fileList); }  public String[] listAllTracks(List<String> tracks) {     int numTracks = tracks.size();     String[] fileList = new String[numTracks];     for(int i = 0; i < numTracks; i++) {         String field = tracks.get(i).toString();          fileList[i] = field;     }      return fileList; }   But when I compile, even if it does compile, it gives me an error stating:     [pathname]/classname.java uses unchecked or unsafe operations.   Recompile with Xlint:unchecked for details   And everything in my player works, except it won't play the files, so I'm thinking that there might be a connection between the compiler warning I get, and the fact that the files won't play. Can anyone spot what I'm getting wrong?


java.lang.NullPointerException: clickable zone on imageView

I'm trying make a clickable zone on a imageView in a fragment. I have the flowing error :  java.lang.NullPointerException: Attempt to invoke virtual method 'android.view.View android.view.View.findViewById(int)' on a null object reference  Does anybody can help me ? code of my fragment : RelativeLayout rl = (RelativeLayout) this.getView().findViewById(R.id.clikeable1);         rl.setOnClickListener(new View.OnClickListener(){             @Override             public void onClick(View v) {                 Toast.makeText(getActivity().getApplicationContext(), "toto", Toast.LENGTH_SHORT).show();             }         });  code of the relativelayout <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"     xmlns:app="http://schemas.android.com/apk/res-auto"     android:layout_width="wrap_content"     android:layout_height="wrap_content">     xmlns:app="http://schemas.android.com/apk/res-auto"     xmlns:tools="http://schemas.android.com/tools"       <TextView          android:layout_width="wrap_content"         android:layout_height="wrap_content"         android:layout_alignParentStart="true"         android:layout_alignParentTop="true"         android:layout_marginStart="290dp"         android:layout_marginTop="110dp"         android:text="Entrez le code étape" />    <ImageView         android:id="@+id/imageView2"         android:layout_width="wrap_content"         android:layout_height="wrap_content"         app:srcCompat="@drawable/password_keyboard" />      <ImageView         android:id="@+id/passwordKo"         android:layout_width="wrap_content"         android:layout_height="wrap_content"         android:layout_alignParentStart="true"         android:layout_alignParentTop="true"         android:layout_marginStart="295dp"         android:layout_marginTop="170dp"         app:srcCompat="@android:drawable/presence_invisible" />      <ImageView         android:id="@+id/passwordOk"         android:layout_width="wrap_content"         android:layout_height="wrap_content"         android:layout_alignParentStart="true"         android:layout_alignParentTop="true"         android:layout_marginStart="405dp"         android:layout_marginTop="170dp"         app:srcCompat="@android:drawable/presence_invisible" />      <EditText         android:id="@+id/passwordEtape"         android:layout_width="wrap_content"         android:layout_height="wrap_content"         android:layout_centerHorizontal="true"         android:layout_centerVertical="false"         android:layout_marginTop="35dp"         android:ems="3"         android:inputType="numberSigned"         android:maxLength="4" />       <RelativeLayout         android:layout_width="350dp"         android:layout_height="350dp"         android:id="@+id/clikeable1"         android:onClick="action1"         android:layout_alignLeft="@+id/imageView2"         android:layout_alignBottom="@+id/imageView2"/>  </RelativeLayout>  Thank you. Max


When I open a site I see a mark over a question.See screen shot.  When I open the question mark is not remove.It still appear.    is this bug or?


Suppose that $a_1,a_2, \cdots, a_n$ are $n$ different integers. Then $[(x-a_1)(x-a_2) \cdots (x-a_n)]^2 +1$ is irreducible over $\mathbb Q$.   I've no idea why it is true. Thanks very much.


Which resolution is best if I want to print a document?

I am in a project where I need to do several documents. I did this size for a test:   A: 203x218cm, 300dpi B: 203x218cm, 72dpi C: 80x86cm, 300dpi   I would like to know some opinion about my files.   Which document works best if I want to print a document with good quality? It's a document in Photoshop   Thanks!


Counting arguments question about sums of binomial coefficients

Use counting arguments to prove these identities: I don't know how to type this: it is two numbers in brackets the first on top of the other, but there is no fraction line. Here is an image of both of the identities.  $${n \choose 0} + {n \choose 1} + {n \choose 2} + \cdots + {n \choose n} = 2^n$$ $$ {n \choose 1} + 2 {n \choose 2} + 3 {n \choose 3} + \cdots + n{n\choose n} = n 2^{n-1}$$


what is the basic difference between INNER JOIN and LEFT JOIN?

I am running the following two queries but both of them are giving the same output.  Query 1  SELECT * FROM EMP LEFT JOIN DEPT ON EMP.EMP_ID = DEPT.EMP_ID   Query 2  SELECT * FROM EMP INNER JOIN DEPT ON EMP.EMP_ID = DEPT.EMP_ID   THESE both queries give the same output i.e. all rows from both the tables. As far as I know left join should give only rows from the first table i.e. "EMP" and not from other table (DEPT).  thanks.


For an irrational number $a$ the fractional part of $na$ for $n\in\mathbb N$ is dense in $[0,1]$

How to prove that the $\{$ fractional part of $n\alpha\mid n \in \mathbb{N}$ $\}$ is dense in $[0,1]$ for an irrational number $\alpha$.   NOTICE that $n$ is in $\mathbb{N}$ Also notice that this is not a duplicate of the mentioned question as it does not carry a correct answer and the partially correct answer in the said question is given for integer multiple case, NOT for $n \in \mathbb{N}$


Compiling python to a single .exe, why is this so difficult?

I'm quite new to programming. I've recently made a simple snake game using python and pygame. Of course, I can play my game easily by running the .py script, but in wanting to share it with my less computer literate friends, I went on to try to figure out how to compile my code into a single .exe to make it easy for them.  I've tried py2exe and cx_Freeze, both giving me a dist or build directory with an .exe and several other files (dependencies). This does work, since I'm able to zip up the whole folder and distribute via .zip, but it's not ideal. I want to be able to wrap it all up in one file.   So I started googling 'how to compile python into a single exe'. However, unlike many of the programming problems I have tried googling before, I just can't get a straight, reliable answer. So far the most recent reliable answer I've tried gives me this setup.py script:  from distutils.core import setup import py2exe, sys, os  sys.argv.append('py2exe')  setup(         options = {'py2exe': {'bundle_files': 1, 'compressed': True}},         windows = ['snek.py'],         zipfile = None         )  # Python 3.4.4, py2exe 0.9.2.2; modules used: pygame, random   Still, it gives me a whole folder instead of a single .exe, which the program cannot run without.  So, I come to you, the all-knowing, the great, stackoverflow, with two questions.  Just in case I missed anything: how do you suggest I achieve my single .exe dream?  And: why the hell is this so difficult?


72h visa free transit BEIJING - HONG KONG - THAILAND - BEIJING - PARIS

I am french and my student visa for China arrives soon to its expiration date and I only have one entry. I am planning to go traveling to Hong Kong then Thailand and come back to Beijing (to find my stuffs), and finally go back to Paris 2 days after arriving to Beijing.  Am I eligible to 72-hour visa free transit in the Beijing Capital Airport ?  I already made some reasearch, and it seems that frontier security only check the first and third country you are going. In my case it would be Hong Kong and Beijing.  Do anyone who had similar situation can tell me ?


How to use LaTeX fonts to format the text?

Are there fonts in LaTeX equivalent to those of Microsoft Office ("Times New Romans, Veranda, Courrier ... ") ? If yes, how can we use them ? Which package contains them?


anyway to check that a img tag is broken or 404'd

I am using CasperJS to scrape some items, so I can't get on the page early enough to add load and error events on img tags. I would also prefer to not have to do a new XHR request for each image to determine it's validity.  Is there any way to select an image tag and determine if there is an image actually there or if it is not in which the alt text is displayed? JS only, after the page is fully loaded.  / EDIT  Not sure why this was marked duplicate when I am specifically asking if there is a way to do this without another network request. The above question has answers that require additional network requests.


Determining the role of "to" in these sentences

This situation has been confusing me for a long time, and I can't define the difference in the meaning of them. For instance:      I suddenly realized this is going to be far more fulfilling if I spent my life creating mazes.     I wonder may I use that one by another way, like:       I suddenly realized this is going to be far more fulfilling if I spent my life to create mazes.


nexus 4 red light flashing ,unresponsive

my nexus 4 , almost 1 month old, died all of a sudden ,only thing its doing nw is flashing a red light on charging. Cant switch it on or even cant reboot. As discussed in the this form i initially thought its complete battery drainage issue. so i kept the phone charging for almost 24hrs ....still no use... i bought it frm US thru my cousin and im staying outside  , so its not kind of easy for warranty claiming also .


How is movement of proteins and lipids between different domains of cell membrane prevented?  Why is the noncytosolic layer not able to do lateral movements between domains but cytosolic layer is able to do so?


What is the difference between "divides" and "divides exactly"?

Maybe this is the sort of question I could find the answer myself if I just knew the right search terms. I've gotten a whole bunch of search results and quite a bit of sidetracks.  In my handwritten notes, which are a little smudged and drawn from various books and journals, I have the definitions     $$f(n) = \prod_{p \mid n} p$$ is the product of primes $p$ that divide $n$   and      $$g(n) = \prod_{p \mid \mid n} p$$ is the product of primes $p$ that divide $n$ exactly   I underlined "exactly." I think those are $f$ and $g$, or they could be Greek letters, I'm not sure. This is a bit of notation I thought I copied from a Fib. Quart. article by Jean Konincke, but when I got the librarian to fetch me the article, I saw that while it does mention divisibility, it doesn't seem to distinguish between "plain" divides and "exact" divides. Also, I had the wrong author's name, though the right title.  Actually, I'm confused as to the meaning of those terms. Take $n = 28$. Wouldn't $f(n)$ be $14$ and $g(n)$ be $28$? But then what's the point of that? $f(n)$ is just the squarefree kernel of $n$, and $g(n)$ is just an identity function (presumably these are just applied to positive integers).  I'm missing something here, I must have neglected to copy the important clarifying details. Help anyone?


image not rendering properly (weird orange grain)

so, every time I try to render my image, i just get a bunch of orange noise. i can't even see the image I'm trying to view


Evaluation measures of goodness or validity of clustering (without having truth labels)

I'm clustering a set of data but I don't have truth document that allow me to evaluate the result of clustering (I have unlabelled data), so I can not use an external evaluation measure. In this case, is there any efficient evaluation measures - internal cluster validity measures, that will allow me to incrementally evaluate the clustering result each time I cluster some new data to the current clustering?


Why am I logged out of DataExlorer Exchange every day?

When I log in to an SE site, that login generally persists (across days, and even across browser restarts).  When I log in to ANOTHER SE site, that site will automatically log me in, based on my cross-se login.  But when I go to , where I logged in last time... only to discover I was logged out and have to MANUALLY re-login, once every couple of days or anytime I restart the browser.   Is there anyway I can get that site to have automated/preserved login the way normal SE sites do?


What is the meaning of responsive design?

I have heard of many websites using "responsive design".   What is this and why should somebody use it?


Glossy shader not visible in renderer preview

I have a problem with the glossy shader. I'd like for it to be visible in renderer preview the same way that it's visible in material preview. How do I do that? Here is a picture of how it looks in material preview mode:   And here is how it looks in renderer preview mode:


Edward Witten has stated that QFT is not mathematically rigorous, and that string theory helps us in unifying the forces much better. Can you give me a suitable example in which QFT lacks mathematical rigour?


Keep only 2 decimals after comma in Java

I'm doing a very simple operation. Here's the code: float expectedTotal = 32.97; float firstPrice = 7.99; expectedTotal -= firstPrice;  When I assert that, expectedTotal should be 24.98, but I end up with an error saying: expected [24.980001] but found [24.98]  So the first question would be: Where is this 0.000001 comes from? I have read in other stackoverflow that dealing with currencies is not ideal with float and I should use the DecimalFormat. I tried with the following code: DecimalFormat df = new DecimalFormat("#.##"); String s = String.valueOf(expectedTotal); String newString = df.format(s); expectedTotal = Float.valueOf(newString);  But receive the error: java.lang.IllegalArgumentException: Cannot format given Object as a Number  I also tried with a parse: DecimalFormat df = new DecimalFormat("#.##"); String s = df.format(expectedTotal);         try {             expectedTotal = (float) df.parse(s);         } catch (ParseException e) {             e.printStackTrace();         }  Basically, all I want is expectedTotal as a float with only 2 decimals. Anyone can help me please ?


How can I determine which time zone (e.g. Central Daylight Time) I'm in with JavaScript?

On my workstation using several browsers, JavaScript's new Date().toString() method returns a string such as:  Thu Aug 15 2019 17:34:40 GMT-0500 (Central Daylight Time)   I'm interested in how it knows about "Central Daylight Time"?  I know how to get the offset (e.g. -300) using , but I don't see any documented approach to get the named time zone.  Is parsing the output of toString() really the best approach?


I have an external sound card which mostly works fine, except that when its first plugged in, or when I turn on my laptop, the volume gets set to 100%. That is, the overall system volume, as shown in the sound indicator.  What I'm looking for is a terminal command that will set that volume to 50%, so that I can run it on login and not have to worry that the first audio I play is going to blare out at me if I forget to turn the volume down. What commands allow you to change that volume, i.e. the one in the sound indicator?  I've poked around in gsettings and dbus, but have been unable to find anything that would let me set the system volume like that. I do know about alsamixer, but that's not the solution I'm looking for, since that doesn't allow me to change the volume using the sound indicator or my laptop's multimedia keys.


Are there any utilities that aid indexing terms of LaTeX documents?  For example, I am looking for a utility that finds the most common words and phrases and asks me whether to include them in a LaTeX index.  thanks