I tried to install steam on Ubuntu 20.04 and steam had tried to install libgl1-mesa-dri:i386 and libgl1:i386 but I received these errors. Package libgl1:i386 is not available, but is referred to by another package. This may mean that the package.  This may mean that the package is missing, has been obsoleted, or is only available from another package  Package libgl1-mesa-dri:i386 is not available, but is referred to by another package.  This may mean that the package is missing, has been obsoleted, or is only available from another package However the following packages replace it:   libgl1-mesa-dri  E: Package 'libgl1-mesa-dri:i386' has no installation candidate E: Package 'libgl1:i386' has no installation candidate   I already have libgl1-mesa-dri and libgl1 installed I tried to do sudo apt-get installed --reinstalled libgl1-mesa-dri libgl1 but failed to download  Thank you Everyone in advance for your help. Edit/Note: I have already enabled i386 Architecture before installing steam.

There are now errors when updating and I cannot install most software due to a corrupted  /etc/apt/sources.list   file. Is there a copy I can download to replace it?  The file would be for Ubuntu 12.04 (Final Beta) in the United States.


What's a negative idiom for a situation where a person sacrifices long term benefit for small, short term relief. Example:  I am cold so I cut off pieces of my jacket to start a fire.  Basically inconveniencing, sacrificing something large for a small moment or purpose without hindsight.

I'm looking for a phrase that describes trying to fix problems caused by underlying issues, with the result of compounding the issue. I usually call this "targeting surface problems rather than root problems", but my terminology is verbose.  Example 1: A government bans buying and selling bananas in the state. Later, it passes a clause allowing citizens to purchase imported bananas.  Example 2: A divided highway is erected with two lanes going in each direction but, since it gets lots of traffic, the shoulders are widened into new lanes. This leaves no shoulder room.  What would be a more concise phrase?


To understand how to start multiple threads calling the same method, I want to use the following logic:   Create an array of threads Initialize the Threads using a lambda expression Start the threads.   The routine works if I use the Join function or if I start threads directly like this:   new Thread(EnterSemaphore).Start(i);   What I can see from the result is that the routine I am using is not working. Not all threads are displayed and I even see a thread with index number 6. I would like to understand why starting an array of threads like this fails.  class SemaphoreLock {      #region Fields     // SemaphoreSlim _sem heeft de capaciteit voor 3 elementen      static SemaphoreSlim _sem = new SemaphoreSlim(3); // Capacity of 3      public readonly object StartLocker = new object();      #endregion      #region Constructor     //      public SemaphoreLock()     {         Thread[] testStart = new Thread[10];          for (int i = 1; i <= 5; i++)         {              // If enabled, this works             // new Thread(EnterSemaphore).Start(i);              // This is not working.             testStart[i] = new Thread(() => EnterSemaphore(i));             lock (StartLocker) testStart[i].Start();              // Adding a join here works, every thread is started as a single thread             //testStart[i].Join();         }      }     #endregion       #region Methods     static void EnterSemaphore(object id)     {         Console.WriteLine(id + " wants to enter");          // Block the current thread until it can enter the Semaphore         _sem.Wait();          Console.WriteLine(id + " is in!");         Thread.Sleep(1000 * (int)id);         Console.WriteLine(id + " is leaving");         _sem.Release();          if (_sem.CurrentCount == 3)         {              Console.WriteLine("Done...");         }     }         #endregion  }

I'm running into a common pattern in the code that I'm writing, where I need to wait for all threads in a group to complete, with a timeout. The timeout is supposed to be the time required for all threads to complete, so simply doing thread.Join(timeout) for each thread won't work, since the possible timeout is then timeout * numThreads.  Right now I do something like the following:  var threadFinishEvents = new List<EventWaitHandle>();  foreach (DataObject data in dataList) {     // Create local variables for the thread delegate     var threadFinish = new EventWaitHandle(false, EventResetMode.ManualReset);     threadFinishEvents.Add(threadFinish);      var localData = (DataObject) data.Clone();     var thread = new Thread(         delegate()         {             DoThreadStuff(localData);             threadFinish.Set();         }     );     thread.Start(); }  Mutex.WaitAll(threadFinishEvents.ToArray(), timeout);   However, it seems like there should be a simpler idiom for this sort of thing.


I have a Mac with two network interfaces, connected to different networks.  For the sake of argument, let's say one is connected to a private network and the other to the Internet.  I understand that I can use the Networks system preference pane to place the Internet interface higher in the "service order" than the private network and that, by doing so, its "Router" will become the system's default gateway (and the other interface's "Router" is ignored).  However, this obviously results in all traffic being routed over the Internet (except the specific subnet of the private network to which the machine is directly connected).  I want to override this behaviour for the entire private network, routing all private traffic via the appropriate interface.  What is the "Apple Way" of accomplishing this?  Merely executing sudo route add ... only creates the route temporarily, whereas I want to associate it with the interface in some permanent way (i.e. that will survive the interface changing state, or the system rebooting).  I presume that the solution will involve launchd invoking a script after the interface has come up… but how?!

I'm adding a route to all 192.168.1.x ips through a gateway like so: sudo route add 192.168.1.0/24 10.0.0.2 .  How do I add this route permanently in High Sierra?


I became very confused about linear functions after reading this question   In the comments it says that $F(x)=2*x+4$  is NOT a linear function , (but an affine one). All my professors gave such examples when teaching linear functions. I am really confused now.  Should a linear function always be of the form $f(x)=t*x$ , where t is a constant ?  I think this could help me understand better linear transformations. I think one of the reasons I did not understand them is because I had a slightly wrong definition of linear functions.  HOWEVER, on Wikipedia, the definition of linear functions seems to accepts functions that also have a constant added or subtracted from the first (linear?) part.      So is wikipedia wrong on this one ?

I am a bit confused. What is the difference between a linear and affine function? Any suggestions will be appreciated


First of all, I'm not 100% sure what I'm asking is a right thing to do or not. So please free feel to correct me if I'm wrong.  Using Spring Security, I've developed a REST API backend which users can log in using some custom entry. If my users authenticate themselves using my custom API, there will be a session created for them and the rest of API entries will be accessible to them, considering their role and ACL.  At the same time, these APIs are designed so they can provide services to other software. So I thought it makes sense to enable some HTTP Basic Authentication as well. Later on, I might be working on digest as well. And if some request is authenticated using one of these methods, there will be no session created for them. And they'll need re-authenticate for every single request. It's a stateless API.  So far everything is great. The users and other systems can make use of the same sets of APIs. But the problem is when a user's session is expired. Or when some user starts using the backend services before he logs in. In such cases, the right strategy is to redirect the user to a login page and ask them to authenticate themselves. But since I've enabled the HTTP Basic Authentication, calling a REST API which needs authentication (while the user is not authenticated) leads to a browser popup asking for the username and password.  Of course, the user can enter the credentials and keep using the system. But I don't like this way of authentication for my users. First of all, the authentication credentials will stick and I consider it a security risk. They are easily be saved into the browser without informing the user they are. And it's hard to get rid of the saved credentials. The user can leave the computer without even knowing that his username and password are saved.  So my question is, is it possible to have Basic Authentication enabled but at the same time, prevent the browser from knowing it? Or even better, acting on it?  I suspect that if I prevent the WWW-Authenticate response header on the way back, I might be able to do so. But then, I'm not sure of the ramifications of such a decision. Also, I don't know how to remove that header from the response for all of the APIs.

My web application has a login page that submits authentication credentials via an AJAX call. If the user enters the correct username and password, everything is fine, but if not, the following happens:   The web server determines that although the request included a well-formed Authorization header, the credentials in the header do not successfully authenticate. The web server returns a 401 status code and includes one or more WWW-Authenticate headers listing the supported authentication types. The browser detects that the response to my call on the XMLHttpRequest object is a 401 and the response includes WWW-Authenticate headers. It then pops up an authentication dialog asking, again, for the username and password.   This is all fine up until step 3. I don't want the dialog to pop up, I want want to handle the 401 response in my AJAX callback function. (For example, by displaying an error message on the login page.) I want the user to re-enter their username and password, of course, but I want them to see my friendly, reassuring login form, not the browser's ugly, default authentication dialog.  Incidentally, I have no control over the server, so having it return a custom status code (i.e., something other than a 401) is not an option.  Is there any way I can suppress the authentication dialog? In particular, can I suppress the Authentication Required dialog in Firefox 2 or later? Is there any way to suppress the Connect to [host] dialog in IE 6 and later?    Edit Additional information from the author (Sept. 18): I should add that the real problem with the browser's authentication dialog popping up is that it give insufficient information to the user.  The user has just entered a username and password via the form on the login page, he believes he has typed them both correctly, and he has clicked the submit button or hit enter. His expectation is that he will be taken to the next page or perhaps told that he has entered his information incorrectly and should try again. However, he is instead presented with an unexpected dialog box.  The dialog makes no acknowledgment of the fact he just did enter a username and password. It does not clearly state that there was a problem and that he should try again. Instead, the dialog box presents the user with cryptic information like "The site says: '[realm]'." Where [realm] is a short realm name that only a programmer could love.  Web broswer designers take note: no one would ask how to suppress the authentication dialog if the dialog itself were simply more user-friendly. The entire reason that I am doing a login form is that our product management team rightly considers the browsers' authentication dialogs to be awful.


I am trying to include MATLAB figures as pdf files in my thesis. However after reinstalling my OS this doesn't work anymore and I am desperately trying to find a solution...  What I do: I use the function matlabfrag.m to export the .fig files to .eps and .tex files. This works perfectly fine. Then I create a temporary .tex file. This file contains the command  \psfragfig{figurename}   which replaces the standart MATLAB font with latex commands formulas etc. specified in the figurename.tex file. This temporary .tex file is then used to create a .pdf file with the command   pdflatex -shell-escape --src -interaction=nonstopmode tempfilename.tex    So far so good. Before I reinstalled my OS everything worked fine. Now I get the Error:     Package pstool Warning: Execution failed during process:     ps2pdf -dAutoFilterColorImages=false -dAutoFilterGrayImages=false -dColorImag   eFilter=/FlateEncode -dGrayImageFilter=/FlateEncode -dPDFSETTINGS=/prepress "70   00_CFC60_acc_single-pstool.ps" "7000_CFC60_acc_single-pstool.pdf"   This warning occurred on input line 16.      LaTeX Font Info:    Try loading font information for T1+aett on input line 16.   (/usr/share/texlive/texmf-dist/tex/latex/ae/t1aett.fd   File: t1aett.fd 1997/11/16 Font definitions for T1/aett.   )   runsystem(echo "   === pstool: end processing ===   ")...executed.      runsystem(rm -- 7000_CFC60_acc_single2.oldaux)...executed.      [1   Non-PDF special ignored!{/var/lib/texmf/fonts/map/pdftex/updmap/pdftex.map}]   (./7000_CFC60_acc_single2.aux)      LaTeX Warning: Label(s) may have changed. Rerun to get cross-references right.      )   (\end occurred when \ifx on line 16 was incomplete)    The .ps file looks perfectly alright. As the error suggests the problem must be .ps >> .pdf. I also stripped down the .tex file to a bare minimum, however only encountered other errors. Here is my temporary tempfilename.tex file:  \documentclass[11pt, oneside]{article} \usepackage{graphicx} \usepackage{amsmath} \usepackage[T1]{fontenc} \usepackage[utf8x]{inputenc} \usepackage{ae} \usepackage{psfrag} \usepackage{color} \usepackage[crop=pdfcrop]{pstool} \pagestyle{empty}  \begin{document}   \begin{figure}       \centering       \psfragfig[width=\textwidth]{7000_CFC60_acc_single}   \end{figure}  \end{document}   I hope someone can help me :)

I realize this question might have been asked already, but I'm relatively new to LaTeX and matlab so I need some help.  I'm trying to export a figure for inclusion in my tex document (to be compiled using pdflatex). The figure contains axes labels with LaTeX fonts (xlabel(...,'interpreter',latex)).  I've looked extensevely on the web but have not found a satisfactory solution.  My best solution so far is to produce a png file by using the savefig.m function, but the quality is not ideal  I'd be very grateful for any hints.


I was noticing my performance on Ubuntu was a little slow after running some codes, and I decided to research on how to upgrade my laptop. I ran into the free -m command, and I was shocked to find out that, despite my RAM board being 8 Gb, it only displays as if I had 4 Gb.               total        used        free      shared  buff/cache   available Mem:           3845        1870         259         254        1715        1477 Swap:         15258           9       15249  Afterwards, I confirmed the state of my memory going to Settings > About, where I find this:  I don't understand much on hardware and on Ubuntu in general, as I only recently transformed my Windows 10 into a Ubuntu dual-boot, then finally taking the plunge to have Ubuntu as my only boot. Did I screw something up? Do I have to format everything and start again? How do I make my computer use its 8 GB Ram? As additional information: my laptop is a Samsung Expert L40, NP350XAA-XD1BR. EDIT: I double checked my RAM and it's a 4 GB - seems there's an onboard 4GB memory I don't have access to, visually. But Samsung BIOS confirm it's 8 GB:  EDIT 2: SOLVED! Just needed to clear RAM with a cotton swab. Turns out it was hardware related.

Recently i had added a 2GB DDR3 ram in my acer laptop. As a result my total ram is 4GB (2x2). I was running ubuntu 12.04 32bit(pae kernel). Everything was working fine. Now i have upgraded (new install) to 13.04 64bit. Suddenly i noticed that system is showing only 1.7GB. So i run lshw to ensure the fact. But lshw shows correct result (4GB = 2x2). How could i solve this??? There is no settings in BIOS for ram at all. My system is newly installed. No additional applications is installed except amd-catalyst driver.  System:  Acer aspire 4250 E-450 apu       Note: BISO also showing that 4GB ram installed.


I wrote a program and have problem with results. When I'm enter some numbers, for example 43.01, conditional operator ignores that statement is true and gives me a wrong output ( 0 cents ), where is the problem?  int main() {     double money_amount;     cout << "Enter money amount. For example: 3.59\n";     cin >> money_amount;     int dollar_amount = money_amount;     double cent_amount = money_amount - dollar_amount;     cout << cent_amount << "\n"; // to make sure that there is 0.01     dollar_amount == 1 ? cout << "You have 1 dollar\n" : cout << "You have " << dollar_amount << " dollars\n";     cent_amount == 0.01 ? cout << "You have 1 cent\n" : cout << "You have " << floor(cent_amount*100) << " cents\n"; // here is the problem }

Consider the following code:   0.1 + 0.2 == 0.3  ->  false   0.1 + 0.2         ->  0.30000000000000004   Why do these inaccuracies happen?


I want to add few jquery in my basic page of drupal website to call some api with parameter. Can any one explain me how can i accomplish this. $.ajax or $.post we can do right but its not happening in basic page. I wanted to triggerd that jquery when i click html submit button... *in this case i am not using hook_form actully.**  This is only for one page...basically its a drupal basic page.

Is there a location where I can drop in a custom JavaScript file in Drupal 7.x?  It just includes simple event actions for menus, and I don't want to edit the theme/module files.  Or do I have to just add the "include" hook to the theme/module?


Any one please give the diff between Mutable objects and Immutable objects with example.

This could be the dumbest question ever asked but I think it is quite confusing for a Java newbie.    Can somebody clarify what is meant by immutable?  Why is a String immutable? What are the advantages/disadvantages of the immutable objects? Why should a mutable object such as StringBuilder be preferred over String and vice-verse?   A nice example (in Java) will be really appreciated.


Show that the number of permutations of $n$ numbers, for $n \ge 2$, with two cycles is at most $(n - 1)!(\log(n - 1)+1)$, where $\log$ denotes the natural logarithm. Justify your answer. I assume we would use a summation at some point, but I'm unsure as to where. I have tried using notes I have made on this topic but can't seem to find anything that directly relates to this question. Could someone also explain the concept of a permutation cycle and cycle lengths as these are things I don't fully understand. Thank you in advance.

Show that the number of permutations of n numbers, for n ≥ 2, with two cycles is at most (n−1)!logn. Unsure as to were to start any help would be appreciated.


I am trying determine if there is a significant difference in preference of activities between males and females.I'm using a survey with the following question on 7-point likert scale:  Question 1: I like activity 1. Strongly disagree ---- Strongly agree  Question 2: I like activity 2. Strongly disagree ---- Strongly agree  Question 3: I like activity 3. Strongly disagree ---- Strongly agree  What statisical analysis could I use to determine if there is a significant difference in preference and what activity is most prefered by the sexes?

Following on from : Imagine that you want to test for differences in central tendency between two groups (e.g., males and females) on a 5-point Likert item (e.g., satisfaction with life: Dissatisfied to Satisfied). I think a t-test would be sufficiently accurate for most purposes,  but that a bootstrap test of differences between group means would often provide more accurate estimate of confidence intervals. What statistical test would you use?


Lately my Ubuntu 16.04 has been asking me to upgrade to a newer version. I wonder: if I upgrade what is going to happen to my data and to the programs I have installed?

What are the different ways I can use to upgrade Ubuntu from one release to another?


I am using the symbol $\Box$ as a binary operator and would like to create a unary operator symbol starting from that. My goal is to have a symbol that behaves like $\Bigotimes$ compared to $\otimes$, for example.  How can I do that? (I know that I can resize the symbol, for example right now I am using $\mathop{\text{\Huge $\Box$} \text{\normalsize}}$, but this has the disadvantage of not scaling properly in $...$ vs. $$...$$ environments, and it is also not positioned properly in the vertical direction).  Many thanks!

I would like to create a new "big operator", by which I mean something like the Σ character used for summations.     I know about the \DeclareMathOperator* command, which creates an operator whose superscripts and subscripts are written directly above and below the operator. Here is an example of that.  \documentclass{article} \usepackage{amsmath} \usepackage{amsfonts} \DeclareMathOperator*{\foo}{\maltese}  \begin{document} \[ \foo_{i=3}^{6}(f^2(i)) \] \end{document}     However, I would like to make my operator "big". I tried this:  \DeclareMathOperator*{\foo}{\text{\Large $\maltese$}}     but that feels like a bit of a hack. Besides, the operator is too high, and needs moving down a tad to align it properly with its operand. So, what's the proper way to do this? How, for instance, is the \sum operator defined?


Hi all I have an h2 element like so:
Back
   and I added an image before:  #back::before {     background-image: url(/images/arrow.png);     background-size: 20px 30px;     display: inline-block;     width: 30px;     height: 40px;     content: "";     background-repeat: no-repeat;     background-position: center; }   However the output is the screenshot attached...my question is how do I get my arrow to be aligned in the middle and before the text. How would I do that?

Why won't vertical-align: middle work?  And yet, vertical-align: top does work.   span{   vertical-align: middle; }
      Doesn't work.


In one of my class, I wrote these lines:  String[] score = {"2","3","4","5"}; player = new otherClass(score); host = new otherClasee(score); player.shuffle(); host.shuffle()  System.out.println("player is: " + Arrays.toString(player.point)); System.out.println("host is: " + Arrays.toString(host.point));   And the otherClass is:  public class otherClass {    String[] point;    public otherClass(String[] something){       point = something;    }    public void shuffle(){        int ind;        String change;        Random rand = new Random();        for (int i = point.length - 1; i > 0; i--){             ind = rand.nextInt(i+1);             if (ind != i){             change = point[i];             point[i] = point[ind];             point[ind] = swap;    } }   The "shuffle()" is the method inside class "otherClass" to swap elements of point[]. But the result I receive is that "player" and "host" are shuffled in the exact same way. Specifically, the "player" is shuffled first, then "host" is later. I was expecting the two shuffles to be different.

I always thought Java uses pass-by-reference. However, I've seen a couple of blog posts (for example, ) that claim that it isn't (the blog post says that Java uses pass-by-value). I don't think I understand the distinction they're making. What is the explanation?


Hello there :) I am basically trying to pull data from a MySQL table, and with it I need the PHP to get the current time on the server as well. So E.G. if it is currently 16-12-2015 and 20:50:36, i need this time to then be converted to unix (which is done with strtotime()).  My question is, how do I get the time of the server in unix put into a $variable?  Thank you,  Joshua

Which PHP function can return the current date/time?


I would like to input a numeric value and output also a numeric value after it has gone through some nodes realizing a mathematical function.   I know how to realize the mathematical function with multiply and adding nodes (here: f(x)=x^2 + 5x ) but I do not know how to continue from the ADD-node on to display the output as a number.

How to visualize a value resulted from math node,or just to know it. I tried the way of scaling this value to the scene size and then pick the color and get the value but I want more effective way to do this.


If $A\in\mathbb R^{N\times p}$, for $p<N$, is there anything simple I can say about the solutions $X\in \mathbb R^{N\times p}$ of the equation $AX^\top+XA^\top=0$ ?

Suppose that I know $A$. And all matrices in the equation are square matrices. I want to solve for $X$ given that  $$X^tA + A^tX = 0$$  I'm not really good at matrix calculus. Is it possible to solve this problem in the sense that we find a closed form solution for $X$ in terms of $A$ and possibly some other vector B (as a free parameter, if necessary)? For example, when $A = I$, we see that $X=B$ for any anti-symmetric matrix $B$.  The motivation for this question comes from computer vision. We know that a homography $H$ between two photos is induced by a plane in space if and only if $H^tF$ is anti-symmetric where $F$ is the fundamental matrix. I also know that $F$ can be parametrized as $F=[e]_{\times}M$ where $M$ is invertible. Now I want to find a general form for $H$. Hence, this question.  Edit: Since the general case might be too broad and challenging, let's narrow down our attention to the simpler case where $A$ and $X$ are $3 \times 3$ matrices and $A$ is not invertible. The general case seems very interesting too.


For my thesis I have to repeat my theorems, not just the number but the exact wording of the Theorems. I found the question , however, this does not answer the problem I have.  The theorems have been defined by  \begin{WP}\label{WP:wp2} some working proposition that i have declared \end{WP}   The option of declare a new command is not the direction I'd like to go. Are there any suggestions?

Suppose I have some theorem in the paper  Section 1 Theorem 1.1. Let ...  And then later in the paper I want to recall the theorem by reprinting it  Section 4 We recall Theorem 1.1: Theorem 1.1. Let ...  What's the proper way to do this?


I'm playing a warlock/sorcerer. Can I cast a 1st level warlock spell with a 1st level slot instead of a 2nd level slot using my sorcerer spellcasting instead of pact magic?

The Pact Magic paragraph on page 164 of the Player's Handbook multiclassing section reads:      you can use the spell slots you gain from the Spellcasting class feature to cast warlock spells you know.   If I were to multiclass as a Warlock 5 / Rogue 3 Arcane Trickster and cast a Warlock spell using my Arcane Trickster's 1st level spell slot, would it be cast as a 3rd level spell?  From the Warlock Spell Slots section on page 107 of the Player's Handbook:      The table also shows what the level of these slots is: all of your spell slots are the same level.   The  appears to only address the issue of spell slot recovery, not casting.


Although there's equal and opposite reaction, usually the force is not balanced Can you explain why?

Given Newton's third law, why is there motion at all? Should not all forces even themselves out, so nothing moves at all? When I push a table using my finger, the table applies the same force onto my finger like my finger does on the table just with an opposing direction, nothing happens except that I feel the opposing force. But why can I push a box on a table by applying force ($F=ma$) on one side, obviously outbalancing the force the box has on my finger and at the same time outbalancing the friction the box has on the table? I obviously have the greater mass and acceleration as for example the matchbox on the table and thusly I can move it, but shouldn't the third law prevent that from even happening? Shouldn't the matchbox just accommodate to said force and applying the same force to me in opposing direction?


I know this implies $F$ is surjective, but not sure if this helps.

Definition of "at most countable" used: A set $A$ is at most countable iff it's finite or there exists a bijection $f:\mathbb{N} \rightarrow A$.  Problem: I want to prove that if there exists a surjective function from the set of natural numbers to a set $A$, then there exists a bijective function $f:\mathbb{N}\rightarrow A$, with the condition that $A$ is infinite (Because if it´s finite, one condition is met and the problem is over).  My approach for these kind of problems used to be creating a function that just maps from the first set to the second, making permutations as necessary. But infinity is confusing me. So this is my approach so far:  Index each set with different index numbers, both natural numbers. $x$ for naturals, and $y$ for elements in $A$. So we would get $f(x_n)=y_i$, $f(x_{x+1})=y_{i+1}$ and so on. Then create another function:  $g(x_n) = \left\{    \begin{array}{l l}     f(x_n) & \quad \text{if $\forall a<n, f(x_a)\neq y_i$}\\     h(x_n) & \quad \text{if $\exists a<n/f(x_a)=y_i$}   \end{array} \right.$  The problem we're trying to avoid here is having two elements in $\mathbb{N}$ so that $f$ maps them to the same $y$. Here, the so called "$h$" function: what should it do? Or is there another approach I should be using instead? (Like, Axiom of Choice and its equivalents).


I made a simple test and it dosen't work.  @RunWith(SpringRunner.class) @SpringBootTest @ContextConfiguration(classes = {SIConfiguration.class, ExceptionTypeRouter.class}) public class ExceptionTypeRouterTest {      @Autowired     @Qualifier("inDefaultChannel")     private DirectChannel in;      @Test     public void fistRouteTest() {          in.send(new GenericMessage<>("ready!"));      } }   @Configuration @Slf4j public class ExceptionTypeRouter {      @Bean     @Qualifier("inDefaultChannel")     public DirectChannel inDefaultChannel() {         return MessageChannels                 .direct()                 .get();     }      @Bean     @Qualifier("directErrorChannel")     public DirectChannel directErrorChannel() {         return MessageChannels                 .direct()                 .get();     }      @Bean     public ErrorMessageExceptionTypeRouter errorMessageExceptionTypeRouter() {         ErrorMessageExceptionTypeRouter router = new ErrorMessageExceptionTypeRouter();         router.setChannelMapping(IOException.class.getName(), "directErrorChannel");         router.setChannelMapping(NullPointerException.class.getName(), "directErrorChannel");         router.setDefaultOutputChannel(outDefaultChannel());          return router;     } }       The proplem is somwhere here. Caze this.getApplicationContext() is null.   private Class<?> resolveClassFromName(String className) {         try {             return ClassUtils.forName(className, this.getApplicationContext().getClassLoader());         } catch (ClassNotFoundException var3) {             throw new IllegalStateException("Cannot load class for channel mapping.", var3);         }     }   Error log:     org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'errorMessageExceptionTypeRouter'   defined in integration.exceptiondemo.configuration.router.ExceptionTypeRouter: Bean instantiation via factory method     failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.   integration.router.ErrorMessageExceptionTypeRouter]: Factory method 'errorMessageExceptionTypeRouter' threw exception; nested     exception is java.lang.NullPointerException

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


I have two separate Google Sheets files ("File A" and "File B") that are in two different places in my Google drive.    Is it possible for me to reference a range of cells in "File A" to be copied into "File B"?  From what I've seen, the built in function IMPORTRANGE only works to reference information from a different sheet within the same file and does not work for inter-file communication... unless there is some cool voodoo stuff that can be done.

I have a monthly spreadsheet that relies on figures from the previous month. I'd like to import these values dynamically rather than cutting and pasting them. Is this possible? How do I do it?


How do I extract all the characters (including newline characters) until the first occurrence of the giver sequence of words? For example with the following input:  input text:  "shantaram is an amazing novel. It is one of the best novels i have read. the novel is written by gregory david roberts. He is an australian"   And the sequence the  I want to extract text from shantaram to first occurrence of the which is in the second line.  The output must be-  shantaram is an amazing novel. It is one of the   I have been trying all morning. I can write the expression to extract all characters until it encounters a specific character but here if I use an expression like:  re.search("shantaram[\s\S]*the", string)   It doesn't match across newline.

For example, this regex  (.*)<FooBar>   will match:  abcde<FooBar>   But how do I get it to match across multiple lines?  abcde fghij<FooBar>


$\cot x=\sin x \sin(\pi/2 -x) + \cos^2x \cot x$  I'm having difficulty with figuring out how to prove trigonometric identities.  I know that in order to do these you need to use the trig ratios reciprocal, quotient  identities and compound angle formulas.  If someone could guide me through these kind of questions.  That would be really appreciated!

Prove: $$\cot x=\sin x\,\sin\left(\frac{\pi}{2}-x\right)+\cos^2x\,\cot x$$   Hi there! So this problem asks to prove this trigonometric identity.  I am not sure how to approach these problems other than needing to know the quotient,p ythagorean, and reciprocal identities.  From here I can see that $\cot x$ can be changed to $1/\tan x$, but is it really necessary? If someone could help with this, it'd be very appreciated!


I could do it long way i.e cat hi.txt | grep 'important url' > imurl cat hi.txt | grep -v 'not important url' > imnoturl cat hi.txt | otherprogram1 cat hi.txt | otherprogramN  However, is there anycommand that allows me to do it in one line. Just curiosity not a neccessity. Like: cat hi.txt | someprogram -p1 ' grep "important url" > imurl ' -p2 ' grep -v "not important url" > imnoturl ' -p3 ' other task ' -pn '' Edit: I want to merge this two: cat $fdns_w1 | pigz -dc | fgrep ".$1" | awk -F 'name":"' '{print $2}' | awk -F '","type' '{print $1}' | sort -u cat $fdns_w1 | pigz -dc | fgrep ".$1" | awk -F 'value":"' '{print $2}' | awk -F '"}' '{print $1}' | sort -u

I have an application which will produce a large amount of data which I do not wish to store onto the disk. The application mostly outputs data which I do not wish to use, but a set of useful information that must be split into separate files. For example, given the following output:  JUNK JUNK JUNK JUNK A 1 JUNK B 5 C 1 JUNK   I could run the application three times like so:  ./app | grep A > A.out ./app | grep B > B.out ./app | grep C > C.out   This would get me what I want, but it would take too long. I also don't want to dump all the outputs to a single file and parse through that.  Is there any way to combine the three operations shown above in such a way that I only need to run the application once and still get three separate output files?


I am reading an article here:       When you say the word “me,” you probably feel pretty clear about what that means. It’s one of the things you’re clearest on in the whole world   I noticed a very detailed point: the , in the sentence is inside the ". Is that a typo of the original post or it's a legal usage?

I am very well aware of punctuation usage difference between American and British usage, but this part confuses me a little.  Example:     A. Why did he ask, "Who are you?"   B. Why did he ask, "Who are you?"?   C. Why did he ask, "Who are you"?   The reason I am confused is because a question is enclosed in a question. Now I know when to put a question mark inside and outside quotation mark:     He asked, "Will you go and jump in the pond?" [a question within a statement]      He really said, "Go jump in the pond"? [a statement within a question]   So, which one of the three options is correct? Same goes for use of the period. Should it be placed inside or outside:     D. He said, "Pluck that flower."   E. He said, "Pluck that flower".   F. He said, "Pluck that flower.".   If I pick the D option, would it also mean that my sentence ended with the enclosed sentence? If I pick the E option, would it mean that my sentence ended while the enclosed sentence was incomplete?  B. and F. seems awkward. Please help!


I made a basic number guessing game, everything was working fine until i tried to add a "play again" feature at the end of it. When the program is run, after inputting the first guess, it just starts the loop over again without going through the rest of it. Also, I am unsure if my code is efficient or not. It seems like too much coding for a simple concept. Is this an average length for a basic guessing program? Sorry if my questions are worded strangely. I'm a first year college student just learning the basics of programming. Here is my code:  public static void main(String[] args) {     Scanner input = new Scanner(System.in);     Random randomNum = new Random();      boolean playing = true;     do {         int max = 100;         int min = 1;         int counter = 10;         int guess = 0;          int guessThis = min + randomNum.nextInt(max);         System.out.println("I'm thinking of a number between 1 and 100. You have 10 tries to guess it. What's your first guess?");          guess = input.nextInt();         counter--;          if (guess == guessThis) {             playing = false;         } else {             playing = true;         }         if (guess > max) {             System.out.println("I said the number is between 1 and 100. You think this is a GAME MUTHA FUCKA??! Guess again... :) " + counter + " guesses left.");           }         if (min > guess) {             System.out.println("Bruh. Are you stupid? " + guess + " is not between 1 and 100. Try again dummy boi. " + counter + " guesses left.");         }            if (guess > guessThis && min <= guess && guess >= max && playing == true && counter > 0) {             System.out.println("Too high. Guess again. " + counter + " guesses left.");         } else if (guess < guessThis && min <= guess && guess >= max && playing == true && counter >0) {             System.out.println("Too low. Guess again. " + counter + " guesses left.");           }          if (playing == false && counter > 0) {             System.out.println("You guessed it!");         }         if (counter <= 0) {             System.out.println("You lose! Ha! Fuck off broooooo. My number was " + guessThis);             playing = false;         }          }while (playing == true);      String answer;      if (playing == false) {         System.out.println("Wanna play again? (y/n)");     }     answer = input.next();     if (answer == "n") {         System.out.println("My game isn't fun enough for you? Wow, okay, rude. Bye then. Dh.");         input.close();     } if (answer == "y") {         playing = true;     } }   }

I've been using the == operator in my program to compare all my strings so far. However, I ran into a bug, changed one of them into .equals() instead, and it fixed the bug.  Is == bad? When should it and should it not be used? What's the difference?


It looks like this answer may have been down voted because a commenter doesn't like that it's a violation of Amazon's terms of service. Is this a valid reason for a downvote?    This question is not a duplicate as it lists a specific situation that is not mentioned in the question or any of the answers of its proposed duplicate. Changing the title to clarify the point.  The answer in here relates directly to the question that was asked, and did not relate to whether or not it will break Amazon's terms of service.  That's not really relevant to whether or not an HTTP request can be made from Node.js to Amazon. The downvote appears to be whether it should be made against the will of Amazon.

If you are the OP, could you not request for a downvote to be reviewed by some moderators so that you are not the one who gets wrongfully blocked from asking questions, but him/her for downvoting unreasonably?  That you could appeal against anything you feel is unjust to you - like in real life - would be great. If you do it right, you won't have to fear getting blocked from asking questions any more. Creating new accounts just to be able to keep asking questions is getting tiresome.


I'm learning the basics of Java, and wanted to practice something. So found a page of some programing problems and I get stuck at this problem:  2) Write a program that asks the user for her name and greets her with her name.  3) Modify the previous program such that only the users Alice and Bob are greeted with their names.  I've made well the 2nd but I have trouble with 3rd one.  System.out.pritnln("Please enter your name "); Scanner input = user new Scanner(System.in); String user_name; user _name = input.next(); if(user_name == "Alice"){ System.out.println("Hello " + user_name + ", sweet name."); if(user_name=="Bob"){ System.out.println("Hello " + user_name + ", sweet name."); } }


I'm trying to create a console application that gives me an updating clock in the corner with the ability to give an input.  I've tried using multiple threads but it gives me weird errors.  My clock function:  public class Work {     public void Count()     {         for (int i = 0; i < 100; i++)         {             DateTime date = DateTime.Now;             Console.SetCursorPosition(0, 1);             Console.Write(new string(' ', Console.WindowWidth));               Console.SetCursorPosition((Console.WindowWidth - 8) / 2, 0);             Console.Write(String.Format("{0:HH:mm:ss}", date));             Console.WriteLine();             if (i == 90)             {                 i = 0;             }             else             {                 // Continue             }         }     } }   My main function:  class Program {     public static void Main(string[] args)     {         Console.CursorVisible = false;         Work w = new Work();         Console.WriteLine("Main Thread Start");          ThreadStart s = w.Count;         Thread thread1 = new Thread(s);         thread1.Start();         int i = 2;         Console.SetCursorPosition(0, i);         i = i + 1;         Console.WriteLine("Input:");         string input = Console.ReadLine();         Console.WriteLine(input);     }  }   Does anybody know how I can achieve this, is there any possible way that I can write to a clock with a different cursor or something along the lines of that?

I have a console application project in C# 2.0 that needs to write something to the screen in a while loop. I do not want the screen to scroll because using Console.Write or Console.Writeline method will keep displaying text on console screen incremently and thus it starts scrolling.  I want to have the string written at the same position. How can i do this?  Thanks


How can I prove this proposition: If a function $f$ is measurable then, its absolute value, $|f|$, is also a measurable function?

Let $(X , \mathscr{M}, \mu)$ be a measure space. Prove that if $f$ is measurable, then $|f|$ is measurable.    A function $f$ is measurable if $f^{-1}((a , \infty)) = \{x : f(x) > a\} \in \mathscr{M}$ for every $a \in \mathbb{R}$.   Ok so this is what I have so far:  Consider two cases: $a < 0$ and $a \geq 0$. If $a < 0$, then we have $$|f|^{-1}((a , \infty)) = \{x : |f(x)| > a \} = X \in \mathscr{M}$$ since $\mathscr{M}$ is a $\sigma$-algebra. I am confused on how to prove the case when $a \geq 0$. If $a \geq 0$, we have $$|f|^{-1}((a , \infty)) = \{x : |f(x)| > a \} = ?$$ I am assuming we will have to use that fact that $f$ is measurable.  Any help will be appreciated!


I want to restrict access to Sharepoint people.aspx page.I have done changes in web.config people by authorization but still the user is able to access the page.Please suggest me how to restrict access to it. The changes done to web.config file as adding location and authorization and allow access.

The SharePoint People.aspx page is visible for all users by default. Is there any way to restrict this page from certain readers?


I'd like to skip sudo passwords, i.e. I don't want to be asked a password when I use sudo command. Is it possible? I know about the security issues, I'll use it only on my virtual test servers.

Inspired by this ....  I am the sole person using my system with 12.04. Every time I issue a sudo command; the system asks for the user password (which is good in its own way).  However I was thinking; without activating the root account; how can I execute the sudo commands which will not ask for user password to authenticate.  NOTE: I want to execute sudo command without authenticating via password; only when they are executed via terminal. I don't want to remove this extra layer of security from other functions such a while using 'Ubuntu software center' or executing a bash script by drag-drop something.sh file to the terminal.


how can I prove a set with n numbers contains subset that the sum of whose elements is a multiple of n  I'm not sure if I can use EGZ theory here

If $n\in \Bbb N$, $A\subset \Bbb N$, $|A|=n$, how to prove that there exists a subset of $A$ such that the summation of its element is divisible by $n$?


I came across a phrase, “86 to sb.” in the following paragraph of an article titled “The owner of the Red Hen explains why she asked Sarah Huckabee Sanders to leave,” in the Washington Post (June 23), that comes with a picture of an actual paycheck issued by the restaurant showing the code, “86” above the name of a recipient. The paragraph reads;  If you ever heard the term “to 86 someone,” it comes from the restaurant industry – code to refuse service, or alternatively to take an item off the menu.  I’m curious to know why the number 86 came to represent the refusal of service at service establishments. Does someone know the provenance? Addendum I noticed that my post duplicates with the similar question posted in 2011, but I dont' think I find a convincing source of its provenance (first appearance, sources, usage trend, currency). It seems that the word gained recency and life with the restaurant owner's refusal to serve  Sarah Huckabee in her Mexican restaurant. Is there any new source of its origin than  ones I saw on the previous post? I checked both Cambridge and Oxford online dictionaries for this word. Cambridge doesn't carry this word. Oxford Dictionaries define "eighty six" as;  1.(informal) Eject or bar someone from a restaurant, bar etc. 2.Reject, discard or cancel.  Origin: 1930s (as a noun) used in restaurants and bars to indicate that a menu item is not available or that a customer is not to be served. Perhaps rhyming slang for nix, which sounds like a bit overstretched assumption to me. The currency of the word or number - 86 is unexpectedly high based on google Ngram. The usage can track back to earlier than 1800 (at 0.002% level) and keeps rising up to 0.00672% level in 2000.

What does it mean when someone or something is referred to as being "86'd"?


I want to install special software on Ubuntu. In its installation guide has been mentioned I must separate binary and source files from each other. What does it mean? How can I do that?  Should I ignore the point of instruction about separating binary and source files? I downloaded git source of special software from Internet. It is a zip file that consists of 9 folders (“cmake”, “CMakefiles”, “docs”, “gui”, “modellingframework”, “optimisation”, “otbsuppl”, “QtpropertyBrowser” and “shared”) and 6 files (“Cmakelist.txt”, “GPLV3.txt”, “INSTALL”, “LICENSE”, “LUMASSConfig.h.in” and “README”). I didn't understand what they are? Sorry, I'm very unfamiliar with Linux and Ubuntu.

I was wondering about generic installations of all applications in linux. And what that means? Well, when I was using windows I knew that if I want to install an application I am double-clicking the .exe file and then next,next,next.  In linux, I have understood that maybe there is a common (not generic) way to install any application. Installing from source maybe? Well is there any step by step method that can be used to install  application like in windows or not?  I am asking because I do not want to keep asking the google, how to? So, I have managed to install recently from source freecad from  and I think that it would be a very nice start as common method, right?  But the thing then is where to find the right source and when an application has a very unique method of installation!


I can not kill one process with command kill -9, is there any way to kill it without restarting the machine?

I imagine that kill -9 still just sends a signal to a process. If the process is not behaving well, I would imagine that kill -9 would have no effect. Indeed, today for the first time I saw kill -9 have no effect when sent to a stuck ruby process. So here is my question: Is there some harsher way to kill a process?


I added a user tomcat in the sudoers file like this :  tomcat ALL=(ALL)        NOPASSWD:ALL   Then I noticed a problem. When I type :  sudo vim /etc/hosts   I can make my changes without any problem. But when I try this I get an error:  sudo echo "address host" >> /etc/hosts -bash: /etc/hosts: Permission denied   Can someone explain to me why?

This is a pretty simple question, at least it seems like it should be, about sudo permissions in Linux.  There are a lot of times when I just want to append something to /etc/hosts or a similar file but end up not being able to because both > and >> are not allowed, even with root.  Is there someway to make this work without having to su or sudo su into root?


I have a shapefile with polygons. And I have a csv file with points. Now I want to know for each point in which polygon it is situated. Every polygon has a number, so I want to create a file where you can find for each point the number of the polygon it is located in.

I have gridded depth points in CSV format that I'm trying to add other map data to, in additional columns. I've tried joining fields, hoping that I could link the Shapefile data to the csv, but when I try to display the csv by graduated symbols based on the new fields, it goes blank. I used Nathan's tips from , but imported the csv as csv since I want to add map info to that, rather than adding csv info to a map.  See this picture below for the sea bottom temperature & salinity voronois by month, underneath the csv points (a sample subset), with the joins already made. I added columns on the csv for each of the fields i'm intending to append.    I also tried spatial joins as per  however it says the layers aren't the same CRS (I checked, they are), then gets to 15% and hangs.  I also also tried spatial join through  but it hit a python error. I can try this again and look to debug the problem if this is the right way to go.  In short: appending polygon data as fields on a points-grid csv: what's the best way in QGIS 2.0?


I have an issue with my new wordpress website running WooCommerce plugin.  There is a random letters added in all website links “?v=d3d4c5deb455”  I tried deactivating the addon’s and it didn't work - only the letters disappeared when I deactivate “WooCommerce” plugin ... which i cant really deactivated cause it an online store  I tried changing the theam and went back the default template  also it didn't work    Screenshot  Website : knzshop.com

I'm new to wordpress, I set up everything, but there's something that bothers me: on every single URL or link, there's a "?v=hash" appended everywhere (example.com/?v=d21feabed96b).  I tried to see inspect every plugin, I don't understand how this parameter is added.  It looks like it's added in js, because if I see the source, there's no trace of this hash, but I can see in firebug live source.  Plugins installed:   jetpack sumome wp-piwik wp super cache woocommerce   Theme: Storefront  I tried to disable everything, but still I get this hash, does anyone knows how and why it's added?  I'm also using cloudflare


I am trying to run a bat file on startup (running Windows 8.1) that will change the permission of the temp folder and then run dropbox. The bat file executes properly on startup and does what I want but the cmd window appears and just stays there with the commands showing. I have to manually close the window for it to go away but other than that it works fine.  So is there a way for me to suppress the window. Here is the batch file code:  @ECHO OFF echo y| CACLS "C:\Users\Name\AppData\Local\Temp" /grant Everyone:F "C:\Users\Name\AppData\Roaming\Dropbox\bin\Dropbox.exe" exit

I have this in a .bat file (windows 7):  taskkill /F /IM CouchPotato.exe TIMEOUT /T 5 CouchPotato.exe exit   (The couchpotato tends to crash alot.)  The command prompt stays open until the process ends.  Is there a way to close it after the process has excecuted?  I tried /silent after the .bat shortcut, but doesn't work..


I wrote the following script to diff the outputs of two directores with all the same files in them as such:  #!/bin/bash  for file in `find . -name "*.csv"`   do      echo "file = $file";      diff $file /some/other/path/$file;      read char; done   I know there are other ways to achieve this.  Curiously though, this script fails when the files have spaces in them.  How can I deal with this?  Example output of find:  ./zQuery - abc - Do Not Prompt for Date.csv

This question is inspired by    I see these constructs  for file in `find . -type f -name ...`; do smth with ${file}; done   and  for dir in $(find . -type d -name ...); do smth with ${dir}; done   being used here almost on a daily basis even if some people take the time to comment on those posts explaining why this kind of stuff should be avoided... Seeing the number of such posts (and the fact that sometimes those comments are simply ignored) I thought I might as well ask a question:  Why is looping over find's output bad practice and what's the proper way to run one or more commands for each file name/path returned by find ?


i have string which contains characters like   TrÃ  Hoa Viá»‡t   the want to Convert like this  Trà Hoa Việt   already tried by php   iconv("UTF-8", "ISO-8859-1//IGNORE", "TrÃ  Hoa Viá»‡t")  but unable to remove the and get original format that i wanted. please help in this  Thank you.

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


How can I check if there is congestion between my wireless router and my cable modem?

I have a wireless router (NetGear WNDR4500) which has a wired connection to a cable modem (Thompson DCM275).   My connection to the wireless router seems to be working fine and the traceroute and ping times are quite fast. But the connection from the wireless router to the cable modem doesn't seem to be working properly sometimes. When I turn the modem off and then on again the traceroute and ping times are fine. But sometimes after say 10 minutes or more the traceroute and ping times to the cable modem increase to thousands of milliseconds. When I turn the modem off and on again the issue goes away again.   Any ideas about what can be the issue?


If Harry has seen his mother die, as revealed in The Deathly Hallows, why couldn't he see the thestrals before The Order of the Phoenix (after he's seen Cedric Diggory die)?

Why couldn't Harry see Thestrals at the end of Goblet of Fire after the senseless and shocking death of Cedric Diggory?   At the end of Goblet of Fire, the carriages still appeared horseless to Harry:     Hermione turned away, smiling at the horseless carriages which were now trundling towards them up the drive, as Krum, looking surprised, but gratified, signed a fragment of   parchment for Ron.   Goblet of Fire - Page 629 - British Hardcover - Adult Edition   At the beginning of Order of the Phoenix, Harry sees the Thestrals for the first time:     Here stood the hundred or so horseless stagecoaches that always took the students above first year up to the castle. Harry glanced quickly at them, turned away to keep a lookout for Ron and Hermione, then did a double-take.   The coaches were no longer horseless. There were creatures standing between the carriage shafts.   Order of the Phoenix - Page 178 - British Hardcover - Adult Edition   We know that only those who have seen death can see Thestrals:     ‘Don’ worry, it won’ hurt yeh,’ said Hagrid patiently. ‘Righ’, now, who can tell me why some o’ yeh can see ’em an’ some can’t?’   Hermione raised her hand.   ‘Go on then,’ said Hagrid, beaming at her.   ‘The only people who can see Thestrals,’ she said, ‘are people who have seen death.’   ‘Tha’s exactly right,’ said Hagrid solemnly [...]   Order of the Phoenix - Page 394 - British Hardcover - Adult Edition   A month went by between Cedric's death and the end of the spring term -- is this enough time for Harry to have truly internalized Cedric's death? Goblet of Fire indicates that Harry was in shock following Cedric's murder, but was able to relate the story of Cedric's death to Mr. and Mrs. Diggory.     When he looked back, even a month later, Harry found he had few memories of the following days. It was as though he had been through too much to take in any more. The recollections he did have were very painful. The worst, perhaps, was the meeting with the Diggorys that took place the following morning.   [...]   ‘He suffered very little, then,’ she said, when Harry had told her how Cedric had died.'   Goblet of Fire - Page 621 - British Hardcover - Adult Edition   So, then, why couldn't Harry see Thestrals at the end of Goblet of Fire?


I have a polynomial $p(z)=z^n+a_{n-1}z^{n-1}+..+a_0$ satisfying $|p(z)|\leq 1$ for all $|z|\leq 1$. I have to show that $a_{n-1}=...=a_0=0$. Applying Cauchy estimates gave me $|a_k|\leq 1$ for all $k$, which doesn't seem to help. For non-zero $z$ I can write $|\frac{z^n}{|z|^n}+..+a_0|\leq 1$ but I don't see how that would help either. Any hint would be appreciated.

Given a polynomial $ P(z) = z^n + a_{n-1}z^{n-1} + \cdots + a_0 $, such that   $\max_{|z|=1} |P(z)| = 1 $      Prove: $ P(z) = z^n $      Hint: Use cauchy derivative estimation    $$ |f^{(n)} (z_0)| \leq \frac{n!}{r^n} \max_{|z-z_0|\leq r} |f(z)| $$ and look at the function $ \frac{P(z)}{z^n} $     It seems to be maximum principle related, but I can't see how to use it and I can't understand how to use the hint.


I have two Tables TABLE 1 ID       Name 1001     XYZ 1002     ABC  TABLE 2 ID    GAME   1001   A      1001   B        1002   A       I want the outcome of two tables join as ID   NAME   GAME1    GAME2    1001 XYZ     A        B        1002 ABC     A          I tried with a simple join and it gives me multiple rows for 1001 and 1002 Query SELECT t1.ID, t1.Name, t2.Game FROM t1, t2 WHERE t1.ID = t2.ID  1001  A 1001  B 1002  A  NA  Actual O/P 1001  A 1001  B 1002  A  Expected O/P ID   NAME   GAME1    GAME2    1001 XYZ     A        B        1002 ABC     A

Having the following data in a table:  ID     Category   Value 1234   Cat01      V001 1234   Cat02      V002 1234   Cat03      V003 1234   Cat03      V004 1234   Cat03      V005   I want to have the following output:  ID     Cat01  Cat02   Cat03 1234   V001   V002    V003 1234   V001   V002    V004 1234   V001   V002    V005   The output I want to achieve is a kind of pivot table where I have all the values vertically in a table and I want to have those values, horizontally, having the category as a column. But there are some categories that have multiples values, in that case, I need to repeat the values of all other categories and create a row per each repeated value  How can it be done in PostgreSQL?


A teenager meets a scientist and his daughter, and discovers that they can travel in time.  In the book, time travel into the past can create overlapping branches, potentially leading towards chaos. An evil (or just self-serving and corrupt) version of the scientist and his daughter show up, and tempt the young man into working for them.  Part of the plot involves a hideout far in the past, in the arctic, where there's no chance of affecting causality. The young man is abandoned there for awhile, then rescued... There's a nightmarish scene involving elevators stopping on multiple floors at the same time, and a sequence where the young man sees the scientist doing an elaborate exercise routine with leaps and hurdles, that turns out to be practice for a heist of some kind.

I read a book from the late 80's when I was 13 or 14 about a boy who travels through time using a calculator. I don't remember too much detail...but I do know that he was on the run from a bad guy who was chasing him and trying to take the calculator. The bad guy might have had a time traveling calculator as well because I remember him chasing him through time.  He got the calculator from a scientist and he was friends with the scientist's daughter. I know that both kids were teenagers, but I don't remember too much more than that.  I never got to finish the book...and for some odd reason, I really want to.


I was considering using L'Hopital for $\displaystyle\lim\limits_{x\to0}\frac{\sin(x)}{x}$, but I was told that this is circular, because we use this limit to show $\displaystyle\frac{\mathrm d}{\mathrm dx}\sin(x) = \cos(x)$.  Do we have to use this limit to find the derivative of $\sin(x)$, or is there a legitimate counter-argument here?

I came across this question:   From the comments, Joren said:     L'Hopital Rule is easiest: $\displaystyle\lim_{x\to 0}\sin x = 0$ and $\displaystyle\lim_{x\to 0} = 0$, so $\displaystyle\lim_{x\to 0}\frac{\sin x}{x} = \lim_{x\to 0}\frac{\cos x}{1} = 1$.   Which Ilya readly answered:     I'm extremely curious how will you prove then that $[\sin x]' = \cos x$   My question:  is there a way of proving that $[\sin x]' = \cos x$ without using the limit $\displaystyle\lim_{x\to 0}\frac{\sin x}{x} = 1$. Also, without using anything else $E$ such that, the proof of $E$ uses the limit or $[\sin x]' = \cos x$.    All I want is to be able to use L'Hopital in $\displaystyle\lim_{x\to 0}\frac{\sin x}{x}$. And for this, $[\sin x]'$ has to be evaluated first.    Alright... the definition that some requested.   Def of sine and cosine: Have a unit circumference in the center of cartesian coordinates. Take a dot that belongs to the circumference. Your dot is $(x, y)$. It relates to the angle this way: $(\cos\theta, \sin\theta)$, such that if $\theta = 0$ then your dot is $(1, 0)$.  Basically, its a geometrical one. Feel free to use trigonometric identities as you want. They are all provable from geometry.


What keeps a player from deliberately planning their own initiative action themselves by choosing to act in a predefined sequence and waiting until a monster has acted?  If all the players do this, they can arrange their actions to maximum effect vs creatures like, say Hydras, where the Hydra goes, then the Melee classes (to pop off heads) then the fire wielders, to cauterize before the Hydra's regeneration goes off.  This seems like an entirely valid strategy, especially for a party that has fought together for a long time and knows each others' fighting styles and abilities, but the Initiative rules assume every fight is a mad scramble to act first, even though this is not necessarily the optimal course of action.  So the question is: Can the players deliberately choose which order to act in at the onset of combat (not during combat, when there's too much going on to make such detailed plans), thus setting their own initiative using disciplined tactics?

In D&D 4e there was an option to Delay your initiative:     Perform your actions as desired and adjust your initiative to your new   position in the order.   Does this rule to change initiative order still exist in 5th edition? I cannot find it in the PHB.


I am needing to control about 75 Infrared LED's individually of each other (can turn each on and off) through the use of the program LABVIEW. Originally I was thinking of using multiplexers to accomplish this, but I came into the issue of drawing enough current to control them. Now I believe that using an LED driver would be the best bet to do this.  Are there any LED drivers out there that are capable of accomplishing this task?

I am new to electronic prototyping and had a few questions.  I need to control 132 LEDs individually. I want to  make 3 rows ( 2 rows of 60 and 1 row of 12) I think i can matrix them but i would still need 63 outputs (3 high, 60 long).  I don't want to use 8 different  shift registers.  Are there any 32 bit or 64 bit led drivers(or shift registers, not really sure what there are called) And where can i buy them.  Any help is appreciated .


I have to compute $$Z(t)=\sum_{n=1}^\infty e^{-\lambda_nt}$$ with $\lambda_n=\pi^2\left(\frac{m^2}{a^2}+\frac{n^2}{b^2}\right)$. So  $$\sum_{m,n=1}^\infty \exp\left(-\pi^2\left(\frac{m^2}{a^2}+\frac{n^2}{b^2}\right)\right)t=\sum_{m=1}^\infty \exp\left(-\pi^2\left(\frac{m^2}{a^2}\right)t\right)\sum_{n=1}^\infty \exp\left(-\pi^2\left(\frac{n^2}{b^2}\right)t\right)$$  where $a$, $b$ are real constants and $t$ a real variable.  $$e^{-tn^2}\le\int_{n-1}^n e^{-tx^2}\le e^{-t(n-1)^2}$$ and $$e^{-t(n+1)^2}\le\int_{n}^{n+1} e^{-tx^2}\le e^{-t(n)^2}$$  so we obtain $$\int_{n}^{n+1} e^{-tx^2}\le e^{-t(n)^2} \le\int_{n-1}^n e^{-tx^2} \implies \int_{1}^{\infty} e^{-tx^2}\le \sum_{n \geq 1}e^{-t(n)^2} \le\int_{0}^{\infty} e^{-tx^2}$$ However, I cannot find explicitly the value $$\sum_{n=1}^\infty \exp\left(-\pi^2\left(\frac{n^2}{a^2}\right)t\right)$$ However, this does not give me an explicit solution on the convergence of $Z(t)$.  Could anyone could help me on how to compute $\sum_{n=1}^\infty \exp\left(-\pi^2\left(\frac{n^2}{a^2}\right)t\right)$?

I have to compute $Z(t)=\sum_{n=1}^\infty e^{-\lambda_nt}$, $t \in \mathbb{R}_{>0}$, with $\lambda_n=\pi^2(\frac{m^2}{a^2}+\frac{n^2}{b^2})$. So $\sum_{m,n=1}^\infty e^{-(\pi^2(\frac{m^2}{a^2}+\frac{n^2}{b^2}))t}=\sum_{m=1}^\infty e^{-\pi^2(\frac{m^2}{a^2})t}\sum_{n=1}^\infty e^{-\pi^2(\frac{n^2}{a^2})t}$.  Is anyone could give me a good hint how to compute $\sum_{n=1}^\infty e^{-\pi^2(\frac{n^2}{a^2})t}$?


how many outlets can you put on a 15amp breaker ?

In my rebuilding project I have counted 18 outlets and lights on one bedroom circuit that travels through 3 rooms. Is that ok?


I understand the advantages of using the Lasso (e.g. scalability, regularization). That being said, I am also aware that the Lasso is an approximate method for feature selection, and that it does not necessarily return the optimal subset of features (i.e., the one that would be identified through $\ell_0$-minimization, or a brute-force search).   In light of this, I'm wondering:   What are the practical disadvantages of using the Lasso for feature selection in binary classification problems? Is there a realistic example where the Lasso returns a subset of features that is completely different from the true optimal set of features?    Note: To be clear, I know that there was a related discussion on . The reason why I've posted a new question instead of posting in the old forum is because:   the old question was about regression problems  the old question compares Lasso to stepwise regression (also an approximate method). In comparison, I suppose this is trying to compare Lasso ($\ell_1$-penalty regularization) to brute force ($\ell_0$-penalty regularization), which would be optimal.

From what I know, using lasso for variable selection handles the problem of correlated inputs. Also, since it is equivalent to Least Angle Regression, it is not slow computationally. However, many people (for example people I know doing bio-statistics) still seem to favour stepwise or stagewise variable selection. Are there any practical disadvantages of using the lasso that makes it unfavourable?


After a couple of weeks of not having "one correct answer" on questions where several answers are correct on their own rights, I decided to mark the questions as a wiki. I think I did this after the accepted answer percentage appeared on the profiles. And wikis often don't have "one correct answer". And I have several of those questions that I marked as wiki, which AFAIK cannot be undone). It's somewhat annoying that I have those red notes in the list that doesn't serve any purpose. And again, red often mean there's an error of some sort.  Edit: The note also disappears when a question is closed.  How else can I remove "Have you considered accepting an answer or starting a bounty for this question?" without accepting a correct answer?  Also, would it be good to let them implement that questions marked as wiki to not have that message?

The biggest peeve is sometimes I vote up an answer mid-way through reading it, and the "don't forget to accept" message blocks the remaining text, so I scramble and triple-click it until it closes.  Anyways I frequently scan my question list and search for SO's reminders, ("Consider accepting an answer") so the "don't forget to accept" is wholly unnecessary to some, and there should be a way to disable it. Do you think so too?


I have just (painfully) upgraded to Ubuntu 18.04 LTS.  Since it appears I have no choice but to use the GNOME desktop, I am trying to make adjustments so that I can use it more like the Unity desktop I used in 14.04 and 16.40.  But I find I can make no changes to the size and position of the Dock.  When I go to Settings and click on Dock, the only thing visible in the large right-hand panel is a very faint slider bar, with no slider.  Positioning the cursor over this bar has no impact.  In short, on my system the Dock is completely unadjustable.  What I was expecting was something like this:  . I.e., the ability to adjust the size, position and auto-hiding capability of the Dock.  What do I have to do to make the Dock adjustable?    $ apt-cache policy gnome-shell-extension-ubuntu-dock gnome-shell-extension-ubuntu-dock:  Installed: (none)  Candidate: 0.9.1ubuntu18.04.1  Version table:    0.9.1ubuntu18.04.1 990      990 http://us.archive.ubuntu.com/ubuntu bionic-updates/main amd64 Packages      990 http://us.archive.ubuntu.com/ubuntu bionic-updates/main i386 Packages     0.9.1 990      990 http://us.archive.ubuntu.com/ubuntu bionic/main amd64 Packages      990 http://us.archive.ubuntu.com/ubuntu bionic/main i386 Packages

I've just upgraded to Ubuntu 17.10 and am missing the Ubuntu Dock settings, i.e. in gnome-control-center the dock settings are blank:    I think I might be missing the "ubuntu-dock" package, but can't find this anywhere in the software centre.  Also the gnome-control-center was completely missing after the update, and I had to install this separately - not sure if this is related.  I think this is different from  because changing the type of GNOME session doesn't fix the problem. If I go for GNOME* I get no Dock settings section at all, and if I got for Ubuntu* I get the blank Dock settings section described above.  Output of apt-cache policy gnome-shell-extension-ubuntu-dock:  rob@rob-pc:~$ apt-cache policy gnome-shell-extension-ubuntu-dock gnome-shell-extension-ubuntu-dock:   Installed: (none)   Candidate: 0.7   Version table:      0.7 500         500 http://gb.archive.ubuntu.com/ubuntu artful/main amd64 Packages         500 http://gb.archive.ubuntu.com/ubuntu artful/main i386 Packages


I am new to Stack Exchange and I wish to know the methods, people use in this community.  For example, I saw many maths questions written in codes. Where can I learn to write those codes?

When editing a post on a site where MathJax is enabled there in "how to format" there is a link  which points to a page not as useful as the  on .  So I suggest to replace that link with


Definition of Dihedral Group: $D_{2n}=\langle r,s|r^n=s^2=1, sr=r^{-1}s \rangle $  I need to show that $D_{2n}/\langle r_n^k \rangle \cong D_{2k}$, assuming $k|n$.  I have already proven that $\langle r_n^k \rangle \trianglelefteq D_{2n}$ so we know that $D_{2n}/\langle r_n^k \rangle$ is a quotient group. Also I know that $|\langle r_n^k \rangle| = \frac{n}{k}$, so by Lagrange's Thm  $$|D_{2n}/\langle r_n^k \rangle| = \frac{|D_{2n}|}{|\langle r_n^k \rangle|}=  \frac{2n}{\frac{n}{k}}=2k=|D_{2k}|$$  So everything looks good, but I am just not quite understanding how I show that these two groups are isomorphic. I feel there is one step missing, or I need to use one of the isomorphism Theorems maybe?

I have to show that, given $k|n,$ and  $\langle{r^k}\rangle$ is a normal subgroup of the Dihedral group $D_{2n}$ then $D_{2n}/\langle{r^k}\rangle\cong D_{2k}$  Given this, I know that I need to show that a particular homomorphism is a bijection.  The natural one I was thinking was $$\phi:D_{2k}\rightarrow D_{2n}/\langle{r^k}\rangle$$ $$r^is^j\mapsto r^is^j\langle{r^k}\rangle$$ First I have to show that this is a homomorphism, which is easy, i think, since $$\phi(r^{i_1}s^{j_1}r^{i_2}s^{j_2})=r^{i_1}s^{j_1}r^{i_2}s^{j_2}\langle{r^k}\rangle=r^{i_1}s^{j_1}\langle{r^k}\rangle r^{i_2}s^{j_2}\langle{r^k}\rangle=\phi(r^{i_1}s^{j_1})\phi(r^{i_2}s^{j_2})$$ Now that I have the homomorphism, I need to show bijectivity.  So given $\phi(r^{i_1}s^{j_1})=\phi(r^{i_2}s^{j_2})$ $$\phi(r^{i_1}s^{j_1})=\phi(r^{i_2}s^{j_2})\Rightarrow r^{i_1}s^{j_1}\langle{r^k}\rangle=r^{i_2}s^{j_2}\langle{r^k}\rangle$$ and it's here I'm getting stuck...drawing a blank


I am trying to calculate the distribution for X + Z which normally means I have to find the CDF. Is that correct? But I am not sure how.  I know that   $X \sim Exp(2)$ and $Z \sim Exp(2)$ and that X and Z is independent.   How do I proceed?  Thanks.

I tried finding the following density function:     Let $X$ and $Y$ be independent random variables, each having the exponential distribution with parameter $\lambda$. Find the joint density function of $X$ and $Z=X+Y$.   $\begin{aligned}f_{X,X+Y}=&\frac{\partial}{\partial x\partial z}\mathbb P (X\leq x,Y\leq z-x)\\=&\int_{-\infty}^x\int_{-\infty}^{z-x}f(u,v)\,\mathrm dv=\frac{\partial}{\partial z}\left[\frac{\partial}{\partial x}\int_0^x\int_0^{z-x}\lambda^2e^{-\lambda u-\lambda v}\,\mathrm dv\,\mathrm d u\right]\\ =&\frac{\partial}{\partial z}\int_0^{z-x}\lambda^2e^{-\lambda x-\lambda v}\,\mathrm dv=\frac{\partial}{\partial z}\int_x^{z}\lambda^2e^{-\lambda x-\lambda(v-x)}\,\mathrm dv\\ =&\lambda^2e^{-\lambda x-\lambda(z-x)}=\lambda^2e^{-\lambda z} \end{aligned}$  But I don't think this is correct, because $\mathbb P(X\leq x,X+Y\leq z)$ isn't equal to $\mathbb P(X\leq x,Y\leq z-x)$. But I can't think of anything else.  Could someone help me a little bit with this exercise?  I'm going to try the following:  $\mathbb P(X\leq x,Z\leq z)=\int_{-\infty}^x\int_{-\infty}^zf_X(u)f_Z(v)\,\mathrm du\,\mathrm dv$,  where I use the convolution formula. If I made no mistake, this gives  $f_{X+Y}(z)=z\lambda^2e^{-\lambda z}$, if $z>0$.  Then calculating the joint density function:  $\begin{aligned}f_{X,X+Y}(x,z)=\frac{\partial}{\partial z}\left[\int_{-\infty}^z\lambda^3ve^{-\lambda x-\lambda v}\,\mathrm dv\right]. \end{aligned}$  Oh wait, this is also incorrect, because $X$ and $X+Y$ are dependent.  I really don't know how to proceed; could someone help?  I've also looked at this , but they mention the Jacobian, and my teacher has chosen to skip the paragraph about the Jacobian, so it wouldn't make sense if I had to use that.


In many of the samples I have seen that the programmer use     this.DataContext =x;    vs simply using DataContext = x; in the page code behind . I always use      DataContext = x;   in my code behind page to set the datacontext. The same is with other variables on the page, many use      this.Variable   to refer to it instead of simply using Variable .  Whats the difference ?Or there is no difference and just programming practice .

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


I'm searching for a solution to a Bash 4 problem I have.  Bash 4 is able to iterate with leading zeros.  For the line:  for i in {001..005}; do echo -n $i" ";done;echo   the output is  001 002 003 004 005   but when I try this:  a="005"; for i in {001..${a}}; do echo $i;done   or something similar, the result is:  {001..005}   What am I missing?

I want to use $var in a shell brace expansion with a range, in bash. Simply putting {$var1..$var2} doesn't work, so I went "lateral"...   The following works, but it's a bit kludgey.    # remove the split files echo rm foo.{$ext0..$extN} rm-segments > rm-segments source rm-segments   Is there a more "normal" way?


What is the classical explanation for why the microwaves won't pass through the microwave door? I know the microwaves behave like particles and dont pass through the microwave door but I am asking why they do so.

If I look through the microwave window I can see through, which means visible radiation can get out. We know also that there is a mesh on the microwave window which prevents microwave from coming out.  My question is how does this work? how come making stripes or mesh of metals can attenuate microwave radiation yet allow visible radiation?  Looks like an electrodynamics problem to me with periodic boundary conditions (because of the partitions on the microwave oven window). Is it discussed in any textbook?


I have a problem with unchecking checkbox with dynamic id.  Both of them are checked but I need to set if one is clicked that other one is disabled then this is example:  <input id="value_Ture_do_30_15_0" class="rnr-checkbox" name="value_Ture_do_30_15[]" value="1" checked="checked" type="checkbox">  <input id="value_Ture_preko_30_15_0" class="rnr-checkbox" name="value_Ture_preko_30_15[]" value="1" checked="checked" type="checkbox">   I have tried this like:  $("[id^='value_Ture_do_30']").checked = false   Also this:  $(function () {     $("[id^='value_Ture_do_30']).click(function (event) {         if (event.target.checked) {             $("[id^='value_Ture_preko_30']").find('input').removeAttr('checked');         }     });     $("[id^='value_Ture_preko_30']").click(function (event) {         if (event.target.checked) {             $("[id^='value_Ture_do_30']").find('input').removeAttr('checked');         }     }); });   Also this solution did not work for me:  But it does not work. If you can help me Thanks  Solved it like this:  $("[id^='value_Ture']").click(function() {     var $this = $(this),          wasChecked = $this.attr("checked") === "checked";     $("[id^='value_Ture']:checked").removeAttr("checked");     if (wasChecked) {         $this.attr("checked", "checked");     } });

I'd like to do something like this to tick a checkbox using jQuery:  $(".myCheckBox").checked(true);   or  $(".myCheckBox").selected(true);   Does such a thing exist?


JEE Advanced is an entrance exam for admissions to IITs in India. I will be giving the exam next year. The exam focuses mainly on problem solving skills. So I need recommendations for a book i can use to learn mechanics. If anyone knows about video lectures that could help me,feel free to share.

Every once in a while, we get a question asking for a book or other educational reference on a particular topic at a particular level. This is a meta-question that collects all those links together. If you're looking for book recommendations, this is probably the place to start.  All the questions linked below, as well as others which deal with more specialized books, can be found under the tag  (formerly ).  If you have a question to add, please edit it in. However, make sure of a few things first:   The question should be tagged  It should be of the form "What are good books to learn/study [subject] at [level]?" It shouldn't duplicate a topic and level that's already on the list   Related Meta:


Give the point set with a corner at the orgin $$M:=\{(x,y)\in \mathbb{R}^2 : y=|x|, x\in (-1,1)\}$$ with the subspace topology of $\mathbb{R}^2$, $(M,\mathcal{T})$ forms a Hausdorff 1-dim locally Euclidean space. Next if we can define a differential structure $\mathfrak{F}$, then $(M, \mathcal{T}, \mathfrak{F})$ will give us a smooth manifold.   Note the projection map $\pi$: $(x,y)\mapsto x$ is a global coordinate map of $M$, it is easy to check that it is a homeomorphism. With $\mathfrak{F}_0 = \{(M, \pi)\}$ we just define $\mathfrak{F}$ to be the maximal collection such that  $$\mathfrak{F} = \{(U, \phi) : \phi\circ \pi^{-1} \text{ and } \pi \circ \phi^{-1} \text{ are } C^\infty\}.$$  From the above definition, it is indeed a smooth manifold. Now if this is a manifold, when we talk about tangent spaces, how can we connect the tangent space at $(0,0)$ to the usual tangent line conecpt in calculus.

Let $M=\{(x,|x|): x \in (-1, 1)\}$. Then there is an atlas with only one coordinate chart $(M, (x, |x|) \mapsto x)$ for $M$. We don't need any coordinate transformation maps to worry about differentiablity. So I thought $M$ is a differentiable manifold. However my teacher says it is not. He says the sharp corner at $x = 0$ is a problem. I can't understand why it is a problem.


My Mexican visa expired in March 2012 and have lived in U.S. ever since and going to school here since kindergarten. I am planning on going to Washington DC on a school trip. Can I go showing a valid passport?   Can I travel within the country with a Mexican Citzen ID if my mom gets the Mexican embassy to process a Mexican ID?  I know it may sound stupid but I am afraid of being seen as immigrant and being deported.  I have no other forms of ID's. Only my Visa. My mom wants to go to the Mexican Embassy place and try to get me a passport because we will be visiting the White House and you need an American form of identification and well, I wasn't born in the U.S. or other U.S. territories.

I am a foreigner and my student visa expired last month. I do have an American driver's license valid until the end of next year. Can I still fly inside the US without being afraid they will check my papers and try to get me out of the country? I haven't used any of my European IDs or passport in 2 years since I got the US ID, so I haven't been showing them off. I've been feeling pretty secure with my license. What do you think?


How to use JS to determine the real visibility of an element? For example, there is the following demo   .red{   width: 100px;   height: 100px;   left: 20px;   top: 20px;   background: red;   position: absolute; } .blue{   width: 50px;   height: 50px;   left: 60px;   top: 60px;   background: blue;   position: absolute; } .green{   width: 100px;   height: 100px;   left: 50px;   top: 50px;   background: green;   position: absolute; }

    How can I check that the "blue" element is not visible on the screen? Is there a way to determine the real visibility of an element at a given time to the human eye? Same question with z-index. checking all elements and comparing which z-index is not an option, of course, and the elements can be in different positions.

In JavaScript, how would you check if an element is actually visible?  I don't just mean checking the visibility and display attributes. I mean, checking that the element is not   visibility: hidden or display: none underneath another element scrolled off the edge of the screen   For technical reasons I can't include any scripts. I can however use  as it is on the page already.


Following the instructions , and everything works fine manually. However, when I use the instructions in a bash script, I get rbenv command not found because the source ~/.bashrc didn't execute correctly. What's going on? Feel like I've run into this before on something else...  *Execute bit is set, ran dos2unix, and have #!/bin/bash at the top.  #!/bin/bash  git clone https://github.com/rbenv/rbenv.git ~/.rbenv echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc echo 'eval "$(rbenv init -)"' >> ~/.bashrc source ~/.bashrc git clone https://github.com/rbenv/ruby-build.git ~/.rbenv/plugins/ruby-build rbenv install 2.3.1

Normally we can source ~/.bashrc file using this command  source ~/.bashrc   but if I write this in a shell script and execute it, nothing happens. Why? Is there any way to do this?  My script:  #!/bin/bash chmod a+x ~/.bashrc source ~/.bashrc   Also tried . (dot) instead of source. Same result.


I wanted to install ubuntu 12.04 alongside my windows 8.1 (model  Asus X55c)  . I followed instructions of the forums and disabled fast boot. But I didn't find any option to disable UEFI mode in boot menu.(Actually,I don't understand all settings of boot menu)I also tried to install ubuntu  by 'Try ubuntu' through  bootable usb .But it didn't see any option like 'intall ubuntu alongside windows 8.1 ', rather I found that it could not detect any operating system installed in my laptop(But windows 8.1 was there !).  Please help me.

I'm absolutely new to Linux. I would like to know how to install Ubuntu alongside the pre-installed Windows 8+ OS.  Should I do it with Wubi, or through the Live USB/DVD?  What steps do I need to take to correctly install Ubuntu?


What controls this section  in Google results?  Is it collected by Google from the website schema.org code?  I have verified my  business but do not see how I can add more info to the box. I can only suggest that some existing info needs to be changed:

What I am referring to is say you search for . You can see on the sidebar of the results page all of the company's wiki information.  My current website does not show my company's wiki page. I am trying to figure out if there is a certain time limit for Google to show the wiki page or if some other validation is required for it to show that is documented?


Everyone knows the following: $$0^x = 0 \quad \wedge \quad x^0 = 1 , \quad\forall x \in R^*$$  One morning, I wake up asking myself the question "$\text{What is $0^0$, then?}$". So, I did what any curious highschool student would do, I tried to figure it out using algebra $$0^0 = 0^{x-x} = \frac{0^x}{0^x} = \frac{0}{0} = \text{undefined}$$  ...and I can't seem to not divide by zero every time I try.  But then, using the concept of limits, I can sort of say what it could be.  $$\lim_{x \to 0} 0^x = 0 \quad\wedge\quad \lim_{x \to 0} x^0 = 1$$  Yeah, that doesn't provide me with much clarity either. From my perspective there's a 50% chance that it is $1$ and a 50% chance that it's $0$. $$\text{So, probabilistically it's } ^1/_2 \text{ !??}$$  Almost all calculators that I put it into gives me back Math Error. But oddly enough   Thanks to , I realize that there can't be a proper definition for it.  But many still define it to be $1$ for many more reasons. I wish to understand these reasons. I would like some proofs for this.  Hence, I seek proofs inclined (biased) to saying that $0^0 = 1$  EDIT: I've changed the question slightly to avoid being a duplicate. Thank you.

Could someone provide me with a good explanation of why $0^0=1$?  My train of thought:  $x>0$  $0^x=0^{x-0}=0^x/0^0$, so  $0^0=0^x/0^x=\,?$  Possible answers:   $0^0\cdot0^x=1\cdot0^0$, so $0^0=1$ $0^0=0^x/0^x=0/0$, which is undefined   PS. I've read the  on mathforum.org, but it isn't clear to me.


I'm struggling to see how these two definitions of geometric independence are related. In Elements of Algebraic Topology by J. Munkres the following definition is given:  Given a set $\{a_0,a_1,\ldots,a_k\}$ of points in $\mathbb{R}^n$ is said to be geometrically independent if for any (real) scalars $t_i$, the equations \begin{equation} \sum_{i=0}^kt_i =0, \text{ and }\sum_{i=0}^k t_ia_i =\boldsymbol{0} \end{equation} imply that $t_0 = t_1 = \ldots = t_k =0$.  And in Basic Concepts of Algebraic Topology, by F. H. Croom, geometric independence is defined as  A set $A=\{a_0,a_1,\ldots,a_k\}$ of $k+1$ points in $\mathbb{R}^n$ is geometrically independent means that no hyperplane of dimension $k-1$ contains all the points.  Croom defines the hyperplane as the set $H = \{v+a\mid a\in A\}$, where $A$ is a subspace of a vector space $V$ and $v\in V$. Any help is gladly appreciated.

I was studying linear optimization and i saw the term Affine independence. I came across this  while trying to get a better understanding of the topic.  What does it mean to be Affinely independent ? Why is it important to learn ? I know that an affine function is basically just a vector added to a point.  For example, if I am talking about linear independence, saying that the vectors $[a_1 \ b_1], [a_2 \ b_2]$ and $[a_3 \ b_3]$ are linearly independent would give me the notion that these 3 vectors lie in a 3 dimensional space; and that they lie in a 2 dimensional space if only one of it is a linear combination of the other two.


I was updating Ubuntu 16.04 from Ubuntu 14.04, but while installing packages it started to show tty screen then I rebooted my machine.  On startup it start to show a message like starting show plymouth...... .I googled and found a command dpkg --configure -a. After running this command my machine displaying message   /dev/sda5 :clean, 649920/318464 files, 11434504/12720128 blocks   and not getting started.

I am trying to boot Ubuntu on my computer.  When I boot Ubuntu, it boots to a black screen.  How can I fix this? Table of Contents:


I'm running 2 virtual machines with VirtualBox: ubuntu (7586MB of memory) and Win10 (3506MB of memory). The host machine is Ubuntu 18.04 with 16GB of RAM and 14GB of swap. Although 7.5+3.5 is barely 11GB of memory, the host machine is using just around 16GB of memory. I observed, that VirtualBox VMs are using RSS and SHR, hence it's probably using more memory than it's supposed to.  top's output:    PID USER      PR  NI    VIRT    RES    SHR S  %CPU %MEM     TIME+ COMMAND                                                                                1625 loj       20   0 6957588 3,597g 3,589g S  52,9 23,4  69:59.89 VirtualBox                                                                                1679 loj       20   0 9385696 7,459g 7,451g S   5,9 48,5  22:34.60 VBoxHeadless     Is there a way to "optimize" memory usage, so that a VM would consume less memory?  Thanks.  EDIT: Question  is asking why is VirtualBox using more memory, than it's reported in task manager. I'm asking why is VirtualBox consuming more memory, than it's configured for VMs (and how to overcome that).

I've been running several VM's with VirtualBox, and the memory usage reported from various perspectives, and I'm having trouble figuring how much memory my VMs actually use.  Here is an example:   I have a VM running Windows 7 (as the Guest OS) on my windows XP Host machine. The Host Machine Has 3 GB of RAM The Guest VM is setup to have a base memory of 1 GB If I run Task Manger on the Guest OS, I see memory usage of 430 MB If I run Task Manger on the host OS, I see 3 processes that seem to belong to VirtualBox:   VirtualBox.exe (1), using 60 MB of memory (This one seems to have the most CPU usage) VirtualBox.exe (2), using 20 MB of memory VBoxSvc.exe, using 11.5 MB of memory  While running the VM, the Host OS's memory usage is about 2 GB When I shut down the VM, the Host OS's it goes back to memory usage goes down to about 900 MB   So clearly, there are some huge differences here.  I really don't understand how the GuestOS can use 400+ MB, while the Host OS only shows about 75 MB allocated to the VM.  Are there other processes used by VirtualBox that aren't as obviously named?  Also, I'd like to know if I run a machine with 1 GB, is that going to take 1 GB away from my host OS, or only the amount of memory the Guest machine is currently using?  Update:  Someone expressed distrust over my memory usage numbers, and I'm not sure if that distrust was directed at me, or my Host OS's Task Manager's reporting (which is perhaps the culprit), but for any skeptics, here is a screenshot of those processes on the host machine:


I cant get the type?  I am using python3.  print(type(base64_type)) # output: <class 'bytes'>  if type(base64_type) is 'bytes':     print('wow') else:     print ('Why are we not working')

What is the best way to check whether a given object is of a given type? How about checking whether the object inherits from a given type?  Let's say I have an object o. How do I check whether it's a str?


How would one interpret eigenvalues and eigenvectors? I tried googeling, but could find anything concrete. If i have an matrix consisting of the basis vectors x((3,1),(2,2)) for $\mathbb{R}^4$ and to eigenvalues 4 and -4. What does this mean geometric? I am looking for an intuitive way to visualise it.

The wiki  on eigenvectors offers the following geometrical interpretation:     Each application of the matrix to an arbitrary vector yields a result which will have rotated towards the eigenvector with the largest eigenvalue.   Qn 1: If there is any other geometrical interpretation particularly in the context of a covariance matrix?  The wiki also discusses the difference between left and right eigenvectors.  Qn 2: Do the above geometrical interpretations hold irrespective of whether they are left or right eigenvectors?


If you were to take Polyjuice, then clip hair from yourself (so it would essentially be the hair of the person you transformed into), could you create more Polyjuice to transform into that person using that hair?

Polyjuice Potion is changing based on someone's current physical state. It shows tattoos (or lack of) and such from DH when Ron changed to Harry.     "I knew Ginny was lying about that tattoo,” said Ron, looking down at his bare chest.    What would happen if someone used hair of a dead person, taken from their body after death, and drank the potion? Would they die as well?


I am trying making a test on how to add multiple values into a column, which accepts multiple values.  For example, I have two tables  Table 1: contains `ID` (`int`) primary, `Name` (`varchar`) Table 2: contains `ID` (reference to Table 1's `ID`), `Image` (`image`)   I created these tables, and I can insert data into table one, but how can I let it insert into multiple value column in table 2 (Image)?  I can have Id and add images how much I want, I tried with stored procedure, using insert, but failed, because I want to check ID is the same to ID in table 1 using where statement not working in insert  For more examples.  ID: 1, Name: Willam, Image:[AnyImage] (More than 1 image) ID: 2, Name: Edi, Image[Anyknownimage], Image[AnyNewImage] etc...   Anything that helps?

What is the best way to get IDENTITY of inserted row?  I know about @@IDENTITY and IDENT_CURRENT and SCOPE_IDENTITY but don't understand the pros and cons attached to each.  Can someone please explain the differences and when I should be using each?


I used to use Windows Moviemaker.  I am new to Ubuntu.  Is it possible to do this easily?  I am fairly techtarded.

I have a Sony CX115 and I have a little footage I'd like to put on youtube. I've downloaded Arista from the Ubuntu Software Center and then I've downloaded its Youtube HD plugin. I've converted my video and uploaded it to youtube... The result is a flashy video with a lot of grey in it:    What could I do to publish it in high quality so it'll be viewable?


Prove by double inclusion the set identity $A\cap(A\cup B) = A$   please help with this am stuck with these identities on the set A and B

I'm trying to prove $A \cap (A \cup B) = A$. I'm stuck on the last part of my proof, not sure how to show next:  $$x \in A \cap (A \cup B)$$ $$\iff x \in A \;\;\text{and}\;\; x \in A \cup B$$ $$\iff x \in A \;\;\text{and}\;\; (\text{either}\;\; x \in A \;\;\text{or}\;\; x \in B).$$


$\vec{P}=\int \frac{d^3p}{(2\pi)^2}\vec{p}a_\vec{p}^{\dagger}a_\vec{p}$ is the total momentum operator.  How does this operator act on the state $\lvert\vec{p}\rangle=a_\vec{p}^\dagger \lvert0\rangle$?  Note: I know that this should give $P \lvert \vec{p} \rangle = \vec{p} \lvert \vec{p}\rangle$, but I don't see how this should follow.

Reading through David Tong lecture notes on QFT.  On pages 43-44, he recovers QM from QFT. See below link:    First the momentum and position operators are defined in terms of "integrals" and after considering states that are again defined in terms of integrals we see that  the ket states are indeed eigen states and the eigen values are therefore position and momentum 3-vectors.  What is not clear to me is the intermediate steps of calculations not shown in the lecture notes, in particular, the computation of integrals involving operators as their integrand, to obtain the desired results.


I run a tests in GitLab PipeLine sfdx force:apex:test:run --wait 10 --resultformat human --codecoverage --testlevel RunLocalTests and get error System.DmlException: Insert failed. First exception on row 0; first error: UNKNOWN_EXCEPTION, portal account owner must have a role: [] If I understand correctly, an additional parameter is needed when creating a scratch org. Thanks to everyone who answers.

Im getting above error when i was trying to run my test class. In my test class i will create an Account, Contact. And this contact id will be used in my original code to create Community user.  I noticed following help article from SFDC. But couldn't figure out how to achieve.   Here they asked to create User on the Test class and Runas this user. But in my case, the community user will be created in the code. Please share any thoughts.  Here is the detailed exception,     System.DmlException: Insert failed. First exception on row 0; first   error: CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY, caused by:   System.DmlException: Insert failed. First exception on row 11; first   error: UNKNOWN_EXCEPTION, portal account owner must have a role: []