Hi I am running my mule application on mule server 3.7.0 and its showing an error as : -   An internal error occurred during: "Launching pro_run". java.lang.NullPointerException  java.lang.NullPointerException     at org.mule.tooling.maven.ui.launch.MuleWithMavenLaunchDelegate.shouldRun(MuleWithMavenLaunchDelegate.java:52)     at org.mule.tooling.runtime.launch.MuleRuntimeLaunchDelegate.launch(MuleRuntimeLaunchDelegate.java:160)     at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:885)     at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:739)     at org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch(DebugUIPlugin.java:1039)     at org.eclipse.debug.internal.ui.DebugUIPlugin$8.run(DebugUIPlugin.java:1256)     at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)  This is differnet from standard NulPointerException. This situation was arising while starting mule server 3.7.0. I have tried many ways to debug it but can't figure out why its there . Any suggestions or help would be great help .


What is the plural of "virus"? I have seen the word "viri" floating around in various sources throughout my life, but most people say "viruses". The spelling checkers I have tried do not recognize "viri", but I have learned that is not a very good method of verifying a word.

Is the plural of virus "viruses" or "virii"?


Background on the program: the heart of the program needs to track all other Forms or other elements of the program. To do this, I am using a Form array  What I am wanting to do is take my initially defined array containing 1 element, and increase the length of the array to add a new element whenever a new Form is launched.The trouble I've run into is that I can't find out how to do this without using a second array to store the old array, re-declaring the original array with array.length += 1, looping through to re-add the original content from the second array, then adding the new element. It's heavy and inconvenient since I need to use similar processes elsewhere.   The code I have, which works but is ugly, is this:  public class PCB {     Form[] Runners;     public PCB()     {         Runners = new Form[1];         Runners[0] = new GUI;  .  .  .  .  .  void NewForm(Form app) {     Form[] TEMP = Runners;   //Create my new array equal to the first     Runners = new Form[Runners.Length + 1];  //re-create the old array, with an additional element     for (int k = 0; k < TEMP.Length; k++)     {         //add the original elements back to the original array         Runners[k] = TEMP[k];     }     Runners[TEMP.Length] = App; //add the final element to the array   I hate having to use the loop-structure, as I feel that it can be done cleaner. what I'm looking for is a function similar to the ListBox.Items.Add([[ITEM]]), but for an array.  Does such a function exist, or do I need to continue with my ugly loops?

I am pulling data out of an old-school ActiveX in the form of arrays of doubles. I don't initially know the final number of samples I will actually retrieve.  What is the most efficient way to concatenate these arrays together in C# as I pull them  out of the system?


I brought up this question in my previous question on , but there was no answer to this specific point.  Is there such thing as a "dark on" opto-isolator, that allows current to flow through pins 5 and 4 when no current flows trough pins 1 and 2, and blocks current through pins 5 and 4 when a current flows trough pins 1 and 2?  This will be like a normal opto-isolator, but it "turns on" when the LED is turned off, instead of the opposite.

Ok, I know the basic function of an optocoupler is "turn on irLED, triggering a phototransistor and allowing current to flow"; an optical off then on switch.  Is there a reverse optocoupler, i.e. "turn on irLED, unknown component is triggered and stops/blocks current flow", an optical on then off switch?  Circuit A does something that includes a charging function then activates Circuit B. As long as Circuit B has [enough] power, Circuit A is removed from it's power source (turned off) by a signal from Circuit B.  When Circuit B's power is gone/too low, signal is removed and Circuit A's power is returned and starts process over again.  I know how optical relays work (Circuit A on, Circuit B off, trigger on, Circuit A off, Circuit B on, trigger off, original condition).  A standard optocoupler is essentially one half of this.  I am wanting the other half.


How does a recipient bank, in international wire transfers, gets back its money which it credits to the recipient since there won't be any physical movement of cash from the sender's bank to that of the receiver's?

Say I open accounts on Bank A and Bank B. I deposit $20 in Back A. I then initiate a wire transfer to my account in Bank B. I drive over to Bank B and withdraw $20.   Bank A now has $20 extra and Bank B how has $20 less. (In physical cash) When and how does the physical cash get transfered?


While I was studying on paper I saw the notation $R=\mathbb{Z_{(2)}}×\mathbb{Z}$, so what does the ring $\mathbb{Z}_{(2)}$ mean?

I am doing some exercises on commutative algebra and came along the following expressions, which were not elaborated on. Is someone familiar with them?  The first is for $p$ a prime number $\mathbb{Z}_{(p)}$, where the exercise is to determine all ideals. Do you think this is just $\mathbb{Z}/p\mathbb{Z}$?  The second one is for $P$ a prime ideal the expression $P_P$, where $P_P$ lies in $R_P$ for $R$ a ring.  I never came across this notation before so I have to ask here.


I have a table main with the following rows:      id |  name  | rank ----+--------+------   1 | Ali    | a   2 | Sami   | b   3 | Khan   | c   4 | Kamran | d   5 | Imran  | e   6 | Asad   | a   7 | Nawid  | v   8 | Jamil  | c   9 | Usman  | j   I want to count rows with certain values in column rank. For example, I want to group values as follows:   Values (a,b,v) should come in one group by name myvalues. Values (c,d,j) should come in another group by name yourvalues. Value (e) should come to another group by name extravalues.   My desired result:    myvalues | yourvalues | extravalues    4     |     4      |      1   myvalues counts 4 because it consists of (a,b,v). There are 2 occurrences of a, 1 occurrence of b and 1 of v - a total of 4. The same is the case with yourvalues which consists of (c,d,j) and the occurrences of these values makes a total of 4. And the last group extravalues consists of (e) and counts only 1 row.

I have a Postgres database table foo that, among other things, has a column for score that ranges from 0 - 10. I want a query to return the total number of scores, the number of scores between 0 and 3, the number of scores between 4 and 6, and the number of scores between 7 and 10. Something like the following:  SELECT   COUNT(*) as total,   COUNT(     SELECT * from foo where score between 0 and 3;   ) as low,   COUNT(     SELECT * from foo where score between 4 and 6;   ) as mid,   COUNT(     SELECT * from foo where score between 7 and 10;   ) as high FROM foo;   I tried this, but got an error with the SELECT in the COUNT statements. Any ideas how I can do this? I'm sure there's a super simple way in Postgres. I just can't figure out the correct terms to Google for.


I have installed Ubuntu 14.04 LTS alongside Windows Xp. My broadband connection working ok in Windows Xp, but it is not working in Ubuntu. I want to connect through LAN over PPPoE.  Please guide me on how to set up a wired DSL connection.

I have a bsnl broadband connection. I don't see any settings for broadband in Ubuntu, and I can't just connect automatically -- "wired connections" shows no connection.  I see an option for mobile settings, but that doesn't work for this case.  Where do I need to look to get the broadband connection to work?


I proceeded this way:  gcd(a,b) = 1 leads to ax + by = 1  gcd(b,c) = 1 leads to cl + dm = 1  a/b = c/d = k and ax+by = cl+dm   Then I trying to operate the equation so that I end up finding k=1 but Im stuck at:   lets a = ck and b = dk  ckx + dky = cl + dm  k(cx+dy) = cl + dm   k = 1/(cx+dy)  and nothing tells me that cx+dy=1 since we have to prove that a=c and b=d  Help please?

Show that if $fd'=f'd $ and the pair $f, d $ are coprime, that is gcd($d,f $)=1, as is the pair $f',d' $, then $f=f' $ and $d=d' $.  This should be simple, but I couldn't verify it. Thanks in advance!


I want to install clamav. I follow the  by doing $ sudo apt-get install clamav  After confirming with y, the following happens at the end of the installation process: Selecting previously unselected package clamav. Preparing to unpack .../clamav_0.102.4+dfsg-0ubuntu0.20.04.1_amd64.deb ... Unpacking clamav (0.102.4+dfsg-0ubuntu0.20.04.1) ... Setting up libtfm1:amd64 (0.13-4) ... Setting up libclamav9:amd64 (0.102.4+dfsg-0ubuntu0.20.04.1) ... Setting up linux-image-5.4.0-45-generic (5.4.0-45.49) ... Setting up clamav-base (0.102.4+dfsg-0ubuntu0.20.04.1) ... id: ‘clamav’: no such user Setting up clamav-freshclam (0.102.4+dfsg-0ubuntu0.20.04.1) ... Created symlink /etc/systemd/system/multi-user.target.wants/clamav-freshclam.service → /lib/systemd/system/clamav-freshclam.service. Setting up clamav (0.102.4+dfsg-0ubuntu0.20.04.1) ... Processing triggers for systemd (245.4-4ubuntu3.2) ... Processing triggers for man-db (2.9.1-1) ... Processing triggers for libc-bin (2.31-0ubuntu9) ... Processing triggers for linux-image-5.4.0-45-generic (5.4.0-45.49) ... /etc/kernel/postinst.d/initramfs-tools: update-initramfs: Generating /boot/initrd.img-5.4.0-45-generic /etc/kernel/postinst.d/zz-update-grub: Sourcing file `/etc/default/grub' /usr/sbin/grub-mkconfig: 12: /etc/default/grub: snd_hda_intel.dmic_detect=0: not found run-parts: /etc/kernel/postinst.d/zz-update-grub exited with return code 127 dpkg: error processing package linux-image-5.4.0-45-generic (--configure):  installed linux-image-5.4.0-45-generic package post-installation script subprocess returned error exit status 1 Errors were encountered while processing:  linux-image-5.4.0-45-generic E: Sub-process /usr/bin/dpkg returned an error code (1)  What is going on? Is clamav not being maintained for Ubuntu 20.4 anymore?

Whenever I use   sudo apt-get upgrade   I am getting these errors:  Reading package lists... Done Building dependency tree        Reading state information... Done Calculating upgrade... Done The following packages will be REMOVED:   linux-image-4.15.0-46-generic 0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded. 3 not fully installed or removed. After this operation, 8,311 kB disk space will be freed. Do you want to continue? [Y/n] y (Reading database ... 256191 files and directories currently installed.) Removing linux-image-4.15.0-46-generic (4.15.0-46.49) ... /etc/kernel/postrm.d/initramfs-tools: update-initramfs: Deleting /boot/initrd.img-4.15.0-46-generic /etc/kernel/postrm.d/zz-update-grub: Sourcing file `/etc/default/grub' /usr/sbin/grub-mkconfig: 8: /etc/default/grub: 4: not found run-parts: /etc/kernel/postrm.d/zz-update-grub exited with return code 127 dpkg: error processing package linux-image-4.15.0-46-generic (--remove):  installed linux-image-4.15.0-46-generic package post-removal script subprocess returned error exit status 1 Errors were encountered while processing:  linux-image-4.15.0-46-generic E: Sub-process /usr/bin/dpkg returned an error code (1)   Output of cat /etc/default/grub:  # If you change this file, run 'update-grub' afterwards to update # /boot/grub/grub.cfg. # For full documentation of the options in this file, see: #   info -f grub -n 'Simple configuration'  GRUB_DEFAULT=0 GRUB_TIMEOUT_STYLE=hidden GRUB_TIMEOUT= 4 GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian` GRUB_CMDLINE_LINUX_DEFAULT="quiet splash" GRUB_CMDLINE_LINUX=""  # Uncomment to enable BadRAM filtering, modify to suit your needs # This works with Linux (no patch required) and with any kernel that obtains # the memory map information from GRUB (GNU Mach, kernel of FreeBSD ...) #GRUB_BADRAM="0x01234567,0xfefefefe,0x89abcdef,0xefefefef"  # Uncomment to disable graphical terminal (grub-pc only) #GRUB_TERMINAL=console  # The resolution used on graphical terminal # note that you can use only modes which your graphic card supports via VBE # you can see them in real GRUB with the command `vbeinfo' #GRUB_GFXMODE=640x480  # Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to Linux #GRUB_DISABLE_LINUX_UUID=true  # Uncomment to disable generation of recovery mode menu entries #GRUB_DISABLE_RECOVERY="true"  # Uncomment to get a beep at grub start #GRUB_INIT_TUNE="480 440 1"


I am trying to run a basic SQL statement, but I can't figure out what I am doing wrong. Here is the context: I have a database named: my_database a table named: users Two columns: service_id which type is BIGINT and video_id which type is varchar(20)  Here is my code:   $video_id = "chartext"; $service_id = 12345678910; $bdd = new PDO("mysql:host=127.0.0.1;dbname=moods_db", "user", "pass"); $query = $bdd->prepare("INSERT INTO users(video_id) VALUES (?) WHERE service_id = $service_id"); $query->execute([$service_id]); var_dump($req->execute([$video_id])); // which gives me false   Some info: My PHP_INT_MAX gives me 9223372036854775807    I am aware of SQL Injection and just removed it to be clearer    I var_dumped each steps and the execute one is the only one that is not working    I ran the statement in phpmyadmin console and it told me: "Syntax error near 'WHERE (service_id = '12345678910')' line 1    I also searched the usage of WHERE Clause but I did not understand if I could put it in an INSERT statement, I think I already did that and it worked, I am lost  Thanks in advance

What's wrong with this query: INSERT INTO Users( weight, desiredWeight ) VALUES ( 160, 145 ) WHERE id = 1;  It works without the WHERE clause. I've seemed to have forgot my SQL.


Open the Developer Options in the Chrome on mobile, but only one menu item: Tracing. Where are the others? (I want enable USB debugging) Device: MIUI 12, Android 10, Mi 9T, Chrome 90

Is it possible to open Chrome's Development Tools in Android? Is it possible to do so with Java?  I tried going into the settings and such, but is it possible to access the console and create cookie for the browser?


I just stumbled over . It was deleted by three users, that in the time of deletion were all ordinary users, see the :     Post Deleted by animuson♦, Rosinante, Manishearth   (animuson is new moderator, assigned the diamond only very recently)  However when trying to undelete I get the "A moderator has deleted this post and it cannot be undeleted" message.  The point of this is clear, that moderator decision to delete can't be reversed but as mentioned before, he wasn't moderator by the time of deleting the post.  Can this be changed so that moderator power is not retroactive?

If you vote to undelete a post that was deleted by a moderator, you will get the message  A moderator has deleted this post and it cannot be undeleted  Interestingly, this extends to posts that a user voted to delete prior to becoming a moderator. For example here's a question that is in that state.  The reverse can also happen. Once a user is no longer a moderator, posts that the moderator bindingly deleted become available to be undeleted. For example, I just voted to undelete this answer and it worked fine


Prove that   $$\sum_{k=0}^{n}\binom{n}{k}(-1)^kk^n = (-1)^nn!$$  Please can anyone help me out here?

Why does the following equality hold? $$n!=\sum_{k=1}^n (-1)^{n-k} \binom{n}{k} k^n$$


My question is, how can I prove that $\sin(5x)$ is not uniformly continuous?

How do I prove $\sin x$ is uniformly continuous on $\mathbb R$ with delta and epsilon?   I proved geometrically that $\sin x<x$ and thus, $$|f(x_1)-f(x_2)|=|\sin x_1 - \sin x_2|\le|\sin x_1|+|\sin x_2|<|x_1|+|x_2|$$   But this doesn't help me much finding a delta...   Thanks for any help!  P.S. I'm only at the beginning of calculus so I can't use many theorems and derivation  (because they haven't been regorously proven).


Every time I run vim, it opens successfully but outputs the error message vim: /usr/lib/libtinfo.so.6: no version information available (required by vim). I already have libtinfo installed: ➜  repo ls -l /usr/lib/libtinfo.so.6 lrwxrwxrwx 1 root root 16  2月 13  2020 /usr/lib/libtinfo.so.6 -> libncursesw.so.6  but the message still pops out every time. My question is: How do I fix it? Why is the message shown?

On every loading of a lib, I get the error:     no version information available   This lib has been compiled on another PC (ubuntu 10.04) than the one running it (mandriva 2010.2).  $ ldd /usr/local/gnu-eabi-4.5.2/i686-pc-linux-gnu/arm-eabi/lib/libbfd-2.21.so /usr/local/gnu-eabi-4.5.2/i686-pc-linux-gnu/arm-eabi/lib/libbfd-2.21.so: /lib/libz.so.1: no version information available (required by /usr/local/gnu-eabi-4.5.2/i686-pc-linux-gnu/arm-eabi/lib/libbfd-2.21.so)  linux-gate.so.1 =>  (0xffffe000)  libz.so.1 => /lib/libz.so.1 (0xb77a7000)  libc.so.6 => /lib/i686/libc.so.6 (0xb7655000)  /lib/ld-linux.so.2 (0xb787a000)   Edit: the workaround didn't work.


How can I solve for the complex solutions of  $$ x^3 = -1 $$


I would like to find a sequence of real numbers $(a_n)_{n\in\mathbb{N}}$ with this property: for any $L\in\mathbb{R}$ there is a subsequence $a_{k_n}$ such that $$\lim_{n\to\infty} a_{k_n} = L$$ Does such a sequence exist?

Im unsure of an example Give an example of a sequence of real numbers with subsequences converging to every real number


Is there a way to rescale the picture environment in TeX (and yes by setting \unitlength), but so that the included text also scales? I have some rather complicated pictures with many draw line etc. commands, which now need to be fitted in a smaller space. The text could easily be seen if it was a smaller size. Is there a way to rescale everything equally?

I have a bunch of LaTeX-output from Gnuplot which I would really like to leave alone. Is there an easy way of scaling an entire figure?  Something like  \includegraphics[scale=0.5]{...}   but just for the figure environment?  If it matters, I have  \begin{figure} \input{plot.tex} \end{figure}   and the output is from gnuplot used "set terminal latex" and so on.


Im not sure if i use the right terms, but im not able to find something to start with.  Im trying to develop a little HTML5 game. I have a ground with a texture and now I want to make a surrounding texture. The texture is an image wich should be bend around the ground.  At the moment im using  for display my images/textures. So im looking for some sort of Tutorial/Script/Advice. Im not even sure if I can bend a image in javascript. So the worst case I can think of is split the image in 100 pieces and then put it back together and rotate each piece.   for example like this:

Games like Super Metroid and Aquaria present the terrain with the other facing parts having rocks and stuff while deeper behind them (i.e. underground) there's different detail or just black.      I would like to do something similar using polygons. Terrain is created in my current level as a set of overlapping square boxes. I'm not sure if this rendering method will work such a system for creating terrain but if anyone has ideas I'd love to hear them. Otherwise I'd like to know how I should re-write the terrain rendering system so it actually works to draw terrain in this manner...


I am very mad about my grade and I prepared this letter. could you pls give me a piece of advice about how to write and complain about the grade? I really do not know what to write. I really want to tell him that this grade is not fair.  PS: I should say that this prof is my supervisor as well.  HERE IS MY LETTER   I am writing this email regarding ++++ grades. I am not happy with my grad. I hope you do not mind but I'd like to ask some questions. I should say that I am really surprised by the final exam grade.  The questions were very easy for me since they were very similar to what we learned in the lectures and you had already covered all of them through the lecture, I thought I could get 100 in the final exam.  In the written report, I got 86.00 I am really curious about this grade. I want to know why I really performed badly. Did I miss anything in the report?  I am available days and nights to discuss these three parts.

My professor announced the grades. He told us in each part what grades we had. My oral presentation for the project was way better than other students. But he just gave me 89 for oral and gave others 88.  I think it is not fair at all, because most of the students were not clear or the did not consider timing. He also told me that "your presentation was very good".  Also, I performed very well on the final exam but he also did not give me the 100. I think it is not fair.  How can I make a complaint? What should I write?


I have a problem providing or finding a general proof for this statement i found in , section $10.3.2$:  Due to the locality of the theory there exists a local field $T_{\mu\nu}(x)$, called the stress-energy tensor, defined by the variation of the local action $S[\varphi]$ under the infinitesimal transformation $x^{\,\mu} \rightarrow x^{' \mu} = x^{\,\mu} + \epsilon^{\,\mu}(x)$  $$ \delta S \, =\, \frac{1}{(2 \pi)^{D-1}} \int d^Dx \, T_{\mu\nu}(x)\, \partial^{\,\mu} \epsilon^{\,\nu} $$  where it says that the factor $(2 \pi)^{D-1}$ is there for later convenience   Now I've seen the proof for a real scalar field which is clearly a field without local interactions.  What is the proof in the general case? Is there a place (book or article) where I can find the proof?

in the book Quantum Field Theory by Itzykson and Zuber the following derivation for the stress-energy tensor is proposed (p.22):  Assume a Lagrangian density depending on the spacetime coordinates $x$ only through fields and their gradients. Under a translation we have $$\mathcal L (x+a)=\mathcal L[\phi_i(x+a),\partial_\mu\phi_i(x+a)].$$  Consider an infinitesimal $x$-dependent transformation $$\delta\phi_i=\delta a^\mu(x)\partial_\mu\phi_i(x),$$ $$\delta\partial_u\phi_i(x)=\delta a^\nu \partial_\nu\partial_\mu\phi_i(x)+\partial_\mu[\delta a^\nu (x)]\partial_\nu \phi_i(x).$$  The proof then proceeds with variation of the action and integration by parts. But why do we consider an $x$-dependent local transformation instead of a global transformation?


I have a time series data like this:  structure(list(TimePeriod = structure(c(1464926400, 1464927300,  1464928200, 1464929100, 1464930000, 1464930900, 1464931800, 1464932700,  1464933600, 1464934500), class = c("POSIXct", "POSIXt"), tzone = ""),      cpubusy = c(35.66, 37.05, 36.9, 36.66, 37.51, 37.2, 35.26,      36.81, 36.14, 36.18)), .Names = c("TimePeriod", "cpubusy" ), row.names = c(NA, 10L), class = "data.frame")   linear model:  lin<-lm(data=df, cpubusy~TimePeriod)   I am trying to read the output of lm function to determine the growth rate:  summary(lin)  Call: lm(formula = cpubusy ~ TimePeriod, data = data1)  Residuals:     Min      1Q  Median      3Q     Max  -59.188 -17.771   0.182  18.622  86.633   Coefficients:               Estimate Std. Error t value Pr(>|t|)     (Intercept) -1.661e+04  5.930e+02  -28.01   <2e-16 *** TimePeriod   1.134e-05  4.041e-07   28.07   <2e-16 *** --- Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1  Residual standard error: 29.77 on 2514 degrees of freedom Multiple R-squared:  0.2386,    Adjusted R-squared:  0.2383  F-statistic:   788 on 1 and 2514 DF,  p-value: < 2.2e-16   Would it be fair to assume that growth rate of cpubusy is equal to R-squared: 0.2386?

The help pages in R assume I know what those numbers mean, but I don't. I'm trying to really intuitively understand every number here. I will just post the output and comment on what I found out. There might (will) be mistakes, as I'll just write what I assume. Mainly I'd like to know what the t-value in the coefficients mean, and why they print the residual standard error.   Call: lm(formula = iris$Sepal.Width ~ iris$Petal.Width)  Residuals:      Min       1Q   Median       3Q      Max  -1.09907 -0.23626 -0.01064  0.23345  1.17532    This is a 5-point-summary of the residuals (their mean is always 0, right?). The numbers can be used (I'm guessing here) to quickly see if there are any big outliers. Also you can already see it here if the residuals are far from normally distributed (they should be normally distributed).  Coefficients:                  Estimate Std. Error t value Pr(>|t|)     (Intercept)       3.30843    0.06210  53.278  < 2e-16 *** iris$Petal.Width -0.20936    0.04374  -4.786 4.07e-06 *** --- Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1    Estimates $\hat{\beta_i}$, computed by least squares regression. Also, the standard error is $\sigma_{\beta_i}$. I'd like to know how this is calculated.  I have no idea where the t-value and the corresponding p-value come from. I know $\hat{\beta}$ should be normal distributed, but how is the t-value calculated?  Residual standard error: 0.407 on 148 degrees of freedom   $\sqrt{ \frac{1}{n-p} \epsilon^T\epsilon }$, I guess. But why do we calculate that, and what does it tell us?  Multiple R-squared: 0.134,  Adjusted R-squared: 0.1282    $ R^2 = \frac{s_\hat{y}^2}{s_y^2} $, which is $ \frac{\sum_{i=1}^n (\hat{y_i}-\bar{y})^2}{\sum_{i=1}^n (y_i-\bar{y})^2} $. The ratio is close to 1 if the points lie on a straight line, and 0 if they are random.  What is the adjusted R-squared?  F-statistic: 22.91 on 1 and 148 DF,  p-value: 4.073e-06    F and p for the whole model, not only for single $\beta_i$s as previous. The F value is $ \frac{s^2_{\hat{y}}}{\sum\epsilon_i} $. The bigger it grows, the more unlikely it is that the $\beta$'s do not have any effect at all.


I write a base class and two derived classes:  class Base     {         public virtual void fn()         {             Console.WriteLine("base fn");         }     }  class Derived1 : Base     {         public override void fn()         {             Console.WriteLine("derived1 fn");         }     }  class Derived2 : Derived1     {         public new void fn()         {             Console.WriteLine("derived2 fn");         }     }   then create an instance of derived2, referenced by a Base variable. Then call the fn() method:  class Program     {         static void Main(string[] args)         {             Base b = new Derived2();             b.fn();             Console.Read();         }     }   the result is that the fn() of Derived1 Class is called.  As far as I know, if a virtual method is called, CLR will look for the method in the method table of the runtime type, which is Derived2; if a non-virtual method is called, ClR will look for it in the method table of the variable type which is Base. But why it calls the method of Derived1?  The Answer "Because Derived1 overrides the fn() of Base" is not enough to clarify my puzzle. Please give me more detail.

What's difference between shadowing and overriding a method in C#?


$$\int \dfrac{\sqrt{\sin^4x+\cos^4x}}{\sin^3x\cos x}$$  My multiple attempts are as follows:-  Attempt $1$: $$\int \dfrac{\sqrt{1-2\sin^2x\cos^2x}\cdot\sin x}{\sin^4x\cos x}dx$$  $$\cos x=t$$ $$-\sin x=\dfrac{dt}{dx}$$  $$\int -\dfrac{\sqrt{1-2t^2(1-t^2)}}{t(1-t^2)^2}dt$$ $$\int -\dfrac{\sqrt{2t^4+1-2t^2}}{t(1+t^4-2t^2)}dt$$  $$\int -\dfrac{\sqrt{2t^2+\dfrac{1}{t^2}-2}}{1+t^4-2t^2}dt$$ $$\int -\dfrac{\sqrt{2t^2+\dfrac{1}{t^2}-2}}{\left(\dfrac{1}{t^2}+t^2-2\right)t^2}dt$$ $$\int -\dfrac{\sqrt{\dfrac{2}{t^2}+\dfrac{1}{t^6}-\dfrac{2}{t^4}}}{\left(\dfrac{1}{t^2}+t^2-2\right)}dt$$  Not finding the way to proceed from here.  Attempt $2$:  $$\int \dfrac{\sqrt{\tan^4x+1}\cos x}{\sin^3 x}dx$$ $$\int \dfrac{\sqrt{\tan^4x+1}}{\tan^3 x\cos^2x}dx$$ $$\tan x=t$$ $$\int \dfrac{\sqrt{t^4+1}}{t^3}dt$$  $$t=\sqrt{\tan\theta}$$  $$\dfrac{dt}{d\theta}=\dfrac{1}{2\sqrt{\tan\theta}}\sec^2\theta$$  $$\int \dfrac{\sec\theta\sec^2\theta}{2\tan^2\theta}d\theta$$ $$\int \dfrac{\sec\theta}{2\sin^2\theta}d\theta$$ $$\int \dfrac{\cos\theta}{2\sin^2\theta\cos^2\theta}d\theta$$ $$y=\sin\theta$$ $$\int \dfrac{dy}{2y^2(1-y^2)}$$ $$-\dfrac{1}{2}\cdot\int\dfrac{y^2-(y^2-1)}{y^2(y^2-1)}dy$$  $$-\dfrac{1}{2}\cdot\left(\dfrac{1}{2}\cdot\ln\left|\dfrac{y-1}{y+1}\right|+\dfrac{1}{y}\right)+C$$  $$-\dfrac{1}{4}\cdot\ln\left|\dfrac{\sin\theta-1}{\sin\theta+1}\right|-\dfrac{1}{2\sin\theta}+C$$  $$-\dfrac{1}{4}\cdot\ln\left|\dfrac{t^2-\sqrt{1+t^4}}{t^2+\sqrt{1+t^4}}\right|-\dfrac{\sqrt{1+t^4}}{2t^2}+C$$  $$-\dfrac{1}{4}\cdot\ln\left|\dfrac{\tan^2x-\sqrt{1+\tan^4x}}{\tan^2x+\sqrt{1+\tan^4x}}\right|-\dfrac{\sqrt{1+\tan^4x}}{2\tan^2x}+C$$  $$-\dfrac{1}{4}\cdot\ln\left|\dfrac{1-\sqrt{\cot^4x+1}}{1+\sqrt{\cot^4x+1}}\right|-\dfrac{\sqrt{1+\cot^4x}}{2}+C$$  But real answer is $-\dfrac{\mathrm{cosec}x}{2}-\dfrac{1}{4}\cdot\ln\left|\dfrac{\mathrm{cosec}x-1}{\mathrm{cosec}x+1}\right|+C$  What am I missing here?

Evaluate the following integral:  $$\int \frac{\sqrt{\sin ^4x+\cos ^4x}}{\sin ^3x \cos x }dx$$ where $x \in \big(0,\frac{\pi}{2} \big)$  Could some give me hint as how to approach this question?  I tried to use the fact that $\sin ^4x+\cos ^4x=1-\frac{sin^22x}{2}$ but it didn't help. How should I proceed?


I found out recently that my code is generating negative zeroes. And this is my very first time encountering this scenario since 3 years ago.  The code was something like this:  $x =  "300.20"; $y =  ("300.10" + "0.10" + "0.00") - "0.00"; $z =  $x - $y;   The $x returns string, $y and $z return float. If you run this codes, $z's value is -5.6843418860808E-14, using number_format it will become -0.00.  Also, $y's value is 300.20 but it is not equal to 300.20 when comparing. Exactly same value but not equal.  My solution is to convert $y to string: $z =  $x - strval($y); but the question is why is this happening?   Same output in PHP5 and PHP7

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


How to block a website from Ubuntu, that the user can never access to that web site, please?  For example, if I want to block www.google.com, how do I to enable the access to it please?  Thanks in advance!

Does anyone know of a good way to set up some sort of parental controls so that one user account is subject to them, but not another?  A couple of friends of mine use Ubuntu and have kids (7 to 10 years old) who use the family computer. They'd like to have some blocking of adult sites. They're not going to supervise all the time, which I know might be ideal, but there we go. And they're not particularly technical, so they don't want to have to run scripts to turn the parental controls on and off regularly, but they can cope with having different accounts for different people. I haven't found a great way of doing this. I am pretty technical, so I'm happy to spend some time at the command line to set it up, but then it needs to just work.  Please don't just link to DansGuardian. If your answer doesn't address the different user account aspect, I will vote it down. If you want to talk about general parental controls that apply to all users then please start a new question - I'm sure that plenty of people would be interested in it, and I'll link to it from this question.


So I've just installed debian in the form of Windows Subsystem for Linux and I was just playing around with it. I asked on some forum (4chan) about some fun random bash scripts/commands, and someone posted this:  Please do not execute this!!  :(){ :|:& }; :  What exactly does this do? I entered it in and my PC just froze up and had to do a reboot. I tried putting it in a search engine but nothing showed up.

I looked at  and can't understand how this works.  This command "exponentially spawns subprocesses until your box locks up".  But why? What I understand less are the colons.  user@host$ :(){ :|:& };:


I want to be able to check if a string is equal to any of the strings inside an array. I know you can check multiple parameters like so:  let value = 'sales';  if ( value == 'sales' || value == 'broker' ){}   But I need to use an array like:  let value = 'sales'; let array = ['sales', 'broker'];  if ( value == array ){}   How can I do this?

What is the most concise and efficient way to find out if a JavaScript array contains a value? This is the only way I know to do it: function contains(a, obj) {     for (var i = 0; i < a.length; i++) {         if (a[i] === obj) {             return true;         }     }     return false; }  Is there a better and more concise way to accomplish this?


I found this proof of $2 = 1$ online and as usual tried to debug it.   Consider the following true statement:     $x^2 = x + x + x + ... + x$ ($x$ times)   If we differentiate both sides, we get:  $$2x = 1 + 1 + 1 + ... + 1 = x$$  Or  $$2 = 1$$  Now, the mistake was that $x^2 = x + x + x + ... + x$ was not true $\forall x \in \mathbb{R}$ and therefore we cannot differentiate both sides and except them to be equal.  However, I learnt of discrete calculus and tried to take the discrete derivative of both sides and got:  $$2x + 1 = x$$ which is also not true for all $x \in \mathbb{N}$.  So, my questions are: Why doesn't the discrete derivative give correct results?  EDIT: I have already mentioned that the statement is not true for all reals and only for natural numbers. I think this makes some of the comments here redundant.

Consider the following:   $1 = 1^2$ $2 + 2 = 2^2$ $3 + 3 + 3 = 3^2$   Therefore,   $\underbrace{x + x + x + \ldots + x}_{x \textrm{ times}}= x^2$   Take the derivative of lhs and rhs and we get:   $\underbrace{1 + 1 + 1 + \ldots + 1}_{x \textrm{ times}} = 2x$   Which simplifies to:   $x = 2x$   and hence    $1 = 2$.     Clearly something is wrong but I am unable pinpoint my mistake.


I have Windows 7 64 bits Home Premium with 2x4GB Ram, but the system shows only 4.75GB available in Windows.

I have set up Windows 7 Ultimate 64-bit on my PC. I have 8GB RAM and my BIOS states the correct amount (8192MB), but Windows (System Manager) says I have 8.00GB (3.22GB usable). give me a solution. I'm tried this: Run > MSCONFIG, open the Boot tab > click Advanced Options > make sure that Maximum Memory but this wasn't helpful. My Motherboard Details: CPU Type : DualCore Intel Pentium, 3000 MHz (15 x 200) Motherboard Name : Foxconn G41MXE Motherboard Chipset : Intel Eaglelake G41 System Memory : 3296 MB (DDR3-1333 DDR3 SDRAM) DIMM1: Kingston : 4 GB DDR3-1333 DDR3 DIMM3: Kingston : 4 GB DDR3-1333 DDR3 My BIOS Details: BIOS Type : AMI (03/21/11) Vendor : American Megatrends Inc. Version : 080015 Capabilities : Flash BIOS, Shadow BIOS, Selectable Boot, EDD, BBS System Properties :  Bios File :  What about Bios Update?


I needed to create a list of lists in Python, so I typed the following: my_list = [[1] * 4] * 3  The list looked like this: [[1, 1, 1, 1], [1, 1, 1, 1], [1, 1, 1, 1]]    Then I changed one of the innermost values: my_list[0][0] = 5  Now my list looks like this: [[5, 1, 1, 1], [5, 1, 1, 1], [5, 1, 1, 1]]    which is not what I wanted or expected. Can someone please explain what's going on, and how to get around it?


I am working on a machine learning project with big data from a hadoop based data warehouse. Therefore, I am using lots of different SQL statements during the day. Sometimes I am modifying the data according to some features and afterwards, I need to feed those variables of dataframe into SQL statement to collect other results from database.   Until now, I've done research on the web but in all related answers you have to indicate each variable as ? or %s in the query. But that method is not feasible for me as sometimes I need to feed more than hundreds of variables so I can not be like   select * from table where id in (?,?,?,.....,?)   My construction to run SQL queries is as follows:  from impala.dbapi import connect from impala.util import as_pandas conn = connect(host='0.0.0.0', port=0, auth_mechanism="blank")   impala_cursor = conn.cursor()   And to run the query   sql= '''SELECT name, id          FROM table          WHERE id in (---HERE COMES THE VARIABLES FROM PANDAS DATAFRAME---)         ''' impala_cursor.execute(sql) df_var = as_pandas(impala_cursor)   Any help is welcome. Thanks in advance!

I have a python list, say l  l = [1,5,8]   I want to write a sql query to get the data for all the elements of the list, say  select name from students where id = |IN THE LIST l|   How do I accomplish this?


How many degrees of freedom does a monoatomic gas have?   According to my Thermal Physics textbook, there are $3N$ degrees of freedom for $N$ particles because the particle is free to move in the $x$, $y$, and $z$ directions.   Why doesn't the rotation/spin of the particle count as a degree of freedom? If we treat the atom as a classical particle, can't it also rotate in the same way that the Earth rotates/spins once per day along its axis?    I also understand that there are electronic degrees of freedom but those may only come into play at higher temperatures.  For context, I am learning about the equipartition theorem. Maybe this is the reason: the spin degree of freedom does exist, but it simply doesn't come into play here because the equipartition theorem only accounts for quadratic degrees of freedom.

I understand that the average energy of each degree of freedom in a thermodynamic system is $\frac12kT$. And so, for an ideal monatomic gas, there are three degrees of freedom associated with the translational components of each atom, which gives $E$ = $\frac32kT$ for each atom in this system.  For an ideal diatomic gas, there are the three degrees of freedom from the translational components plus two more degrees of freedom associated with the rotational components of each molecule. So we end up with $E$ = $\frac52kT$ for each molecule.  My question here is why did we ignore the rotational degree(s) of freedom in case of a monatomic gas ? Like why isn't there another degree of freedom for the rotational component of a single atom ? Also, if that is neglected for some reason, then when does it become significant and can no longer be ignored ? For example, shouldn't it be included in calculations under extreme conditions like temperature of millions of degrees ?


If $a+b=c+d$, and $a^3+b^3=c^3+d^3$, then prove that: $$a^{2011}+b^{2011} = c^{2011}+d^{2011}$$  Approach: From $$a+b=c+d$$ We have: $$(a+b)^2 = (c+d)^2$$ $$a^2+b^2+2ab = c^2+d^2+2cd .... (1)$$ Similarly, we have: $$a^2+b^2-ab = c^2+d^2-cd ....(2)$$ from $a^3+b^3=c^3+d^3$ $(1)-(2)$, gives us $ab=cd$  I wanted to try the below formula explicitly for $n=$ odd, but it isn't working out well. $$a^n+b^n=  (a+b)(a^{n-1} - a^{n-2}b + a^{n-3}b^2-a^{n-4}b^3+.....+a^2b^{n-3}-ab^{n-2}+b^{n-1})$$ Where $n$ is odd.  I got $a-b=c-d$ by using the above information, but I am unable to take $a-b$ common due to the last term as follows: $$a^n+b^n=  (a+b)\ \ \ [ \ \ a^{n-2}(a-b) + a^{n-4}b^2(a-b)+ a^{n-6}b^4(a-b).....+ab^{n-3}(a-b)+b^{n-1}]$$ I want to generalize the result for all odd numbers, but I'm unable to do so. Any help or hints would be most appreciated! Thanks.

Let $a, b, c, d$ be four numbers such that $a + b = c + d$ and $a^3 + b^3 = c^3 + d^3$. Prove that $a^{2009}+b^{2009}=c^{2009}+d^{2009}$.   I've got $a^2+b^2-ab=c^2+d^2-cd$. I tried squaring or cubing it repeatedly but I didn't get what I wanted.  Now how do I proceed?


Suppose that I am given various samples of a vector random variable as the columns $v_1,v_2,\dots,v_n$ of a certain matrix $A$. Is there a relation between  the SVD $A = USV^T$ the SVD $\hat{A} = \hat{U}\hat{S}\hat{V}^T$, where $\hat{A}$ is the 'de-meaned' version of $A$, i.e. the matrix with columns $\hat{v}_j = v_j - \frac{1}{n}\sum_{k=1}^n v_k$.  If I understand correctly, when doing principal component analysis one typically uses the latter, because that is the matrix such that $\hat{A}\hat{A}^T$ is the covariance matrix of the $v_j$. Would it make a big difference to use the former instead? Is there an algebraic relation between the two sets of singular values and vectors obtained? Is one considered more meaningful than the other in practice?

What difference does centering (or de-meaning) your data make for PCA? I've heard that it makes the maths easier or that it prevents the first PC from being dominated by the variables' means, but I feel like I haven't been able to firmly grasp the concept yet.   For example, the top answer here  describes how not centering would pull the first PCA through the origin, rather than the main axis of the point cloud. Based on my understanding of how the PC's are obtained from the covariance matrix's eigenvectors, I can't understand why this would happen.  Moreover, my own calculations with and without centering seem to make little sense.  Consider the setosa flowers in the iris dataset in R. I calculated the eigenvectors and eigenvalues of the sample covariance matrix as follows.  data(iris) df <- iris[iris$Species=='setosa',1:4] e <- eigen(cov(df)) > e $values [1] 0.236455690 0.036918732 0.026796399 0.009033261  $vectors             [,1]       [,2]       [,3]        [,4] [1,] -0.66907840  0.5978840  0.4399628 -0.03607712 [2,] -0.73414783 -0.6206734 -0.2746075 -0.01955027 [3,] -0.09654390  0.4900556 -0.8324495 -0.23990129 [4,] -0.06356359  0.1309379 -0.1950675  0.96992969   If I center the dataset first, I get exactly the same results. This seems quite obvious, since centering does not change the covariance matrix at all.   df.centered <- scale(df,scale=F,center=T) e.centered<- eigen(cov(df.centered)) e.centered   The prcomp function results in exactly this eigenvalue-eigenvector combination as well, for both the centered and uncentered dataset.   p<-prcomp(df) p.centered <- prcomp(df.centered) Standard deviations: [1] 0.48626710 0.19214248 0.16369606 0.09504347  Rotation:                      PC1        PC2        PC3         PC4 Sepal.Length -0.66907840  0.5978840  0.4399628 -0.03607712 Sepal.Width  -0.73414783 -0.6206734 -0.2746075 -0.01955027 Petal.Length -0.09654390  0.4900556 -0.8324495 -0.23990129 Petal.Width  -0.06356359  0.1309379 -0.1950675  0.96992969   However, the prcomp function has the default option center = TRUE. Disabling this option results in the following PC's for the uncentered data (p.centered remains the same when center is set to false):  p.uncentered <- prcomp(df,center=F) > p.uncentered Standard deviations: [1] 6.32674700 0.22455945 0.16369617 0.09766703  Rotation:                     PC1         PC2        PC3         PC4 Sepal.Length -0.8010073  0.40303704  0.4410167  0.03811461 Sepal.Width  -0.5498408 -0.78739486 -0.2753323 -0.04331888 Petal.Length -0.2334487  0.46456598 -0.8317440 -0.19463332 Petal.Width  -0.0395488  0.04182015 -0.1946750  0.97917752   Why is this different from my own eigenvector calculations on the covariance matrix of the uncentered data? Does it have to do with the calculation? I've seen mentioned that prcomp uses something called the SVD method rather than the eigenvalue decomposition to calculate the PC's. The function princomp uses the latter, but its results are identical to prcomp. Does my issue relate to the answer I described at the top of this post?  EDIT: Issue was cleared up by the helpful @ttnphns. See his comment below, on this question:  and in this answer: . In short: a covariance matrix implicitly involves centering of the data already. PCA uses either SVD or eigendecomposition of the centered data $\bf X$, and the covariance matrix is then equal to ${\bf X'X}/(n-1)$.


Is open connected subset of $ \mathbb{R^2} $ is path connected?

Show that if $U$ is an open connected subspace of $\mathbb{R}^2$, then $U$ is path connected. (Hint:Show that given $x_0 \in U$, the set of points can be joined to $x_0$ by a path in $U$ is both open and closed in $U$.)  This should not be too difficult, but I am stuck at some point.  Let $x_0 \in U$  Let $A = \{ x \in U | \text{there is a path connecting $x$ and $x_0$} \}$ $\subset U$.   I want to show that $A$ is open, so let $x \in A$. By openness of $U$, we can find a basic open set $\prod_{i=1}^2 (a_i,b_i)$ such that $\prod_{i=1}^2 (a_i,b_i) \subset U$. But I am stuck in showing that $\prod_{i=1}^2 (a_i,b_i)$ lies entirely in $A$.


I'm trying to modify the environment variables on a parent shell from within Python.  What I've attempted so far hasn't worked:  ~ $ export TESTING=test ~ $ echo $TESTING test ~ $ ~ $ ~ $ python Python 2.7.10 (default, Jun  1 2015, 18:05:38) [GCC 4.9.2] on cygwin Type "help", "copyright", "credits" or "license" for more information. >>> import os >>> os.environ['TESTING'] 'test' >>> os.environ['TESTING'] = 'changed' >>> os.environ['TESTING'] 'changed' >>> quit() ~ $ ~ $ ~ $ echo $TESTING test   That's all I've been able to come up with.  Can it be done?  How do I set environment variables of parent shell in Python?

In Linux When I invoke python from the shell it replicates its environment, and starts the python process. Therefore if I do something like the following:  import os os.environ["FOO"] = "A_Value"   When the python process returns, FOO, assuming it was undefined originally, will still be undefined. Is there a way for the python process (or any child process) to modify the environment of its parent process?  I know you typically solve this problem using something like  source script_name.sh   But this conflicts with other requirements I have.


I'm a newbie user doing rather well at my first O/S install.  This particular snag I cannot figure out.  The upper left key (just below the ESC) is marked with a tilde as the shift value and the "back single quote" (there's probably a proper name for it), if the key is pressed unshifted.  When I press this key I get a ">" (when shifted), and a "<" when pressed on its own.  It is the only key that appears to have an "alternate" definition.  I'm not certain if this is a keyboard definition, or a region setting or something else.  I don't know how to check these settings (or where).  I am not even sure if the approach to the problem is to replace a setting or change the internal key definition for the one key.  Whatever is the easier/cleaner solution is fine with me.  I'm hoping the problem is a common set-up problem that an experienced installer will recognize and know how best to rectify.  The version of ubuntu is 16.04 LTS and the language I intended is English.  Sometimes I select English(US) and sometimes I select English(CA).  I don't recall what I selected on any occasions I was asked during the installation process.  This was installed as a dual-boot on a MacBook Pro (12,1).  Thank you in advance for your time, and I apologize if this is a question that has been asked repeatedly - I'm sure it has been, but I couldn't find it.

I am running Ubuntu 16.10 on a MacbookPro and keys 49 and 94 are inverted... I resolved this problem with xmodmap, but this won't apply permanently. After some research I found xmodmap is no longuer use by Ubuntu but xkb instead. So I searched in the configuration of xkb and I found in the config file /usr/share/X11/xkb/keycodes/macintosh this lines :   xkb_keycodes "badmap" {     <TLDE> =  94;     <LSGT> =  49; };  xkb_keycodes "goodmap" {     <TLDE> =  49;     <LSGT> =  94; };   This is exactly my problem, this two keys are inverted. So I wondering if I can't change my layout configuration with the param badmap.    The ouput of setxkbmap -query -v 10  Setting verbose level to 10 locale is C Trying to load rules file ./rules/evdev... Trying to load rules file /usr/share/X11/xkb/rules/evdev... Success. Applied rules from evdev: rules:      evdev model:      pc105 layout:     fr,fr,us variant:    mac,oss, Trying to build keymap using the following components: keycodes:   evdev+aliases(azerty) types:      complete compat:     complete symbols:    pc+fr(mac)+fr(oss):2+us:3+inet(evdev) geometry:   pc(pc105) rules:      evdev model:      pc105 layout:     fr,fr,us variant:    mac,oss,


So I came across this sentence and whats confusing to me is the infinitive in the beginning. I thought the construction was "be to do something" ( "...is to ban...). I have seen similar sentences in the past mostly in headlines so maybe words are left out because the meaning is clear as it is?

I saw an article starts with: "A company to launch a new product", in a news paper. I just wonder what does it mean?  Is it a kind of usage of near future? (e.g. is to do something)


English has certain words that almost always go together. For example:  Wreak Excruciating Vastly  Reading that list, most native speakers will expect to see "havoc", "pain", and "superior" respectively. While you could "wreak destruction", that usage is very uncommon compared to "wreak havoc". My primary question: Is there a name for this kind of word relationship? Secondary questions:  Is there a reason this happens in our language? Can you list any other examples of these pairs?  Funny side note: Not knowing what to call this concept makes it a little tricky to pick meaningful tags.

The statement that I want to make is:     "Impostor syndrome" ... why does this (conjunction of words) sneak into every text I read these days?   What is the right or best expression for "conjunction of words"? In the statement I don't want to refer to the syndrome itself, but rather to the expression. If it was one word instead of two I would want to say     ... why does this word sneak into every text I read these days.   However, writing     ________ why do these two words sneak into every text I read these days.   would miss the point, because it's not these two words that sneak into every text at various location but rather their conjunction.


Is there a way to extend a command line command on to multiple lines in windows?    Of course, one can simply keep typing, and wrap around, what I'm wondering is if there is a character that you could put at the end of the line that would be a signal that the command is not yet complete.  This could be helpful in formatting a large command, and I've seen this in other command line environments.

I'm trying to execute a command on cmd.exe, with a line break or new line as part of the command, like below:  command -option:text   whatever   But every new line executes the command, instead of continuing the command on the next line.  So how can I input a new line character, or create a multi-line command in cmd.exe?


I haven't quite figured out, how to use "normal" bash variables in an Upstart script.  Basically, I just want to do this.  DAEMON="/usr/bin/redis-server" DAEMON_ARGS="/etc/redis/redis.conf" RUNDIR="/var/run/redis" PIDFILE="$RUNDIR/redis-server.pid"  pre-start script     mkdir -p /media/redis/     mkdir -p /var/log/redis/     mkdir -p $RUNDIR     touch $PIDFILE     chown redis:redis $RUNDIR $PIDFILE     chmod 755 $RUNDIR end script  start on runlevel [2345] stop on runlevel [06]  script     echo $DAEMON     exec start-stop-daemon --start --quiet --umask 007 --pidfile $PIDFILE --chuid redis:redis --exec $DAEMON -- $DAEMON_ARGS end script   But, of course, this doesn't work. Prefixing the variable declarations with env kinda works, but doesn't allow for interpolation.  # using `env` the variables are accessible in the entire file. env DAEMON="/usr/bin/redis-server" env DAEMON_ARGS="/etc/redis/redis.conf" env RUNDIR="/var/run/redis" env PIDFILE="$RUNDIR/redis-server.pid" # however interpolation doesn't work # `echo $PIDFILE` -> $RUNDIR/redis-server.pid   If I move the variable declaration inside a block (like pre-start or script), they work, but only inside that block. If I define them in the pre-start block, they are undefined in the main block.  There has to be a sane way of doing this.

I have written several upstart scripts to start transmission-daemon for several users. The script is this:  start on (local-filesystems and net-device-up IFACE=eth0 and runlevel [235]) stop on runlevel [016]  kill timeout 50  respawn  env USER=user env PIDFILE=/var/run/transmission-user.pid  script     DAEMON=$(which transmission-daemon) || exit 0     CONFIGDIR=/home/$USER/.config/transmission-daemon      exec start-stop-daemon --start --quiet --chuid $USER --pidfile $PIDFILE --make-pidfile --exec $DAEMON -- -f --config-dir $CONFIGDIR --logfile $CONFIGDIR/daemon.log end script  post-stop exec rm -f $PIDFILE   I would convert this:  env USER=user env PIDFILE=/var/run/transmission-user.pid   To this:  env USER=user env PIDFILE=/var/run/transmission-$USER.pid   But upstart doesn't allow. I can do it if I move those lines to the script section:  script     USER=user     PIDFILE=/var/run/transmission-$USER.pid     ... end script   But in this case, the PIDFILE, in post-stop section, is empty. Is there any way to do this?


I make use of a package (gnuplottex) that writes contents of an environment to a file, using the \verbatim@start/processline/end commands (by \immediate\write\FileHandle{\the\verbatim@line}). Now I want to modify the package to insert a couple of user-defined lines at the start of every file.  I defined a token list to store the lines and two commands to set these header lines:  \newtoks\headerlines \def\setheaderlines#1{\headerlines{#1}} \def\addtoheaderlines#1{\headerlines\expandafter{\the\headerlines#1}}   The tokens I then write to the file before the \verbatim@start, with \immediate\write\FileHandle{\the\headerlines}. This works fine for a single line, but I need to write several lines to the file, so preserve newlines in the token and write them to the files. Right now, this does not happen: everything gets put on a single line. How do I preserve newlines in the token list and write as separate lines to the file?  In other words:  \setheaderlines{header line 1 header line 2}   gets written to the file as   header line 1 header line 2`   instead of  header line 1 header line 2

Within a custom command, I'm doing the following to write to a file:  \newcommand\mycommand[1]{   \newwrite\file   \immediate\openout\file=foobar.tex   \immediate\write\file{     foo     bar     #1     blarg   }   \immediate\closeout\file }   Of course when I invoke it as \mycommand{baz}, I get the following contents in foobar.tex:  foo bar baz blarg   with all new lines turned into spaces by LaTeX. My question is, is there a way to output these lines into the file "as expected", i.e. with real new lines at the end of each line instead of a space? I'm thinking some \catcode wizardry should do the trick, but I'm not sure which character I need to redefine and to what category code.  Update  The solution in  works perfectly. The only problem is when #1 contains embedded newlines. I can of course send it to mycommand with its own slew of ^^J, I was wondering if there is a way to avoid this.


Given: li = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h']  Why does print(li[-5:0]) not print [d, b, c]? -5 is the beginning and 0 is the end, so, why does print(li[-5:0]) print an empty list? Shouldn't print statement start from d which is -5 and go through until 0+1 which is c?

I need a good explanation (references are a plus) on Python's slice notation.   To me, this notation needs a bit of picking up.   It looks extremely powerful, but I haven't quite got my head around it.


Could someone explain to me why  $$x^{\log(n)} = n^{\log(x)}$$ in simple terms?  I tried to simply take the $log$ of both sides but it doesn't work out or simplify.

I have been hit with a homework problem that I just have no idea how to approach. Any help from you all is very much appreciated. Here is the problem  Prove the equation: $a^{\log_b c} = c^{\log_b a}$  Any ideas?


Which is correct? Also why? For some reason the continually is throwing me off here. Thanks.

Does "feel committed to" require an infinitive or gerund complement?   For example, which of the following is grammatical?        I feel committed to following up on that.   I feel committed to follow up on that.


I'm running XUbuntu 20.04 and I am unable to get a GUI. Booting to terminal I run startx and I am presented with the following: /etc/X11/xinit/xerverrc: 3: exec: /usr/bin/x: not found. This seems to indicate Xorg is not installed and searching through questions on here reinforces that. Running sudo apt install xorg results in the following: $ sudo apt install xorg Reading package lists... Done Building dependency tree Reading state information... Done Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation:  The following packages have unmet dependencies:  xorg : Depends: xserver-xorg (>= 1:7.7+19ubuntu14) but it is not going to be installed         Depends: libgl1-mesa-glx but it is not going to be installed or                  libgl1 but it is not going to be installed         Depends: libgl1-mesa-dri but it is not going to be installed         Depends: libglu1-mesa but it is not going to be installed         Depends: x11-utils but it is not going to be installed E: Unable to correct problems, you have held broken packages.  Attempting to run sudo apt install --fix-broken results in 0 packages being upgraded, installed, or removed. I have tried installing the individual packages like xserver-xorg but it just becomes a circular problem of each package having unmet dependencies and I cannot get it installed. I am unsure where to take this problem next to diagnose and solve. Most solutions on here for not getting xorg to start revolve around reinstalling xorg but in my situation apt can't resolve all the dependencies to reinstall it.

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.


I'm looking for a novel that I think was published before 2006; it was a great read.   From what I can remember there was an aggressor alien species that came to earth and put the human race into something like castes to control them. They gave black people power and made whites more like slaves. This alien race were like giant grasshoppers or bugs and could jump high.  There was another friendly alien race that befriended humans; they were very short and might have been a slave race. Humans taught them military tactics and tech, and both these friendly aliens and humans were able to defeat their mutual enemy.


How do I test for a player being in a world? I have 2 command blocks: the second one is conditional and relies on the first one to be correct for it to work. In the first command, I have this: /execute if entity (player) in minecraft:the_nether run say test, yet it says test every time even if the player is not in the nether.

I have a vanilla server 1.8.7 that uses a book to tp players to spawn or to their home (an invisible armor stand with their uuid connected to it). Problem is, if they set home (place their armor stand) in the overworld and go to the nether and try to tp home (activated using a trigger), it sends them to the same co-ordinates in the nether, and most likely kills them.   I did some digging, and there seems to be a dimension parameter, but I can't quite figure out the syntax or how to get it to work.  I updated the command block to:  /tp @a[score_tpHome_min=1,Dimension=0] 68 68 68   I was hoping it would only tp the player when they were in the overworld (Dimension 0), but it seems to be ignoring that parameter in the nether and still teleporting to those co-ordinates in the nether.   I also tried:  /tp @a[score_tpHome_min=1,Dimension:0] 68 68 68   Which is the way other people were using the parameter in other ways, but that gave an error.


Ubuntu Server 18.04 Tried:  ~$ sudo apt-get update Hit:1 http://archive.ubuntu.com/ubuntu bionic InRelease Get:2 http://archive.ubuntu.com/ubuntu bionic-security InRelease [83.2 kB] Get:3 http://archive.ubuntu.com/ubuntu bionic-updates InRelease [88.7 kB] Get:4 http://archive.ubuntu.com/ubuntu bionic/main Translation-en [516 kB] Get:5 http://archive.ubuntu.com/ubuntu bionic-security/main Translation-en [78.1 kB] Get:6 http://archive.ubuntu.com/ubuntu bionic-updates/main Translation-en [161 kB] Fetched 927 kB in 1s (628 kB/s) Reading package lists... Done  :~$ sudo apt-get install krb5-kdc krb5-admin-server Reading package lists... Done Building dependency tree Reading state information... Done Package krb5-kdc is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source  E: Package 'krb5-kdc' has no installation candidate E: Unable to locate package krb5-admin-server   Ubuntu documentation has:   sudo apt install krb5-kdc krb5-admin-server   Same result.  There was an old post about Ubuntu 14... update solve his problem, not mine.

When I try to install any package through the command line, I get an error.   $ sudo apt-get install <package> Reading package lists... Done Building dependency tree        Reading state information... Done E: Unable to locate package <package>   Can anyone help me on this?


I'm on Blender 2.79. When using drivers on node properties the material doesn't update on the Rendered/Material viewports until I force reload it.  My drivers are pulling custom object properties from a parent armature and running it through a scripted expression. This driver's output is then fed into the Y Scale of a Mapping node. It works wonderfully, the value updates immediately, but the viewport doesn't.  Starting point:    After changing the parent's custom property, the driver updates, the node value updates, but the material in the viewport doesn't:    After I hit SHIFT+Z twice to exit and reenter the Rendered mode, the material updates:    Another way to force the viewport update is to make a manual change to the material, like disconnecting a random node or changing the texture location, or to the drivers, as changing the type of a second driver. But automatically? No success so far.  What am I doing wrong?

I am trying to animate in 2d. I do it with planes that have textures on them. I recently came up with the idea of having a plane with an image sequence of mouths because animating actual lip syncing by hand takes too long and isn't really necessary for what I'm trying to acomplish. However, when playing back the animation in textured viewport shading the animated texture stays at the last frame until the animation stops. I can use the arrow keys and it works fine as well as scrubbing through the timeline, just not when playing back the animation with alt+a. Can anyone help me with this problem?


//--Need a way to set a delay here--\\\    var result = ['Rock', 'Paper', 'Scissors',][Math.floor(Math.random() * 3)]   cpuReply.value = result //--end of script--\\\   Okay so I am trying to find a way to add a delay before these two lines of code. I have heard a lot of advice about using the .delay, but I don't know how to define it, and it often says unexpected number if I do this    delay(5000)   var result = ['Rock', 'Paper', 'Scissors',][Math.floor(Math.random() * 3)]   cpuReply.value = result   I am not sure I typed in the delay right (tell me if it is wrong) and please help me figure this out.

Is there any JavaScript method similar to the jQuery delay() or wait() (to delay the execution of a script for a specific amount of time)?


I was born here in America, but I also have my citizenship from Brazil. I have both passports, dual-nationality. I know for a fact that Brazilians do not need a visa to enter Venezuela. I also do not have a visa to USA, Brazil, or Venezuela. I simply use my passport to USA and Brazil.  Can I leave America, use my Brazilian passport to enter Venezuela?   If so, how would I come back home to America? I have my thoughts on how but I'm unsure, please correct me if I'm wrong.   Will Venezuela allow me to come back if I show them both my passport? ...and no visa. Do I just show my Brazilian passport? If so, won't they ask me for a visa to USA? Will I have to make a trip to Brazil then USA?   If anyone knows of someone or an office, anything that I can call (in the USA) please give me that number!

I was just wondering if you have two passports (a Chinese one and an Australian one), and you booked your airline ticket with the Chinese one, will you have to show both of your passports or just one?  The thing is, on my Chinese passport, it has my birth name, but then when I became an Australian citizen, I legally removed my Chinese name and replaced it with my English name. So I don't know whether I should just show the passport officials the one that I booked the airline ticket with.


I have the following code in c++:  typedef struct {    int a;    int b;    float c; } Data;  class DataInfo : public Data {    // some code here };   my question is can class inherit struct in C++? how this happens?

The question says it all really.  Am I allowed derive a class from a struct, or should I create a class that embeds my struct and defines copy constructors and an = operator to move between the two?


The Big Bang happened almost 14 Billion years ago. Theoretically speaking , if we could teleport (Instant teleportation) to somewhere that’s 20 Billion light years away from the Earth , if we looked at the Earth using a super telescope, what would we see?Would we see the Big Bang ? Would we see what there was before the Big Bang? Does such a place even exist? If no , would that mean the space is finite?

TV documentaries invariably show the Big Bang as an exploding ball of fire expanding outwards. Did the Big Bang really explode outwards from a point like this? If not, what did happen?


I'm trying to adjust the spacing between several display equations, without having to put them in AMS align environment. I inserted several display equations in a row, each creating its own new line, but I would like to adjust the spacing of said lines. Here's an example of LaTeX source:  We can quickly calculate: \[ a=12 \] \[ b=9 \] \[ c=19.2 \] Which results in results   I can't figure out how to set the spacing between them. I am using Lyx as my editor, so ideally a solution that involves changing the Lyx document setting would be the best. However, I'm fine with adding a preamble latex code to adjust that spacing.  Thank you so much for all your help; any input is appreciated!

This is a follow-up question regarding the extra vertical space in amsmath's align environment. Why when in use align uses so much vertical space in contrast with other environments like for example tabular or itemize?  \documentclass[12pt]{article} \usepackage[top=0.3in, bottom=1.2in, left=0.8in, right=0.8in]{geometry}   \usepackage[fleqn]{amsmath} \usepackage{unicode-math}  \setlength{\mathindent}{0cm} \newcommand{\3}{\vspace{0.3cm}}  \title{} \author{} \date{}  \begin{document}  70  \begin{align*} &e^{jz}=\cos z+j\sin z\\ &\cos z=(1/2)(2\cos z)=\\ &=(1/2)(2\cos z+j\sin z-j\sin z)=\\ &=(1/2)(\cos z+j\sin z+\cos z-j\sin z)=\\ &=(1/2)(e^{jz}+e^{-jz}) \end{align*}  80  \begin{itemize} \item Item 1  \item Item 2  \end{itemize}  90  \begin{tabular}{c|c}  Entry 1& Entry 2  \\  Entry 3& Entry 4 \end{tabular}  \end{document}     Also another image of the huge space between two align environments. Even without the blank lines the space is a lot.    \begin{document}  \begin{multicols*}{2}   \begin{align*} &\text{70}\\ &e^{jz}=\cos z+j\sin z\\ &\cos z=(1/2)(2\cos z)=\\ &=(1/2)(2\cos z+j\sin z-j\sin z)=\\ &=(1/2)(\cos z+j\sin z+\cos z-j\sin z)=\\ &=(1/2)(e^{jz}+e^{-jz}) \end{align*}    \begin{align*} &\text{207}\\ &x(t)=A_{c}\cos \theta(t)\\ &\theta(t)=2\pi f_{c}t+\phi(t)\\ &\phi(t)=K_{p}m(t)\\ &x(t)=A_{c}\cos[2\pi f_{c}t+K_{p}m(t)] \end{align*}   Edit I:  As I mention in a comment I have tried the following code and there is no difference between two align environments, only between text and an align environment. Why doesn't work in the case of the two environments and how can I fix it so to work? Also what is the reason that this space exists?  \setlength{\abovedisplayskip}{0pt} \setlength{\belowdisplayskip}{0pt} \setlength{\abovedisplayshortskip}{0pt} \setlength{\belowdisplayshortskip}{0pt}


I m really sorry if this question's origin reside in my profound lack of understanding of the template concept itself. I had defined the following class. #include <iostream>  template <typename T> class T3B_data{ public:     T3B_data<T>();     ~T3B_data<T>();     void fromText(std::istream& is);     void fromText(const std::string& textPath);     void fromBinary(std::istream& is);     std::ostream & toText(std::ostream& oStream)const;     std::ostream & toBinary(std::ostream& oStream);     friend inline std::ostream& operator << (std::ostream & oStream,const T3B_data<T> & data){         return data.toText(oStream);     } private:     T * mObj; };  In order to make a simple template test i tried the following main in order to instantiate it #include "T3B_data.h"  int main(void){   T3B_data<int> * myData = new T3B_data<int>();   return 0; }  i don t get why did i had to instanciate the template explicitly by adding: template class T3B_data<int>;  at the end of the header file for the compiler to find the class constructor. Note : I m fully aware that appending the line actually force a whole new class generation. i just don t get why the code in the main did not actually force template instanciation at compiler level. Note 2: I m quite sure i m making something wrong, because when using STL containers i do not need to instanciate it whenever i use it with a self defined type like : struct myStruct{     int a;     std::string; }; std::vector<myStruct> a;  Thanks in advance to any people sharing interest in this question. EDIT : Something must be utterly wrong in my implementation, as i move my header file into my main and stubbed implementation using {} at end of declaration. and everything compiles fine without the template class T3B_data; declaration. Question ending up being a duplicate to

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


We always say that a low current can kill. However my knowledge of current is the amount of Coulomb. When that is explained, there is no mention of voltage level...  However, shouldn't voltage be important too? Do we consider a voltage of 120V because this is the voltage in common wire?  Let's make an extreme supposition.  Would 1A with 1 pV still be dangerous?  If so why? Coulomb are like particle as far as I understand, so if they have no energy, why would they be so dangerous?

Related:        From what I've heard:   110 V (or 220 V; household voltage pretty much) is dangerous (i.e. can kill you) I think there's consensus on this, no need to try :) 60 V (old telephone lines) is supposedly dangerous (never tried, only heard it once... probably won't try)   From what I know first-hand:   9 V is not dangerous (I've put a 9-V battery on my tongue, nbd... actually it kinda hurt!) 1.5 V can indeed be quite shocking with enough current (fell for one of those "Do you want some gum?" tricks back in high school...), but they sometimes do not use 1.5 V with the low amperage levels, some use a DC motor to vibrate and complete the trick.   So I guess there's two parameters here, voltage and current... but are there rough numbers on how much of each (or in combination, which I guess would be power) would be considered hazardous?  No old telephone lines have always been 48vDC well at least since from 1950s, if your skin is wet you can feel it slightly, like on your forearm.  Now the ring voltage is 90-110vAC with a 2 on 4 sec off cycle (USA).  It will ring your bell but good, should you be touching the wires when someone calls. The ring voltage rides on top of the 48vDC, so its present on the same two conductors that the voice voltage(DC) is on. Luckily it's 4 seconds off will give you a chance to get off the conductors with a scream (of pain).


I know how to get two images side by side within minpages environment. Suppose I have a paragraph followed by the two side by side images and an equation about two or three lines. The issue I'm having is even when I put the code in the right place after the paragraph, I still get the two side by side images after the equation. How can I adjust the order the way I want. Thank you for any help.

I have a problem when a lot of figures are in question. Some figures tend to "fly around", that is, be a paragraph below, although I placed them before that paragraph. I use code:  \begin{figure}[ht] \begin{center} \advance\leftskip-3cm \advance\rightskip-3cm \includegraphics[keepaspectratio=true,scale=0.6]{slike/visina8} \caption{} \label{visina8} \end{center}\end{figure}   to place my figures. How can I tell latex I REALLY want the figure in that specific place, no matter how much whitespace will be left?


I'm looking over a proof for something and I can't understand the last bit of a certain part (counting argument).  $G$ is a group of order 80 and $n_2 = 1$ or $5$ (number of 2-Sylow subgroups). We assume that it's not one so it is five. Then let $P_1 \neq P_2$ be 2-Sylow subgroups with $D$ being the intersection of these. So, we know that $P_1, P_2 \in C_G(D)$ but if the centralizer has two 2-Sylow subgroups it must have at least 1+2=3 2-Sylow Subgroups. So, $|C_G(D)| \ge 16(3) = 48 \implies C_G(D) = G$. I am fine with all of this, just the final bit... this is a contradiction. Am I missing some obvious reason that $C_G(D) = G$ is a contradiction?  Then we can conclude that the subgroups intersect trivially, which is what I want.  EDIT: The objective of the proof is simply to show that either the 2-Sylow or 5-Sylow subgroup must be normal. There is no mention of the group being abelian or non-abelian, so this is unknown. Before this part we assume that $n_5 = 16$ giving 64 elements of order 5.   Thanks!

Let G be a group of order 80  a) Show that G has a normal Sylow 5-subgroup or a normal Sylow 2-subgroup b) Show that G is solvable  Approach: $80=5*2^4$  $Syl_5(G) \equiv  1mod \text{ } 5$ and $Syl_5(G) | 16$, so the only possibilities are 1 and 16    $Syl_2(G) \equiv 1 mod \text{ }2$ and $Syl_2(G)|5$, so the only possibilities are 1 and 5  How do we discard one of the possibilities to imply there exists a normal sylow p subgroup in G?


I am not trying to change my e-mail in the various StackExchange profiles I have.  Rather, when I log into a StackExchange site, and I log in using the StackExchange OpenID, I use my e-mail.  I want to change that e-mail.  Is it possible?  When I get to my StackExchange profile and I click on the "Logins" link, I get an option to add more logins, but not to edit the one I already have there.

I no longer use the service that I originally used to register, and would like to change the service I use to log in, or at least add a second account.  Is this possible? How do I change my login provider or associate a backup method to log in?     For more information, see "" in the .


I am new to bash. Need suggestion for the following problem.   So I want to execute the script in this way   ./myscript --bootstrap bootstrap.exe --vmmount ./vmmount --image /dev/sdb2 --target-exe installer.exe [--internal-exe] param1 param2 param3 ...   Argument parser i have done:  VMMOUNT="" BOOTSTRAP="" IMAGE_FILE="" TARGET_EXE="" INTERNAL_EXE="" while : ; do if [ "$1" = "--vmmount" ] ; then     [ -n "${VMMOUNT}" ] && usage     VMMOUNT="$2"     shift     shift elif [ "$1" = "--bootstrap" ] ; then     [ -n "${BOOTSTRAP}" ] && usage     BOOTSTRAP="$2"     shift     shift elif [ "$1" = "--image" ] ; then     [ -n "${IMAGE_FILE}" ] && usage     IMAGE_FILE="$2"     shift     shift        elif [ "$1" = "--target-exe" ] ; then     [ -n "${TARGET_EXE}" ] && usage     TARGET_EXE="$2"     shift     shift elif [ "$1" = "--internal-exe" ] ; then     [ -n "${INTERNAL_EXE}" ] && usage     INTERNAL_EXE="true"     shift     shift else     break fi done my_method "${IMAGE_FILE}" "${VMMOUNT}" "${BOOTSTRAP}" "${TARGET_EXE}" "${INTERNAL_EXE}"    Now I have confusion in parsing the parameters param1 and param2 etc. How to parse them ? Can I use $@ to take the params as array or any other efficient way ?

Say, I have a script that gets called with this line: ./myscript -vfd ./foo/bar/someFile -o /fizz/someOtherFile  or this one: ./myscript -v -f -d -o /fizz/someOtherFile ./foo/bar/someFile   What's the accepted way of parsing this such that in each case (or some combination of the two) $v, $f, and  $d will all be set to true and $outFile will be equal to /fizz/someOtherFile?


Constantly, I use windows and ubuntu and need to access files on both systems. It sucks to be copying files back and forth and sometimes I forget some file and I have to restart several times. To resolve this I created the following partitions   Device     Boot     Start             End   Blocks      Id System  /dev/sda1    *       2048         1026047   512000       7 HPFS / NTFS / exFAT  /dev/sda2       1,026,048      35,842,047   17,408,000  27 Hidden NTFS WinRE  /dev/sda3        35842048       247212031   105684992    7 HPFS / NTFS / exFAT  /dev/sda4     247,214,017   1,250,263,039   501,524,511+ f Win95 (LBA) Extended Partition  /dev/sda5       247214080      1053323263   403054592    7 HPFS / NTFS / exFAT  /dev/sda6   1,053,327,360   1,233,903,615   90,288,128  83 Linux  /dev/sda7   1,233,905,664   1,250,263,039    8,178,688  82 Linux swap / Solaris   Some people and websites say that doing so is not recommended. Will I have problems?

I have a new laptop which I am setting up as dual boot Windows/Linux.    I would like to access files from both Ubuntu and Windows 7.  Should I create a separate NTFS partition?


My purpose was to make 2D list by * list2 = [[False]*2]*3 #[[False,False],[False,False],[False,False]] list3 = [[False]*2 for _ in range(3)] #same as list2 list2[0][0] = True # [[True, False], [True, False], [True, False]] list3[0][0] = True # [[True, False], [False, False], [False, False]]  list3 works well but list2 doesn't. list2 is affected by 'x' of list2[z][x]. What happened?

I needed to create a list of lists in Python, so I typed the following: my_list = [[1] * 4] * 3  The list looked like this: [[1, 1, 1, 1], [1, 1, 1, 1], [1, 1, 1, 1]]    Then I changed one of the innermost values: my_list[0][0] = 5  Now my list looks like this: [[5, 1, 1, 1], [5, 1, 1, 1], [5, 1, 1, 1]]    which is not what I wanted or expected. Can someone please explain what's going on, and how to get around it?


Evaluation of Integral $\displaystyle \int \sqrt{\sin x}\; dx$  $\bf{My\; Try::}$ Let $\sin x = y^2\;, $ Then $\displaystyle \cos xdx =2ydy\Rightarrow dx = \frac{2y}{\sqrt{1-y^4}}dy$  So $\displaystyle \int \sqrt{\sin x}\;dx = 2\int \frac{y^2}{\sqrt{1-y^4}}dy = 2\int y^2\cdot \left(1-y^4\right)^{-\frac{1}{2}}dy$  (Using Wolframalpha It Show The Results is in the form of Elleptical Integral of first and Second Kind.)  Now How Can I solve after that   Help Required  Thanks

$$\int \sqrt{\sin x} ~dx.$$  Does there exist a simple antiderivative of $\sqrt{\sin x}$? How do I integrate it?


I have recently installed a Ubuntu dual-boot with Windows on my PC (still trying to get the Windows part working). The internet on Ubuntu is really slow compared to Windows.   A sppedtest.net test has a ping of 1000ms+ and won't even run.  It's taken me around 10 minutes to download 4000 kB Pinging 8.8.8.8 (Google DNS anycast) returns times of 1500ms when it should be < 20 ms   I have a feeling this could be down to the Ubunutu installation. My Mac (right next to the Ubuntu PC) is working fine and does a Speedtest.net test with a ping of 9ms, 36mpbs download and 10mpbs upload.  What could be the problem?

I have just installed Ubuntu 20.04 and I am facing a pretty big issue. My download speeds are really low compared to the Windows 10 that I have installed on dual-boot setup.   This is the speed I'm getting in Windows.    And this is what I'm getting in Ubuntu.   My network adapter is Lenovo RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller.   I have tried changing the DNS options but that doesn't help.  Device is a Lenovo Y700-15ISK Laptop.  Output lshw:  *-network DISABLED        description: Wireless interface        product: QCA9377 802.11ac Wireless Network Adapter        vendor: Qualcomm Atheros        physical id: 0        bus info: pci@0000:08:00.0        logical name: wlp8s0        version: 30        serial: cc:b0:da:b7:60:65        width: 64 bits        clock: 33MHz        capabilities: pm msi pciexpress bus_master cap_list ethernet physical wireless        configuration: broadcast=yes driver=ath10k_pci driverversion=5.4.0-29-generic firmware=WLAN.TF.2.1-00021-QCARMSWP-1 latency=0 link=no multicast=yes wireless=IEEE 802.11        resources: irq:142 memory:94000000-941fffff   *-network        description: Ethernet interface        product: RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller        vendor: Realtek Semiconductor Co., Ltd.        physical id: 0        bus info: pci@0000:09:00.0        logical name: enp9s0        version: 15        serial: c8:5b:76:3e:55:50        size: 1Gbit/s        capacity: 1Gbit/s        width: 64 bits        clock: 33MHz        capabilities: pm msi pciexpress msix bus_master cap_list ethernet physical tp 10bt 10bt-fd 100bt 100bt-fd 1000bt-fd autonegotiation        configuration: autonegotiation=on broadcast=yes driver=r8168 driverversion=8.048.00-NAPI duplex=full ip=192.168.100.2 latency=0 link=yes multicast=yes port=twisted pair speed=1Gbit/s        resources: irq:131 ioport:3000(size=256) memory:94304000-94304fff memory:94300000-94303fff   Also, the ifconfig shows a lot of dropped RX packages that are increasing as we speak:


I am using the US International Alternate keyboard layout on Windows. Google Docs has Ctrl+Alt+M to enter a comment, but with this keyboard layout that registers as AltGr+M, which produces µ. Is there any way to prevent Ctrl+Alt from registering as AltGr?

I'm currently using Google Docs, but when I try to use the keyboard shortcuts like Ctrl+Alt+M it gives µ instead.    Is Chrome (9) overruling Google Docs in some way?  How can I get these shortcuts working?  I'm using Chrome dev 9 on a Dutch Windows 7 with a US-layout keyboard


We are having 1 billion phone numbers and we have to search them against numbers which we send for promotion to filter out which are not promotional registered. That is we have lets say 1 million record which we need to search against 1 billion database records.   What would be best and optimized way to search these records and which database should we use?  We are currently using SQL Server and in a batch of 10000 searches it gives result in 20 minutes.  We want real time searching.

I am developing sms based service platform. In India, we have two different types of routes to send sms - promo & trans. Sms sent via promo route has to be checked against nationally maintained database (DND), which currently holds 231450000 mobile numbers.  My question is   What is the efficient way to store this data (DND). What is the efficient way to check, whether the number exists within these numbers or not. Twice in a week, a delta dump of these numbers (DND) is provided by telecom authority. How to sync the dump with existing db. Should I use mysql to store this data, which will consist of mobile numbers, or any other in-memory storage?   EDIT:   Each row of data consists of mobile number alongwith few preferences like area code, user preference etc The data dump provided twice a week contains only additions / deletions and not the whole data. Lookup frequency can be very large. Actually every SMS sent from the platform has to first make a lookup against the data (DND). So if the platform is handling 100 sms per second, it has to make 100 lookups per second against this data. The lookup simply checks existence of a particular mobile number against the data(DND) in database. The new delta data dump (additions / deletions), has to be synced in few hours only, as the dump is provided by telecom authority in the day and the same has to go live by midnight 00:00 hours. So the total time to sync data will be around 3 hours.   Sample DND dump    Sample of DND dump provided. Here A under Opstype means record has to be added, while as D means record has to be deleted.


As a concrete example, let's say I have a multiclassed Cleric and Wizard (), meaning that a common spell they could both have is Cure Wounds, but let's say that I didn't have the wizard learn the Cure Wounds spell. Could the character have the "prepared wizard spells" include Cure Wounds, which is a spell that as a Theurgy Wizard he could know, but doesn't?

If I multiclass into 2 or more classes/subclasses that can cast spells, how do I determine what spells I know or can prepare?  For instance, if I am playing a multiclassed character with 1 level in warlock, 2 levels in bard, and 3 levels in paladin, how do I determine which spells I know/have prepared?    Related:


This is something I was thinking about, so I'm going to post it as a question and post my own answer. I hope that anyone who wants will comment, correct me if I'm wrong, and add their own knowledge and thoughts.  Suppose $f:[a,b]\to \mathbb{R}$ is a positive, continuous function. The $L^p$ norms of $f$ are the analogs to the weighted power means of a group of positive numbers $a_1, \dotsc, a_n$. (Perhaps it would be more precise to say that the expressions $\left(\int_a^b\frac{f^p}{b-a}dx\right)^{1/p}$ are the analogs.) The power means are given by $$M_p(a_1, \dotsc, a_n)=(w_1a_1^p + \dotsb + w_na_n^p)^{1/p},$$  where $w_i$ such that $\sum w_i =1$ are any weights we like (the simplest case is when $w_i=1/n$ for all $i$). It is well-known (see ) that the power means $M_p$ tend to the geometric mean as $p\to 0$. What does $$\left( \frac{\int_a^b f(x)^p}{(b-a)}\right)^{1/p}$$  tend to as $p\to 0$?

Let ($\Omega$, $\cal{F}$, $\mu$) be a probability space and $f\in L^1(\Omega)$. Prove that  $$\displaystyle\lim_{p\to 0} \left[ \int_{\Omega}|f|^pd\mu \right]^{\frac{1}{p}}=\exp \left[ \int_{\Omega}\log|f| d\mu  \right],$$  where $\exp[-\infty]=0$. To simplify the problem, we may assume $\log|f|\in L^1(\Omega).$


Let $c>0$. Let a sequence $(a_n)$:  $a_1=1$,   $a_{n+1}=\frac{1}{2}(a_{n}+\frac{c}{a_{n}})$.  Calculate $$\lim_{n \mapsto\infty }a_n$$  So, my solution is: I can show in induction that $a_n$ is determinated for all $n$. I showed in induction that $(a_n)$ is trupped between $1$ and $c$, (by seperating the cases of $c>1$ and $c<1$).  I guess I need to separate for the 2 above cases and show that the sequence is monotonous and then I can conclude that the sequence converges, and show that the limit is $\sqrt c$. But I cannot know for sure that there's exist a limit to the sequence.

Let $c>0$, $a_{1} = 1$, and $$a_{n+1} =\frac{1}{2}\left(a_{n}+\frac{c}{a_{n}}\right)$$  I need to:   Show that $a_{n}$ is defined for every $n\geq 1$ Show that this sequence is convergent. Find its limit.   I proved the first part by showing by induction that this sequence is positive for every $n$. To show that this sequence is convergent I'm thinking of showing that this sequence is a Cauchy series, yet can't figure out how.  For the third part I'm clueless at the moment.


I've been using Ubuntu Server for a few months now. I'm getting the below OUTPUT after running sudo apt-get -f upgrade:   Reading package lists... Done Building dependency tree        Reading state information... Done Calculating upgrade... Done The following packages will be REMOVED   linux-image-extra-3.13.0-44-generic 0 to upgrade, 0 to newly install, 1 to remove and 0 not to upgrade. 2 not fully installed or removed. After this operation, 152 MB disk space will be freed. Do you want to continue? [Y/n] y (Reading database ... 447185 files and directories currently installed.) Removing linux-image-extra-3.13.0-44-generic (3.13.0-44.73) ... run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 3.13.0-44-generic /boot/vmlinuz-3.13.0-44-generic run-parts: executing /etc/kernel/postinst.d/initramfs-tools 3.13.0-44-generic /boot/vmlinuz-3.13.0-44-generic update-initramfs: Generating /boot/initrd.img-3.13.0-44-generic  gzip: stdout: No space left on device E: mkinitramfs failure cpio 141 gzip 1 update-initramfs: failed for /boot/initrd.img-3.13.0-44-generic with 1. run-parts: /etc/kernel/postinst.d/initramfs-tools exited with return code 1 dpkg: error processing package linux-image-extra-3.13.0-44-generic (--remove):  subprocess installed post-removal script returned error exit status 1 Errors were encountered while processing:  linux-image-extra-3.13.0-44-generic E: Sub-process /usr/bin/dpkg returned an error code (1)    I've tried all the Google results I can find that seem relevant including sudo apt-get remove and sudo apt-get autoremove, but to no avail.

I try to do do-release-upgrade but then I get:       Not enough free disk space      The upgrade has aborted. The upgrade needs a total of 25.7 M free   space on disk '/boot'. Please free at least an additional 25.7 M of   disk space on '/boot'. Empty your trash and remove temporary packages   of former installations using 'sudo apt-get clean'.   Output of df:                      237251272 214797108  10402504  96% / udev                    488120         4    488116   1% /dev tmpfs                   198676       668    198008   1% /run none                      5120         0      5120   0% /run/lock none                    496684         0    496684   0% /run/shm /dev/sda1               233191    225867         0 100% /boot   How come there is no space left on boot? Here's the output of ls -as /boot:  total 221839     4 .     4 ..   645 abi-2.6.32-34-generic-pae   698 abi-2.6.35-30-generic-pae   727 abi-2.6.38-12-generic-pae   727 abi-3.0.0-12-generic-pae   727 abi-3.0.0-13-generic-pae   727 abi-3.0.0-14-generic-pae   727 abi-3.0.0-15-generic-pae   727 abi-3.0.0-16-generic-pae   727 abi-3.0.0-17-generic-pae   727 abi-3.0.0-19-generic-pae   761 abi-3.0.0-20-generic-pae   115 config-2.6.32-34-generic-pae   128 config-2.6.35-30-generic-pae   136 config-2.6.38-12-generic-pae   140 config-3.0.0-12-generic-pae   140 config-3.0.0-13-generic-pae   140 config-3.0.0-14-generic-pae   140 config-3.0.0-15-generic-pae   140 config-3.0.0-16-generic-pae   140 config-3.0.0-17-generic-pae   140 config-3.0.0-19-generic-pae   140 config-3.0.0-20-generic-pae     5 grub 10773 initrd.img-2.6.32-34-generic-pae 13619 initrd.img-2.6.35-30-generic-pae 15365 initrd.img-2.6.38-12-generic-pae 16481 initrd.img-3.0.0-12-generic-pae 16487 initrd.img-3.0.0-13-generic-pae 16501 initrd.img-3.0.0-14-generic-pae 16476 initrd.img-3.0.0-15-generic-pae 16481 initrd.img-3.0.0-16-generic-pae 16478 initrd.img-3.0.0-17-generic-pae    12 lost+found   174 memtest86+.bin   176 memtest86+_multiboot.bin  1700 System.map-2.6.32-34-generic-pae  1841 System.map-2.6.35-30-generic-pae  2115 System.map-2.6.38-12-generic-pae  2141 System.map-3.0.0-12-generic-pae  2141 System.map-3.0.0-13-generic-pae  2143 System.map-3.0.0-14-generic-pae  2146 System.map-3.0.0-15-generic-pae  2147 System.map-3.0.0-16-generic-pae  2147 System.map-3.0.0-17-generic-pae  2148 System.map-3.0.0-19-generic-pae  2149 System.map-3.0.0-20-generic-pae     2 vmcoreinfo-2.6.32-34-generic-pae     2 vmcoreinfo-2.6.35-30-generic-pae     2 vmcoreinfo-2.6.38-12-generic-pae     2 vmcoreinfo-3.0.0-12-generic-pae     2 vmcoreinfo-3.0.0-13-generic-pae     2 vmcoreinfo-3.0.0-14-generic-pae     2 vmcoreinfo-3.0.0-15-generic-pae     2 vmcoreinfo-3.0.0-16-generic-pae     2 vmcoreinfo-3.0.0-17-generic-pae     2 vmcoreinfo-3.0.0-19-generic-pae     2 vmcoreinfo-3.0.0-20-generic-pae  4092 vmlinuz-2.6.32-34-generic-pae  4347 vmlinuz-2.6.35-30-generic-pae  4567 vmlinuz-2.6.38-12-generic-pae  4675 vmlinuz-3.0.0-12-generic-pae  4676 vmlinuz-3.0.0-13-generic-pae  4681 vmlinuz-3.0.0-14-generic-pae  4698 vmlinuz-3.0.0-15-generic-pae  4700 vmlinuz-3.0.0-16-generic-pae  4700 vmlinuz-3.0.0-17-generic-pae  4703 vmlinuz-3.0.0-19-generic-pae  4705 vmlinuz-3.0.0-20-generic-pae   Output of uname -a:   Linux kitsch 3.0.0-17-generic-pae #30-Ubuntu SMP Thu Mar 8 17:53:35 UTC 2012 i686 i686 i386 GNU/Linux


What is the best way to get from this:  ['\n    62\n    ', '\n    178\n    ', '\n    7,800\n    ']   ...to this in Python?  ['62', '178', '7,800']   I am trying to strip all non-alphanumeric characters from the strings like below,  import re re.sub(r'\W+', '', my_string)   ...but with lists/arrays.

Given [1,2,3,4,5], how can I do something like   1/1, 1/2, 1/3,1/4,1/5, ...., 3/1,3/2,3/3,3/4,3/5,.... 5/1,5/2,5/3,5/4,5/5   I would like to store all the results, find the minimum, and return the two numbers used to find the minimum. So in the case I've described above I would like to return (1,5).  So basically I would like to do something like  for each element i in the list map some function across all elements in the list, taking i and j as parameters store the result in a master list, find the minimum value in the master list, and return the arguments i, jused to calculate this minimum value.  In my real problem I have a list objects/coordinates, and the function I am using takes two coordinates and calculates the euclidean distance. I'm trying to find minimum euclidean distance between any two points but I don't need a fancy algorithm.


I recently just started running into a special character error for curly braces,  like { and } in the example below:   \documentclass{article}  \usepackage{times}  \usepackage[complete,subscriptcorrection,mtpcal,mtphrb]{mtpro2}   \usepackage{amsmath}  \begin{document}         \{ 1 \}   \end{document}   for which the error message is:  ! Missing $ inserted. <inserted text>                  $ l.11 \{         1 \} ?

The following MWE shows the problem:  \documentclass{article} \usepackage{amsmath} \usepackage[lite]{mtpro2} \usepackage{refcheck}  \begin{document} \begin{align}   a & \leq b \end{align} \end{document}   And I get a ! Missing $ inserted.. The problem disappears when refcheck is not used, or when mtpro2 is not used.  Does anyone sees a way to use both packages simultaneously?  Also an input such as  \documentclass{article} \usepackage{amsmath} \usepackage[lite]{mtpro2}  \begin{document} Braces \{in text\} \end{document}   produces the same error.


If we have an array of ciphertexts based on the same data encrypted with different keys (e.g. sharing the data with different persons using different 128 bit keys), then is it easier to an attacker to guess the data without knowing any of the keys? If so, then is there a way to harden this kind of encryption? (To be more specific the data is a 128 bit group key encrypted with the personal key of each person.)

Let's say that Alice and Bob complete a key exchange and then Alice uses that key k1 to encrypt a 256-bit key kaes1 and sends it to Bob. From there, Alice and Bob exchange a lot of messages back and forth, using AES-256 to symmetrically encrypt the data with the key kaes1.  Then, Charlie comes along and wants to participate, so Alice and Charlie complete a key exchange and Alice then uses that key k2 to encrypt the same original kaes1 and sends it over to Charlie. From there, Alice and Bob and Charlie now exchange a bunch of messages symmetrically encrypted with AES-256.  Eve has been listening in this whole time, and she has all the data, but none of the keys. Does Eve gain an advantage if she knows that kaes1 was the payload for 2 different messages encrypted with 2 different keys k1 and k2?


I have an enum like this:  public enum MyEnum {     people1,     people2 }   I want to override or overload ToString() method. For example in the following code, variable s becomes "This is people 1".  string s=MyEnum.people1.ToString(); //I want s to become "This is people 1"   I don't want to create another method with extension method, I want to override or overload ToString method.

I have the following enumeration:  public enum AuthenticationMethod {     FORMS = 1,     WINDOWSAUTHENTICATION = 2,     SINGLESIGNON = 3 }   The problem however is that I need the word "FORMS" when I ask for AuthenticationMethod.FORMS and not the id 1.  I have found the following solution for this problem ():  First I need to create a custom attribute called "StringValue":  public class StringValue : System.Attribute {     private readonly string _value;      public StringValue(string value)     {         _value = value;     }      public string Value     {         get { return _value; }     }  }   Then I can add this attribute to my enumerator:  public enum AuthenticationMethod {     [StringValue("FORMS")]     FORMS = 1,     [StringValue("WINDOWS")]     WINDOWSAUTHENTICATION = 2,     [StringValue("SSO")]     SINGLESIGNON = 3 }   And of course I need something to retrieve that StringValue:  public static class StringEnum {     public static string GetStringValue(Enum value)     {         string output = null;         Type type = value.GetType();          //Check first in our cached results...          //Look for our 'StringValueAttribute'           //in the field's custom attributes          FieldInfo fi = type.GetField(value.ToString());         StringValue[] attrs =            fi.GetCustomAttributes(typeof(StringValue),                                    false) as StringValue[];         if (attrs.Length > 0)         {             output = attrs[0].Value;         }          return output;     } }   Good now I've got the tools to get a string value for an enumerator. I can then use it like this:  string valueOfAuthenticationMethod = StringEnum.GetStringValue(AuthenticationMethod.FORMS);   Okay now all of these work like a charm but I find it a whole lot of work. I was wondering if there is a better solution for this.  I also tried something with a dictionary and static properties but that wasn't better either.


These aren't the geographically located Olympics. I am from the Southern Hemisphere and this makes me feel alienated, as sometimes occurs in other forums and communities. I think many people will share the feeling.

The Winter Bash site is located at http://winterba.sh/.  Only one problem:   . Saint Helena is in the Southern Hemisphere. It's Summer in Saint Helena.   So shouldn't it be the Summer Bash? Don't forget our Aussie/Kiwi/South African/Southern Brazilian/Argentine/Uruguayan/Zimbabwean/Swazi/Tokelauan/Tuvaluan/Pitcairn Islander/ friends!