I know I can use -A, -B and -C to show surrounding lines but all of them also show the matching line. What I'm trying to make here is so, in this example file:  foo bar   I'd be doing something like grep <option> "bar" file and my output should be foo  Side note: I know the way of doing it with another grep or using sed but I would like to do it just by using one time grep

I need to find a string and need to print the line above it.   case1: The same line won't have the more than one matching pattern   ie)  consider a file containing  $cat > para returns between the paragaraphs italic or bold     quotes by placing italic   Here i need to find for italic, and i need to get the output as below   returns between the paragaraphs quotes by placing   How can i get the output like this?


The following post was edited by :    Attempting to edit the post opens it up without the title and the tags.  The revision history of the post can be accessed .  Surely one could copy/paste the title and add the tags while making the edit, but it seems like a bug.  (Needless to say this issue is not observed on other posts.)

While trying to edit  I noticed the title vanished:        This is for inline edit, in the  there's no title and no tags as well.  Most likely the cause is the first revision of that question hard deleted as can be seen in the , but still I'd like to get title and tags back when editing.


Assume that the metric space $(X, d)$ is not compact. Show that there exists $f:  X\to \Bbb R$ which is continuous but not bounded. The only function in my mind is $f:  X\to \Bbb R$ defined by $f(x)=\|x\|$. I know this function is continuous. I don't know if it is bounded or not. I need a hint how to choose this function.

Suppose $(S,d)$ is a non-compact metric space. Is it possible to construct an unbounded continuous function from $S$ to $\mathbb{R}$? If it is possible, please show the construction method :)  Here's my attempt to solve this problem: Because $S$ is not compact, we can find a neighborhood assignment function $N(x)$ so that a finite cover is not possible. Then each time we can find an uncovered point from the union of neighborhoods before, and change the function by $f(x):=max\{f(x),\text{a function which equals to the indice of this point at that point and gradually vanishes at further points from the selected point}\}$. However I'm concerned that while this function is unbounded, there may be some invalid points for this function (goes to infinity)...  EDIT: As I found out there is a duplicate question, however the elementary solution is not presented in that question, so I still wish to know about this problem. :)


Can I take part in some project for ubuntu? What should i do? I am new, and i would love to complete or take part or start a project for it.  Thx

I would like to know what kinds of contributions someone can make to Ubuntu. Such as Programmer, User, Proofreader, etc.


I've heard that the word Oriental, if used to people, is racism.  Is it true? And if it is, why?

It seems as if a shift occurred and the descriptive "Oriental" was replaced by "Asian" as the accepted term in polite society — what caused this shift?


How do we access the second last copied stuff on our clipboard?  (Windows Vista Home Premium 32-bit sp2)  I am still interested if the solution is not a straightforward one and requires hacks

In Visual Studio, I can cycle through my clipboard history by pressing CTRL+SHIFT+V rather than CTRL+V. I believe it's called a clipboard ring. But that feature doesn't seem to exist outside of Visual Studio, at least not with the same key combination. Is there a key stroke combination built in to windows to do the same, i.e. be able to cycle through your clipboard history while pasting?


It's from the late 80's early 90's I saw it on PBS I think. Everyone had a life clock installed at birth.   Everything bought and sold was with time increments. No one went to prison, time was just subtracted. When you ran out you died. I remember an addict begging for time before they died.  I have been looking for this one for years.

I'm looking for the name of a short black and white movie in which people were given an allotted amount of time at birth, and used that time to buy things. For example, a can of beans in the store would be priced something like 23 minutes, and that amount would be deducted from one's remaining time. People could perform services for each other and settle the transaction using time remaining. A key part of the story involves the person going to the central temporal authority to petition that his mother be given more time.


When I enter reboot on the command line, I get:  reboot: Need to be root   and asked the root / sudo password. When I reboot via the gui I can do that without my sudo password. Why is that? What's happening internally of the ubuntu system there?

When we install/remove/update packages or make any changes which require administrative privileges we are prompted for the password of admin user who has the sudo privileges - this happens both via GUI and terminal.    However, if we try to shutdown and restart via terminal, it complains that we need to be root:  $ reboot reboot: Need to be root  $ shutdown now shutdown: Need to be root   But we are never asked for a password when we perform these actions via the cog-wheel at top right.    Why is there this discrepancy?


Hi there is a bunch of videos and resources on how to rsync locally rsync /home/user1 /home/user2/backup, but i haven't found any tutorials on rsync crontab to another server  pretty much, i use crontab -e and i have a script i run from rsynch.sh  #!/bin/bash rsync -xza /home/willchap  willchap@server02:/home/willchap/backup   it will work fine without crontab, the problem is, i am guessing crontab fails because it is asking for a password  what are my options here?

I want to be able to login to a remote via ssh without having to enter the password all the time.   How do I set it up? Is a different command required to execute a password-less session?


Letting W be the weighted graph created by taking a complete graph K5 on five vertices 1, 2, 3, 4, 5 with the weight of each edge {x,y} given by ({x,y})=x+y,   How would I find a minimum weight spanning tree for W?

If I were to let $W$ be the weighted graph formed by taking a complete graph $K_5$ on five vertices 1, 2, 3, 4, 5 with the weight of each edge $\{x,y\}$ given by $(\{x,y\}) = x + y$, how would I find a minimum weight spanning tree for $W$?


I would like to attach a dagger symbol (\textdagger) as a superscript in front of a word (not in math). How can I do it?

What is the easiest way to superscript text outside of math mode?  For example, let's say I want to write the $n^{th}$ element, but without the math mode's automatic italicization of the th.  And what if I still want the n to be in math mode, but the th outside?


Let $(X,d)$ be a compact metric space. Show that $C(X,\mathbb{R})$ is a separable metric space (space of continuous functions from $X$ to $\mathbb{R}$).    I first showed that if $(X,d)$ is compact, then it must be separable, so we have a dense subset $\{x_{1},x_{2},...\}$ which is countable of $X$. Then, I'm not so sure on how to move forward. I was thinking of using the Stone Weierstrass Theorem for the set of functions:  $F=\{1,f_{1},f_{2},...\}$  Where $f_{n}(x)=d(x,x_{n})$ for $x \in X$. Then, this implies that the above set is dense in $C(X,\mathbb{R})$ and countable, so $C(X,\mathbb{R})$ is separable if $F$ is a unital separating subalgebra.  Clearly $F$ is unital, but I'm not sure on how to show it is separating and a subalgebra of $C(X,\mathbb{R})$ (it is a subset of the former set since the distance function is continuous). How would one proceed with this step?  Thank you for your help.

$X$ is a compact metric space, $C(X)$ is separable when $X$  is compact where $C(X)$ denotes the space of continuous functions on $X$. How to prove it?  And if $X$ is just a compact Hausdorff space, then $C(X)$ is still separable? Or if $X$ is just a compact (not necessarily Hausdorff) space, then $C(X)$ is still separable?  Please help me. Thanks in advance.


Is it possible to use the mic and headphone simultaniously when using a2dp? the sound quality is really bad when using hsp/hfp.

I'm trying to use my headphones with my Ubuntu 13.10. My headphones are Nokia BH-905i, which can be connected via Bluetooth or green+pink wires.  If I use bluetooth, voice quality is terrible or microphone doesn't work. If I try to choose "Headset" option from In and Out tabs in Sound Settings, they're disabling each together.  In Out tab, I'm using "High sound quality A2DP", because it betters voice quality.  How could I get my microphone working? Sound out works fine.


Is there a way to manage document permissions by code.  i.e., inside a .tex file, insert a command to restrict document only to view and printing?

My questions is very simple. How can I set security setting for a PDF file created with PDFLatex?  I should set some password or print permissions, etc.


Windows 7 has a nice new feature for moving around windows.   The one that I am particularly interested in is:  Windows Key + Left/Right : Move the window to the left or right of the screen, or over to a second monitor.  But, Windows Key + Up: Maximize the current window and Windows Key + Down: Restore or minimize the current window. are also quite useful.  Is there anyway that I can get this functionality in OS? Preferably replacing the windows key with Command Key.

I'd like to do something with my windows on OS X, where something includes options like re-arranging, moving, re-sizing, remembering positions, cloning across Spaces, etc. What options exist?  Rules   One app per answer. Use this format for the first two lines of your answer: ## [app name](link to website) [App Store](link to appstore) (price)    Check for duplicates before adding new answers.  If you find a duplicate, vote it down and encourage its poster to upvote the original entry instead (and remove the dupe). Include short description about what this Window Managing app does.  What makes this Window Manager app different than the others? Is it focused on re-sizing using only the keyboard? Is it focused on moving using only mouse gestures? Etc.


i'm implementing my first CNN for image classification in a field with very few research.  I'm aware i could extract feature and then try SVM, knn...  But i want to be sure CNN is not a viable solution.  I have already tryied different architecture, hyperparametrisation... Result have increase from 45% to 60%. I still have thing to try (data augmentation,dropout, transfer learning...)   Are there clue that  can tell me  CNN will not work fo my task, or should i try all method to be sure cnn is not viable?  For exemple in my case, i got 12 categorie. 8 are easy to classify but for the 4 other it's very hard, and all my modification significantly affect my accuracy for the 8 class, but just increase accruracy for the 4 other class a little

Imagine a standard machine-learning scenario:     You are confronted with a large multivariate dataset and you have a   pretty blurry understanding of it. What you need to do is to make   predictions about some variable based on what you have. As usual, you   clean the data, look at descriptive statistics, run some models,   cross-validate them etc., but after several attempts, going back and   forth and trying multiple models nothing seems to work and your   results are miserable. You can spend hours, days, or weeks on such a   problem...   The question is: when to stop? How do you know that your data actually is hopeless and all the fancy models wouldn't do you any more good than predicting the average outcome for all cases or some other trivial solution?  Of course, this is a forecastability issue, but as far as I know, it is hard to assess forecastability for multivariate data before trying something on it. Or am I wrong?   Disclaimer: this question was inspired by this one  that did not attract much attention. It would be nice to have detailed answer to such question for reference.


Given $x_1 = 2$ and $x_{n+1} = \dfrac{1}{2} x_n + \dfrac{1}{x_n}$, prove that $x_n \to \sqrt{2}$.  I thought I could use monotone convergence but I have a hard time proving the monotonicity of the sequence.

For any $a > 0$, I have to show the sequence $x_{n+1}$ $=$  $ \frac 12$($x_n+ $ $ \frac {a} {x_n}$)  converges to the square root of $a$ for any $x_1>0$.  If I assume the limit exists ( denoted by $x$) then,  $x$ $=$  $ \frac 12$($x+ $ $ \frac {a} {x}$) can be solved to $x^2 = a$  How could I show that it does exist?


The project I am working on need to send mail to Zimbra as well as Gmail IDs. The mail server used here is Zimbra Client Server and Port used is 25. But while sending mail to Gmail ID,Exception occurs as follows. Exception : Transaction failed. The server response was: 5.7.1 somegmail_Id@gmail.com: Relay access denied Code section             int port = 25;             oSmtpClient.UseDefaultCredentials = false;             oSmtpClient.Credentials = new NetworkCredential(sUserName, sPassword);             oSmtpClient.Host = sServer;             oSmtpClient.Port = port;             oSmtpClient.EnableSsl = true;             oSmtpClient.UseDefaultCredentials = false;             MailMessage oMailMessage = new MailMessage(); ;             oMailMessage.From = new MailAddress(sFrom);             oMailMessage.To.Add(new MailAddress(MailId));             oMailMessage.Subject = "Subject";             oMailMessage.Body = sBody;             oMailMessage.IsBodyHtml = true;             oSmtpClient.Send(oMailMessage);

Instead of relying on my host to send an email, I was thinking of sending the email messages using my Gmail account. The emails are personalized emails to the bands I play on my show.   Is it possible to do it?


In the Ubuntu dock on Ubuntu 18.04, multiple windows of the same application are grouped and orange dots are shown to tell you how many windows of the application are opened. When you click on the icon, a small screen capture of each of the windows is shown.  However, these screen captures are shown in an order that's based on which window was last active on the desktop. This is something that clashes with the way I use the dock. I'm used to mentally mapping the windows to their dock positions. As such, I will often be trying to get to "the top one" and then I end up needing several clicks before I actually get to the terminal (or some other application) that I was looking for.  Is there some way to make sure that the order of these screen captures does not change whenever a window becomes active?

Say I have two Chrome windows open like this:   It seems that the most recently used window always appears on top. In other words, the "Apply Digital Signatures" was the window I had open last. If I were to switch to the window showing the new tab, then the order in which the windows are displayed in the task bar suddenly changes. Is there a way to keep them from shuffling around? I'd like to be able to order them however I want, like tabs in a web browser. (I'd also like to put them across different workspaces.)


Suppose $R=\mathbb{Z}[i]$ is Gaussian domain , and $a^2+b^2=p$ is prime. Denote $\alpha=a+bi$ and $I=(\alpha)$. Prove $R/I$ is a finite field with characteristic p.  My attempts: First prove $\alpha $ is irreducible, hence $I$ is a maximal ideal and it follows $R/I$ is a field. And $R=\mathbb{Z}[i]$ is an Euclidean  domain. Hence for $x\in \mathbb{Z}[i],x=q\alpha+r$ where $N(r)\lt N(\alpha)$ , so there are finite elements in $R/I$. Thus $R/I$ is a finite filed. But I can't figure out why the characteristic is $p$.     Thanks for your hints.

A very basic ring theory question, which I am not able to solve. How does one show that    $\mathbb{Z}[i]/(3-i) \cong \mathbb{Z}/10\mathbb{Z}$. Extending the result: $\mathbb{Z}[i]/(a-ib) \cong \mathbb{Z}/(a^{2}+b^{2})\mathbb{Z}$, if $a,b$ are relatively prime.   My attempt was to define a map, $\varphi:\mathbb{Z}[i] \to \mathbb{Z}/10\mathbb{Z}$ and show that the kernel is the ideal generated by $\langle{3-i\rangle}$. But I couldn't think of such a map. Anyhow, any ideas would be helpful.


I've read about Fermat's little theorem and generally how congruence works. But I can't figure out how to work out these two:   $13^{100} \bmod 7$ $7^{100} \bmod 13$   I've also heard of this formula:  $$a \equiv b\pmod n \Rightarrow a^k \equiv b^k \pmod n $$  But I don't see how exactly to use that here, because from $13^1 \bmod 7$ I get 6, and $13^2 \bmod 7$ is 1. I'm unclear as to which one to raise to the kth power here (I'm assuming k = 100?)  Any hints or pointers in the right direction would be great.


I want to make a mini game in Minecraft were I need a random command generator for 9 commands. I need a random command to give the player a random item. I can't do the command block in the dispenser any more because it will just drop out instead of being placed. What different ways are there for generating randomness in commands, and which one would be best for my use? This question is similar to the one about , but I am specifically attempting to get randomness when using commands - the redstone solutions do not apply here.

I have 5 buttons and only one of these can be correct, all others must be false. These 5 outputs will go into 2 outputs, in between there needs to be a circuit which changes which single button out of the 5 will go down the "correct" output of the final 2. The 4 remaining buttons must go to the second of the final 2 outputs. Both final outputs must give out a true signal for a brief period the same as a button on its own would produce. There should also be a way of activating the circuit. Not sure if that is explained well enough so I have made a basic diagram of what I need.  The diagram shows how I need the signal to be split. However in between the buttons and the final two wires there needs to be a circuit (marked by the grey box). This circuit changes the single button connected to the left wire. The right input should start the circuit and randomise the 5 buttons. There are no limits to size, amount of materials used or method used. This question is similar to the one asking about , but I am specifically working with Redstone circuitry - the commands solutions do not apply here


For example I have something written like this read -p "Enter a character: " variable if [ $variable -eq 'A' ];  I'm getting an error that says integer expression expected, but I don't want to use an integer variable I want to use a character?

I have the following if block in my bash script:  if [ ${PACKAGENAME} -eq kakadu-v6_4-00902C ]; then   echo "successfully entered if block!!" fi   The script execution is not entering my if block even though $PACKAGENAME is equal to kakadu-v6_4-00902C. What am I doing wrong?


I am a complete noob who just installed an Ubuntu guest in . I did a minimal installation, because the only program I want is LibreOffice. I did some research on how to install LibreOffice on Ubuntu, but I found different answers. Some recommend installing it from  (USC), others, from the official site, and a third group prefer to install it from the terminal typing “sudo apt install libreoffice”. Like I said, I am a complete beginner with this so I am confused on how to proceed. What is the difference between the different options? What is the best way to install this software?

There was recently another release of , but it is  a pain to have to manually go to their website and download the packages every time there is a new release. Is there a PPA that always has the latest version of LibreOffice?


Is there any explanation or background information that connects climate related changes with the timeline in Blade Runner?  There have been sprinkled info related to nuclear war, massive solar farms (2049), dead trees, etc.   Is there something I can read to know more about this movie's universe with regards to its climate?

I watched both the Blade Runner movies today. A few significant things I come across were that 90% of both of the movies' scenes are night scenes.  Why did both the directors choose to direct so many dark and night scenes? And some part of Blade Runner 2049 is shot in orange forecolor, for displaying radiation. Why orange? Radiation has nothing directly to do with orange color, so why this choice?


. The class is global without sharing . Not able to figure  out what the issue is any help is appreciated

Im creating a community user from an Apex code. When our internal users (non-admins) run the code they are getting following error. (This was working fine when we test the feature in sandbox)     SObjectException: Field is not writeable: User.ProfileId   The code is       //Grab Community User Profile     Profile p = [Select Id, Name from Profile where Name = :COMMUNITY_PROFILE LIMIT 1];       User PortalUser = new User();          PortalUser.UserName = Con.Email+'-POC';         PortalUser.ContactId = Con.Id;         PortalUser.ProfileId = p.id;         PortalUser.Email = Con.Email;         PortalUser.EmailEncodingKey = 'UTF-8';         PortalUser.FirstName = Con.FirstName;         PortalUser.LastName = Con.LastName;         PortalUser.TimeZoneSidKey = 'America/Los_Angeles';         PortalUser.LocaleSidKey = 'en_US';         PortalUser.LanguageLocaleKey = 'en_US';          if (Con.LastName.length() >= 8){             PortalUser.Alias = Con.LastName.substring(0, 7);             }else{             PortalUser.Alias = Con.LastName;         }             SObjToInsert.add(PortalUser);


I am using json to get date from asp.net controller witch get date from ms sql database.  In JavaScript i get object with strange date type  Object BloodTestID:23 Date:"/Date(1451599200000)/" Name:"Hb" PersonBloodTestID:0 Value:"151" __proto__:Object   How to convert "/Date(1451599200000)/" into 01.01.2016?

I'm taking my first crack at  with jQuery. I'm getting my data onto my page, but I'm having some trouble with the JSON data that is returned for Date data types. Basically, I'm getting a string back that looks like this:  /Date(1224043200000)/   From someone totally new to JSON - How do I format this to a short date format? Should this be handled somewhere in the jQuery code? I've tried the jQuery.UI.datepicker plugin using $.datepicker.formatDate() without any success.  FYI: Here's the solution I came up with using a combination of the answers here:  function getMismatch(id) {   $.getJSON("Main.aspx?Callback=GetMismatch",     { MismatchId: id },      function (result) {       $("#AuthMerchId").text(result.AuthorizationMerchantId);       $("#SttlMerchId").text(result.SettlementMerchantId);       $("#CreateDate").text(formatJSONDate(Date(result.AppendDts)));       $("#ExpireDate").text(formatJSONDate(Date(result.ExpiresDts)));       $("#LastUpdate").text(formatJSONDate(Date(result.LastUpdateDts)));       $("#LastUpdatedBy").text(result.LastUpdateNt);       $("#ProcessIn").text(result.ProcessIn);     }   );    return false; }  function formatJSONDate(jsonDate) {   var newDate = dateFormat(jsonDate, "mm/dd/yyyy");   return newDate; }   This solution got my object from the callback method and displayed the dates on the page properly using the date format library.


I’ve been having trouble fixing the “macOS needs to repair your library” loop for the past couple of days and I’m running out of options. The message pops up over and over again, no matter what I do.    I’ve gone as far as typing a command in Terminal (recovery mode) which Apple support sent me (the diskutil resetuserpermissions, except longer).  I found some other commands online but I’m not sure what they do and that’s why I haven’t tried them, can anybody help me?  Other commands I’ve found: resetpassword (confused as to WHICH password it’ll reset) and  sudo chown -R <user> ~/Library  sudo chgrp -R <groupname> ~/Library (found on this website)  This last one the user said I should get it by running id -u for user and id -g for groups, but as I am not the tiniest bit familiar with programming, I wonder if he meant I should replace “user” for id -u and same thing for groups??  Please help as I am desperate and Apple support’s solutions haven’t helped me so far!!

After upgrading to High Sierra, I'm getting this error message about 30-50 times a day:    Is there any way to find out what is causing this error?  Any ideas how to fix it?


Prove $$\int_0^{\pi}\left|{\sin nx\over x}\right|\,dx\ge\frac2\pi\left(1+\frac12+\frac13\dots+\frac1n\right)$$ I'm not sure how to start. Any help will be appreciated. Thank you

Show that,$$\int_0^\pi \bigg|\dfrac{\sin nx}{x}\bigg|\mathrm{d}x \ge \dfrac{2}{\pi}\bigg(1+\dfrac12+\cdots+\dfrac{1}{n}\bigg)$$    I could not approach the problem at all. Please help.


TL, DR : the long sentence in bold.  I have been reasearching about accelerometers for a while, and I saw many times the following sentence:  Accelerometers don't sense gravity, they sense every other accelerations other than gravitational acceleration.  Is this statement fully correct?  During a free-fall there exists an acceleration due to the gravitational force acting on it(excluding other forces, i.e in vacuum) on the body right?(Correct me if I am wrong)  A body sitting on a flat surface and not moving should have a 0 acceleration (the forces on it are gravitational force and normal force equal in magnitude but with reverse directions, thus cancelling each other), right?(Correct me if I am wrong)  I think both my 2 statements above are correct, However;  I have a 3-axes accelerometer and when it is standing on a flat surface (table for ex.), xy plane is level with the horizon and positive z axis points towards the sky, accelerometer outputs a + 1g in z axis. And when the sensor is in free-fall(xy plane is still horizontal,i.e level) it outputs 0 g in z axis again.  So these two observations conflicts with two realities. Then should I conclude that, accelerometers indeed don't sense gravity (explains why free-fall results in a 0 g output) and for the case it is standing on a table it senses the acceleration due to the normal force?  P.s : When applying a force towards +/- x or +/- y, the outputs are consistent with how they have to be physically.  I asked other questions somehow similar to this on different communities (electronics, aviation, robotics etc.) but also wanted to get some answers from the perspective of physics.

Take two different reference frames. The first one - say $\lbrace{W}\rbrace$ - is inertial and it's fixed to the Earth surface. The second one $\lbrace{B}\rbrace$ is moving and in general is rotating and accelerated, so $\lbrace{B}\rbrace$ it is not inertial.  The equations of motion for the origin of the frame $\lbrace{B}\rbrace$ can be formulated on both frames as:  $$ \sum_{i}\,  ^wF_{ext} = m\, ^w\dot{v}$$ in the inertial frame and $$ \sum_{i}\,  ^bF_{ext} = m\, ^b\dot{v} - ^b\omega \times m ^bv$$ on the non-inertial one, where $^f x$ represents the vector $x$ expressed on the frame $f$.  Let an accelerometer to be installed over $\lbrace{B}\rbrace$ which by design subtracts gravity from its output.  I'm not sure if it is measuring the term $^b\omega \times m ^bv$ or not so, what is the accelerometer exactly giving as output?


I've been googling for hours; everything I can find either is for Bootcamp or doesn't work.  So, I have a clean PC that I want to install Win10 on; I also have a Mac with a Win10 ISO and a flash drive; how do I put the ISO onto the drive? I've tried using Unetbootin, but the PC doesn't boot from it.   My Boot Camp Assistant does not support burning ISO's to USB; it just installs from ISO directly.

Reasons for wanting create such a usb include:   PC is unbootable and you want to prepare a bootable USB using the ISO file that you have on your external hard drive. to install Windows 8.1 on Mac without Boot Camp.   What are the necessary steps to create such a Windows 8.1 bootable usb on a Mac ?


My wifi worked great on Ubuntu, until today where my wifi doesn't work anymore after turning on my pc. I don't see the wifi tab in the settings. I am running a dual boot and wifi still works on Windows. Wi-fi card: broadcom dw1530 wireless-n wlan half-mini card What should I do to fix the problem? Edit: Output of lspci -knn | grep Net -A3 : 00:19.0 Ethernet controller [0200]: Intel Corporation 82579LM Gigabit Network Connection (Lewisville) [8086:1502] (rev 04)     DeviceName:  Onboard LAN     Subsystem: Dell 82579LM Gigabit Network Connection (Lewisville) [1028:0493]     Kernel driver in use: e1000e     Kernel modules: e1000e 00:1a.0 USB controller [0c03]: Intel Corporation 6 Series/C200 Series Chipset Family USB Enhanced Host Controller #2 [8086:1c2d] (rev 04) -- 02:00.0 Network controller [0280]: Broadcom Inc. and subsidiaries BCM43228 802.11a/b/g/n [14e4:4359]     Subsystem: Dell Wireless 1530 Half-size Mini PCIe Card [1028:0011]     Kernel modules: bcma 0a:00.0 SD Host controller [0805]: O2 Micro, Inc. OZ600FJ0/OZ900FJ0/OZ600FJS SD/MMC Card Reader Controller [1217:8221] (rev 05)  Edit 2: lspci -knn | grep Net -A3 00:19.0 Ethernet controller [0200]: Intel Corporation 82579LM Gigabit Network Connection (Lewisville) [8086:1502] (rev 04)     DeviceName:  Onboard LAN     Subsystem: Dell 82579LM Gigabit Network Connection (Lewisville) [1028:0493]     Kernel driver in use: e1000e     Kernel modules: e1000e 00:1a.0 USB controller [0c03]: Intel Corporation 6 Series/C200 Series Chipset Family USB Enhanced Host Controller #2 [8086:1c2d] (rev 04) -- 02:00.0 Network controller [0280]: Broadcom Inc. and subsidiaries BCM43228 802.11a/b/g/n [14e4:4359]     Subsystem: Dell Wireless 1530 Half-size Mini PCIe Card [1028:0011]     Kernel driver in use: wl     Kernel modules: bcma, wl

My wifi worked great on Ubuntu, until today where my wifi doesn't work anymore after turning on my pc. I don't see the wifi tab in the settings. I am running a dual boot and wifi still works on Windows. Wi-fi card: broadcom dw1530 wireless-n wlan half-mini card Which steps should I take to troubleshoot and fix this?


package com.ami.practice; public class UnrechebleStatement { public static void main(String[] args) {     System.out.println(m());         }  public static int m(){     try{         int x=0;         int y=10/x;         return y;     }catch(Exception e){         return 1;     }finally {         return 2;     }   } }

Considering this code, can I be absolutely sure that the finally block always executes, no matter what something() is?  try {       something();       return success;   }   catch (Exception e) {        return failure;   }   finally {       System.out.println("I don't know if this will get printed out"); }


I'm using MiKTeX 2.9 and TeXworks. When I compile the beamer document with footnote references it only returns the text that's in the braces for the \footnote command in the footnote and not an actual reference.  Minimal working example.  \documentclass{beamer}  %THEME \usetheme{default} \usecolortheme{beaver}  %BIBTEX \usepackage[style=verbose,autocite=footnote]{biblatex} \usepackage{filecontents} \begin{filecontents}{\jobname.bib} @article{methods,     author= "A.G. Schwartz and J.H. Lipner and J.D. Pasteris and G.M. Genin and S. Thomopoulos",     title = "Muscle loading is necessary for the formation of a functional tendon enthesis",     journal = "Bone",     year = "2013",     volume = "55",     number = "1",     pages = "44-51", } \end{filecontents} \addbibresource{\jobname.bib}  %DOCUMENT \begin{document}  \begin{frame}{Recap}  \begin{itemize} \item This is a recap slide\footcite{methods} \end{itemize}  \end{frame}  \end{document}   Gives me this:      I even tried to copy and paste the example in  answer and it gives me same type of error: just prints "Taflove2000" in the footnote.  It's got to be something to do with the way I'm compiling it. I've tried it with miktex-pdftex.exe with arguments  $synctexoption --shell-escape -undump=pdflatex $fullname   which is what I usually use. But I've also tried it with  texify.exe and arguments  --pdf --tex-option=$synctexoption $fullname   What should I be using?

Running the minimal example  \documentclass{article} \usepackage{filecontents} \begin{filecontents*}{\jobname.bib} @ARTICLE{example,   author  = {Other, Anthony Norman},   title   = {Some things I did},   year    = {2014},   journal = {J.~Irrep. Res.},   volume  = {1},   number  = {1},   pages   = {1-10} } \end{filecontents*} \usepackage[backend=biber]{biblatex} \addbibresource{\jobname.bib} \begin{document} Hello\cite{example}. \printbibliography \end{document}   I get the warning There were undefined references.  I have read  and know that I need to run:   LaTeX Biber LaTeX   However, my editor is only set up to run BibTeX. How do I go about setting up my editor/IDE to be able to run Biber, and how do I run the LaTeX/Biber/LaTeX cycle?  Answers (sorted alphabetically by editor name)                    Answer guidelines   Each answer should be for one editor. If the editor is cross-platform, if possible give a single answer with notes covering the minor platform variations. Please edit the question to include new answers in the 'link list' Each answer should be 'stand alone', i.e. don't say 'It's almost the same as editor Y but ...' for the editor part Instructions for 'build tools' such as arara or latexmk are welcome but should explain how to set up the editor in question as not all editors allow simple addition of arbitrary tools


I just did a fresh install of Ubuntu 14.04 64-bit, and it seems that most major packages I attempt to install (among them being Skype, Steam/Steam-Launcher, WINE, etc.), give an "unmet dependencies" error and refuse to install.   I have looked at several other questions of a similar description (many duplicates) but none of the solutions worked and I have not yet found someone with this specific issue.  Installing Skype:  stere0123@stere0123-THINKPAD-U14:~$ sudo apt-get install skype 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:  skype : Depends: skype-bin E: Unable to correct problems, you have held broken packages. stere0123@stere0123-THINKPAD-U14:~$    I get similar errors with some other packages I've tried as well. Any help would be greatly appreciated as this problem is currently crippling this system!

Occasionally, when I'm installing stuff, I get an error like the following:  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:  package1 : Depends: package2 (>= 1.8) but 1.7.5-1ubuntu1 is to be installed E: Unable to correct problems, you have held broken packages.   How can I resolve this?


I know the concept of solar sail, but I wanted to know if it is possible to create thrust by using a laser that is on a satellite. I mean that the satellite uses a powerful laser as a thruster.  And if it is possible does it have been tested already ?

I am preparing for my quals and stumbled across the following problem, and although it only requires undergraduate-level physics, I feel I can't piece everything together.  "A rocket of mass $m_0$ is propelled by a giant monochromatic laser mounted on the back of the rocket. The laser emits a beam with a power of $P_0$ watts and a frequency $f_0$, both measured in the rest frame of the rocket. When the beam is turned on, the rocket is driven in the opposite direction by the recoil.  (a) At $t=0$, the laser is turned on, with the rocket's velocity initially at rest in the Earth's reference frame. Calculate the instantaneous acceleration of the rocket.  (b) If the rocket is moving at velocity $v$, what is the instantaneous beam power as measured in the Earth's reference frame?   (c) The laser is kept going until the speed of the rocket reaches $v=0.9c$. What is the rest mass of the rocket at this point?"  I work in units where $c=1$. For (a), in the Earth's reference frame, I get a momentum $p(t) = \gamma m_0 v + h f$, where $\gamma = \frac{1}{\sqrt{1-v^2}}$ and $f = f_0 \sqrt{\frac{1-v}{1+v}}$ because of the Doppler shift in frequency as the rocket travels further away. Differentiating w.r.t time, I get  $$ \frac{dp}{dt} = \gamma^3 m_0 a - \frac{\gamma a}{(1+v)} h f_0 $$  This is as far as I get. Equaling $dp/dt=0$ for conservation of momentum make the $a$ cancel out, and there isn't any other time dependency to differentiate $v(t)$.  For part (b), we can say that in the frame of the rocket, $P_0 = r h f_0$, where $r$ is the rate of emission of photons. In the frame of the Earth, we can therefore write   $$ P(t) = \frac{dE}{dt} = \frac{d}{dt} \left( \gamma m_0 + r h f \right) = m_0 \gamma^3 v a - \frac{\gamma a}{(1+v)}  P_0 $$  but since I don't have $a$, there's not much I can do. Also, I am not sure if $r$ needs to be corrected with a proper time factor when we boost between frames.  Also, for part (c), my first intuition was to say that the rest mass was $m_0$, but now I am thinking that the rocket's total mass decreases because we need to account for the energy lost from the laser. I am slightly confused as to what I need to take into account.


I have drawn a graph in LaTeXDraw. I need to name the vertices of the graph as v_n (where n is subscript of v). In latex document it was easy, just $v_n$ was doing the work. But how can I do it in a LaTeXDraw picture? Any help is appreciated.

I wish to insert a simple vertex name like a1. All I want is to put 1 as subscript of a. I couldnot figure out how to do it in LaTexDraw.


I'm using AJAX to request a sub section of my page. Here is an example of what the content requested could look like:  <div id="NewContentAfterPageLoad">    <form>      ...      <input id="clickMe" type="submit" form="aForm" value="submit">    </form> </div>  <script>    $(document).ready(function(){        $('#clickMe').on('click', '#clickMe', function(e) {          alert();       });    }); </script>   So this content is not present on page load.   Adding the jQuery like this doesn't work even though I'm using delegates.  Does this mean that any jQuery has to be present on page load for the browser to read it?  Is there a workaround for dynamically loaded jQuery?

I have a bit of code where I am looping through all the select boxes on a page and binding a .hover event to them to do a bit of twiddling with their width on mouse on/off.  This happens on page ready and works just fine.  The problem I have is that any select boxes I add via Ajax or DOM after the initial loop won't have the event bound.  I have found this plugin (), but before I add another 5k to my pages with a plugin, I want to see if anyone knows a way to do this, either with jQuery directly or by another option.


#!/bin/bash USERNAME=ksmith HOSTS="linux1" YUPDATE="sudo yum -y update" FIXDATE="sudo -u echo -e 'ZONE="America/New_York"\nUTC=true' > /etc/sysconfig/clock"  for HOSTNAME in ${HOSTS} ; do ssh -tt -l ${USERNAME} ${HOSTNAME} "${YUPDATE}; ${FIXDATE}"  done   I get the error:  sudo -u echo -e 'ZONE="America/New_York"\nUTC=true' > /etc/sysconfig/clock -bash: /etc/sysconfig/clock: Permission denied   I manually went in and tried a sudo and it won't take. It requires a sudo su first, then it works. But I can't get it working in bash. I understand Fab / Python can do this, but I'm hoping to keep this in bash.  It's going to be a script that updates all our servers and then applies the "FIXDATE" fix(which requires sudo su). The yum update works fine.

Disclaimer: I'm pretty novice at sysadmin stuff.  I'm trying to set up port forwarding in an AWS EC2 instance, this has to be done in the command-line because I don't want to go in and edit anything, it has to be automatic (it's part of a build process).   sudo echo "net.ipv4.ip_forward = 1" >> /etc/sysctl.conf      Permission denied   The weird thing is I've been (successfully) using sudo for pretty much every command that required su privileges. If I do sudo su before the command (trying it out by hand in an ssh session), then it works.  Reasons behind this? Possible solutions that don't involve sudo su or manual edits?


If $X$ is binomial random variable $B(n,p)$ and Y is negative binomial $(r,p)$, How can I show that $F_X(r-1) = 1- F_Y(n-r)$.   While it is possible to show that using the definition of binomial and negative binomial, I am more interested in showing that directly using their p.m.fs.

I wonder a technique to extend the discrete probability space.  Here's an example from Concrete Mathematics EXERCISE 8.17:     Let $X_{n,p}$ and $Y_{n,p}$ have the binomial and negative binomial distributions, respectively, with parameters $(n,p)$. Prove that $\Pr(Y_{n,p}\le m) = \Pr(X_{m+n,p}\ge n)$.   The answer to the problem is also from Concrete Mathematics:     \begin{align} \Pr(Y_{n,p}\le m)  &= \Pr(Y_{n,p}+n \le m+n) \\ &= \hbox{probability that we need $\le m+n$} \tag{1}\\ &= \hbox{probability that $m+n$ tosses yield $\ge n$ heads} \tag{2} \\ &= \Pr(X_{m+n,p}\ge n) \end{align}   Well, (1) and (2) are describing the same thing, but they're in different probability spaces, so we should extend these two probability spaces into a unique probability space, ensuring that the probability of each event doesn't change. How can we do it? I haven't a clear idea.  And the more general problem arises: How to extend a probability space? Is there any technique to do it, at least, treat part of problems?  Thanks for your help!


Trying to run system-config-samba on 17.04 (it worked fine for me on 16.10), here is terminal output:    main1@system1:~$ gksu system-config-samba   File "/usr/sbin/system-config-samba", line 45, in <module>     mainWindow.MainWindow(debug_flag)   File "/usr/share/system-config-samba/mainWindow.py", line 82, in __init__     self.samba_data = sambaParser.SambaParser(self)   File "/usr/share/system-config-samba/sambaParser.py", line 185, in __init__     self.parseFile ()   File "/usr/share/system-config-samba/sambaParser.py", line 225, in parseFile     token = self.createToken (line, section)    File "/usr/share/system-config-samba/sambaParser.py", line 310, in createToken     name, value = line.split ("=", 1) ValueError: need more than 1 value to unpack main1@system1:~$    I do not know what this means, nor how to fix the problem.  I've searched, but found nothing.  (Although, I am not sure of the correct search terms to use.)    I do not see my question as a duplicate of  .  That question is asking where system-config-samba is located.  I already have system-config-samba installed, and I am able to find it with no problem.  Also, that question is discussing how to install samba, which I have already done, I have verified that smbd and nmbd are running.  Finally, that question does not at all discuss the exact, same error messages that I show above, which is exactly what I am asking about.    I am hoping someone can help me with understanding these messages and fixing it so system-config-samba works.  Thanks.

Just installed a fresh Ubuntu 16.04, and Samba. I want to share a drive with Windows machines, with anonymous users.  First thing I notice is the Samba configuration GUI (system-config-samba) is no longer available.  I forged ahead with the CLI and Nano, editing /etc/samba/smb.conf, using various bits of information from many other people struggling with the same issues.   I have it to the place where Windows machines can see the machine and the shared folder, but any attempt to open the share results in "Access Denied".  I want the share to be anonymous, but I also tried logging in using the Ubuntu user and password, and still "access denied".   Before I get into all the gory details after several hours of trying, what happened to the GUI config?  If it is just under another name, I'll try that first.  Update: It turns out there is an even easier way to configure sharing in 16.04 Unity.  Just right click on the folder to share and select "Local Network Share". From there, the Folder Sharing dialog opens to configure the sharing.    Unfortunately it doesn't work (remote user authentication always fails), but at least the interface is there.  I'll report back if and when I figure out more.


Been getting an error at the line where I used "while (this.resultSet.next())" I'm new to javafx, still studying and watching youtube tutorials, unfortunately I can't find a video on how to fix this. The data from my database wont populate the table  Here's the error:  Caused by: java.lang.NullPointerException     at sample.TableViewController.Save(TableViewController.java:73)     ... 120 more   package sample;  import com.mysql.jdbc.ResultSet; import javafx.collections.FXCollections; import javafx.collections.ObservableList; import javafx.event.ActionEvent; import javafx.fxml.FXML; import javafx.fxml.Initializable; import javafx.scene.control.TableColumn; import javafx.scene.control.TableView; import javafx.scene.control.cell.PropertyValueFactory;  import java.net.URL; import java.sql.Connection; import java.sql.DriverManager; import java.sql.PreparedStatement; import java.sql.SQLException; import java.util.ResourceBundle; import java.util.logging.Level; import java.util.logging.Logger;  public class TableViewController implements Initializable {      @FXML     private TableView<ModelTable> table;      @FXML     private TableColumn<ModelTable, String> ID;      @FXML     private TableColumn<ModelTable, String> FrstName;      @FXML     private TableColumn<ModelTable, String> LstName;      @FXML     private TableColumn<ModelTable, String> GS;      @FXML     private TableColumn<ModelTable, String> Grade1;      @FXML     private TableColumn<ModelTable, String> Grade2;      @FXML     private TableColumn<ModelTable, String> Grade3;      @FXML     private TableColumn<ModelTable, String> Grade4;      @FXML     private TableColumn<ModelTable, String> Grade5;      @FXML     private TableColumn<ModelTable, String> Grade6;      Connection con = null;     PreparedStatement preparedStatement = null;     ResultSet resultSet = null;     ObservableList<ModelTable> oblist = FXCollections.observableArrayList();      @Override     public void initialize(URL url, ResourceBundle resourceBundle) {      }      public void Save(ActionEvent event) {         try {             String query = "Select * from `records`";             con = DriverManager.getConnection("jdbc:mysql://localhost/records", "root", "");             preparedStatement = con.prepareStatement(query);             preparedStatement.executeQuery();             while (this.resultSet.next()) {                 oblist.add(new ModelTable(resultSet.getString("ID"), resultSet.getString("FrstName"), resultSet.getString("LstName"), resultSet.getString("GS"), resultSet.getString("Grade1"), resultSet.getString("Grade2"), resultSet.getString("Grade3"),resultSet.getString("Grade4"), resultSet.getString("Grade5"), resultSet.getString("Grade6")));             }              ID.setCellValueFactory(new PropertyValueFactory<>("ID"));             FrstName.setCellValueFactory(new PropertyValueFactory<>("First Name"));             LstName.setCellValueFactory(new PropertyValueFactory<>("Last Name"));             GS.setCellValueFactory(new PropertyValueFactory<>("Grade/Section"));             Grade1.setCellValueFactory(new PropertyValueFactory<>("Grade1"));             Grade2.setCellValueFactory(new PropertyValueFactory<>("Grade2"));             Grade3.setCellValueFactory(new PropertyValueFactory<>("Grade3"));             Grade4.setCellValueFactory(new PropertyValueFactory<>("Grade4"));             Grade5.setCellValueFactory(new PropertyValueFactory<>("Grade5"));             Grade6.setCellValueFactory(new PropertyValueFactory<>("Grade6"));               table.setItems(oblist);          } catch (SQLException ex) {             Logger.getLogger(TableViewController.class.getName()).log(Level.SEVERE, null, ex);         }     } }

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


We have an industrial program. For a device that is running 24 hours a day. The database is constantly used. What I noticed today after 4 months: The database log file size was 80 Gig !  Query execution speeds were slower. Shrink did not reduce the volume of logs. With my search I set the Recovery Model to Simple, and then I did the Shrink . Logs volume reduced to 1 MB !  Recovery model set to Full.  But why did this happen? And how can I stop it?  If you need more info tell me to add it

This one seems to be a common question in most forums and all over the web, it is asked here in many formats that typically sound like this:  In SQL Server -  What are some reasons the transaction log grows so large? Why is my log file so big? What are some ways to prevent this problem from occurring? What do I do when I get myself on track with the underlying cause and want to put my transaction log file to a healthy size?


In an MLB game, Astros' pitcher left the game in top of 5th while the Astros were winning 7-6. They since used a new pitcher in every inning. At the end the Astros won the game 8-6. Which pitcher gets the winning record?

I've read the rules for determining Wins, Losses and Saves for pitchers, and I've never been able to make heads or tails of it.  Is there an easier way to explain it?


I have some very old magic cards with no symbols how can I find out what they are worth or if they are rare?

With an extremely large variety of Magic: The Gathering Cards that exist out there from so many sets and a loose definition of utility and value in the game, it's often hard to gauge a card's individual worth/price without checking it out online. Of course, the rarity is generally a good indicator, but there are plenty of  too.   My question is What is the most efficient way of determining card value without individually loking up each Magic card?


I heard a person on television say the following...     "Pittsburgh need to win this game."   To me, this sounds incorrect.  I think it should be "needs to."  If however, the announcer had said...     "The Steelers need to win this game."   it sounds right to me.  So, I have always gone by the following  plural = need; singular = needs  However, this again does not make sense for some words (e.g. I = need).  Is there some hard and fast rule on when need should be used vs. needs?

I'd say Microsoft have a way of bending the rules and I know that McLaren have won the championship. While this sounds strange, I believe it is correct English (sorry, I'm not native).   But when it's a small company, would you still use it this way? Is a company always plural, or are small companies singular? I.e., would you say Bakery Johnson makes fine bread or Bakery Johnson make fine bread? Is it My book seller, Woody's, have moved or is it has moved?


On which Stack Exchange community site (if any) may/should I post a question requesting a subjective recommendation of "the best" X? (In my case, the X is "book explaining the architecture of the internet".)  If that's not a sufficiently meta-y question for this site, would it help if I ask where I should post questions asking where I should post questions requesting a subjective recommendation of "the best X"?

Stuff like polls, recommendations based on subjective constraints, puzzles, webcomics etc. do not belong on the serious main SE sites, where professionals should be considered at work and having just a few spare minutes ("code's compiling") to answer questions, so they should not be distracted by such things. However, I'd also like to have a home for these things still using the SE engine. For the reason I mentioned before, this needs to be a separate place though. Let's call it four.[sitename-here].com.


I wrote a rather long answer today that had many parts to it and it may have actually been confusing to some readers which section started and ended where, and though I tried my best, there was just so much stuff that people could still miss it. So I think that it would be really good if there was a way of collapsing parts of a post, so that there would be a title for that section and then a little arrow which when pressed would reveal the section within it which could contain images and text alike and would just be a way of easily compressing a post and only showing what is necessary and the user wants to see at one time.  The poster could also choose which parts should be collapsed by default, and which not. This would mostly be useful in answers.  You are currently able to hide certain parts of a post with >! but that does not fully collapse the section nor does it work well for large sections because to scroll down you will probably have to allow it to disappear again.

A question with attachments, screenshots and/or long code, makes it vertically long and often difficult to read fast.  It would be nice to have a new kind of format, such as 'hideable', with a graphic button or a '+' / '-' sign, so you can add additional details, visible only on a click.


I am trying to integrate $\displaystyle \int_0^\infty \frac{\sin^2(x)}{x^2} dx$  by method of contour. I am considering the following contour but I am not being able to. Also I am not sure if it's right approach.   $$\int_\Gamma f(z) dz + 2 \int_0^\infty f(z) dz + \int_\gamma f(z)dz = 0$$ The first integral tends to zero as $R \to \infty $, but letting $\epsilon \to 0$, for the last integral I am getting. $$\int_{\pi }^0 \frac{\sin^2({\epsilon e^{i\theta}})}{\epsilon^2 e^{i2\theta }} i \epsilon e^{i\theta}d\theta = 0$$  ADDED:: Taking the above contour, we do not have any pole inside the contour. $$\int_{-\infty}^\infty \frac{1 - e^{i2z}}{2z^2}dz + \int_\Gamma \frac{1 - e^{i2z}}{2z^2} dz + \int_\gamma \frac{1 - e^{i2z}}{2z^2} dz = 0 \hspace{1 cm }(1)$$  $\displaystyle \int_\Gamma \frac{1 - e^{i2z}}{2z^2} dz \to 0$ due to Jordan Lemma. To evaluate $\displaystyle \int_\gamma \frac{1 - e^{i2z}}{2z^2} dz $ let the radius of the small semi circle be $\epsilon \to 0 $.   $$\lim_{\epsilon \to 0}\int_\pi^0 \frac{1 - e^{i2\epsilon e^{i\theta}}}{2\epsilon ^2 e^{i2\theta}} i \epsilon e^{i\theta}d\theta =\lim_{\epsilon \to 0} \int_\pi^0 \frac{1 - 1 - 2i\epsilon e^{i\theta} + O(\epsilon^2)}{2\epsilon e^{i\theta}} i  = \lim_{\epsilon \to 0} \int_\pi^0 1+  O(\epsilon) d\theta = -\pi \hspace{1 cm }(2)$$  From $(2)$, $(1)$ reduces to  $$\int_{-\infty}^\infty \frac{1 - e^{i2z}}{2z^2}dz - \pi = 0 \implies \Re \int_{-\infty}^\infty \frac{1 - e^{i2z}}{2z^2}dz = \int_{-\infty}^{\infty}\frac{\sin(x)^2}{x^2}dx = \pi$$  Including singularity at $z = 0$, we will have that small inner circle on lower plane. $$\int_{-\infty}^\infty \frac{1 - e^{i2z}}{2z^2}dz + \int_\Gamma \frac{1 - e^{i2z}}{2z^2} dz + \int_\gamma \frac{1 - e^{i2z}}{2z^2} dz = 2 \pi i \text{Residue}[f(z), z = 0] = 2\pi \hspace{1 cm }(3)$$  As for $\displaystyle \int_\gamma \frac{1 - e^{i2z}}{2z^2} dz = \lim_{\epsilon \to 0}\int_{-\pi}^0 \frac{1 - e^{i2\epsilon e^{i\theta}}}{2\epsilon ^2 e^{i2\theta}} i \epsilon e^{i\theta}d\theta = \pi \hspace{1 cm }(4)$  From $(3)$ and $(4)$ we get the same result.

I am looking for a short proof that $$\int_0^\infty \left(\frac{\sin x}{x}\right)^2 \mathrm dx=\frac{\pi}{2}.$$ What do you think?  It is kind of amazing that $$\int_0^\infty \frac{\sin x}{x} \mathrm dx$$ is also $\frac{\pi}{2}.$ Many proofs of this latter one are already in this .


java.lang.NullPointerException     at android.content.res.Resources_Delegate.getDrawable(Resources_Delegate.java:189)     at android.content.res.Resources.getDrawable(Resources.java:845)     at android.content.Context.getDrawable(Context.java:687)     at androidx.core.content.ContextCompat.getDrawable(ContextCompat.java:454)     at androidx.appcompat.widget.ResourceManagerInternal.getDrawable(ResourceManagerInternal.java:144)     at androidx.appcompat.widget.ResourceManagerInternal.getDrawable(ResourceManagerInternal.java:132)     at androidx.appcompat.widget.AppCompatDrawableManager.getDrawable(AppCompatDrawableManager.java:406)     at androidx.appcompat.widget.AppCompatTextHelper.loadFromAttributes(AppCompatTextHelper.java:283)     at androidx.appcompat.widget.AppCompatTextView.(AppCompatTextView.java:105)     at androidx.appcompat.widget.AppCompatTextView.(AppCompatTextView.java:95)     at androidx.appcompat.app.AppCompatViewInflater.createTextView(AppCompatViewInflater.java:182)     at androidx.appcompat.app.AppCompatViewInflater.createView(AppCompatViewInflater.java:103)     at sun.reflect.GeneratedMethodAccessor841.invoke(Unknown Source)     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)     at java.lang.reflect.Method.invoke(Method.java:498)     at android.view.BridgeInflater.lambda$createViewFromCustomInflater$0(BridgeInflater.java:259)     at android.view.BridgeInflater.createViewFromCustomInflater(BridgeInflater.java:285)     at android.view.BridgeInflater.onCreateView(BridgeInflater.java:122)     at android.view.LayoutInflater.onCreateView(LayoutInflater.java:930)     at android.view.LayoutInflater.onCreateView(LayoutInflater.java:950)     at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:1004)     at android.view.BridgeInflater.createViewFromTag(BridgeInflater.java:309)     at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:961)     at android.view.LayoutInflater.rInflate_Original(LayoutInflater.java:1123)     at android.view.LayoutInflater_Delegate.rInflate(LayoutInflater_Delegate.java:72)     at android.view.LayoutInflater.rInflate(LayoutInflater.java:1097)     at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:1084)     at android.view.LayoutInflater.rInflate_Original(LayoutInflater.java:1126)     at android.view.LayoutInflater_Delegate.rInflate(LayoutInflater_Delegate.java:72)     at android.view.LayoutInflater.rInflate(LayoutInflater.java:1097)     at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:1084)     at android.view.LayoutInflater.rInflate_Original(LayoutInflater.java:1126)     at android.view.LayoutInflater_Delegate.rInflate(LayoutInflater_Delegate.java:72)     at android.view.LayoutInflater.rInflate(LayoutInflater.java:1097)     at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:1084)     at android.view.LayoutInflater.inflate(LayoutInflater.java:682)     at android.view.LayoutInflater.inflate(LayoutInflater.java:501)     at com.android.layoutlib.bridge.impl.RenderSessionImpl.inflate(RenderSessionImpl.java:328)     at com.android.layoutlib.bridge.Bridge.createSession(Bridge.java:396)     at com.android.tools.idea.layoutlib.LayoutLibrary.createSession(LayoutLibrary.java:209)     at com.android.tools.idea.rendering.RenderTask.createRenderSession(RenderTask.java:608)     at com.android.tools.idea.rendering.RenderTask.lambda$inflate$6(RenderTask.java:734)     at java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1590)     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)     at java.lang.Thread.run(Thread.java:748)


I've got a large amount of money (for me) in a US large cap index fund, with a 0.25% expense ratio.  I've recently gotten back into investing after a long hiatus, and am now putting most of my money into VOO for its ridiculously low expense ratio.  But my question is - what should I do with the money currently in the older index fund? I don't think it's in a bad spot, and the fees are super low, relatively speaking, so by my estimates I'm not really saving that much by moving that money into VOO, and indeed I'll pay capital gains on it.  But at 40 years old, I have another 20+ years of compounding to go before I'll start withdrawing from my investments. I feel like in this situation, I feel like the right idea is to just keep old money where it is since the expense ratio is reasonably low and invest new money into something cheaper, e.g. VOO.  But are there any other considerations I should think about here, considering my age, time horizon, etc.?

Assuming I'm paying long term capital gains tax, what is the break even point where it is more worthwhile to switch from one fund to another?  For (a hypothetical) example, if I have a fund with an expected return of 3.5%, what would be the minimum expected return of another fund to make it worthwhile to pay the capital gains tax and switch to the other fund?  (I'm assuming the answer to this question is an equation involving investment horizon, capital gains tax rate, and my current taxable gains)


The story I read back in the mid-late 70's was in a two or three-parter in Christian magazine, but the story itself did not have religious themes, per se.  The main story was about a group of space academy cadets in a ship.  Our hero is an idealistic man and his best friend, both who are cadets on the ship.  What's also common knowledge is that one of the cadets is a "pacer" ... a cyborg who is placed there to maintain the high competitive edge and push the the real cadets to be their very best.  And it's a common belief amongst the cadets each year, that you must find and kill the cyborg or your class is cursed.  Something goes wrong and the ship's computer loses it's ability to pilot the ship.  The commandant asks for a volunteer to help with the navigational computations.  Everybody knows that it's very likely going to be the pacer who volunteers.  So our hero's best friend steps forward and the rest of the story is about the other cadets encouraging him to do some snooping, get proof his friend is the pacer, and then help kill him.  The hero is torn.  ... on the other hand, maybe there ARE religious themes  lol!  Anyway, I'd love to know the author so I can track down this story and read it again.  Thanks all !

Looking for a short story probably anthologized in a golden age collection about space cadets that are under the impression they have to figure out who in their class is the secret android (and maybe kill him). They end up picking the valedictorian / smartest in the class for obvious reasons.   I think that it might then be revealed that this is a hoax played upon the students by the instructors.


Forgive me if this question has already been asked. I was unable to find anything relevant to this question.  The $n$th derivative of a function, $f^n(x)$ is well-defined for $n\in\mathbb{Z}^+$. As well, it can be defined for the case where $n\in\mathbb{R}^+$, (i.e. fractional derivatives). What about in the case where $n\in\mathbb{C}$? What would it mean to take the imaginary derivative of a function?  Similarly, let $n$ be a function of some variable, $x$, (i.e. $n=\cos(x)$). Could you define $f^n(x)=f^{\cos(x)}(x)$? And again, what would it even mean to take the $\cos(x)$th derivative of a function?  As well, if $F'(x)=f(x)$, does $f^{-1}(x)=\int\,f(x)\,dx=F(x)$, where $f^{-1}$ is the negative derivative, and not the inverse?  Edit: Duplicates do not answer the final part of this question (i.e. the $\cos(x)$th derivative of a function).  Edit 2: It's interesting because, let's say that $f^{-1}(x)=\int\,f(x)\,dx=F(x)$. Operator theory tells us that when we apply two half derivatives in succession to a function (i.e. $D^{\frac{1}{2}}D^{\frac{1}{2}}f(x)$, that we obtain the first derivative of that function $f(x)$. This is consistent with the idea that the antiderivative is nothing more than $D^{-1}f(x)=D^{-1}F'(x)$.   But consider the complex derivative $f^i(x)$. Following operator theory, one would claim that the antiderivative of this function could be written as $f^{-i}(x)$. However, this is obviously not the case as this implies that $f(x)=f^0(x)=f'{x}$, recalling that $i^2=-1$, such that $(i)(-i)=1$.

I do not know much about fractional calculus, except what I have read in a few short posts at MSE and .  I know that order of a derivative can be extended from rational values to real values, but all I know is what is written .  So my question is, what is the simplest way to understand and/or define $\dfrac{d^n}{dx^n}f(x),$ for $n\in\mathbb{R}$?  For example what is $\dfrac{d^\pi}{dx^\pi}f(x)$?  Also, what about complex values?  What might we say about $\dfrac{d^{s}}{dz^s}f(z)$ for $s\in\mathbb{C}$?  And what are some uses for such derivatives?


I deleted all partitions and I installed Ubuntu 12.04 LTS. Well, when I startup my PC, after the Ubuntu's logo, a black screen appears but I hear the log on sound.  If I restart and connect other screen, the OS starts sucessfully. Any ideas?  Thanks!

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


I have a "strange" behaviour with a double:  #include <stdio.h> int main() {     double var = 4724.735;     double var1 = 472473.5;     printf("var: %19.11f var1: %19.11f\n", var, var1);     var *= 100.0;     printf("var * 100.0: %19.11f\n", var);    return 0;  }   The result is:  var:    4724.73500000000 var1:  472473.50000000000 var * 100.0:  472473.49999999994   Why after the * 100.0 operation I have that result instead of 472473.50000000000?  With a smaller number, i.e. var = 724.735, the problem doesn't exist.  Are you sure is a duplicate? The  is related to javascript and here the problem is in the first decimal and only if I use an integer part of 4+ number. Thank you

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


In the above statement N , a , b are natural numbers . I was wondering whether the above statement is always true . If it is always true will anyone give me a simple reason or proof for it ? Please guide me .

Using divisibility theorems, prove that if $\gcd(a,b)=1$ and $a|c$ and $b|c$, then $ab|c$.   This is pretty clear by UPF, but I'm having some trouble proving it using divisibility theorems. I was looking at , and if this could be proven, then the solution would follow immediately.


Short version: When solving for the pdf of a function of a continuous random variable(say, $Y=X^2$), why can't you just plug in inverse of that($\pm\sqrt{x}$) into the pdf of the RV? Why do you have to start from the cdf of the $Y$, substitute $Y$ with $X^2$, and differentiate that to get the pdf?    The point of this question is regarding the intermediate step involved.   Why is it not allowed to simple plug-in to the pdf of RV?   why is necessary and also justified to do so involving the cdf?   Long version : Let's say you have a random variable $X$ and a function of the random variable, $g(X)$ (such as $Y=X^2$). You are interested in finding the pdf of $Y$, i.e. $f_Y(y)$.   Usually, to do this, you have to start with the cdf of $Y$ first, and differentiate that to get a pdf of it. For example,    $$F_Y(y)=P(Y\le y)$$ and here you substitute $Y$ with $X^2$:  $$P(Y=X^2 \le y)=2F_X (\sqrt{y})-1$$  and you you differentiate this to get pdf of $Y$ $$d(2F_X(\sqrt{y})-1)/dy=f_Y(y)$$  My question is : WHY? why not just solving for $$f_X(\pm\sqrt{y})$$ what is wrong with this approach? and why is it justified to use cdf to solve this?  Please explain this in a layman's term since clearly I am a novice in statistics

Suppose $X$ is a random variable with pdf $f_X(x)$. Then the random variable $Y=X^2$ has the pdf   $$f_Y(y)=\begin{cases}\frac{1}{2\sqrt{y}}\left(f_X(\sqrt{y})+f_X(-\sqrt{y})\right) & y \ge 0 \\ 0 & y \lt 0\end{cases}$$   I understand the calculus behind this. But I'm trying to think of a way to explain it to someone who doesn't know calculus. In particular, I'm trying to explain why the factor $\frac{1}{\sqrt{y}}$ appears out front. I'll take a stab at it:  Suppose $X$ has a Gaussian distribution. Almost all the weight of its pdf is between the values, say, $-3$ and $3.$ But that maps to 0 to 9 for $Y$. So, the heavy weight in the pdf for $X$ has been extended across a wider range of values in the transformation to $Y$. Thus, for $f_Y(y)$ to be a true pdf the extra heavy weight must be downweighted by the multiplicative factor $\frac{1}{\sqrt{y}}$  How does that sound?  If anyone can provide a better explanation of their own or link to one in a document or textbook I'd greatly appreciate it. I find this variable transformation example in several intro mathematical probability/stats books. But I never find an intuitive explanation with it :(


The problem  Imagine we keep uniformly drawing $n$ integers $X_i$ from {0, 1, ..., 9} so that their sum is more than $10$. For instance, one draw would be {1, 0, 2, 5, 3}, hence $n=5$, and repeat this procedure over and over. What would the expected value of $n$ be (analytically calculated)? By simulation (over 10 million trials), it is 3.063577.  Apparently, if that were uniformly drawn from $[0,10]$, this expected value would be equal to the Euler number $e$.  [I very recently asked it  and am waiting for answers (and will post them here), but I thought maybe it may be more suitable for CV. Sorry if that makes it off-topic.]  What I have been trying to do  Consulting the paper  by Caiado & Rathie (2007), I suspect (given $Y = \sum_{i=1}^{n}X_i$) the characteristic function of the distribution of $Y$ is something of the following form (Equation 2.3 in the paper)  $$ \Phi_Y(t) = \left( \sum_{p=0}^{k} \frac{e^{i.t.p}}{k+1} \right)^n , \forall t \in \mathbb{R}, i=\sqrt{-1} $$  If I understand it correctly, $k$ should be equal to 9 (right?)  If I have been correct, I tried calculating the inverse Fourier transform of $\Phi_Y(t)$ for $k=9$ and calculate its expected value but it is getting too complicated—and I suspect I'm very wrong here.  I went through multiple "similar" questions on SE (e.g., , , , , , and ) but I'm too confused to infere something useful from them.  Is there an answer to my question?  Many thanks in advance!    Some R code for numerical estimation  This is the R code I used to calculate it numerically (edited since the first submission):  N <- 1e+7 s.list <- n.list <- rep(NA, N)  for(i in 1:N){   s <- 0   n <- 0   seed <- i   while(s < 11){     s <- s + (sample(10, 1, replace = TRUE) - 1)     n <- n + 1   }   if(!(i %% 10000)) print(paste("At iteration", round(i/1000,1), "K, s is", s, "and n is", n))   s.list[i] <- s   n.list[i] <- n }  answer <- mean(n.list)

Here is the question:  You roll a fair 6-sided dice iteratively until the sum of the dice rolls is greater than or equal to M. What is the mean and standard deviation of the sum minus M when M=300?  Should I write a code to answer these kind of questions?  Please give me some hints on that. thanks!


Regarding the following expression, we can realize that the period character is of dual functionality in its nature: partly denoting the abbreviation, partly being used to end the sentence.     I like rideable animals such as donkeys, horsies, cowsies etc.   Now, if we reconstruct the sentence in the following way, we'll be forced to use separate period characters for each of the functions and it looks pretty weird, at least to me. I wonder if it's the correct usage at all and what a correct alternative might be.     I like rideable animals (donkeys, horsies, cowsies etc.).   Please note that I'm not in any way asking about how to express the thought contained in the example nor that how to circumvent the situation (by rephrasing it as two different sentences or such).

Are there cases where a period is placed inside parentheses? In which cases the period (or a comma) should be placed inside the parentheses?


I would like to know what's the difference between these notations :  function Forms (formSelector) {   this.id;   this.formSelector = formSelector; }  Forms.prototype.getAll = function () { return $(this.formSelector) } // get all forms in a JQuery object  Forms.prototype.get = function () { return $(this.getAll()).get(this.id) }   And  function Forms (formSelector) {   this.id;   this.formSelector = formSelector;    this.getAll = function () { return $(this.formSelector) }   this.get = function () { return $(this.getAll()).get(this.id) } }   Or even   function Forms (formSelector) {   this.id;   this.formSelector = formSelector;    this.getAll = $(this.formSelector);   this.get = $(this.getAll()).get(this.id); }   I can even write something like this:  var Forms = {   constructor: function (formSelector) {     this.formSelector = formSelector;      return this.formSelector;   },    setId: function (id) { if (!isNaN(id) this.id = id; }    getAll: function () {     return $(Forms.constructor.formSelector); // this should work I think ?    } }   This is so confusing to me, I don't quite get to figure out what's the best and more optimized way to write my objects, in terms of speed and clarity, and to encapsulate their methods and properties.  In any case, it seems that I can modify my properties by just stating something like:  var test = new Forms('.forms');  test.id = 10; test.getAll = 'something';  // What I want is something like :  test.setId(10) // and test.id = X shouldn't work   Thanks!

What's the difference between  var A = function () {     this.x = function () {         //do something     }; };   and  var A = function () { }; A.prototype.x = function () {     //do something };


Abbott's Understanding Analysis, Problem 1.2.4  Produce an infinite collection of sets $A_1, A_2, A_3,...$ with the property that every set $A_i$ in the collection:  (1) Contains an infinite number of elements,   (2) $$A_i \cap A_j = \emptyset, \quad \forall i \neq j,$$   and   (3) $$\cup_{i=1}^{\infty} A_i = \mathbb{N}.$$  I am unable to come up with a response. The property that $$\cup_{i=1}^{\infty} A_i = \mathbb{N}$$ implies that these sets can only contain elements of the natural numbers. However, it seems to me difficult to produce an infinite collection of sets that contain infinitely many natural numbers each and that are mutually disjoint.  Thank you, for your help. :)

Is it possible to have a countable infinite number of countable infinite sets such that no two sets share an element and their union is the positive integers?


I create a DataFrame：  import pandas as pd data = pd.DataFrame({'a':range(1,11),'b':['m','f','m','m','m','f','m','f','f','f'],'c':np.random.randn(10)})   Which looks like：      a  b         c 0   1  m  0.495439 1   2  f  1.444694 2   3  m  0.150637 3   4  m -1.078252 4   5  m  0.618045 5   6  f -0.525368 6   7  m  0.188912 7   8  f  0.159014 8   9  f  0.536495 9  10  f  0.874598   When I want to select some rows, I run  data[:2] or data.ix[2]   But when I try:  se = range(2) data[se]   There's a error:  KeyError: 'No column(s) named: [0 1]'   I know DataFrame select a col as default.What happened when I run data[se]? How colon(:) works in python?

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.


The warning is the following: "(gedit:38572): Tepl-WARNING **: 09:45:20.468: GVfs metadata is not supported. Fallback to TeplMetadataManager. Either GVfs is not correctly installed or GVfs metadata are not supported on this platform. In the latter case, you should configure Tepl with --disable-gvfs-metadata."  What should I do? Is this normal?  This is what I was doing:  How should I proceed to properly install rkhunter?

I recently installed a GRUB theme from  on Ubuntu 20.04 LTS (my PC is Windows 10 dual-boot with Ubuntu). To install the theme successfully, the file at /etc/default/grub needs to be edited. So I used sudo gedit /etc/default/grub command to do so. After editing when I save it I, see the following warning in Terminal:  (gedit:7169): Tepl-WARNING **: 21:13:18.135: GVfs metadata is not supported. Fallback to TeplMetadataManager. Either GVfs is not correctly installed or GVfs metadata are not supported on this platform. In the latter case, you should configure Tepl with --disable-gvfs-metadata.  Later on I also edited the grub menu by editing the file at /boot/grub/grub.cfg by using sudo gedit /boot/grub/grub.cfg. Upon saving the file I got a similar warning  (gedit:8887): Tepl-WARNING **: 21:18:46.163: GVfs metadata is not supported. Fallback to TeplMetadataManager. Either GVfs is not correctly installed or GVfs metadata are not supported on this platform. In the latter case, you should configure Tepl with --disable-gvfs-metadata.  Can someone tell me the reason? And also how to deal with it?


I've been typing up a document, and I realized I didn't know how to type up this sideways parenthesis thing here:  Could someone tell me how to type that up? This is in math mode.

I have  $m\times n = n + n + \dots + n$    in my text right now, but I would like to put a curly brace under the \dots to emphasize that there are m,n's involved. How would I do this?


This equality keeps coming up in my algebra course and I don't understand why this is true. $$ \sqrt{x^2} = |x| $$ shouldn't it just be $$ \sqrt{x^2} = x $$?

As far as I see, $\sqrt{x^2}$ is not $x$, but $|x|$, meaning the "absolute". I totally get this, because $x^2$ is positive, if $x$ is negative, so $\sqrt{y}$, whether $y = 10^2$ or $y = -10^2$: $y$ is positive.  But then I remember that $\sqrt(x)$ is the same as $x^{1/2}$ and thus, $\sqrt{x^2}$ is the same as $x^{1}$.   So, as far as I get it, $\sqrt{x^2} = x^{2/2}$.  But then, I can cancel $\frac{2}{2}$ to $1$. So: $\sqrt{x^2} = x^1 = x$.  Where does the absolute value in this derivation of the calculation come from?  I get it why its there: Because $(-x)^2 = x^2$, so the radicand is always positive. But from $\sqrt{x^n} = x^{n/2}$ I dont understand how it gets there.


I have a small network of computers as a workgroup - NO Server. I only want 3 people to have internet and other 7 to have email only.  How do I do that?

I have a workgroup of ten computers connected to internet on a broadband ADSL line via a 24 port switch. There is no server.  The internet bills have gone so high that I want to eliminate seven to email only and no internet leaving three that can have access to internet.  How can I accomplish that?


I have noticed lately that the answer sorting/ordering method has changed where if the user answered their own question that it now appears at the bottom of the answers rather than at the top.  I have found this rather annoying from a usability level as now what most likely is the most helpful answer is buried at the bottom when I am expecting it to be at the top. This has tripped me up recently when I thought the question didn't have an accepted answer and I was looking at "inferior" answers before I scrolled and noticed an accepted answer at the bottom of the page.  Doesn't making useful answers hard to find go against the sole purpose Stack Overflow was built?

The highest-voted answer on  has three votes, and appears above the accepted answer (two votes). I think it's an amusing coincidence that it just so happens to be a Jon Skeet answer. What's going on here? Shouldn't  be at the top?


Ok, I cannot for the life of me get past this captca. I select all the street signs, who knows whether they're right.   But also, if you're supposed to select images, what's with the text box below? there's no instruction on what to type there.

I just got challenged (over on ) by the new "Mark all images with street signs" CAPTCHA.  I must have tried a dozen times to solve it by checking all images that had street signs, but I never succeeded.  Of note is a text input field without instructions of what to enter there. I suspect that is the problem: It is expecting input, but doesn't tell me what to input.  It's either broken or I am missing something.  I am using Chrome on an iPhone in "full site" mode.


This is a question on one of final exam at my school...:  X and Y are independent Gaussian random variables with zero mean and unit variance. Z=X/(X+Y). Find the pdf of Z.  After some struggles, I think I can solve this question by letting W = X+Y first and derive the pdf of W. Then I can find the pdf of Z = X/W.  However, after reading these two wikipedia articles:    .  I realized that the whole answer is going to be very long.   Meanwhile, I came across this posting - , which is similar in nature.   It appears that what are shown on the wikipedia articles are the only way to go.  However, considering this is a final exam question, given a short time limit, there should probably a much shorter way to reach my answer. Can anyone please show me the "easier" way?

X, Y are independent standard normal random variables, what is the distribution of $$ \frac{X}{X+Y} $$  Could anyone help me with this? Thanks.    I have worked the problem by multivariable transformation:  Let $$Z=\frac{X}{X+Y} , W=X$$  Consider transformation $$(X,Y)\longrightarrow(Z,W)$$  Then $$X(Z,W)=W , Y(Z,W)=\frac{W(1-Z)}{Z}$$  defines the inverse transformation.  The Jacobian is $$J(Z,W)=\frac{w}{z^{2}} $$  So $$f_{Z,W}(z,w)=f_{X,Y}(w,\frac{w(1-z)}{z})\cdot\mid\frac{w}{z^{2}}\mid$$  As X  and Y  are independent. Then the marginal pdf of Z  is $$f_{Z}(z)=\intop_{0}^{\infty}\frac{w}{z^{2}}\cdot f_{X}(w)\cdot f_{Y}(\frac{w(1-z)}{z})dw+\intop_{-\infty}^{0}-\frac{w}{z^{2}}\cdot f_{X}(w)\cdot f_{Y}(\frac{w(1-z)}{z})dw$$  After calculation we get $$f_{Z}(z)=\frac{1}{\pi\cdot\frac{1}{2}\cdot(1+(\frac{z-\frac{1}{2}}{\frac{1}{2}})^{2})}$$  Hence $$Z\sim \mathrm{Cauchy}(\frac{1}{2},\frac{1}{2}).$$


My server is currently down. Apparently he has no room. How do I solve this?       danilodorgam@ny3-vps:/etc$ df     Filesystem                1K-blocks     Used Available Use% Mounted on     udev                         504600        4    504596   1% /dev     tmpfs                        101788      336    101452   1% /run     /dev/disk/by-label/DOROOT  30830588 12305880  16935572  43% /     none                              4        0         4   0% /sys/fs/cgroup     none                           5120        0      5120   0% /run/lock     none                         508924        0    508924   0% /run/shm   ...   df -ih Filesystem                Inodes IUsed IFree IUse% Mounted on udev                        124K   402  123K    1% /dev tmpfs                       125K   312  124K    1% /run /dev/disk/by-label/DOROOT   1.9M  1.9M     0  100% / none                        125K     2  125K    1% /sys/fs/cgroup none                        125K     1  125K    1% /run/lock none                        125K     1  125K    1% /run/shm none                        125K     2  125K    1% /run/user

I cannot update Ubuntu because I have 99% inode usage. What is the easiest way for me to alleviate this problem?  Thanks for your help.


Hope that you will find this post in good health. I am Mr. Adnan from Pakistan with research background in Control systems. I am working on one problem in which Hadamard weights are using.   During solving that problem, i am facing one problem to calculate inverse /stacking operator i.e $\text{vec}^{-1}$. I would be highly thankful if could you please guide me that how to calculate for example  $$\text{vec}^{-1}(Wq)$$  where $W$ is non singular matrix and $q$ is controller having state space representation  \begin{align} X'&=Ax+Bu, \\ Y&=Cx+Du \end{align}  I just have two queries to calculate above inverse   what should be order of $q$ to calculate inverse vector operator $\text{vec}^{-1}$ if order of controller $q$ is know then Please tell me how to solve $\text{vec}^{-1}$, any formula,relation or command.   I Knew these two commands $\text{vec}$ and $\text{vec}^{-1}$ but that is not working in my problem.  -Thanks in Advance

There is a well known  operator $\mbox{vec}$ in matrix analysis.   I've vectorized my matrix equations, did some transformation of vectorized  equations and now I want to get back to the matrix form. Is there special operator for it?


It is known that any subgroup of a group having index 2 is normal. Note that here 2 is a prime.   Is such a result true for some other odd prime ?. That is, "does there exist an odd prime $p$ such that whenever a subgroup $H$ of a group $G$ has index $p$, then $H$ is normal in $G$ ?"

Generalizing the case $p=2$ we would like to know if the statement below is true.  Let $p$ the smallest prime dividing the order of $G$. If $H$ is a subgroup of $G$ with index $p$ then $H$ is normal.


In this , I want to change first element of second nested list but.  L1=list('|  |') L2=[L1,L1] print L2  >>>[ [ '|', ' ', ' ', '|' ], [ '|', ' ', ' ', '|' ] ]  L2[1][0]='@' print L2  >>>[ [ '@', ' ', ' ', '|' ], [ '@', ' ', ' ', '|' ] ]   Its Change both nested list!! Where I am going Wrong??

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?


so I know that the contrapositive will be something like;  If all the numbers are greater than or equal to 7, then the average cannot be less than 7.  How do i go about proving it from there? or is there any other method of proving it? if so how?  I really appreciate the help from anybody!

I tried proving this by contraposition, by saying, "If every number that is being averaged is greater than 7, then the average of a thousand numbers is less than 7."  This seems easier to prove, but I don't know where to go from there.


My main activity:  public class DiaryActivity extends AppCompatActivity {  private ArrayList<String> allURL = new ArrayList<>(); public void setList(ArrayList<String> list) {         this.allURL = list;     }      private void fireYourAsyncTask() {         new shitson(this).execute();     }  @Override     protected void onCreate(Bundle savedInstanceState) {         super.onCreate(savedInstanceState);         setContentView(R.layout.activity_diary);         fireYourAsyncTask(); }   My other .java:  public class shitson extends AsyncTask<Void, Void, ArrayList<String>> {  ArrayList<String> tmp; private DiaryActivity activity;  public shitson(DiaryActivity diaryActivity) { }  protected ArrayList<String> doInBackground(Void... arg0) {     tmp = new ArrayList<>();     HttpHandler sh = new HttpHandler();     String url2 = "https://................";     String jsonStr = sh.makeServiceCall(url2);      if (jsonStr != null) {         try {              JSONArray urlOfURLs = new JSONArray(jsonStr);             for (int i = 0; i < urlOfURLs.length(); i++) {                 JSONObject JSONURL = urlOfURLs.getJSONObject(i);                 String url = JSONURL.getString("url");                 tmp.add(url);             }         } catch (JSONException e) {             e.printStackTrace();         }     }      writeout();     return null; }  @Override protected void onPostExecute(ArrayList<String> strings) {     super.onPostExecute(strings);     activity.setList(tmp); }  public void writeout() {         for (String i : tmp) {             Log.e("-0-0-0-0-0-0-0-", i);         }     } }   What I want to have the list I made in shitson.java in my DiaryActivity. In the shitson.java the writeout() function writes the right informations in Logcat but at activity.setList(tmp); I get error messages like these:   java.lang.NullPointerException: Attempt to invoke virtual method 'void com.example.petkovics.mango.DiaryActivity.setList(java.util.ArrayList)' on a null object reference     at com.example.petkovics.mango.shitson.onPostExecute(shitson.java:57) at com.example.petkovics.mango.shitson.onPostExecute(shitson.java:20)   What is non-sense since the writeout() function after I filled up the "tmp" ArrayList, it tells me every single data it has to do. But still in onPostExecute it gets crazy...

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


I have a sample $x_1,\dots,x_n \stackrel{iid}{\sim}f(;\boldsymbol{\theta})$, where $\boldsymbol{\theta} = (\theta_1,\dots,\theta_d)$, and   , $0<\theta_j<1$,  $\sum_{j=1}^d\theta_j = 1$.   I can easily implement and evaluate the log likelihood function  $$\ell(\boldsymbol{\theta}) = \sum_{i=1}^n \log f(x_i;\boldsymbol{\theta}),$$  however I do not know how to impose the condition   $$\sum_{j=1}^d\theta_j = 1.$$  How is this kind of optimization done in maximum likelihood estimation?

I would like to receive the maximum of a function f(x) where the x are proportions that sum to one.   f.max <- function(x){       x1 <- x[1]             x2 <- x[2]       x3 <- x[3]        x4 <- 1 - (x1 + x2 + x3)           #(x1 + x2 + x3 + x4) should always be 1            d <- (x1*x3 + x1*x4 + x2*x3 + x2*x4)        x1*4 + x2*6 + x3*3 + x4*2 + d*8    #function to be maximized       }  optim( par=rep(0.25,3), fn=f.max, gr=NULL, method=c("L-BFGS-B"), lower=rep(0,3), upper=rep(1,3), control=list(fnscale=-1) )   While I can constrain the inital values in optim() by the lower= and upper= statement, I do not manage to specify that the maximization is done so that always: (x1 + x2 + x3 + x4) = 1


I'm trying to build a JavaFX software application for windows platforms including windows XP, Vista, 7, 8, 10.  I'm using Maven as a dependancy manager to build the project.  In my application, i make use of MySQL Driver for JDBC connectivity. However, when targeting old OS such as XP, i'm obliged to use old drivers because nowdays versions of MySQL are impossible to start on XP.  I need my project to get built with MySQL 5.1.6 Driver for Windows XP platform, and MySQL 5.7 Driver for the rest of platforms.  I'm aware that i can do that by building the project 2 times and proving 2 .jar files and then 2 different .exe files, but is there any other elegant way to do that ?  Thanks in advance.

Is it possible to have a different set of dependencies in a maven pom.xml file for different profiles?  e.g.  mvn -P debug mvn -P release   I'd like to pick up a different dependency jar file in one profile that has the same class names and different implementations of the same interfaces.


I've read about Subprocess module from python documentation and from Stackoverflow as well ! But i am unable to implement the concept ! Like for example :     So how can I execute following command line using python ?

How do you call an external command (as if I'd typed it at the Unix shell or Windows command prompt) from within a Python script?


As I watched the video on YouTube of proving sum of $$1+2+3+4+\cdots= \frac{-1}{12}$$  Even we know that the series does not converge.  First I still can't prove what wrong in infinite sum of $$1-1+1-1+1+\cdots= \frac{1}{2}$$  and I want to know more about of what mistake did they make in the video.  I did research on our forum about this topic. But still not clearly understand about of that proving.  Thank you. (Sorry about my bad English )

$\displaystyle\sum_{n=1}^\infty \frac{1}{n^s}$ only converges to $\zeta(s)$ if $\text{Re}(s) > 1$.  Why should analytically continuing to $\zeta(-1)$ give the right answer?


When should one use Public over Protected in Java when creating Superclasses, if a program runs without any problems with a Protected access modifier set is there any need to change it to Public?

In Java, are there clear rules on when to use each of access modifiers, namely the default (package private), public, protected and private, while making class and interface and dealing with inheritance?


How can I delete a file made up of a java program. I have a file named con.txt located in a directory, this file is made up of before, when I learned java language. But something is wrong (probably the path) when I try to open the file then notepad display 'can not file \\. \ con.txt, do you want create new file ''. I try to create a new file but create a new one and the old file still exists. Can you show me how to delete this file, thank you very much

Why in Windows, can't you name a folder 'con'?  Whenever I try to name a folder as "con" (without the quotes) it defaults to its original name.  Why does it do this?


I have recently dropped my Iphone 8 and that caused it to go into endless reboot cycle. I had to put the phone into DFU Recovery mode and after it recovered I noticed I cant set it up as the home button appears to be unresponsive. Is there any way I can control the phone remotely or any other way to set up the phone without the use of the Home button?

I'm about to factory reset an iPad with a broken home button. I've been using AssistiveTouch in place of the button.  In iOS 10, unlocking requires the home button, so I have to use AssistiveTouch every time I turn the iPad on. My question is—if I factory reset it, is there a part of the iOS 10 setup screen that requires the home button to proceed? If I reset, AssistiveTouch will not be enabled and I won't be able to enable it until the iPad is finished being set up. This could make the device unusable.


I want a friend to render my 6400 frame short film I made on blender... And it has a lot of image textures for materials... I have all the images, music, and pretty much everything that is in the animation in one folder, including the actual blender file... But it seems the destination of the files will change because the folder would be installed on his computer and he would have to go and change all the matierial image texture file destinations to the same folder on his disk... Is there a way where he can just link up to all of the files without the hassle? Thanks

I'm creating a (fully packed) .blend file that contains textures, cycles materials, UV maps, multiple scenes, rigging, and fluid simulations. The OS I am working on to create it is Windows. However, I must send this file to Blender (same version, 2.66) on Linux. I plan to rebake the fluid on that machine. What considerations must I take with the names, content, etc of packed files and .blend data?


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

Let $X$ be an inner product space, and let $M$ be a non-empty subset of $X$. Then we have the following:   (a) If the space of $M$ is dense in $X$, then $M^\perp = \{0 \}$, that is, $x \in X$, $x \perp M$ imply $x =0$.   (b) If $X$ is complete and $M^\perp = \{0 \}$, then the span of $M$ is dense in $X$.   In (b), what if the space $X$ is not complete? In such a case, can we have a set $M$ such that $M^\perp = \{0\}$, but the span of $M$ is not dense in $X$?


I have carried out a principal component analysis on 10 emotions I have observed in animals e.g. happy, playful, aggressive etc (5 positive emotions and 5 negative). Each animal is given a score for each emotion from 1 to 100. E.g. an extremely happy animal receives a "happy" score of 100. My PC1 is positively correlated with positive emotions and negatively correlated with negative emotions. Thus, I have labelled the PC "Good welfare". I have component scores for each animal for PC1. I want to assign each animal to a poor or good welfare category based on these PC scores but how do I go about this? The scores range from 3.12673 to -2.23454. Could I take animals with a minus score as having poor welfare and those with a positive score had good welfare? I don't know how to interpret the component scores. Thanks!

Can anyone help me in interpreting PCA scores? My data come from a questionnaire on attitudes toward bears. According to the loadings, I have interpreted one of my principal components as "fear of bears". Would the scores of that principal component be related to how each respondent measures up to that principal component (whether he/she scores positively/negatively on it)?


Also only use the loop while and if else statement to determine whether an integer is perfect square.

I'm looking for the fastest way to determine if a long value is a perfect square (i.e. its square root is another integer):    I've done it the easy way, by using the built-in  function, but I'm wondering if there is a way to do it faster by restricting yourself to integer-only domain. Maintaining a lookup table is impractical (since there are about 231.5 integers whose square is less than 263).   Here is the very simple and straightforward way I'm doing it now:  public final static boolean isPerfectSquare(long n) {   if (n < 0)     return false;    long tst = (long)(Math.sqrt(n) + 0.5);   return tst*tst == n; }   Note: I'm using this function in many  problems.  So no one else will ever have to maintain this code.  And this kind of micro-optimization could actually make a difference, since part of the challenge is to do every algorithm in less than a minute, and this function will need to be called millions of times in some problems.    I've tried the different solutions to the problem:   After exhaustive testing, I found that adding 0.5 to the result of Math.sqrt() is not necessary, at least not on my machine. The  was faster, but it gave incorrect results for n >= 410881.  However, as suggested by , we can use the FISR hack for n < 410881. Newton's method was a good bit slower than Math.sqrt().  This is probably because Math.sqrt() uses something similar to Newton's Method, but implemented in the hardware so it's much faster than in Java.  Also, Newton's Method still required use of doubles. A modified Newton's method, which used a few tricks so that only integer math was involved, required some hacks to avoid overflow (I want this function to work with all positive 64-bit signed integers), and it was still slower than Math.sqrt(). Binary chop was even slower.  This makes sense because the binary chop will on average require 16 passes to find the square root of a 64-bit number. According to John's tests, using or statements is faster in C++ than using a switch, but in Java and C# there appears to be no difference between or and switch. I also tried making a lookup table (as a private static array of 64 boolean values).  Then instead of either switch or or statement, I would just say if(lookup[(int)(n&0x3F)]) { test } else return false;.  To my surprise, this was (just slightly) slower. This is because .