How can I interpret the beta regression from regressing lny on lnx, or lny on x etc. For example in Stata I make this regression using beta function: reg lny lnx z t, beta robust  this gives me usual coefficient estimates which can be interpreted as elasticity, but it also gives standardized betas.  I know for a regression of y on x, the standardized betas are interpreted as a one standard deviation of x from its mean have a beta standard deviation change in y, for example:  reg y x z t, beta robust  But what happens if variables are lny and lnx form? How does it relate to usual elasticity interpretation in log-log regressions?

I have read many threads here on how to interpret coefficients in a regression where the predictor and the dependent variable are log-transformed. Most give an answer for a one or ten percent change. However, I am not sure whether I am right about interpreting other changes.  I have a beta coefficient of $-0.5057$. Given the standard interpretation (as elasticity), a one percent increase in the predictor variable ($X$) leads to an decrease of $0.5057$ percent in the dependent variable ($Y$).  Alternatively a ten percent increase in $X$ leads to a $5.057$ percent decrease in $Y$.  I found the formulas $1.1^{-0.5057}$ and $\exp(-0.5057(\log(1.1)))$ to calculate the affect of any change in $X$ on $Y$. Are these formulas right because I get for a ten percent increase slightly different results than the $5.057$ decrease.  Furthermore, is it right that the percentage values for the changes in $Y$ do not increase proportionally with increases in $X$? If a one percent increase in $X$ leads to an decrease of $0.5057$ percent in $Y$, it is wrong to assume that a $50$ percent increase in $X$ leads to a $(50 \times  0.5057)$ decrease in $Y$?   $\exp(-0.5057(\log(1.5)))= 0.8146$. Given the difference between $1$ and this value, it suggests that $Y$ decreases by $18.5$ percent. Am I right?  The formulas mentioned above suggest so. Is that because of the nonlinearity in the model?


I am an Indian citizen and traveling to Seattle (on Business visa) through Tokyo (Layover for 9 hours). I don't have any such plans to go outside from the airport in Tokyo. Do I still need a Transit visa for staying in Airport transit zone in Tokyo?  Do I need to cross the Immigration boxes while transferring the flights?

I will be transferring between two international flights at Tokyo Narita airport. I'm scheduled to depart the same day I arrive. I am planning to stay within the airport during the layover. Does anyone know if I will require a transit visa at Narita?


So i just began to write my literature review and have a big bunch of research papers saved in a folder.  Is there a tool that would help me visualize the references between those papers saved in my folder?  I.e. for example paper A mentioned paper B in its bibliography, and B referenced C, C referenced D and E, A referenced E.

I had the thought that I should run a computation on my document to see things like: How many times I cite each source, how many times I cite each author etc. Then I thought that isn't enough. What if I cite A_foo, B_foo and C_foo, but both A_foo and B_foo cite C_foo. That is worth knowing. A graph of citations between the texts that I am citing will revel interesting information.  For example nodes with out any parent, will generally indicate new and original ideas. While they may draw on other things, those things are distant enough from  my work that I am not citing them. Nodes that have no links to any others, show that I am bringing in an idea from another subfield, perhaps.  This graph should be computable, I know google scholar maintains a list of almost everything I've cited, and for each thing lists who has cited them.  Has this been experimented with? Are there existing tools for the job? If there isn't I might mess around with some python and put something together.  My references are all in bibtex.  I would like to construct a graph of the citations.


I have an application running under Ubuntu that tries to consume all available memory. Is there a way to specify and restrict the allocations available for a given application?

I'm running pdftoppm to convert a user-provided PDF into a 300DPI image.  This works great, except if the user provides an PDF with a very large page size.  pdftoppm will allocate enough memory to hold a 300DPI image of that size in memory, which for a 100 inch square page is 100*300 * 100*300 * 4 bytes per pixel = 3.5GB.  A malicious user could just give me a silly-large PDF and cause all kinds of problems.  So what I'd like to do is put some kind of hard limit on memory usage for a child process I'm about to run--just have the process die if it tries to allocate more than, say, 500MB of memory.  Is that possible?  I don't think ulimit can be used for this, but is there a one-process equivalent?


In the Twilight books, how many vampires have special powers?  In the novella - The Short Second Life of Bree Tanner - Riley tells the newborns that only about 2% of vampires have special powers. At first I thought this was accurate, but then I started thinking about it; it makes sense that the Volturi have special powers - they're the elite vampire police, of course they're made up of the special vampires - but more than half of the Cullens have special powers, which seems really rare.  Did Riley just lie to the newborns to discourage them from thinking they had powers? Or was he correct?

In the Twilight universe, some vampires gain no powers when they turn (you know, except for diamond-hard skin, strength enough to lift a car, regeneration, and being able to run at 100 miles per hour).  On the other hand, some gain additional powers. Edward can read minds. Alice can see the future. Chelsea can manipulate people's emotional bonds.   This is because the nature of vampification is to enhance the qualities that someone already has. Those humans with latent powers get full-fledged powers when they turn, whereas humans without such powers simply gain enhanced personality traits.   How common are vampires with special powers? Clearly most of Carlisle's coven has such abilities, as do many of the Volturi, but is this the norm, or are powers more rare among vampirekind as a whole?


I've just started editing pictures on my Windows 10 Laptop (Asus) with Lightroom. Unfortunately when I upload the picture to my iPhone 8 the colors look different. It's such a pity because the overall result is different.   I started investigated and I realized that it might be related to the color profiles (?), but I haven't obtained any result really.   So I'm asking you guys, How can I make the colors on my screen on Windows 10 looks the same as the colors on my iPhone 8?  EDIT I might be not clear, I would like to see a picture the same on my laptop and on my iPhone, in particual I would like the laptop to match the iPhone color (so I have to change some setting in the laptop not in the phone).   The other similar question says that one's a to change the monitor calibration, but I have already gone through that and there are still differences between my pc screen and and Iphone.

Each display device renders colors in their own way. E.g. Apple's retina display renders colors in a more vivid way then an LG display device. The photo editor has to deal with this problem. I use my own taste when performing color correction or improving (selective) color saturation. Sadly, when a color suits my taste on my screen, it doesn't on another screen.   How can I find the ideal color saturation balance taking multiple display devices in mind?


my exercise is to proof the following: if $(x_n)_{n\in\mathbb N}$ is a positive sequence, and if $$\lim_{n\rightarrow+\infty} x_n =x,\,\, \mbox {where } x>0$$ then $$\lim_{n\rightarrow+\infty} \log x_n=\log x$$ I have no idea how that works and I would be happy if someone could help me.  EDIT: I am not allowed to use the information that the logarithm is a countinous function.

Proof that Limit of the Log is the Log of the Limit. What is the intuition behind this statement?


I am in a similar situation as this poster except I have Windows 7 Pro: I have SSD which is the C drive which stores windows and a 1TB hard drive. I have created a CD with an image of Ubuntu. I'm still pretty new to all this so need a bit of hand holding!    I'm not clear from his post whether or not he has partitioned his hard drive prior to installing Ubuntu or not.   However judging from the response there 2nd hard drive sdb does not appear to be partitioned. The responder (Mitch) goes on to partition the drive using the Ubuntu installer as shown.    In my case I already have files stored on the second drive, can I still safely use the Ubuntu installation software to partition software? Or would it be better to use a different piece of software to partition the hard drive prior to install? Obviously I don't want the existing files to be wiped (although I have backed them up). FYI, I've never partitioned a hard drive before.  Also I noticed that other answers to the same problem suggest disconnecting the windows hard drive first.    2 ways, depending on exactly how you want to choose what OS you want to boot into.   You want to choose via the BIOS boot menu: Disconnect the current Windows drive Connect the other drive Install Ubuntu Choose the OS during the BIOS boot sequence You want to choose via the GRUB menu: Leave the Windows drive connected Connect the other drive Install Ubuntu to the new drive (be careful here that you choose the correct drive!) At boot time, you will be presented with a menu, allowing you which OS to boot into   As well as being safer (in that your Windows drive won't be wiped) especially important in my case as I don't have the capacity to back it up.   Is there any major advantages between choosing the OS via the BIOS as opposed to the Grub drive? FYI... I'm not even sure what a Grub drive is, I'm just looking for the easiest/quickest solution.  Mitch's original response seems to be the the GRUB based solution. Is this correct?   However all I have to do to amend Mitch's solution to the BIOS based one is to physically disconnect the windows drive after switching the boot to DVD drive in BIOS and then follow Mitch's instructions for the rest but having one drive instead of two.  I then reconnect the windows drive afterwards.  Do I have to make any other changes to the BIOS after this?

I have been trying for a week to install (not live cd) Ubuntu on an external drive.  I am totally new to Linux and would love to try it out. That's why I want to install it on an external drive and not dual boot.   I used two USBs, one with a live Linux system, and another to install it onto. I chose the boot location as the external hard drive when installing Linux. But when I boot the PC (without the drive inserted)  GRUB appears and stays there. However when the drive is inserted and I boot the PC GRUB appears and gives me the option to go to Ubuntu.   So it seems as if Ubuntu is installed on the USB, but something important for booting seems to be installed on the PC and therefore when I use the drive on a different PC it doesn't boot (which is the main reason I'm installing Linux).   Please help me fix this!


I have a basic question, mainly about the similarities and differences between  (DS) and  (ML). When I put it up on Stack Overflow, someone want to delete my post because he/she pointed out that my question is a question unrelated to programming. Fine. And then I went to this site and I put forward the question, but some people voted it down again.  After that I entered the  Stack Exchange site, but I found there was not a label for data science on that at all. What's more, when I was about to ask that, I had to wait for 40 minutes since I had asked a question on one of your subsites even though I had deleted it. So I am wondering where can I post it so as to get kind answers?  On top of that, I have a suggestion: Could you Stack Exchange provide suggested sites to those who posted inappropriate questions or move the posts to correct sites automatically so that they do not have to find one from the overall 175 sites and wait for an additional 40 minutes intervals?  This is definitely an inefficient process and a pure waste of time, for me, and for those patient teachers.  Edit: @PolyGeo reminded me that I should ask only one question rather than three in each post. It really makes sense, but the point is, can't this problem be solved by just one edit instead of deleting it and finding somewhere else and waiting for a long time? Besides, different people hold different opinions or doubts on my question. Some may say my question is excursive. What can I do?  Following @PolyGeo's advice, I modified my original question as follows (I am not going to ask here; please do not say I am out of topic). And my question again, where can I post?     Recently I took part in an online project about data science, I   learned some frameworks such as Pandas, NumPy, and Sklearn, some basic   knowledge, like kNN, linear regression, regularization, logistic   regression and classification/regression trees. Although I have   finished the course, I am still having a hard time writing my resume   for an application of MS, describing the relationship between what I   have learned with artificial intelligence (AI), or machine learning. Since   I am going to pursue the field of AI, how can I figure out the   similarities between DS and ML/AI so as to express my previous work?      A couple of days ago, I glanced over Coursera and found the   machine learning course provided by professor Andrew Ng is extremely   similar to my previous course except neural networks. My course did   not cover that.      In a nutshell, my question is, what are the links between what I   have learned with machine learning or artificial intelligence?

I just found  , and I must say I found it very useful; however, it was closed as "Off topic". Now, it hasn't generated all that many page views, but I would have loved it if it was open, in case something new came up in the past year it was closed.   The "Off topic" specification doesn't exactly explain what the problem is with the question; I see the point for Stack Overflow, given there is no actual coding problem discussed - but a user in that post points out:     (That aside, prepare for your question to be closed, it's a bit too close to "please provide me a list of", which isn't muchly appreciated)   Now, the thing is, a lot of times I actually would appreciate greatly a "provide me a list of" question, like in this case - however, I can see the point in this posting in particular not being on-topic for Stack Overflow.   My question then is - is there a place where such "listing" questions about computer software in general can be asked? I don't think it would fit in programmers.SE, and one may think superuser.com would be appropriate - but then again, its purpose could be understood as specific questions about how to do more advanced stuff with existing software, thereby excluding again listing questions.   If that is so, then where do such question belong? If Super User on the other hand is appropriate, wouldn't the referred post be better off moved to Super User, and opened for contributions there - instead of sitting on Stack Overflow closed?


Can anyone suggest or recomend a suitable Graphics drive? I can only find these for Windows OS. lspci gives VGA info:   VIA Technologies KM400/KN400/P4M800 S3 Unichrome (rev 01)   When running "Try Ubuntu without installing" from a UnetBootin USB stick or booting from a clean Ubuntu Hard Disk install the screen "The system is running in low graphics mode" is displayed, from which there is no recovery. Pressing Enter (OK) displays a further 4 options but none can be selected with either mouse or keyboard. During an install (twice now) all graphics display perfectly.

Note: This is an attempt to create a canonical question that covers all instances of "low-graphics mode" error that occurs to a user, including but not limited to installation of wrong drivers, incorrect or invalid lightdm greeters, low disk space, incorrect installation of graphics card like ATI and Nvidia, incorrect configuration of xorg.conf file while setting up multiple monitors among others. If you are experiencing the "low-graphics mode" error when trying to login but none of the following answers work for you, please do ask a new question and then update the answers of this canonical question as and when your new question gets answered.   When I try to boot into my computer, I am getting this error:  The system is running in low-graphics mode Your screen, graphics cards, and input device settings could not be detected correctly. You will need to configure these yourself.   How do I fix the failsafe X mode and login into my computer?  Answer index:


When trying to update, I received the following error message: sudo apt update Obj:1 http://archive.canonical.com/ubuntu focal InRelease . . . Err:7 http://ppa.launchpad.net/compiz/ppa/ubuntu focal Release   404  Not Found [IP: 91.189.95.85 80] Des:8 http://ky.archive.ubuntu.com/ubuntu focal-backports InRelease [101 kB] Reading package lists... Done E: El repositorio "http://ppa.launchpad.net/compiz/ppa/ubuntu focal Release" does not have a Release file. N: Updating from such a repository can't be done securely, and is therefore disabled by default. N: See apt-secure(8) manpage for repository creation and user configuration details.. E: Release file for http://security.ubuntu.com/ubuntu/dists/focal-security/InRelease is not valid yet (is not valid for another 4h 45min 31s). Release file for this repository. E: Release file for http://ky.archive.ubuntu.com/ubuntu/dists/focal-updates/InRelease is not valid yet (is not valid for another 4h 45min 44s). No Release file for this repository. E: Release file for http://ky.archive.ubuntu.com/ubuntu/dists/focal-backports/InRelease is not valid yet (is not valid for another 4h 46min 10s). No release file for this repository.  What's wrong with this, the same error I received when I install MySQL?

When updating, I get the following error message:   W: The repository 'http://ppa.launchpad.net/mc3man/trusty-media/ubuntu xenial Release' does not have a Release file.   Here, I find another statement on this error:   This recommends removing certain PPAs; and, I'm not sure if I should do that since it might mean not getting the updates that I need.    Is this what I should do?


Suppose, I type the website name www.yahoo.com in my browser. Forward DNS lookup will fetch us the IP address of the server but how does the client (browser) know the port number that the application is running on?

This is a  about DNS/Hostnames resolution to IPs/Ports   Example 1  I'm running a web server on port 80 and another on port 87. I would like to use DNS so that www.example.com goes to port 87. How can I accomplish this using DNS only?  Example 2  I'm running a service on my server on a non-standard port. How can I get clients to connect to this non-standard port automatically? Can I use DNS? Is there some application specific support where DNS could indicate the IP and Port?   Example 3  Do some application protocols specifically support hostname awareness, and allow special actions to be taken based on this information? Are there other questions on Server Fault that cover some of these?  Commandeering: This question was originally asking about running IIS and Apache on the same server, but the same concepts can be applied to any server software receiving connections from clients. The Answers below describe the technical problems and solutions of using DNS and application protocol support to assign a port number for a client to connect.


Whenever I suspend my laptop, than resume, Ubuntu gets broken graphics. It looks like this:  Fullscreen windows look fine, but all the non-fullscreen windows have broken shadows and navigation buttons. GPU: NVIDIA GeForce GTX960M (with 375.39 propiretary driver)

NB: Nvidia has released an official fix; please see ,  and/or .  Upon waking up Ubuntu 16.04 from Suspend, the following graphical glitches appear around all windows, context menus, and similar:      This is currently known to affect the following NVIDIA cards running the proprietary drivers:  NVIDIA GeForce 610M, driver version 375.39, 340.102 NVIDIA GT 630M, driver version 375.39 NVIDIA GTX 650, driver version 375.39 NVIDIA GT 740M, driver version 378.13 NVIDIA GTX 745, unknown driver version NVIDIA GTX 850M, driver version 375.39, 378.13 NVIDIA GT 940M, driver version 375.39 NVIDIA GTX 950M, unknown driver version NVIDIA GTX 960M, driver version 378.13 NVIDIA GTX 970, driver version 375.39 NVIDIA GTX 970M, driver version 375.39 NVIDIA GTX 980 TI, unknown driver version NVIDIA GTX 1060, driver version 375.26, 375.39, 378.09 NVIDIA GTX 1070, driver version 378.09  The above above list has been sourced from reports from other users here on AU,  thread, and  thread. NB: This is be no means an exclusive list. It probably effects nearly all Nvidia cards.  Furthermore, this issue has been replicated on a clean install where the only change was a software update and the installation of the latest NVIDIA drivers.  What is going on, and how can it be resolved?


When I set my image to medium, the transparent background goes black, and detail is lost:  Normal:    Medium:    Small:    Using HTML <img> tag    And here is the image itself:

on Stack Exchange using URL modifiers, any transparent elements or backgrounds will be lost in the conversion.  Exactly how the missing transparency is handled can vary depending on the modifier being used, and the size of the image being converted  When testing with a  image:   , , : Transparent background was converted to black , , : Transparent background was converted to white : Image was not modified (Image was smaller than 1024×1024) HTML modifier: Transparency is preserved   When testing with a  image:    , , , , , : Transparent background was converted to black HTML modifier: Transparency is preserved    was marked as  back in 2013, so it seems odd that this issue would still be around.    Original (1000x298): https://i.stack.imgur.com/s1dWm.png      Large Thumbnail (640x191): https://i.stack.imgur.com/s1dWml.png      Medium Thumbnail (320x95): https://i.stack.imgur.com/s1dWmm.png      Small Thumbnail (160x48): https://i.stack.imgur.com/s1dWmt.png      Big Square (160x160): https://i.stack.imgur.com/s1dWmb.png      Small Square (90x90): https://i.stack.imgur.com/s1dWms.png      ?s=64 (64x64): https://i.stack.imgur.com/s1dWm.png?s=64      Custom HTML: <img src="https://i.stack.imgur.com/s1dWm.png" width="400">      -Thanks to , , and  for documenting


so I am developing a library for dealing with trees (as graph structures). I already have a class Tree that implements many things.  I now want to create two new classes, let's say Tree2D and Tree3D, that will inherit from Tree, and for which I will add 2D and 3D geometry.  As I plan to have several methods that can be applied to both 2D and 3D geometry, I would like to create a class TreeGeometry, in which I will implement those methods, and then make Tree2D and Tree3D inherit from it.  However, I do not want that someone can instance TreeGeometry objects directly. In a sense, I want this class to be "private". I've read about abstract class, so I think it might be the appropriate thing, but I'm not sure that I can make such an abstract class inherit from Tree.   Any advice on how I should proceed ?

I am coding a small Python module composed of two parts:   some functions defining a public interface, an implementation class used by the above functions, but which is not meaningful outside the module.   At first, I decided to "hide" this implementation class by defining it inside the function using it, but this hampers readability and cannot be used if multiple functions reuse the same class.  So, in addition to comments and docstrings, is there a mechanism to mark a class as "private" or "internal"? I am aware of the underscore mechanism, but as I understand it it only applies to variables, function and methods name.


I'm trying to do the following:  foreach (var item in Assembly.GetExecutingAssembly()                              .GetTypes()                              .Where(i => i.GetInterfaces()                              .Contains(typeof(ITabItem)))) {     container.RegisterType<ITabItem, item>(nameof(item)); }   But I'm getting this error on item in the RegisterType method:   Error CS0118  'item' is a variable but is used like a type  I know that I'm passing an object type but how do I get around this?  EDIT: this is the non-dynamic way that works.  container.RegisterType<ITabItem, AdminViewModel>(nameof(AdminViewModel)); container.RegisterType<ITabItem, OwnerViewModel>(nameof(OwnerViewModel));

What's the best way to call a generic method when the type parameter isn't known at compile time, but instead is obtained dynamically at runtime?  Consider the following sample code - inside the Example() method, what's the most concise way to invoke GenericMethod<T>() using the Type stored in the myType variable?  public class Sample {     public void Example(string typeName)     {         Type myType = FindType(typeName);          // What goes here to call GenericMethod<T>()?         GenericMethod<myType>(); // This doesn't work          // What changes to call StaticMethod<T>()?         Sample.StaticMethod<myType>(); // This also doesn't work     }      public void GenericMethod<T>()     {         // ...     }      public static void StaticMethod<T>()     {         //...     } }


In the manual of sudo I need to search for -k so I tried this:  man sudo | grep '\-k'   But it would result a paragraph be half-written on the output:  sudo -h | -K | -k | -V              Similar to the -k option, except that it removes the user's  -k, --reset-timestamp   Instead I tried printing the whole manual and color the search phrase with:  man sudo | grep '\-k\|$'   But since the manual page is too long, I can't scroll up enough to reach the beginning of the output (Note: I don't want to change the Scrollback lines in the profile settings of Terminal).  So I need to use more or less commands, to be able to reveal the output by page, so I tried:  man sudo | grep '\-k\|$' | less   But of course it doesn't work, because pipe runs the 2nd command on the 1st command.  Any idea how to redirect pipe?  Or make grep print whole paragraph instead of one line? (the lines are based on Terminal's window size)

Is there a option to search within manpages?


I have tried a lot of different settings, but I'm not sure how to make the material preview to bake the same. I've tried mixed shaders in world settings with diffuse and glossy, but they all turn out pretty dark. Thank you in advance ! It's a metal material, and I have so far 5 lights.  This is what it looks like in material preview:  Rendered view:  Current Bake settings:  Current World settings:

When I apply a glossy shader to the material of my text, the text becomes just black. Why?    I have lamp and everything, but the problem persists. The text is red before I add the glossy shader.  I'm using Cycles render.   Thanks!


So in a OLS simple linear regression, the regression line passes through mean of X and mean of Y.   It also passes through the point (mean X, mean Y).  Is this still true for a OLS multivariable regression.  Does that regression line pass through the mean of Y and all the Xis?  Does it also pass through the points (mean Xis, mean Y).  Thanks!

How do you show that the point of averages (x,y) lies on the estimated regression line?


I understand that when we are doing PCA, we are choosing an axis where the data has the maximum amount of variance. Then, we are restricted to choosing only axes which are orthogonal to the first axis we chose.  That means that if we want to maximize some kind of average or sum of the variances of all axes that we chose, we may not get to an optimal solution with PCA, right?  From what I understand, PCA chooses the axis with most amount of variance at each step. So does that make it greedy?

Christopher Bishop writes in his book Pattern Recognition and Machine Learning a proof, that each consecutive principal component maximizes the variance of the projection to one dimension, after the data has been projected to orthogonal space to the previously selected components. Others show similar proofs.  However, this only proves that each consecutive component is the best projection to one dimension, in terms of maximizing the variance. Why does this imply, that variance of a projection to say 5 dimensions is maximized choosing first such components?


I just want to override the browser closing message so i tried to do the following:  <script type="text/javascript">  window.onbeforeunload = closeEditorWarning;  function closeEditorWarning(){ return 'AAAAAAA' }  </script>   but unfortunately it doesn't work! what should i do to make it work?

I need to warn users about unsaved changes before they leave a page (a pretty common problem). window.onbeforeunload = handler  This works but it raises a default dialog with an irritating standard message that wraps my own text. I need to either completely replace the standard message, so my text is clear, or (even better) replace the entire dialog with a modal dialog using jQuery. So far I have failed and I haven't found anyone else who seems to have an answer. Is it even possible? Javascript in my page: <script type="text/javascript">        window.onbeforeunload = closeIt; </script>  The closeIt() function: function closeIt() {   if (changes == "true" || files == "true")   {       return "Here you can append a custom message to the default dialog.";   } }  Using jQuery and jqModal I have tried this kind of thing (using a custom confirm dialog): $(window).beforeunload(function () {     confirm('new message: ' + this.href + ' !', this.href);     return false; });  which also doesn't work - I cannot seem to bind to the beforeunload event.


How can I create these types of gradient images in Photoshop or Illustrator?  I don't understand how they made these swooshes.    Lower picture is what I came up with... but it's not the same.  Your help is much appreciated.   Greetings, Pim

I need to create an image like this, but I do not know what software or technique to use. I tried to use the Mesh Tool in Illustrator, but the result is odd, also I tried to blur an image in Photoshop, but I need to use some particular colors.


As you can see from the below image, the black top bar seems to stop when I scroll the page to the right.    Can this glitch be fixed?

Update  A month Several months later, a new top bar, and the bug still exists. An answer has already been posted that would fix the bug, so is this something that the dev team plans on fixing?  There are also a host of other problems caused by this, especially on the  and . Again, this would be fixed with  html{min-width:1000px;}   There is a slight bug with small windows on both the new meta and main site(s)?, shown here. The problem is that the top bar coloring doesn't stretch across when you resize and scroll left or right.        On Meta, when a horizontal scroll bar is needed, the black background will only be as wide as the width of the viewport, but when you scroll the coloring will not shift.  To reproduce:   Make screen as large as possible, or wait until the menu bar starts expanding Make it smaller and smaller until horizontal scrollbar appears, then scroll left and right.


In Game of Thrones, I saw many nude and sex scenes. Are those scenes telecast on TV without censoring, and are they performed by the real actresses or some stand in?

I have recently started watching Game of Thrones and I noticed that it has many well known actors like Peter Dinklage, Emilia Clarke, Sean Bean, Natalie Dormer and so on.  By famous I mean, actors that are seen in many other movies.  Did these actors really go nude, that is, the bodies we see in the series are their real bodies or have body doubles been used?  I read an article where they explained how they used body double for Lena Headey in the nude penance walk scene of Cersei Lannister. So for other actors (like Emilia Clarke or Natalie Dormer) who are seen naked, was it a real body or just another body double?


I am just starting to learn about multivariable functions. I was thinking of the conditions of such a function.  Is there a function, with domain in $\mathbb{R}^2$ and range in $\mathbb{R}$ such that it is defined for all of $\mathbb{R}^2$, and that for every pair of numbers in its domain, there is a single output number, and for every output number, there is a single pair of numbers in its domain (1 to 1 correspondence between $\mathbb{R}^2$ and $\mathbb{R}$).   I thought about it a bit, and it seems that the function can be represented with a 3d graph, and it must be that every cross section parallel to the x-y plane is a point.  I don't believe that it is possible, but I don't know this for sure, and I would like to know for sure.

Could any one give an example of a bijective map from $\mathbb{R}^3\rightarrow \mathbb{R}$?  Thank you.


I have , a Canon 50mm f/1.8 STM:    I would like to purchase a polarizing filter for the lens but I can't seem to find one. A quick search on Amazon, for example, yields plenty of 49mm and 52mm filters but none for a 50mm lens.  Am I looking for the wrong number? Am I looking in the wrong places?

I was looking to get a circular polarizing filter and an UV filter for my Canon 550D, 18-135mm lens. When I checked online I found these filters came in different sizes, like 62mm, 67mm, 72mm, 77mm. How do I know which is right?  Also, will there be any degradation of photo quality if I put both these filters on the lens?


I am reading about the Brown-York formalism in . The document says that if we consider a deformation of our end points $(q,t$) in position and time, then the classical mechanics action varies by (equation (65) on p.76) \begin{align}         \nonumber \delta S^1[q^a(t)] := &\int_{t_1}^{t_2} \left( \frac{\partial L}{\partial q^a} - \frac{\mathrm{d}}{\mathrm{d}t} \frac{\partial L}{\partial \dot{q}^a} \right) (\delta q^a - \dot{q}^a \delta t) + \frac{\partial L}{\partial \dot{q}^a}\delta q^a\Big|_{t_1}^{t_2} \\         &- \left( \frac{\partial L}{\partial \dot{q}^a} \dot{q}^a - L \right) \delta t\Big|_{t_1}^{t_2}.\tag{65}     \end{align} Could somebody tell me how we got to this? Here’s what I’ve tried: \begin{align}     \delta S^1(q,\dot{q},t) = \frac{\partial S^1}{ \partial q} \delta q + \frac{\partial S^1}{ \partial \dot{q}} \delta \dot{q} + \frac{\partial S^1}{ \partial t} \delta t,\tag{a} \end{align} where the suppressed indices of the vectors $q$ and $\dot{q}$ are implied. The first term gives $$\begin{equation}     \frac{\partial S^1}{ \partial q} \delta q  = \int_{t_1}^{t_2} \frac{\partial L}{\partial q} \delta q \mathrm{d} t. \end{equation}\tag{b}$$ The second term gives $$\begin{align}     \nonumber \frac{\partial S^1}{ \partial \dot{q}} \delta \dot{q} &= \int \frac{\partial S}{\partial \dot{q}} \delta \frac{\mathrm{d}}{\mathrm{d} t} q \mathrm{d} t\\     &= \frac{\partial L}{\partial \dot{q}} \delta q\Big|_{t_1}^{t_2} - \int \frac{\mathrm{d}}{\mathrm{d} t} \frac{\partial L}{\partial \dot{q}} \delta q \mathrm{d} t. \end{align}\tag{c}$$ To get to the last line I have used integration by parts. The third terms can be written as $$\begin{align}     \nonumber  \frac{\partial S^1}{ \partial t} \delta t &= \int_{t_1}^{t_2} L \mathrm{d}t \delta t \\     \nonumber  &= L \delta t |_{t_1}^{t_2}\\     &= \left( p^a \dot{q}_a - E \right) \delta t |_{t_1}^{t_2}. \end{align}\tag{d}$$ The combination of the three terms leads to $$\begin{align}     \delta S^1 &= \int_{t_1}^{t_2} \left( \frac{\partial L}{\partial q} - \frac{\mathrm{d}}{\mathrm{d}t} \frac{\partial L}{\partial \dot{q}} \right) \left( \delta q + \dot{q} \delta t \right) + \frac{\partial L}{\partial \dot{q}}\delta q\Big|_{t_1}^{t_2} + (E + L)\delta t |_{t_1}^{t_2}. \end{align}\tag{e}$$

I was trying to derive equation (65) in the following review:    This slightly unusual then usual classical mechanics because it includes a variation of time also, $\delta t$.  Usually one would define, $$\delta S~=~ \int \left[ L \left(\tilde{q}(t),\dot{\tilde{q}}(t),t\right) -  L \left(q(t),\dot{q}(t),t\right)\right] dt , $$ where,  $$\tilde{q}~=~q+\delta q. $$  We have then (before applying int by parts),  $$ \delta S ~=~ \int \left(\frac{\partial L}{\partial q}\delta q +\frac{\partial L}{\partial \dot q}\delta \dot q\right)dt.$$  How does one proceed if both $q$ and $t$ vary and further that $q$ depends on a varying $t$?  Is the definition now  $$\delta S~=~ \int \left[ L \left(\tilde{q}(t+\delta t),\dot{\tilde{q}}( t+\delta t), t+\delta t\right) -  L \left(q(t),\dot{q}(t),t\right)\right] dt~?  $$  If so how does one proceed?


Which of the following is correct - or are both of these examples grammatical?        This includes me, my friend and my brother.   This includes myself, my friend and my brother.      EDIT NOTE:  Pleas note that this question here:  only talks about the use of "myself" when it refers to the same person as the Subject of the verb. This is not the case in examples (1) and (2) above.

What are general guidelines for the use of "me" and "myself"?     Did I describe me or did I describe Maria?   OR     Did I describe myself or did I describe Maria?


Not sure if this is the right Stack Exchange site, but I bought a brand new ASUS K55N laptop (6 GB RAM) but it says only 1.46 GB is usable.  Info:   Windows 8.0 x64 System reports 6 GB but only 1.46 usable msconfig Boot tab does NOT have memory checked in advanced options BIOS reports 2018 GB RAM Called ASUS, apparently this model has 1 2 GB stick and 1 4 GB stick   This led me to believe that the 4 GB stick was corrupt but I ran the Windows memory diagnostic utility and came back with no errors.    Any thoughts? Other things I should try?  UPDATE:   Just saw that it has 4 GB as hardware reserved! That can't be right? How can I fix that?

I have a new HP Z800 Workstation, running Windows 7 Enterprise 64 bit. Z800 Specs are .  The machine has 4GB of RAM -- windows reported 1.99GB available, 2GB was "hardware reserved".  I added another 2 GB and windows reports that there is 6GB of physical RAM, but now 4GB is "hardware reserved".  The BIOS sees the full RAM amount as well.  The video card is an nVidia Quadro FX 580, so it shouldn't be using any shared memory at all.    Why is all my extra RAM marked as "hardware reserved" in Windows 7?


I am using QGIS 2.8.1. I have installed the OpenLayers Plug, however it is not showing up in my list of plugins. I confirmed it's installed in the plugin manager.  Is anyone else having this issue?

I have just installed QGIS 2.6 and have installed the OpenLayers plugin. It lists the OpenLayers plugin in the installed tab, however, I can't add a layer to my project as it does not give the option to add an OpenLayers layer as previous versions do.  Does anyone know what is going wrong here?


I have two domains named www.example.com and www.example-alias.com , Both domain are pointing same location in the server. I need to do 301 redirection for www.example.com to www.example-alias.com  <IfModule mod_rewrite.c> RewriteEngine On         RewriteCond %{HTTP_HOST} ^(www\.)?example\.com [NC] RewriteRule ^(.*)$ http://www.example-alias.com/$1 [R=301,L] </IfModule>   It is working only for www.example.com home page, not for any inner page. How do I redirect www.example.com inner pages to www.example-alias.com. Similar   www.example.com/service to www.example-alias.com/service

This is a  about Apache's mod_rewrite.   Changing a request URL or redirecting users to a different URL than the one they originally requested is done using mod_rewrite. This includes such things as:   Changing HTTP to HTTPS (or the other way around) Changing a request to a page which no longer exist to a new replacement. Modifying a URL format (such as ?id=3433 to /id/3433 ) Presenting a different page based on the browser, based on the referrer, based on anything possible under the moon and sun. Anything you want to mess around with URL   Everything You Ever Wanted to Know about Mod_Rewrite Rules but Were Afraid to Ask!  How can I become an expert at writing mod_rewrite rules?   What is the fundamental format and structure of mod_rewrite rules? What form/flavor of regular expressions do I need to have a solid grasp of? What are the most common mistakes/pitfalls when writing rewrite rules? What is a good method for testing and verifying mod_rewrite rules? Are there SEO or performance implications of mod_rewrite rules I should be aware of? Are there common situations where mod_rewrite might seem like the right tool for the job but isn't? What are some common examples?   A place to test your rules  The  web site is a great place to play around with your rules and test them. It even shows the debug output so you can see what matched and what did not.


Let the random variables $\xi_1, \xi_2, \ldots, \xi_n$ be independent, have an exponential distribution and expectation of each is 2. Are $\sum_{i=1}^{n} \xi_i / i$ and $\max\xi_n$ equally distributed?

Let $X_1, X_2, \dots$ be i.i.d. exponentially distributed RVs. For $n = 1,2,\dots$ consider: $Y_n := \max(X_1, X_2, \dots, X_n)$ $U_n := \sum_{i=1}^{n}\frac{X_i}{i}$ Show that $Y_n$ and $U_n$ have the same distribution   What I've tried: $P(Y_n<y)= P(X_i<y)^n = (1- e^{\lambda y})^n => P(Y_n=y) = n(1- e^{\lambda y})^{n-1}$ But I get stuck with $U_n$. I tried an MGF, $U_n$ evaluates nicely but then $Y_n$ gets messy. Any thoughts?


I recently moved from windows to lubuntu 18.04 and i've installed wine 3.14 following this guide (). How can i update wine to 3.15 without losing all the data of the application that i'm using (for example games saves)? Thanks in advance.

I just formatted my laptop and got rid of Windows 7. Yay ;-)  Either way, Wine is version 1.3.28 here, and I need it to update (there are some bugfixes) for my game so I need a more recent version. This is the version I got from the Ubuntu software manager. How do I get a more recent version or Wine version 1.4?  I've already added the repo into my repository, but still no updates.  Thanks in advance.


Why can't I see matcaps having pressed F12? I have them in the 3D View but the render shows just the "basic" material.

Is it possible to use Matcap materials as an actual material for a model so that I can render with it? There are certain parts that I want to apply specific Matcaps textures to but I want to actually use them to render and not just for sculpting purposes.  Is this at all do-able?


I was reading a book and I found the following equation. I'm not good at physics and I couldn't understand where does it come from, can anyone explain me why is it valid? $$ \mathbf E = -\nabla\phi - \frac{\partial\mathbf A}{\partial t} $$ Thank you!

Can anyone explain where the following expression for the electric field vector comes from? $$ \mathbf E(\mathbf r,t) = -\nabla \phi(\mathbf r,t) - \frac{\partial}{\partial t}\mathbf A(\mathbf r,t)  $$  where $\phi$ and $\mathbf A$ are the scalar and vector potentials, respectively.  Presumably it can it be derived from Maxwell's Equations?


I'm trying to style the first word of a specific sentence using only CSS (i.e. I can't change the HTML). I feel that I'm close to the answer but I can't seem to get it right. The CSS selector I'm using is:  main > h2:nth-child(2)+p {   color: red; }   I can't post the HTML here cause it's not getting formatted right, but it can be found on this JSFiddle:   Thanks,  brld  Again: I cannot change the HTMl, or add any sort of Javascript.

This one has me kind of stumped. I want to make the first word of all the paragraphs in my #content div at 14pt instead of the default for the paragraphs (12pt). Is there a way to do this in straight CSS or am I left wrapping the first word in a span to accomplish this?


I just completed my portfolio website and uploaded it to a subdomain of my parent website.  Now the website works fine except that my main styling CSS doesn't work, no errors in the console, nothing. It just doesn't work. I verified it by placing the CSS in <style> tags in the head of my index.html and it worked but then it messed up with my paroller.js plugin, no errors in the console but paroller.js stopped working.  If I include the CSS like I've included it offline (in a separate file, like I always do and it always works on the same web server) it just doens't work. If I include it in the index.html my paroller.js plugin stops working.  Everything works fine offline.  I'm importing the CSS like this - <link rel="stylesheet" href="folername/filename.css"> Please note that I am loading multiple CSSs and this one is the first to be loaded. All other CSSs seem to be working.  The webpage is located at -

I have noticed that some browsers (in particular, Firefox and ) are very zealous in using cached copies of .css and .js files, even between browser sessions. This leads to a problem when you update one of these files, but the user's browser keeps on using the cached copy. What is the most elegant way of forcing the user's browser to reload the file when it has changed? Ideally, the solution would not force the browser to reload the file on every visit to the page.  I have found  and  suggestion to be useful. It turns out there is a term for this: auto-versioning. I have posted a new answer below which is a combination of my original solution and John's suggestion. Another idea that was suggested by SCdF would be to append a bogus query string to the file. (Some Python code, to automatically use the timestamp as a bogus query string, was .) However, there is some discussion as to whether or not the browser would cache a file with a query string. (Remember, we want the browser to cache the file and use it on future visits. We only want it to fetch the file again when it has changed.)


If I invoke  DYLD_X=foo /bin/bash -c 'echo "<$DYLD_X>"'   the output is  <>   while  MY_VAR=bar /bin/bash -c 'echo "<$MY_VAR>"'   outputs  <bar>   Switching to Bash 5:  DYLD_X=foo /usr/local/bin/bash -c 'echo "<$DYLD_X>"'   the output is  dyld: warning, unknown environment variable: DYLD_X <foo>   I would think that dyld should only monitor variables that it knows about. Is there anything that can be done to control this behavior?  MacOS Mojave 10.14.4

In shell scripts used for unit testing with dynamic libraries in a directory other than the typical @rpath, I have previously been able to set DYLD_FALLBACK_LIBRARY_PATH to set the directory containing the libraries. Under 10.11.1, bash seems to ignore attempts to set this environment variable:  $ sh -x testscript.sh + DYLD_FALLBACK_LIBRARY_PATH=/Users/something/testinglibs + export DYLD_FALLBACK_LIBRARY_PATH + exec printenv   and DYLD_FALLBACK_LIBRARY_PATH is not present in printenv's output.  Is this a security-related hack in 10.11's shell? I haven't been able to find this change documented in man pages or online.


I have 9 microcontrollers  and I have connected the RX and TX lines of 8 of them in parallel. My configuration is in master-slave. The master microcontroller send data to one of the 8 RX lines but only one of them can respond at a time. The cable length is about 3 to 5 metres between each node.  I have two questions. My test was done with 2 slaves instead of 8. UART at 9600bps.  If I setup the TX lines of the slaves as Open Drain it works fine, but the signal doesn't have steep ramps. I thought this happens due to Pull-up resistors. And I also think that is going to be better with 8 slaves on the bus, right?  Why doesn't that topology work if the TX lines of the slaves are not Open Drain?  I managed to make it work by disabling the transmit of the UART in all of them except one, and it worked fine. I had two slaves, so I disabled the one and left the other. Also I noticed that the edges of the signal was sharper. Why are they sharper in that case?  Regarding resistors: The value of the resistors for both RX and TX lines are 2.7KΩ. However the Open Drain topology would parallel the internal pull-up resistors. According to the datasheet that resistor is about 20KΩ at minimum. So, using a 2.7KΩ in the output would give us a total resistance of 2.52KΩ (20+2.7)/9. And the Open Drain would make a voltage divider 2.52KΩ + 2.7KΩ (Schematic 2). Which means with 8 slaves and Open Drain topology the signal will not go lower than 1V which is the threshold of the low level. Is that correct?  Wouldn't it be better to disable all the internal pull up resistors and place two (let's say: 4.7KΩ) only at the master side?  Distance: What is the maximum baud rate for such distance? I'm a little worried about the signal integrity. The test was done with 9600bps but I didn't notice any significant difference in 4800bps. The distortion of the signal didn't have a difference.  Voltage values are 3.3V for the UART bus.  Schematic 1. (all resistors are 2.7KΩ)        – Schematic created using   Schematic 2. (U4, U5, U6, U7, and U8 are omitted for simplicity).          EDIT: Thank you all very much about your answers so far. I wanted to point out that this is a question about UART only. I am not looking for alternative solutions. I'm just trying to find some answers about the above implementation.  EDIT2: Thank you very much for your answers! I ended up modifying a little my schematic. I disabled the internal pullup resistors of the microcontrollers and I placed external ones at the master's board. Their value would be around 1 KOhm to 3 KOhm. I have to do some tests more to decide the final value. I also replaced all series resistors with 130 Ohm.   I tested 5 slaves over 20 metre cable (with pullup 3 KOhm and 130 Ohm series resistors) and it worked fine.   Would it be better to add open drain/open collector line drivers on every TX lines?

I'd like to interface my main microcontroller's hardware serial port to more than one device at the same time. My understanding is that UART on my microcontrollers is based on an active-low 5V TTL.  (I know what I'm explaining here can be technically achieved by using more suited protocols, such as SPI and I2C, but my project requires to be only implemented using UART.)  Here's a pseudo-schematics chart of what I'm trying to achieve:         – Schematic created using   Please note that:   I don't want to use a second UART interface on the master, or any of the slaves. Only one slave at a time is going to transmit or send data on the line to the master. (e.g. If the slave 1 is transmitting data, slave 2 and 3 should remain idle.) Whatever the master is transmitting can, and should be received by all of the slaves. All of the slaves should be hot-pluggable, meaning they could be removed or inserted at any time. The RX and TX wires to the master are parallel between each slave, so no daisy chaining.   So, my questions are as follows:   Assuming the correct impedance is considered, I shouldn't need an additional circuit to transmit data from the master's TX line to any of the slave's RX line simultaneously. Is this correct? I understand that without current limiting resistors between slaves' TX line and the master's RX line, if any of the devices begin to broadcast data, the line between the devices will short circuit and I risk damaging them. Is this correct? Assuming the items 1 and 2 are correct:  a) Would just some current limiting resistors be enough to use?  b) Can I use 74-series logic gates instead of resistors? Between options a and b above, what route should I choose? For a reliable 115200 baud rate connection, will the switching frequency of a 74HC08 AND gate suffice to be incorporated?   EDIT: I'm well aware of other well-suited protocols such as SPI and I2C. There's a reason I'm using UART, and that's because the optiboot bootloader that is used on the master's mcu communicates over UART, albeit UART's obvious limitations.  Also, while daisy-chaining is definitely a clever approach, due to breaking the 4th requirement, it also breaks bootloader functionality.  The devices could also be USB-to-Serial chips, and using SPI-to-USB or I2C-to-USB would not be feasible in this project.  So, I'd appreciate if you could focus on the 6 questions listed here instead, and share your UART knowledge.


I have to prove that if a nonempty subset $S$ of $\mathbb{R}^n$ is both open and closed, then $S=\mathbb{R}^n$  Does anyone have an idea I am new to this stuff.

Proposition : The only sets in $R^n$ which are both open and closed are the empty set and $R^n$ itself.  I came up with the proof of this claim and I'd like to know if my proof is correct.  Proof:  Let $S$ be the nonempty proper subset of $R^n$ which is both open and closed. Then $T = R^n-S$ is also a nonempty proper subset of $R^n$ which is both open and closed. Now take a point $s_0$ in $S$ and $t_0$ in $T$. Then we can consider a closed box $J_1$ which contains both $s_0$ and $t_0$.  The n-dimensional interval $I_1^k$ is defined by the inequalities   $s_k\le x_k \le t_k$ (k=1, 2, $...$, n ), where each $s_k$ and $t_k$ are the k-th coordinates of $s_0$ and $t_0$. Without loss of generality, assume that for all k, $s_k \le t_k$.  Here $J_1$ denotes the catesian product   $J_1$ = $I_1^1$ x  $\cdots$ x $I_n^1$   Now, bisect all of the n 1-dimensional intervals and the point $\frac {s_0+t_0}{2}$ will lie in the center of the bisected box. This point belongs to either $S$ or $T$. Say it belongs to $S$ then, rename it $s_1$ and the original $t_0$ to be $t_1$. Now again consider a box that has both points as vertices like the previous case and repeat the process.   Writing $I_k^m$ = [$s_k^m$,$t_k^m$],   we have  $t_k^m$ - $s_k^m$ = $\frac {t_k-s_k}{2^{m-2}}$  Then for each fixed k, the sup of all left endpoints must therefore be equal to the inf of all right endpoints, and their common value we donote by $b_k$ (actually we know this by Bolzano-Weierstrass).   Now we assert that b=($b_1$,$...$,$b_n$) is a limit point of $S$ and $T$. To see this, take any n-ball B(b; $r$). The point b of course belongs to each of the boxes $J_1$, $J_2$, $...$ constructed above, and when $m$ is such that $max_k\frac {t_k-s_k}{2^{m-2}}$ < r/2, this neighborhood will include $J_m$ and since $J_m$ contains both points of $S$ and $T$, b is a limit point of both sets. But since both sets are closed, they both contain b, which is a contradiction. Hence, the proposition is true.


Good day   I was trying to insert date into database and used the same solutions    What I am facing now that after I used this solution, it show for me   Java.nullPointerException   Also I have tried ((JTextField) jDateChooser1.getDateEditor().getUiComponent()).getText() and it did not worked with me and says cannot convert date to string.   here is my codes :        import java.util.Date;     import java.sql.*;      String Sql="insert into rect (recName,phoneNo,position,DOB,gender,Mstatus,nationality,quali,major,Uni,email,EngCom,AraCom,status,Stage,IntDate,source,interviewer,RecEval,comments,Attach) values (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?) ";       try {             Class.forName("com.mysql.jdbc.Driver");           con = DriverManager.getConnection("jdbc:mysql://localhost:3306/hr","root","");            Date date = jDateChooser1.getDate();        SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd"); String strDate = formatter.getDateInstance().format(date); java.sql.Date sqlDate = new java.sql.Date(date.getTime());           Date datex = jDateChooser2.getDate();          SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd");          String intrDate = format.getDateInstance().format(datex);          java.sql.Date sqlDatex = new java.sql.Date(datex.getTime());             ps= con.prepareStatement(Sql);             ps.setString(1, jTextField18.getText());             ps.setString(2, jTextField1.getText());             ps.setString(3, jTextField2.getText());              ps.setDate(4,sqlDate);              if(jRadioButton1.isSelected()== true){              ps.setString(5, jRadioButton1.getText());              }               else {              ps.setString(5, jRadioButton2.getText());              }             ps.setString(6, (String) jComboBox1.getSelectedItem());             ps.setString(7, jTextField3.getText());             ps.setString(8, jTextField4.getText());             ps.setString(9, jTextField5.getText());             ps.setString(10, jTextField6.getText());             ps.setString(11, jTextField8.getText());             ps.setString(12, jTextField9.getText());             ps.setString(13, jTextField10.getText());             ps.setString(14, jTextField11.getText());             ps.setString(15, jTextField12.getText());            ps.setDate(16, sqlDatex);             ps.setString(17, jTextField14.getText());             ps.setString(18, jTextField15.getText());             ps.setString(19, jTextArea1.getText());             ps.setString(20, jTextArea2.getText());             ps.setString(21, jTextField19.getText());                        int i =ps.executeUpdate();             if (i>0)             {                     JOptionPane.showMessageDialog(null, "Data is Saved");             }             else {                     JOptionPane.showMessageDialog(null, "Data is not Saved");             }         }         catch (Exception e){         JOptionPane.showMessageDialog(this, e.getMessage());         JOptionPane.showMessageDialog(null, e);         }

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 am running (and also new to) OS X El Capitan. I have a user cronjob that is using some basic commands that I got via brew. wget and s3cmd  I have the cronjob executing a shel script in my user bin, but the cronjob is not finding the commands and throwing mail messages at me that say...  script.sh: line 4: wget: command not found   but when I run the script myself it goes fine. I get this probably has something to do with the user that cronjob are running under and the PATH, but IDK how to go about changing it. Any ideas?

I want to set up a crontab on my Macbook Pro running Lion. I run the usual crontab -e and provide a quick job to see if everything is working ok ---  */10 * * * * wget -O - -q -t 1 http://site.local/cron.php   10 minutes later I see I've got some "mail" from the system stating ---  /bin/sh: wget: command not found   I do have wget installed as I can run the program from the command line  How do I fix this error? Does my crontab or .bash_profile require a shebang?


Want to get the IP address using Shell script. Without knowing the eth0 or eth1 or eth2 How to get the particular IP address.  I am not interest to get localhost address, want to get private IP address.

How can I get my own IP address and save it to a variable in a shell script?


I asked for assistance about a month ago, but haven't received a single response.  If I asked incorrectly or broke etiquette rules I am truly sorry.    My original question was this:     I ran 12.04 LTS forever without a hitch.  Realized I was falling behind, so I took the plunge.      First problem was that I had to take a phased approach; couldn't upgrade directly to 14.  But packages for 13.x were no longer available on US servers (I'm in San Diego).  I selected "Best Server", and it took me to Singapore.  All good.      First upgrade I did over SSH, from my LAN.  Went from 12.04 to 13.04.  It took a few hours, but went without a hitch.  Everything tested good.      Next upgrade (13.04 to 13.10) I did over SSH, from work.  Again took a few hours, but everything went smoothly.      When I got home I decided to go for the gold, and kicked off the final upgrade (from 13.10 to 14.04) from the local machine.  First I changed the source from Singapore back to the US.  Then I started the upgrade.  It went well, but eventually started returning errors.  First was a minor error, which said the install would continue.  After two or three I received a message that the install failed and would be halted.  But it continued.  I noticed that the video kept turning off and on.  I allowed it to continue to completion, after a few more errors.      The end state is that the host machine appears to lock as soon as it boots.  However I am able to SSH into the machine, and it appears to be functioning properly.  I believe the problem is with X-Windows.  I have an NVIDIA adapter, which I believe may be problematic with this release.  I would really like to fix this install, instead of reloading from scratch.  From the remote machine I just attempted the following command:  sudo apt-get -f install       And received this error (leaving off most of the output):  The following packages will be REMOVED:   xserver-common-lts-trusty  The following NEW packages will be installed:   libglamor0 libspice-server1 libxatracker2 xorg xserver-xorg   xserver-xorg-input-all xserver-xorg-input-evdev xserver-xorg-input-mouse   xserver-xorg-input-synaptics xserver-xorg-input-vmmouse   xserver-xorg-input-wacom xserver-xorg-video-all xserver-xorg-video-ati   xserver-xorg-video-cirrus xserver-xorg-video-fbdev   xserver-xorg-video-glamoregl xserver-xorg-video-intel   xserver-xorg-video-mach64 xserver-xorg-video-mga   xserver-xorg-video-modesetting xserver-xorg-video-neomagic   xserver-xorg-video-nouveau xserver-xorg-video-openchrome   xserver-xorg-video-qxl xserver-xorg-video-r128 xserver-xorg-video-radeon   xserver-xorg-video-s3 xserver-xorg-video-savage   xserver-xorg-video-siliconmotion xserver-xorg-video-sis   xserver-xorg-video-sisusb xserver-xorg-video-tdfx xserver-xorg-video-trident   xserver-xorg-video-vesa xserver-xorg-video-vmware  Fetched 2,819 kB in 7s (369 kB/s) Extracting templates from packages: 100% (Reading database ... 382361 files and directories currently installed.) Removing xserver-common-lts-trusty (2:1.15.1-0ubuntu2~precise1) ... Removing 'diversion of /usr/lib/xorg/protocol.txt to /usr/lib/xorg/protocol-precise.txt by xserver-common-lts-trusty' dpkg-divert: error: rename involves overwriting `/usr/lib/xorg/protocol.txt' with   different file `/usr/lib/xorg/protocol-precise.txt', not allowed dpkg: error processing package xserver-common-lts-trusty (--remove):  subprocess installed post-removal script returned error exit status 2 Errors were encountered while processing:  xserver-common-lts-trusty E: Sub-process /usr/bin/dpkg returned an error code (1)       Is there anything I can do to get this fixed, short of starting from scratch?   Instead of restating the question I would simply like to ask; is it possible for me to fix this failed installation?  Or am I doomed to starting over?  I have the system working like I want so I really hope I don't need to reload.  But if I do, is there a recommended way to back up what I have, so I don't need to totally reinvent the wheel?  Thanks in advance for your assistance.

I just installed Ubuntu (12.04.4) and I upgraded to 13.10  I have no idea how to fix this :/  $ sudo apt-get install -f  Reading package lists... Done Building dependency tree        Reading state information... Done The following packages will be REMOVED:   xserver-common-lts-saucy 0 upgraded, 0 newly installed, 1 to remove and 2 not upgraded. 1 not fully installed or removed. After this operation, 1,718 kB disk space will be freed. Do you want to continue [Y/n]? y (Reading database ... 175174 files and directories currently installed.) Removing xserver-common-lts-saucy ... Removing 'diversion of /usr/lib/xorg/protocol.txt to /usr/lib/xorg/protocol-precise.txt by xserver-common-lts-saucy' dpkg-divert: error: rename involves overwriting `/usr/lib/xorg/protocol.txt' with   different file `/usr/lib/xorg/protocol-precise.txt', not allowed dpkg: error processing xserver-common-lts-saucy (--remove):  subprocess installed post-removal script returned error exit status 2 Errors were encountered while processing:  xserver-common-lts-saucy E: Sub-process /usr/bin/dpkg returned an error code (1)


I'm using Blender 2.81 and I can't find halo rendering or anything except surface even after changing the rendering engine to Cycles.

Complete beginner here.  I'm trying to follow  tutorial on Anisotropic shaders, but my property panel looks nothing like the property panel in the tutorial.  For example, when creating a material, this is what his property panel looks like:    But this is what mine looks like, if I follow the same path:    I'm sure I'm missing something obvious.  How can I see the property panel shown in the tutorial?


I know that if a pime q|a^2^m+1 and q divides a^2^n+1 then q divides their sum and difference but i don't know how to proceed further. please help

Prove that if $m\not =n,a$ are positive integers then $(a^{2^n}+1,a^{2^m}+1)$ is $1$ if $a$ is even and $2$ if $a$ is odd.    I solve the problem in the following way: I assume that $m>n$ then  $$a^{2^m}+1=a^{2^m}-1+2$$ With this expression if I take a divisor prime $p$ of $a^{2^n}+1$ then if $p|a^{2^m}+1$ this prime must divide 2 and the result follows.   But, how can I prove this statement without use of primes? This exercise appears before the concept of prime is introduced then I prefer do not use it.    Any idea?   Thanks!


If you recreated intermediate species between every species on the evolutionary tree, would every species be able to reproduce with each other through a series of intermediates? Would this blur the concept of "species"?

To be clear, I'm not doubting that homo sapiens and homo neanderthalensis did interbreed: of that much I'm convinced.   Within the past few years I've seen an upcropping of pop-sci articles discussing the interbreeding between pre-historic species of humans. In everything that I see in these articles, as well as in scientific literature (my college Bio textbook, among others), I see these different humans being referred to as separate species.   This conflicts with my understanding of a species. Given the following definition, wouldn't homo sapiens and homo neanderthalensis be the same species?     A species is often defined as the largest group of organisms where   two hybrids are capable of reproducing fertile offspring, typically   using sexual reproduction.      Is this definition incorrect?  Are the publications using "species" colloquially, as opposed to scientifically?  Is "species" still a poorly defined concept? (see )   Thanks!


I am not able to sudo apt-get update successfully. I am using Ubuntu 16.04.1 LTS  Error message:  W: GPG error: http://security.ubuntu.com/ubuntu xenial-security InRelease: At least one invalid signature was encountered.   More error messages attached in the screenshot.    How could I fix it?

apt-get update after upgrade - I get following message  W: GPG error: http://archive.canonical.com/ubuntu xenial InRelease: At least one invalid signature was encountered. W: The repository 'http://archive.canonical.com/ubuntu xenial InRelease' is not signed. N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use. N: See apt-secure(8) manpage for repository creation and user configuration details. W: GPG error: http://ua.archive.ubuntu.com/ubuntu xenial InRelease: At least one invalid signature was encountered. W: The repository 'http://ua.archive.ubuntu.com/ubuntu xenial InRelease' is not signed. N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use. N: See apt-secure(8) manpage for repository creation and user configuration details. W: GPG error: http://ua.archive.ubuntu.com/ubuntu xenial-security InRelease: At least one invalid signature was encountered. W: The repository 'http://ua.archive.ubuntu.com/ubuntu xenial-security InRelease' is not signed. N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use. N: See apt-secure(8) manpage for repository creation and user configuration details. W: GPG error: http://ua.archive.ubuntu.com/ubuntu xenial-updates InRelease: At least one invalid signature was encountered. W: The repository 'http://ua.archive.ubuntu.com/ubuntu xenial-updates InRelease' is not signed. N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use. N: See apt-secure(8) manpage for repository creation and user configuration details. W: GPG error: http://ua.archive.ubuntu.com/ubuntu xenial-proposed InRelease: At least one invalid signature was encountered. W: The repository 'http://ua.archive.ubuntu.com/ubuntu xenial-proposed InRelease' is not signed. N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use. N: See apt-secure(8) manpage for repository creation and user configuration details. W: GPG error: http://ua.archive.ubuntu.com/ubuntu xenial-backports InRelease: At least one invalid signature was encountered. W: The repository 'http://ua.archive.ubuntu.com/ubuntu xenial-backports InRelease' is not signed. N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use. N: See apt-secure(8) manpage for repository creation and user configuration details.   Tried   sudo apt-get clean sudo mv /var/lib/apt/lists /tmp sudo mkdir -p /var/lib/apt/lists/partial sudo apt-get clean sudo apt-get update   It did not help.  My current source.list:   ###### Ubuntu Main Repos deb http://ua.archive.ubuntu.com/ubuntu/ xenial main restricted universe multiverse   ###### Ubuntu Update Repos deb http://ua.archive.ubuntu.com/ubuntu/ xenial-security main restricted universe multiverse  deb http://ua.archive.ubuntu.com/ubuntu/ xenial-updates main restricted universe multiverse  deb http://ua.archive.ubuntu.com/ubuntu/ xenial-proposed main restricted universe multiverse  deb http://ua.archive.ubuntu.com/ubuntu/ xenial-backports main restricted universe multiverse   ###### Ubuntu Partner Repo deb http://archive.canonical.com/ubuntu xenial partner


Since we know that all accelerated charges radiate energy and we also know that all matter is made up of protons and electrons which are all the while doing accelerated motion.So from this can i conclude that every piece of matter radiates energy because of jiggling motion of atoms?

I'm having trouble understanding the simple "planetary" model of the atom that I'm being taught in my basic chemistry course.   In particular,    I can't see how a negatively charged electron can stay in "orbit" around a positively charged nucleus. Even if the electron actually orbits the nucleus, wouldn't that orbit eventually decay?  I can't reconcile the rapidly moving electrons required by the planetary model with the way atoms are described as forming bonds. If electrons are zooming around in orbits, how do they suddenly "stop" to form bonds.     I understand that certain aspects of quantum mechanics  to address these problems, and that there are  of atoms. My question here is whether the planetary model itself addresses these concerns in some way (that I'm missing) and whether I'm right to be uncomfortable with it.


I was reading through the  and noticed an expression inside a comment was quoted this way:  /* `stakbot' is preserved by this routine */    ^^^^^^^^   also the       The command `bye' is identical to `exit'   and IIRC the zsh man pages use this same notation. Why?    Is it to prevent the code from being accidentally being interpreted as a backtick expression and executed ? or is it simply a convention?

Frequently I get asked the question:     ``K., where does this convention for quotation marks come from? You know, the one with the two grave accents introducing a quoted string and two regular upright single quotation marks ending it?''   I have no idea. Where does this come from?


I would like to disable the accent characters options you get when you hold down keys.   I have always used holding keys to repeat letters but all of the sudden it shows special characters and won't let me repeat any keys, even if they do not have special characters. I have been using Yosemite on my early 2011 MBP for a while now and this has never occurred before. Did I do some strange keyboard combination? And is there a way to turn it off, to get proper key repeats back? I have searched for this everywhere in the settings and online, but apparently it is not a known thing.   Thank you very much in advance!

When I hold a key in Lion, I get this iOS-style character picker instead of a repeated character, as in previous versions of the OS:    I really dislike this (I rarely use those symbols as I only speak Dutch and English). I want to hooooooooooold a key. :)  Where can I turn this off? I can't find an option in the system preferences.


Please see the image? How to write this in latex?

How do I produce a conditional expression with large brackets? For example: X = 0 if a=1, 1 otherwise, with a large left bracket and specifying each condition in a line?


I want to make a USB Stick with a stand-alone LaTeX for OS X devices.   Is there any possibility to doing that?   If yes, how can i do it? All versions for LaTeX on Mac i found needed a system library to install.

I'm looking to treat myself to a totally portable TeX system and was wondering: is it possible to devise an installation scheme that would run on Windows, Linux and MacOS at the "same" time?  I think TeXLive is the best choice here, but I'd much rather avoid having to maintain three separate TeXLive installations. I'd like the three installations to share the package databases for instance.  I'll be using a 32Gb USB stick, in case it matters.  PS: I think I'm onto something here... will post back when I have a working prototype.  Edit: after reading  I managed to format a USB stick with UDF and have it read and written in Linux and Windows (need to perform some tests on Mac yet). This is the first step towards interoperability.  Edit 2: well, as it turns out, the previous note was useless (the partition table breaks under Windows), I've found  and it works like a charm. The only remaining step is writing a couple of scripts to set the environmental variables and we're done ;)


To find volume of the shape generated by rotating $f(x)$ around the $x$ axis we calculate  $$\int_a^b \pi f(x)^2\, \mathrm d x$$  as the area of a circle is $\pi r^2$ and we just split it into discs.  Why then by analogy is the surface area formula not just   $$\int_a^b 2 \pi f(x)\, \mathrm d x$$  I don't understand the fundamental difference between the two cases.

I am using two books for my calculus refresher.   Thomas' Calculus  Higher Math for Beginners by Ya. B. Zeldovich   My question is : When applying Integral Calculus for calculation of volumes of solids, generated by curves revolved around an axis, we use slices of 'cylinders' to approximate the volume of the resulting solid and then integrate the sum of those infinitesimal cylinders. However, when we are using the same techniques to calculate the surface area of the surfaces generated by revolving curves around an axis, we consider the 'slope' of the differential length of curve 'dx', calculate the total length of the curve and derive the required surface area.  Are we not supposed to use the same 'slope' for calculating the volumes of the infinitesimal 'cylinders' for calculation of volumes? Shouldn't we use 'sliced portions of 'cones' as the infinitesimal volumes?? When it come to calculation of volumes of solids of revolution, why are we neglecting the slope of the curve for the differential length and simply assume that it is an infinitesimal cylinder??  Ex: Let us say we want to calculate the surface area and the volume of the solid generated when the parabola y = 10 . x^2 is revolved about the y-axis, with limits of x from 0 to 5.  In such cases, when calculating the volume of the solid, we consider infinitesimal 'cylinders', ignoring the 'slope' of the curve for the differential element 'dx', but when calculating the surface area, we consider the 'slope' of the differential element 'dx'.


If $R$ is a commutative integral domain and it also satisfies descending chain condition on its ideals then how will we show that such ring $R$ will be a field?

Prove: Let $R$ a Artinian commutative ring with $1 \neq 0$. If $I$ is prime, then $I$ is maximal.     I got stuck on this. I understand that every ideal is generated by finitely many elements. Here is my approach:  It's enough to prove the following implication: $$ R/I \ \text{is a domain} \quad \Rightarrow \quad R/I \ \text{is a field}$$ Then only finding an inverse is left. So let $x \in R$ in arbitrary. We have to find an inverse element of $x+I \in R/I$, that as an element y so that $x \cdot y \in I+1$. We denote $I = (x_1, x_2, \cdots, x_n)$.  Now I have to find y so that $xy -1 = r_1 x_1+ r_2 x_2 + \cdots + r_n x_n$. This is where I no more knew what to do.   Your advise will be appreciated.


I am currently studying about the dual nature of radiation and matter. I have come across how the radiation energy is quantified by saying that it is built up of discrete units. Though I fairly have a grasp on this issue, my textbook has a statement that is not clear. It says,     Observation on photoelectric effect imply that in the event of matter-light interaction, absorption of energy takes place in discrete units of hv. This is not quite the same as saying that light consists of particles, each of energy hv.   What does it mean? Aren't the two sentences contrasting thems? If not, please let me know.  Thank you in advance.

At the end of this nice video (), she says that  is a chain reaction of electric and magnetic fields creating each other so the chain of wave moves forward.  I wonder where the  is in this explanation. What is the relation between electromagnetic wave and photon?


I need to create a bash file that automatically makes new directories and assign some of them to a variable. I can make folder without problems but when I test variables with echo the console return me nothing: #!/bin/bash  mkdir ~/Scrivania/TEST2/Salmonella_enterica mkdir ~/Scrivania/TEST2/Salmonella_enterica/NCBI mkdir ~/Scrivania/TEST2/Salmonella_enterica/NCBI/vs2 mkdir ~/Scrivania/TEST2/Salmonella_enterica/NCBI/vs2/Annotation mkdir ~/Scrivania/TEST2/Salmonella_enterica/NCBI/vs2/Sequence mkdir ~/Scrivania/TEST2/Salmonella_enterica/NCBI/vs2/Sequence/Chromosomes mkdir ~/Scrivania/TEST2/Salmonella_enterica/NCBI/vs2/Sequence/WholeGenomeFasta CHR="~/Scrivania/TEST2/Salmonella_enterica/NCBI/vs2/Sequence/Chromosomes" ANN="~/Scrivania/TEST2/Salmonella_enterica/NCBI/vs2/Annotation" WGF="~/Scrivania/TEST2/Salmonella_enterica/NCBI/vs2/Sequence/WholeGenomeFasta" cd ~/Scrivania/TEST2  When I try to assign the variable directly from terminal it works perfectly (copy-pasted from the script, so no typo), it just does nothing when i execute the .sh, except creating folders. Thanks, i'm sure it's a stupid question but I never used bash files before.

I just want to write a script which changes my directory.  I put the below commands in the file /home/alex/pathABC  #!/bin/sh cd /home/alex/Documents/A/B/C echo HelloWorld   I did   chmod +x pathABC   In the Terminal, while in /home/alex, I ran ./pathABC, but the output is just HelloWorld and the current directory is not changed.  So what is wrong?


If there's some cross-platform C/C++ code that should be compiled on Mac OS X, iOS, Linux, Windows, how can I detect them reliably during preprocessor process?

I need my code to do different things based on the operating system on which it gets compiled. I'm looking for something like this:  #ifdef OSisWindows // do Windows-specific stuff #else // do Unix-specific stuff #endif   Is there a way to do this? Is there a better way to do the same thing?


I rarely touch apache configs but I must be doing something wrong here.   trying to set it up so these domains point to different webroots:  example.com -> var/www/html  ggurt.example.com -> var/www/html/ggurt  With the current config (screenshot below), ggurt.example.com and example.com BOTH go to var/www/html/ggurt. I want the sub domain and second level domain to have different webroots. What am I doing wrong?

My VirtualHost config is below:  <VirtualHost *:80>           ServerName www.example.com           ServerAlias example.com           DocumentRoot /var/www/example/html </VirtualHost>   I want to add a subdomain as such: new.example.com  And I want to add a wildcard to catch all other subdomains (*.example.com) and route them to www.example.com.  How should I add this subdomain? Will it involve an A record?  For the wildcard, if I change my ServerAlias to...  ServerAlias example.com *.example.com  ... then will it interfere with my subdomain (new.example.com)?  EDIT: I have several domains on a single host (via virtual hosts). This is in the same folder as 000-default.conf, but it's named example.conf. (I've actually deleted 000-default.conf, and used conf files named after the domains they point to.)


Client's SQL Server farm DBs are backed up by third-party tool that does not use VSS. About half of the instances show backups being made by some tool that is using VSS. I can disable SQL Server VSS Writer to stop these errant backups, but how do I track down what is running the VSS backups?  keywords: Volume Shadow Copy Service, volume-shadow-service [I don't have rep to create tags]

This one's got me a bit perplexed. How might one determine what process/program is making file-level backups via VSS/VDI and the SQL Writer service? I've tried using Profiler to trace backup/restore events, and that just shows me SQL Writer itself creating the backup events. I don't see anything in the Windows event log indicating what's talking to SQL Writer, nor does SQL Server put anything meaningful in its own error log.  I've got a situation where something is making snapshot backups and breaking the differential chain, but we're not sure what the culprit is. It's undoubtedly some kind of backup agent, or a virtualization assistant that talks to SQL Writer to allow for VM snapshots, but we need some way to pin it down.


I have this equation and I would like to "get more space" into it, how to do it?  \documentclass[a4paper,12pt]{article}  \usepackage{amsmath} \usepackage{amssymb}  \begin{document}  \newcommand{\vnull}{\boldsymbol{0}} \newcommand{\vK}{\boldsymbol{K}} \newcommand{\vN}{\boldsymbol{N}} \newcommand{\vT}{\boldsymbol{T}} \newcommand{\vD}{\boldsymbol{D}} \begin{equation*}   \left(     \begin{array}{l|l|l}       \vK & \vN^\top & \vT^\top \\       \hline       - \rho \vD(\mathcal{A}_\nu) \vN & \vD(\mathcal{I}_\nu) & \vnull\\       \hline       - \rho \vD(\mathcal{A}_t) \vT & \vnull                      & \vD(\mathcal{I}_t^+ \cup \mathcal{I}_t^-)     \end{array}   \right) \end{equation*}  \end{document}

\documentclass[english]{article} \usepackage[T1]{fontenc} \usepackage[latin9]{inputenc} \usepackage{babel} \begin{document} % ... \[ \begin{array}{ccccc} x(1) & = & \frac{x(0)}{1} & = & x(0)\\ x(2) & = & \frac{x(1)}{2} & = & \frac{x(0)}{2}\\ x(3) & = & \frac{x(2)}{3} & = & \frac{x(0)}{2.3}\\ x(4) & = & \frac{x(3)}{4} & = & \frac{x(0)}{4!}\\  &  &  &  & \vdots\\ x(n) & = & \frac{x(n-1)}{n} & = & \frac{x(0)}{n!} \end{array} \] % ... \end{document}   Because of the fractions in the array cells, array elements are vertically too close to each other, they are literally touching to each other. Also the horizontal spacing is too much as you see in the image (screen shot from the output PDF file).  How do I make these cell-spacings look better?


I've been struggling for two days to get this to work, but I just can't (I'm terrible at regular expressions :S).  ${test}[arg]   From this text, I need to retrieve two different things: test and arg. To do it, I have created this regex:   (\$\{(\b[a-zA-Z0-9.]+\b)\})(\[(.+)\])?   With that example, it works. However, if I try this other text: ${test}[arg1] - ${test2}[arg2], I just get one match with 2 groups: test and arg1] - ${test2}[arg2, instead of getting 2 different matches: one with groups test and arg1, and the other with groups test2 and arg2.  I hope you can help me out.  Thanks in advance.

I have this gigantic ugly string: J0000000: Transaction A0001401 started on 8/22/2008 9:49:29 AM J0000010: Project name: E:\foo.pf J0000011: Job name: MBiek Direct Mail Test J0000020: Document 1 - Completed successfully  I'm trying to extract pieces from it using regex. In this case, I want to grab everything after Project Name up to the part where it says J0000011: (the 11 is going to be a different number every time). Here's the regex I've been playing with: Project name:\s+(.*)\s+J[0-9]{7}:  The problem is that it doesn't stop until it hits the J0000020: at the end. How do I make the regex stop at the first occurrence of J[0-9]{7}?


I had assigned a bounty of +50 to my  on SO. Later on many efforts I got solution and I posted it as answer to my bounty question. I know that one can't get bounty points on his own question. But my solution got more than 2 upvotes and I think it is eligible for bounty.   From      If you do not award your bounty within 7 days (plus the grace period), the highest voted answer created after the bounty started with at least 2 upvotes will be awarded half the bounty amount. If there's no answer meeting that criteria, the bounty is not awarded to anyone.

It's possible to offer and award bounties of reputation on questions.   What is a bounty? How can I find questions that have a bounty attached? How do I start a bounty? When can I start a bounty? Why is the system requiring me to choose a bounty amount that's higher than the minimum? Can I use Markdown formatting in the bounty remarks? Can I edit the remark? How long is the bounty period? How do I award a bounty? Can I award a bounty to my own answer? Can I award a bounty to an old answer? If I offer a bounty on someone else's question, can I award the bounty to their answer? After awarding the bounty, can I remove it or move it to another answer at a later time? What happens if there's no answer after the bounty period? What happens if I feel my question is still unanswered? What is automatic awarding? Are bounty awards exempt from the 200 points/day reputation limit? How does Community Wiki mode affect bounties? How does user deletion or post dissociation affect bounties? Can I award a bounty to an answer from a deleted user or one where the author was dissociated? Can I offer a second bounty after the first one has expired? Can I raise my bounty? What happens if a bounty question is closed or deleted? Why can't I vote to close or migrate a bounty question? What happens if I delete my account while I have an active bounty? Do I keep an awarded bounty when I delete my answer? What happens if a question where I awarded a bounty later gets deleted or migrated? Can I cancel my bounty? Can I affect / divide / share part of my bounty to two (or more) users? How many outstanding bounties can a single user have?      See also:  in the Help Center


in my code below:  #include <stdio.h> #include <stdlib.h>    int main() {       char text[256];  // three character pointers     char *new_line;  // store new_line pointer with hello     new_line = strcpy(text, "hello how are you");      while(*new_line)         printf("%c",*new_line++);        return (0); }   I am trying to divide the array pointed by *new_line based on the space in between the words stored in the array. more specifically I want to assign index to each word in the array and display it like:  1- hello 2- how 3- are 4- you   How can I break this char array and get these words individually?

I have been trying to tokenize a string using SPACE as delimiter but it doesn't work. Does any one have suggestion on why it doesn't work?  Edit: tokenizing using:  strtok(string, " ");   The code is like the following  pch = strtok (str," "); while (pch != NULL) {   printf ("%s\n",pch);   pch = strtok (NULL, " "); }


While studying introductory analysis, I came across an exercise wherein we have to prove that if $A$ is a set, it can't contain itself. The hint indicates we're supposed to use the regularity axiom.  I want to find out the problem with defining $A$ as the set $\{A, x\}$, where $x$ is a non-set object. This definition doesn't violate the regularity axiom because of $x$, and such a set can exist because of the pair set axiom ($A$ and $x$ are objects, so there exists a pair set $\{A, x\}$ )  I tried looking up a proof online, but it only denotes a set containing itself as $A = \{A\}$. Why not $\{A, x\}$ or $\{A, x, y\}$, etc...?

Exercise 3.2.2 Use the axiom of regularity and the singleton set axiom to show that if $A$ is a set then $A \notin A$.  Axiom of Regularity: If $A$ is a non-empty set, then there is at least one element x of A which is either not a set, or is disjoint from A.  Singleton Set Axiom: If $a$ is an object, then there exists a set $\{a\}$ whose only element is $a$, we refer to $\{a\}$ as the singleton set whose element is $a$ Furthermore, if $a$ and $b$ are objects, then there exists a set $\{a,b\}$ whose only elements are $a$ and $b$    I think I can give the proof when A is the non-empty set which contains finite elements. However, can anyone give any hint for the general case?  Suppose $A \in A$   Then eixsts $x$ such that either $x$ is not a set or $x \cap A$=$\emptyset$  Then it is clear thar $x \ne A$ (if $x = A$, then $x \cap A \ne \emptyset$)  We observe that as an element, $A$ $\ne$ $x$, $A$ $\in$ $A$  Then $A$ $\in$ $A-x$   Define the new set $A-x$ as $A_1$  then exists $x_1$ such that $A \in A_1-x_1$  After finite steps  we find that $A \in \emptyset $  which leads to contradiction.


I am trying to prove the following statement:  Let $X, Y$ be two independent random variables. If for some $p>0$, $\mathbb{E}(|X+Y|^p)<\infty$, then $\mathbb{E}(|X|^p)$ and $\mathbb{E}(|Y|^p)$ are both finite.  The trouble I am having is that all the inequalities which I can think of in this case are in the opposite direction of what I actually want to prove. For instance, Minowski's inequality allows me to conclude that $$\mathbb{E}|X+Y|^p \leq [(\mathbb{E} |X|^p)^{1/p} +(\mathbb{E} |Y|^p)^{1/p}]^p $$, but this is not helpful at all in terms of the direction of the inquality. I also struggled to find a way to utilize the independence assumption. I would appreciate it if someone could provide a hint.

Let two random variables $X$ and $Y$ be independent of each other, for some $p>0$, we have   $$E|X+Y|^p<\infty$$   Show that   $$E|X|^p<\infty,\quad E|Y|^p<\infty$$   My try: I know Minkowski inequality  $$E|X+Y|^p \leq E|X|^p + E|Y|^p, \tag{$0<p<1$}$$  But this inequality here is not useful, so how prove it? Thank you very much!


I was reading a proof of the fact that $\pi$ is transcendental over $\mathbb{Q}$, and the author mentioned that if $\pi$ is algebraic then so is $i \pi$, but I'm not particular sure why. Can anybody explain this to me? Thank you.

Of course this is a particular case of the closure under addition and multiplication of algebraic numbers (which proof would also be appreciated), but I would prefer a simple transformation on the already known polynomial giving $a$ as a root in order to obtain a polynomial giving $ia$ as a root. Thank you in advance for your help.


When I receive a reply on a comment or thread I created or opted into on chat channels such as  or MS Teams opened in a web browser I receive a small banner that extends from the bottom vertical pane of the screen if I'm not in that tab.  I noticed I get a push notification when using the Stack Exchange app on my iOS device when someone comments back.  Besides the inbox icon at the top right hand side of the screen, is there any feature within Stack Exchange that can alert me regardless of what browser tab I'm currently looking at like what Slack and MS Teams do?

I noticed that chat supports desktop notifications to notify you when someone pings you, which made me think that maybe the main site has this functionality as well, and I'd really like to use it in that case. But I couldn't find an option to turn them on anywhere.  Chrome notifications look like this:


My compressor is going out and milk spoils.  The repair man says it will take a week to 10 days to get a new one.  It is still cool in there but not cold.  I just opened a new jar of mayo and some salad dressings. I want to be safe but no wasteful.

What general rules do I need to follow to keep my food safe? How do I know what temperature to cook something to, or whether my food is safe at room temperature?


I have problem when I try append li element to list using jQuery. When I create static li element in HTML mouseenter and mouseleave function work ok. But when I want to add li element using append function mouseenter does not work. Can you explain me, where I make the mistake?  $(document).ready(function() {   var input = $('.task-input');   var span = ''    $('.add-button').click(function() {     if(input.val() == '') {       var margin = 10;       for(var i = 0; i < 10 ; i++) {         $(this).animate( {             'margin-left': '+=' + (margin = -margin) + 'px'          }, 50);       }        }     else {       $('ul').append('

'+input.val()+'
'+ span +'
');       input.val('');     }    })    $('.list').find('li').mouseenter(function() {     $(this).css({       'background-color':'yellow'     })     $('.remove').css({       'display':'block'     })      $('.remove').click(function() {       $(this).parent().remove();     })   })    $('.list').find('li').mouseleave(function() {     $(this).css({       'background-color':'lightgray'     })      $('.remove').css({       'display':'none'     })   })    })

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.


How to create form with condition drop down. Like If I click option "Other" then only a text box should appear in the form. How to do it ? Urgent  Like :  If I ans 6th question as "Yes: then only the the "specify" row should appear. How to do it ? Urgent

I want to creat a form through InfoPath - In a such a way that, if I select "Yes" option then only I should get text box to add my comments.  Otherwise it should not appear in the feedback form. How to do it ?


I know that gradient formula in other coordinate system is more complicated than the Cartesian formula. For example, the gradient in polar coordinate system is  $$ \nabla f = \frac{\partial f}{\partial r} \hat{\vec{r}} + \frac{1}{r}\frac{\partial f}{\partial \theta} \hat{\vec{\theta}} $$  I can follow the proof of this result (for example ), however I don't understand the result intuitively. Why is the result different from that in Cartesian coordinates? Can somebody shed some light on it?

I am looking for an intuitive way to explain the "$1/r$" factor in the gradient in polar coordinates.  For instance, if $g(x,y)=f(r,\theta)$, $$\nabla g=f_r\hat{e_r}+\frac 1rf_\theta\hat{e_\theta}$$  Is there a way to explain the $\frac 1r$ factor? By dimension matching? Or any other way to see that the answer is not $$\nabla g=f_r\hat{e_r}+f_\theta\hat{e_\theta}$$  Thanks for any help.


Looking around at a couple of power supplies that I own such as a guitar pedal adapter that says it puts out 9V and 1700mA max, how does a power supply like this work so that it doesn't put out too much current and blow up what's attached? There isn't a switch that I physically have to switch but how does the adapater "know" how much current to put out?

Power supplies are available in a wide range of voltage and current ratings.  If I have a device that has specific voltage and current ratings, how do those relate to the power ratings I need to specify?  What if I don't know the device's specs, but am replacing a previous power supply with particular ratings?  Is it OK to go lower voltage, or should it always be higher?  What about current?  I don't want a 10 A supply to damage my 1 A device.


I am a manual functional tester and I am keen on shifting my career from Manual testing to Automation testing using Selenium. What is the best way to begin with this goal of mine? Thanks!

So I've been testing web based analytical software now for the past 4 years or so with mostly manual techniques. But for 2015, I've set myself the goal of getting setup and start writing automated tests and to introduce automated testing into my company.  I've done a little research and it seems that Selenium is quite big when it comes to writing automated tests, but most of the tutorials I've come across reference the Java language.  Some questions:   Is Java the primary language used for Selenium tests?  Do you recommend it over C# ?  Wat is the process of writing test scripts?  Are there Frameworks that I should use that can make the process even easier?