Anyone know why providing was used here? Is using which provides here correct?  We have a weekly Western Canada newsletter written by our B.C. and Alberta bureau chiefs, providing a comprehensive package of the news you need to know about the region and its place in the issues facing Canada.


Of course, $x!$ itself is defined for positive integers, so it cannot have an antiderivative. However, is it possible to integrate $x!$ using the gamma function? If so, what is its antiderivative? I'm in calc 2 in high school, so if something is outside of my scope of understanding, please let me know, but still do answer for the benefit of everyone else.

What is $$\int\Gamma(x) \, dx$$ where $\Gamma(x)$ is the gamma function?


so I'm creating a code. In it, I wanted to make two eyes for the helmet. To do it, I need to create a function so that I can draw two ellipses in one function. After creating the design for the eyes, I found I hadn't closed that section which resulted in all of the shapes in my Processing file to be moved around the page.  I then closed the section, but now I'm getting a NullPointerException.  How do I fix this?  float Helmet_Ratio=.4; int i=0;  void setup() {   size(1280,720);   smooth(); }  void draw(){    eye(1200,300);    eye(1275,350);    }     void eye(int y, int z){    fill(0);    ellipse(y,z,15,15);    fill(0);    ellipse(y+75,z+0,15,15); } {   background(255);  //This is where the problem begins  {   //Pattern Background   int x = 15;   if (x > 20) {    rect(0, 0, 55, 55); } if (x < 20) {   strokeWeight(3);   fill(0,200,0);   rect(0,0,25,25); }   for (i=0; i<125; i++)  {    pushMatrix();    fill(0,32,32);    rotate(.75);    rect(0,i*12,1280,i/5);    popMatrix();  }  {    //Helmet 1 Red   strokeWeight(0);   translate(50,0);   fill(255,0,0);   ellipse(width/2.25,height/2,240,250);    //Helmet 1 Lense   beginShape();    endShape();    //Helmet 2 Blue   strokeWeight(0);   translate(250,0);   fill(51,51,255);   ellipse(width/2.25,height/2,200,195);    //Helmet 3 Yellow   strokeWeight(0);   translate(250,0);   fill(255,255,0);   ellipse(width/2.25,height/2,150,160);    //Helmet 4 Black   strokeWeight(0);   translate(-750,0);   fill(32,32,32);   ellipse(width/2.25,height/2,200,195);    //Helmet 5 Pink   strokeWeight(0);   translate(-225,0);   fill(255,102,255);   ellipse(width/2.25,height/2,150,160);  }  }  }

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?


Do I need a transit visa for UK if I use Manchester airport for 1.30 hours?

Is there a website or some other way to find out if I need a transit visa for a short stop in the UK on my way somewhere else? Ideally this should give me the answer for all nationalities, and take into account any other visas I may have.


I'm not good with RegEx and I would like have a RegEx for next URL scheme.  Can you help me to create a regular expression for that URL?  https://fonts/mapbox/{fontstack}/{range}.pbf   And if possible, show me one page to learn and understand it.

I don't really understand regular expressions.  Can you explain them to me in an easy-to-follow manner?  If there are any online tools or books, could you also link to them?


I am learning about .  The author mentions the following (emphasis mine):     XML Elements vs. Attributes  <person sex="female">   <firstname>Anna</firstname>   <lastname>Smith</lastname> </person>         <person>   <sex>female</sex>   <firstname>Anna</firstname>   <lastname>Smith</lastname> </person>       In the first example sex is an attribute. In the last, sex is an element. Both examples provide the same information.      There are no rules about when to use attributes and when to use elements. Attributes are handy in HTML. In XML my advice is to avoid them. Use elements instead.        Avoid XML Attributes?      Some of the problems with using attributes are:         attributes cannot contain multiple values (elements can)   attributes cannot contain tree structures (elements can)   attributes are not easily expandable (for future changes)         Attributes are difficult to read and maintain. Use elements for data. Use attributes for information that is not relevant to the data.   So is the view of the author a famous one, or is this the best practice in XML?  Should Attributes in XML be avoided?  W3Schools also mentioned the following (emphasis mine):       XML Attributes for Metadata      Sometimes ID references are assigned to elements. These IDs can be used to identify XML elements in much the same way as the ID attribute in HTML. This example demonstrates this:  <messages>   <note id="501">     <to>Tove</to>     <from>Jani</from>     <heading>Reminder</heading>     Don't forget me this weekend!   </note>   <note id="502">     <to>Jani</to>     <from>Tove</from>     <heading>Re: Reminder</heading>     I will not   </note> </messages>       The ID above is just an identifier, to identify the different notes. It is not a part of the note itself.      What I'm trying to say here is that metadata (data about data) should be stored as attributes, and that data itself should be stored as elements.

At work we are being asked to create XML files to pass data to another offline application that will then create a second XML file to pass back in order to update some of our data. During the process we have been discussing with the team of the other application about the structure of the XML file.   The sample I came up with is essentially something like:  <INVENTORY>    <ITEM serialNumber="something" location="something" barcode="something">       <TYPE modelNumber="something" vendor="something"/>     </ITEM> </INVENTORY>   The other team said that this was not industry standard and that attributes should only be used for meta data. They suggested:  <INVENTORY>    <ITEM>       <SERIALNUMBER>something</SERIALNUMBER>       <LOCATION>something</LOCATION>       <BARCODE>something</BARCODE>       <TYPE>          <MODELNUMBER>something</MODELNUMBER>          <VENDOR>something</VENDOR>       </TYPE>    </ITEM> </INVENTORY>   The reason I suggested the first is that the size of the file created is much smaller. There will be roughly 80000 items that will be in the file during transfer. Their suggestion in reality turns out to be three times larger than the one I suggested. I searched for the mysterious "Industry Standard" that was mentioned, but the closest I could find was that XML attributes should only be used for meta data, but said the debate was about what was actually meta data.  After the long winded explanation (sorry) how do you determine what is meta data, and when designing the structure of an XML document how should you decide when to use an attribute or an element?


Let $\varphi: A \rightarrow B$   be a ring homomorphism. Let $f =\mathrm{Spec}(\varphi) : \mathrm{Spec}(B) \to \mathrm{Spec}(A)$ be the map associated to $\varphi$.  Why is the map $f$ is continuous?  I think we need to use $IB$ (the ideal of $B$ generated by $\varphi(I)$).  Then we got $f^{-1}(V(I)) = V(IB)$. (why?)  Could someone tell the details of this proof? Thank you :)

Let $A, A'$ be commutative rings with $1 \neq 0$.  Let $h : A \to A'$ be such that $h(1) = 1$.  Then $f: {\rm Spec}(A') \to {\rm Spec}(A)$ defined by $f(\mathfrak{p}') = h^{-1}(\mathfrak{p}')$ is continous with respect to the spectral topologies.


Regarding the isomorphism $T_{(x,y)}(X \times Y)= T_xX\times T_yY$ between the tangent spaces of two manifolds $X$ and $Y$, is it true that $$\mathfrak{X}(X \times Y)=\mathfrak{X}(X) \oplus \mathfrak{X}(Y),$$ where $\mathfrak{X}(-)$ denotes the module of vector fields?

So, I know that tangent bundle of a product manifold $M \times N$ splits in a sum $$ T_{(x,y)}(M \times N) = T_xM \oplus T_yN, $$ so that is obvious that the sum $X \oplus Y$ of smooth vector fields $X \in \mathcal{T}(M)$ and $Y \in \mathcal{T}(N)$ is a smooth vector field of $M \times N$. I've been told that, though not every vector field in $\mathcal{T}(M \times N)$ is a sum, locally one can always find one such decomposition, which will in turn be unique due the fact the sum is a direct one.   How can I show that this decomposition exists locally? More than that, if $X = X_1 + X_2$ is the decomposition, is there a way the express the coordinate functions of $X_1$ and $X_2$ in terms of those of $X$?   First I thought about taking two frames that locally spam $TM$ and $TN$ and write down $X$ using them, but then the coordinate functions are of the form $X^i: M \times N \to \mathbb R$, and the vector field components in each subspace are not exactly fields of $M$ and $N$ because their coordinate functions don't have the right domains. Is there another better way to see this decomposition holds locally?


I wanted to ask if anyone knew of a simple way to prove this.  The proof I know: Identify any such character with a continuous, periodic homomorphism $f: \mathbb R \rightarrow S^1 \subset \mathbb C^{\ast}$.  Then $f$ has a Fourier expansion $$f(x) = \sum\limits_n c_n e^{2\pi i nx}$$  with  $$c_n = \int\limits_{\mathbb R/\mathbb Z} f(x)e^{-2\pi i nx}dx = \begin{cases} 1 & \textrm{if $f(x) = e^{2\pi i nx}$} \\ 0 &\textrm{else} \end{cases}$$  This shows that if $f$ is not any of the $e^{2\pi i nx}$, it is zero.  $\blacksquare$  This proof could be considered circular, because the Fourier expansion of $f$ is essentially using the Peter-Weyl theorem, which says that the characters of a compact topological group form an orthonormal basis for the $L^2$ space.  So we are essentially already assuming that $f$ is one of the $e^{2\pi inx}$.  How can this be proved without using Fourier series/circular reasoning?

I'd like to see a proof why $\varphi \in \operatorname{Hom}{(S^1, S^1)}$ looks like $z^n$ for an integer $n$.  At first I thought I could argue that if I have a homomorphism that maps $e^{ix}$ to some $e^{iy}$ for $x,y \in \mathbb R$ then $z = rx$ for some real number $r$. But on second thought I'm not sure why I can't have $\varphi (e^{ix} ) = e^{g(x)i}$ for a $g$ other than $g(x) = \lambda x$.   I'm also interested in seeing different proofs. I'm sure there are several ways to prove this.  Thanks for your help.


I am developing a stand alone python script that will invoke methods from processing module. I am seeing error "ImportError: No module named processing" on ubuntu.  Here is the code.  import PyQt4.QtGui import PyQt4.QtCore import PyQt4.Qsci  from qgis.gui import * from qgis.core import * import os   import processing  print 'hello'

I want to access the  outside of QGIS from a standalone script.  What module do I have to load in order to use it?   How can I access processing?  from qgis.core import *  layerInput = QgsVectorLayer('test.shp', 'test', 'ogr')  processing.runalg('qgis:explodelines', layerInput, 'temp.shp')


I am new to typescript. Recently I have added ES-lint to react native project. IN my project I have used == instead of === as it was required. Removing == increases my no of lines of code, which may result to increase time complexity. To what solution I should go for. Removing == or increasing line of codes. I have already checked  this link but does not answer my question. I am aware about different use of == and ===. But here is the condition i do not want to check the type but only values. My question is just that is it strictly avoided to use ==.

I'm using  to go through JavaScript, and it's returning many suggestions to replace == (two equals signs) with === (three equals signs) when doing things like comparing idSele_UNVEHtype.value.length == 0 inside of an if statement.  Is there a performance benefit to replacing == with ===?   Any performance improvement would be welcomed as many comparison operators exist.  If no type conversion takes place, would there be a performance gain over ==?


I saw this diagram on an exam paper and noticed that it was too clean to have been made in the usual MS Word program. So I figured that it may have been made in either TikZ or PSTricks.   What stood out for me was the method of shading the region, which was to use a 'dotted background' as opposed to the usual grey paint. Is this something possible in either TikZ or PSTricks? I have never seen it before in either of the two, but perhaps you may have. I can't imagine somebody manually assigning dots coordinate by coordinate.

I want to reproduce the following diagram in Tikz.    LaTeX code of my MWE is below:  \documentclass[tikz]{standalone} \usepackage{pgfplots}  \begin{document}  \begin{tikzpicture}  \draw [-latex, thick] (0, 0) -- (0, 6) node  [above] {\Large{$e$}}; \draw [-latex, thick] (0, 3) -- (6, 3) node  [right] {\Large{$\widehat{Y}$}};  \draw [thick] (0, 0.5) -- (5, 4); \draw [thick] (0, 1.75) -- (5, 5.25);  \end{tikzpicture}  \end{document}     I wonder how to fill specified area by dotted points. Any help will be highly appreciated. Thanks  Edited  How about this one?


The imaginary feature being proposed sounds like a lot of work to implement but I think it still can be useful as an inspiration.  Assume a user of an SE site has made some thoughtful contributions and feels like they really spent some effort on their posts. Assume the user in question does not believe in the immortality of SE and wants to have a local copy of all their contributions (questions/answers, possibly also comments). They could copy all of them by hand, or automate it somehow if they know programming but that is at least a little bit annoying. Can we make add a feature to download a .zip archive of all your content if you want to? Just like on GitHub where you can download your repo.  This leaves open the question of how exactly to represent a post in text form (tags, revision history, post time etc.) but that is technical details.  EDIT: I see that my question was closed as a duplicate. I do not think that it is a duplicate though I recognize that I may be mistaken. My reasons (a) the feature I request should not download all content, only my content (maybe I don't want to pay for extra gigabytes of traffic) (b) I also would like it to be really simple, just one click and you download it (I don't want to spend half an hour extracting what I need from the data dump through some SQL gymnastics, I would like it to be just one button).

I would like to create a local MySQL copy of Stack Overflow for academic purposes (school project). As far as I know, the database dump of the  database is available only in an XML format that I will have to convert to SQL on my own with some tool.  Most of direct download links I found were broken (404). The only non-torrent source that I have found and that is still alive is  but the latest Stack Overflow dump there is from October 2009, content of which looks like this:    Where could I find a direct download link with the Stack Overflow dump?    Note: I am not able to use torrents due to network policies, yet for the completeness of this question, here's the link that might help someone:    Other related questions / links that haven't helped me:     ~ all links there give 404  ~ from September '09 with another broken link  ~ from about a year ago with a clearbits.net link  ~ also not working anymore


This is a new project and I didn't change any settings, in the viewport shading material is clipping the background when I rotate the viewport, Please Help!

I don't know why but now, when i go in material preview or rendered (in solid mode it works fine), my object is entirely gray, or invisible idk, because it has the same color of the background. I've been working for days on this project without having this issue, it suddenly showed up. I tried opening other old projects and suddenly they all do the same so i guess it is some blender program setting that applies for all the projects, but idk how it happened cuz i didn't change anything :/, anyone got any tips?


Xubuntu AMD 64.  Nvidia K600 card.  Drivers and software file is NVIDIA-Linux-x86_64-435.21.run     While installing process stops and message: something like,      "must be installed at root"   The Terminal message is:       nvidia-installer: Error opening log file   '/var/log/nvidia-installer.log' for writing (Permission denied);   disabling logging.   Linux novice.  Are there any other places to look for a driver for that card?

Is there a package of Ubuntu drivers as driver pack solution? I tried to search for it, but I did not find it. If there is, how can I easily get it?


I just recently took over a website that is hosted on GoDaddy to make enhancements to it. However, I am new to SEO and believe that I may have accidentally removed it from Google searches.  As stated, when googling for the website, I cannot find it anywhere. Whenever, I run a live test inspection on Google's search console, this is what I get...     I had some cache issues when I first made the site live with all of the upgrades, and may have unknowingly removed it from the search. However, I am still able to type in the actual address in the search bar and it will take me to the updated site.  These are the meta tags I am using along with one for keywords, description, and google-site-verification:  <meta charset="utf-8"> <meta name="viewport" content="width=device-width, shrink-to-fit=yes"> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />   If there is anything I may be missing or something that you could help me out with, it would be greatly appreciated as I am new to using SEO.  Notes that may be helpful:   I do not have a robots.txt file I am not using any meta tags with noindex

This is a general, community wiki  question and answer pair intended to address any questions   concerning the reasons a site or specific site contents do not appear   in search engine results.      If your question was closed as a duplicate of this question and you   feel that the information provided here does not provide a sufficient   answer, please open a discussion on .   My site (or specific pages on my site) is not appearing in search engine results.  Why isn't my content indexed and what can I do about it?


Why are fingerprints different from person to person? It can't be genetics. Even identical twins has different sets of fingerprints. What is the deciding factor that form and shape our fingerprints?

When there is every thing same from their genes to their phenotype so then why they don't have same fingerprints?


Is the gravitational force dependent on the nature of the medium present in between the two masses?

When I look at electric or magnetic fields, each of them has a constant that defines how a field affects or is affected by a medium. For example, electric fields in vacuum have a permittivity constant $ϵ_0$ embedded in the electric field expression of a point charge: $E = q/4π ϵ_0r^2$. However, if I put this point charge in some dielectric that has a different  permittivity constant $ϵ$, the value of the electric field changes. On a similar note, magnetic fields behave very similar but have the permeability constant $μ_0$ instead.   From my understanding, I believe that this is not the case for gravitational fields since the universal gravitational constant $G$ is consider to be a fundamental constant. So I am assuming that even though gravitational fields do operate in different types of mediums, this somehow doesn’t affect the gravitational field value. My question is why is this the case, that is, why isn’t there a permittivity-type constant for gravitation?


So i copied using copy.copy which is shallow but if i change the value in one the value in the other won't get changed.  import copy a=[1,2,3,4,5] b=copy.copy(a) print id(a[0])==id(b[0])   now i get true as output.Since the address of a[0] and b[0] is same then if i change the value of one the other must also change.  b[0]=55 print[a] print[b]   Output:  [1,2,3,4,5] [55,2,3,4,5]   So why is it like that?

Why does the following behave unexpectedly in Python?  >>> a = 256 >>> b = 256 >>> a is b True           # This is an expected result >>> a = 257 >>> b = 257 >>> a is b False          # What happened here? Why is this False? >>> 257 is 257 True           # Yet the literal numbers compare properly   I am using Python 2.5.2. Trying some different versions of Python, it appears that Python 2.3.3 shows the above behaviour between 99 and 100.  Based on the above, I can hypothesize that Python is internally implemented such that "small" integers are stored in a different way than larger integers and the is operator can tell the difference. Why the leaky abstraction? What is a better way of comparing two arbitrary objects to see whether they are the same when I don't know in advance whether they are numbers or not?


In Fallout 4, you can obtain  (the base for the armor - not the workstation) in a few ways. The ones I know of are:   Fixed/Quest related ones (such as the ones placed at vertibird crash sites) From vendors From pickpocketing fusion cores from armored enemies, causing them to step out of their frames   Are any of these sources renewable? If so, which ones?  If they are, I wouldn't feel so bad killing enemies rather than stealing their cores. I basically want to know if any of these sources respawn.

I've seen videos of some folks having several armor sets (4 is the most I've seen so far) standing about on their settlement. I'm wondering if having too many would cause some sets to disappear. They're not like guns/items that you can safely store in settlement crates, the suits kind of just... stand around. (I know there's the extra step of taking out the fusion cores, so that NPC's don't use them.)  Is there a limit to the number of Power Armor sets you can keep?


I want to have Clonezilla and GParted on one USB stick. I remember that there was a joint project, but it is now closed. Is there an ISO with both that I can download?  I don't want a multiboot USB. I want one Linux with both tools. Sorry for the , but this was the project in 2007 which mentioned.

I want a complete guide to make a generic multiboot USB. Requests:  Multiple iso boots; Multiple persistent boots (unlimited size); One partition to data storage;  What I've tried:  only lets 1 persistent ISO.  limits your persistent storage to 4GB, no partition for data (still good) mkusb More than 4GB persistent storage, data partition, but single boot. Correct me if I'm wrong. What can be done so far is accepted.


I have a directory with about 10 polygon shapefiles. I need ArcMAP to take all these shapefiles and union them all into one layer using the model builder. I know I need to use some sort of iterator, however the basic one does not successfully union them all, but rather only the last one. What am I doing wrong here? Here is the model:

I would like to feed a list of feature classes (only one polygon per feature class, but up to 150 feature classes) into the Union tool in ModelBuilder by using a Feature Class Iterator and the Collect Values Tool.   Unfortunately, it does not work since "Collect Values" only works with Merge, Append, etc.   Does anyone know a workaround or another way to do this?


Which one is correct?  "All the apples on the tree are ripe" or "All apples on the tree are ripe".

I came across people using all the in sentences instead of all.     Select the type of user to view all the users of that type. All the   users of the selected role are displayed.   I usually strike out the after all. Is there any justification that I can give my team on why the seems out of place in the above example? Are there any rules of grammar for or against using the article after all?


for example in the code below I want to get "Dog" or "Cat". How do I do that?  public class Animal {     // insert code here }  public class Dog extends Animal {     // insert code here }  public class Cat extends Animal {     // insert code here }  public class test {     Animal animal = new Animal();     // how do I get the name of the subclass i.e. how to get that the      // animal is a dog if it is in fact a dog??! }

If class B and class C extend class A and I have an object of type B or C, how can I determine of which type it is an instance?


I am looking for help on understanding how child themes and parent themes functions.php work.  I know with CSS, the cascade overrides CSS declared earlier in the style sheet.  It is my understanding that the functions.php does not operate the same way. I understand that both functions.php are loaded.  What happens if you want to have the function in the child theme override a function in the parent theme and the parent theme is not using if statements like the codex recommends?

I was wondering whether it is possible to completely disable a function that is called in a parent theme's functions.php and if so, how? (Of course without deleting the function. Rather by adding something to functions.php of the child theme.)


I was reading the answer to , but I'm confused about a part of it.      Will deleting my account clear any restrictions placed on my account?      Unfortunately, deleting your account while you are suspended by a   moderator or rate-limited or banned by the automated quality filter   will not remove any restrictions placed on your account. They will   simply be re-applied to any new accounts you create.   Note the bolded sentence at the end.   Suppose if I owned an account that was . I delete my account, and everything I earned under that account is lost.    Suppose I create a new e-mail account, and use it to apply for another account on Stack Exchange (for this example, let's assume under the same display name), if a moderator determines that the owner was in fact the owner of an account that was suspended and deleted, can they apply the same suspension to the new account? Or is it new e-mail = new user/account?   You would have to safely determine that the new user is really the previous user, because the display name could be a common name or a popular character in pop culture, and it could just be a coincidence, that you favor the same tags/topics.   I've been referred to  post, but it doesn't answer my question fully. When you have a new e-mail account, and use it to start a fresh Stack Exchange account, can any previous suspension or penalties be transferred?  As the quoted answer states, if you create another account, it won't remove the previous suspension, but it doesn't differentiate between the same e-mail or a new e-mail address for the new account. How does the Stack Exchange rules and system handle this type of situation?  I don't just mean editing your profile with the new e-mail, I mean hitting signup and filling out the fields only with your new e-mail address, so on the surface, to Stack Exchange, you are a new user.

My account has been , besides the following restrictions:  an account will be locked at 1 reputation the user page will have a visual indication that the account is in timed suspension, and for how long the account holder will be unable to vote, ask, answer or comment  What else does timed suspension prevent me doing? For example, can I still edit my own posts or delete content? And what is a network-wide suspension?


How to remove String element in array using different method. Any ideas on how to make it? I currently have this but it's not working and I'm out of ideas. else if(operations ==2){                 String searchStudentNumber = sc.next();                 StudentAssistant[] copy = new StudentAssistant[studAssistant.length-1];             for(int i=0,j=0;i<studAssistant.length;i++){                 if(copy[i]!= searchStudentNumber){                     copy[j++] =                 }             }   //                for(int i = 0; i<sACounter; i++) ////                    if(studAssistant[i].getStudentNumber().equals(searchStudentNumber)){ //                    if(studAssistant[i].equals(searchStudentNumber)){   ////                        studAssistant[i].searchStudentNumber(searchStudentNumber); //                        studAssistant[i] = null; //                        break; //                    }                   }

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


I am transition from Windows to OS X: Can one configure the Safari browser with a socks to tunnel through a SSH tunnel (Putty in MS-Windows).  Can a SSH tunnel be configured from the command line and command the Safari browser to direct request / responses through the tunnel?  If yes, an example is appreciated.

I've been using SSH Tunnel manager to easily set up and stop port tunneling over SSH to various servers at my company. That saved me the pain of opening up a new terminal window which will hang out there just for the sake of having a tunnel open.  This worked great (well , sort of) but SSH Tunnel Manager is a PowerPC application. With Lion, it is not supported any more.  What is a good replacement?


I am reading an older physics book that my professor gave me. It is going over Coulomb's law and Gauss' theorem. However, the book gives both equations with an $r^3$, not $r^2$, in the denominator. Can somebody please explain why it is given as r^3? An image is attached for reference.  Also for equation 1-24, can somebody please explain how the middle side is equal to the right side with the del operator?

I am going over Coulomb's law and there is something that is a bit confusing for me:  According to Coulomb's law, if I have a charge $q_{1}$ at a point $\vec{r_{1}}$ and a charge $q_{2}$ at a point $\vec{r_{2}}$ then the force that the first charge applies to the second charge is given by  $$ F_{1,2}=\frac{Kq_{1}q_{2}}{|\vec{r_{2}}-\vec{r_{1}}|^{2}}(\vec{r_{2}}-\vec{r_{1}})=\frac{Kq_{1}q_{2}}{|\vec{r_{2}}-\vec{r_{1}}|^{3}}\hat{(\vec{r_{2}}-\vec{r_{1}})} $$  I see that in the first expression is does look like the force is proportional to $\frac{1}{r^{2}}$, but I don't understand why it isn't the second expression that matters, giving us that the force is proportional to $\frac{1}{r^{3}}$:  Say both charges are on the $x-$axis, then $\hat{(\vec{r_{2}}-\vec{r_{1}})}=\hat{x}$. Increasing the distance between the charges to two times what is by moving the second charge on the $x$- axis was, would decrease the force $2^{3}=8$ times, since $\hat{(\vec{r_{2}}-\vec{r_{1}})}$ is still $\hat{x}$.  What is the mistake in my reasoning ?


Is there any example of currently living organisms that shows close resemblance to both being a plant and an animal?  What is the plant with the closest possible resemblance to animals, and What is the animal with the closest possible resemblance to plants?

Plants and animals have the following distinct properties:    Plants live from solar energy by , they use solar energy to make sugar and oxygen out of carbon dioxide, which gives them energy. Animals live from the sugar and oxygen plants created and produce carbon dioxide for their energy. Animals can move across the planet while plants are tied to the ground.   Clearly, animals have a harder time to survive with no plants within their reach than plants have without animals coming close. This is logical because solar energy is always there while plants are not.  So my question is: Are there animals that can do photosynthesis? It's obvious that an animal with plant-like stateliness would be non-beneficial since it relies on eating other plants for it's energy and there may not always be plants within reach from it's spot.  But animals using the sun and carbon dioxide for energy production does not sound so stupid.   Night animals could also gather energy in their sleep. Much easier than plants, animals could make sure nothing blocks their sunlight. Many animals go through periods of hunger because food is scarce, for some of them this period is paired with high sunlight levels. (the dry season f.e.) (EDIT: This is just an idea, of course photosynthesis requires water, which is absent in the dry season. But still, in warm period with enough water, there's sometimes too much animals to feed from the available vegeation.)   Some things I already took into consideration:   I know that plants, because they are small in mass (compared to the area with which they can collect sunlight) and static, don't need nearly as much energy as animals do. Is this the main reason? I know that f.e. reptiles, but in fact all cold-blooded animals, already use the sun's energy. But they only use the heat from the sun to warm their bodies, they don't photosynthesize.


Firstof all i am new to android game programming.This is the GameView java class. I did not write the code and to find the other files you can visit     . When i compile everything, android studio gives me error. why is that?   package net.simplifiedcoding.spacefighter;   import android.graphics.Paint;   import android.content.Context;  import android.graphics.Canvas;  import android.graphics.Color;  import android.view.SurfaceHolder;  import android.view.SurfaceView;   public class GameView extends SurfaceView implements Runnable {  volatile boolean playing; private Thread gameThread = null;  //adding the player to this class private net.simplifiedcoding.spacefighter.Player player;  //These objects will be used for drawing private Paint paint; private Canvas canvas; private SurfaceHolder surfaceHolder;  public GameView(Context context) {     super(context);      //initializing player object     player = new net.simplifiedcoding.spacefighter.Player(context);      //initializing drawing objects     surfaceHolder = getHolder();     paint = new Paint(); }  @Override public void run() {     while (playing) {         update();         draw();         control();     } }  private void update() {     //updating player position     player.update(); }  private void draw() {     //checking if surface is valid     if (surfaceHolder.getSurface().isValid()) {         //locking the canvas         canvas = surfaceHolder.lockCanvas();         //drawing a background color for canvas         canvas.drawColor(Color.BLACK);         //Drawing the player         canvas.drawBitmap(                 player.getBitmap(),                 player.getX(),                 player.getY(),                 paint);         //Unlocking the canvas         surfaceHolder.unlockCanvasAndPost(canvas);     } }  private void control() {     try {         gameThread.sleep(17);     } catch (InterruptedException e) {         e.printStackTrace();     } }  public void pause() {     playing = false;     try {         gameThread.join();     } catch (InterruptedException e) {     } }  public void resume() {     playing = true;     gameThread = new Thread(this);     gameThread.start(); }   }

I'm a C++ developer - not a java developer, but have to get this code working...  I have 2 public classes that will be used by another product.  I used the package directive in each of the java files.    package com.company.thing;  class MyClass ...   When I try to compile a test app that uses that I add   import com.company.thing.*;   The javac compiler fails with errors about com.company does not exist.  (even if I compile it in the same directory as the class files I just made a package of)  I am sure I am doing something bone-headed and silly.  I've read the  pages and tried to set up a directory structure like /com/company/thing  etc, but either I have totally screwed it all up or am missing something else.  EDIT thanks for the suggestions - I had tried the classpath previously.  It does not help.  I tried compiling   javac -classpath <parent> client.java    and the result is:  package com.company does not exist   I have the code I want to import (the two java files) in \com\company\product.  I compile those fine.  (they contain MyClass) I even made a jar file for them.  I copied the jar file up to the parent directory.  I then did (in the parent directory with the client java file)   javac -cp <jarfile> *.java   the result is:  cannot access MyClass bad class file: MyClass.class(:MyClass.class) class file contains wrong class: com.company.product.MyClass Please remove or make sure it appears in the correct subdirectory of the classpath.   EDIT  I got the client code to compile and run if I used the fully qualified name for MyClass and compiled it in the parent directory.  I am totally confused now.    compiled with no classpath set - just   javac *.java    in the parent directory - and it worked fine.  I can get a test app to compile, but that is not going to cut it when i have to integrate it into the production code.  Still looking for help.  EDIT:  Finally - not sure why it didn't work before - but I cleaned up all the files all over the directory structure and now it works.    Thanks


I'll admit I'm completely stumped. This is one of those bugs you will only get from a language like c++.  I've got a struct array that I am modifying the member data for. Just normal assignment really. I've got one function that gets some of the member data, the function then calls another function which will get other member data. When I use the Visual Studio debugger to step through, all the assignment seems to go by fine. I watch the variables change in the debugging window at the bottom. But once the second function goes back up to the calling function, the data vanishes. it goes back to unallocated gibberish. Any Idea's?  Edit: Do not mark this question as a duplicate of a value/reference discussion. It should either be deleted for uniqueness, or left alone. Far too many answers on this site are marked as duplicate simply because an answer somewhere else might answer the question, even though the questions are different. If the questions are different, they should be separate.  The two functions:  void GetTestData(Student* students, int numStudents, int numTests) {   // Loop through the i students and all j tests   for (int i = 0; i < numStudents; ++i)   {     // get test scores     for (int j = 0; j < numTests; ++j)     {         cout << "What was " + students[i].Name + "'s score for test #" + to_string(j + 1) + "? ";         cin >> students[i].Tests[j];     }      CalcGrades(students[i], numTests);   } }  void CalcGrades(Student student, int numTests) {   double sum = 0;    // add up all the scores   for (int i = 0; i < numTests; ++i)   {     sum += student.Tests[i];   }    // calculate the average and store it in the members   student.Avg = sum / numTests;    // grade assignment tree   if (student.Avg >= 91)   {     student.Grade = 'A';   }   else if (student.Avg >= 81)   {     student.Grade = 'B';   }   else if (student.Avg >= 71)   {     student.Grade = 'C';   }   else if (student.Avg >= 61)   {     student.Grade = 'D';   }   else   {     student.Grade = 'F';   } }

What is the difference between    a parameter passed by reference a parameter passed by value?   Could you give me some examples, please?


Let's say someone managed to get the Hulk into space and left him there. Is there anyway he could die from starvation if left out there long enough?

Does the Hulk actually need to consume food, or is Bruce Banner's normal dietary intake enough? I'm asking because it seems transforming from the Hulk back to Bruce Banner with a half a cow in his stomach could be rough on the poor Doctor.


The van Kampen theorem implies that the fundamental group of the figure-eight, being the wedge product of two circles, is not abelian. How can one prove directly that the path-product of the loop $\alpha$ around one of the two circles and the loop $\beta$ around the other (both at the point where the circles are joined) does depend on their order, i.e., that $\alpha \beta$ is not path-homotopic to $\beta \alpha$? Surely there must be a way!

I know $\pi_1(\mathbb{R}^2\setminus\{x,y\}) = \mathbb{Z}\ast\mathbb{Z} = \langle a,b\rangle$, but its non-abelian-ness isn't obvious to me.   Specifically, I draw a box and two points to represent $x$ and $y$. I call the clockwise loop around $x$ $a$, and the clockwise loop around $y$, $b$.   If I draw the loops $ab$ and $ba$ they look `obviously homotopic' to me (they are both a single clockwise loop containing both $x$ and $y$), so should be the same element in $\pi_1$, which is clearly not the case if we take the free product of $\mathbb{Z}$ with itself.   It seems that I must be making a big mistake somewhere. What is the obstruction to $ab \simeq ba$? I would prefer something concrete, I know this fundamental group follows from standard theorems (van Kampen's theorem), but I want to see the homotopy fail, because I think they are pretty clearly homotopic - so there is something wrong with my intuition which I'd like to fix.


Is there a book analogous to Introduction to Algorithms (CLRS) for Machine Learning, that covers all the models and explanations comprehensively?

I find resources like the  and  incredibly useful. They obviously serve well as references but also help me to organize my thoughts on a subject and get the lay of the land.   Q: Does anything like these resources exist for machine learning methods?  I'm imagining a reference card which for each ML method would include:   General properties When the method works well When the method does poorly From which or to which other methods the method generalizes. Has it been mostly superseded? Seminal papers on the method Open problems associated with the method Computational intensity   All these things can be found with some minimal digging through textbooks I'm sure. It would just be really convenient to have them on a few pages.


Here is my system specifications.    Error:     The computer has rebooted from a bugcheck.  The bugcheck was:   0x0000001a (0x0000000000041790, 0xfffffa8003d23de0,   0x000000000000ffff, 0x0000000000000000). A dump was saved in:   C:\Windows\MEMORY.DMP. Report Id: 080515-65988-01.   Log >

For the past couple weeks, my PC has started having an issue where it randomly reboots. These reboots have happen 1-2 times a day, and have so far always been when I am away from it.  There isn't any discernible patterns I've seen from the reboot timestamps. I've thought it might be related to the power supply going bad, but it is fairly new. Also the fact that it is not rebooting under load, but rather while Idle, seems like it shouldn't be a PSU problem?  I also upgraded to Windows 10 the other day, expecting that to possibly affect/fix the issue, but it still happens regardless.  Here are the two events always generated by the reboot -        Is there any way to further debug/troubleshoot what exactly is causing the reboots?


When is the right time to start adding(or thinking about adding) servers to your Web Application? What are the difficulties involved in going from a single server(DB and Web) to multiple?  For example:  Most of the time you start with one sever that you use for both DB and Web then you split you DB/Web onto a different server then go to multiple web servers(which creates session issues) then possibly a NAS for the DB etc etc.

This is a  about  Related:      I have a question regarding capacity planning. Can the Server Fault community please help with the following:   What kind of server do I need to handle some number of users? How many users can a server with some specifications handle? Will some server configuration be fast enough for my use case? I'm building a social networking site: what kind of hardware do I need? How much bandwidth do I need for some project? How much bandwidth will some number of users use in some application?


I found out that numpy cannot save with a certain name.  >>> import numpy as np >>> a = range(100) >>> np.save('con', a) �NUMPY F {'descr': '<i4', 'fortran_order': False, 'shape': (100,), } Traceback (most recent call last):   File "<stdin>", line 1, in <module>   File "C:\Users\gilgarad\AppData\Local\Programs\Python\Python36\lib\site-packages\numpy\lib\npyio.py", line 509, in save     pickle_kwargs=pickle_kwargs)   File "C:\Users\gilgarad\AppData\Local\Programs\Python\Python36\lib\site-packages\numpy\lib\format.py", line 587, in write_array     array.tofile(fp) io.UnsupportedOperation: seek   Why am I getting this error? I am sure that this is not because of the length of file name because I have saved some other files with the other three character length name and was successful.  Is there some kind of rules about the file names that I should know if when I save some numpy file?

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


a question - in some case, I saw command line like this   . ./test.sh  I'm curious why use "." before "./test.sh" what condition we have to use "." before a command?

While following android eclipse debug tutorial, I encounter following commands.  cd /path/to/android/root  . build/envsetup.sh  lunch 1     make        emulator   My problem is what the dot before build/envsetup.sh means?


Why does a negative times a negative equal a positive? Does this ever happen in the real world?

Someone recently asked me why a negative $\times$ a negative is positive, and why a negative $\times$ a positive is negative, etc.  I went ahead and gave them a proof by contradiction like so:  Assume $(-x) \cdot (-y) = -xy$  Then divide both sides by $(-x)$ and you get $(-y) = y$  Since we have a contradiction, then our first assumption must be incorrect.  I'm guessing I did something wrong here. Since the conclusion of $(-x) \cdot (-y) = (xy)$ is hard to derive from what I wrote.  Is there a better way to explain this?  Is my proof incorrect?  Also, what would be an intuitive way to explain the negation concept, if there is one?


Below is my code, basically what I want the program to do is loop the while statement every time the enter key is hit, and then when "q" is submitted to the console, I want the program to end. What did I do wrong? With this code, it only runs once, and if i change  if (moreEmps != "q") break;    to  if (moreEmps == "q") break;   then it will continue no matter what is entered. can someone steer me in the right direction? Thanks!      import java.text.NumberFormat;     java.util.Scanner;     /**     * Input a number of hours and calculate the pay at $10.00 per hour     * Pay time and one half for any hours over 40.     */     public class PayCalc     {     public static void main (String[] args)     {     // Declare constants to be used in payroll calculation     final double RATE = 10.00;     // hourly rate     final int REGULAR_HOURS = 40; // hours paid at regular rate      double pay = 0.0;     Scanner input = new Scanner (System.in);      System.out.println("Employee Payroll Program");     System.out.println("Press enter to begin.");      String moreEmps = "";      while (moreEmps != input.nextLine())     {          System.out.print("Enter employee name: ");          String employee = input.next();          System.out.print("Enter hours worked:  ");          int hours = input.nextInt();           if (hours > REGULAR_HOURS)              pay = RATE * REGULAR_HOURS + (hours - REGULAR_HOURS) * RATE * 1.5;           else             pay = hours * RATE;           NumberFormat formit = NumberFormat.getCurrencyInstance();          System.out.println();          System.out.print("Total Pay for ");           System.out.print(employee);          System.out.println(" : " + formit.format(pay));           System.out.println("Any more employees?");          System.out.println("Press enter to input another employee's information, or q to quit.");          moreEmps = input.next();          moreEmps.toLowerCase();             if (moreEmps != "q") break;     }    } }

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


I want to find the number of ways to make change for $22.22 using pennies, nickels, dimes, quarters, half dollars, and dollars. I have a textbook with generating functions for this, but I don't exactly see what to do.

I was trying to solve a problem similar to the "how many ways are there to make change for a dollar" problem.  I ran across a  that said I could use a generating function similar to the one quoted below:     The answer to our problem (293) is the   coefficient of $x^{100}$ in the reciprocal   of the following:      $(1-x)(1-x^5)(1-x^{10})(1-x^{25})(1-x^{50})(1-x^{100})$   But I must be missing something, as I can't figure out how they get from that to $293$. Any help on this would be appreciated.


I have two (really three, but one is irrelevant here) header files with classes in them for a project. One Node class that includes a set of pointers to other nodes (its like a tree), and the other class is a graph class (entitled AML) that holds a set of all the pointers to nodes in their respective layers.   I wanted to write my own C++ set operations (because I'll need them), so I decided to declare a namespace that has the set operation functions. However when I try to use these set operations in my Node class, I get an error. Here is the relevant code:   aml.h  #pragma once #include <set> #include "Node.h" #include "constant.h"  using namespace std; class aml { // class stuff };  namespace setops {     set<Node*> set_union(set<Node*>  &a, set<Node*>  &b);     // other set operations }   aml.cpp  #include "aml.h"  using namespace std;   //class functions  set<Node*> setops::set_union(set<Node*>  &a, set<Node*>  &b) {     set<Node*> c;     for (Node* data : a) {         c.insert(data);     }     for (Node* data : b) {         c.insert(data);     }      return c; }   Node.h  #pragma once #include <string> #include <set> #include "aml.h" #include "constant.h"  using namespace std; class Node { private:     set<Node*> lower; public:     set<Node*> getLower();     set<Node*> GL(); };   and here is the GL() method in which the error occurs. This is supposed to return the set of all nodes that can be reached by traveling down the tree. getLower() returns the lower set that houses all a node's children.  Node.cpp  #include "Node.h"  set<Node*> Node::getLower() {     return this->lower; }  set<Node*> Node::GL() {     set<Node*> lowerSet;     lowerSet.insert(this);     if (this->lower.size() == 0) {         return lowerSet;     }     set<Node*> recurse;     for (Node* node : this->lower) {         recurse = node->GL();         lowerSet = setops::set_union(lowerSet, recurse); //This is the error line     }     return lowerSet; }   I marked the problem line. It actually has three errors, one on each parameter and one of the equals sign. The errors say (all of them are pretty much the same, but this is the parameter one)  a reference of type "set::set<<error-type>*, std::less<<error-type>*>, std::allocator<<error-type>*>& "(non-const qualified) cannot be initialized with a value of type "set::set<Node*, std::less<Node*>, std::allocator<Node*>> "  I have no idea what is going on, any help appreciated!

I often find myself in a situation where I am facing multiple compilation/linker errors in a C++ project due to some bad design decisions (made by someone else :) ) which lead to circular dependencies between C++ classes in different header files (can happen also in the same file). But fortunately(?) this doesn't happen often enough for me to remember the solution to this problem for the next time it happens again.  So for the purposes of easy recall in the future I am going to post a representative problem and a solution along with it. Better solutions are of-course welcome.     A.h  class B; class A {     int _val;     B *_b; public:      A(int val)         :_val(val)     {     }      void SetB(B *b)     {         _b = b;         _b->Print(); // COMPILER ERROR: C2027: use of undefined type 'B'     }      void Print()     {         cout<<"Type:A val="<<_val<<endl;     } };       B.h  #include "A.h" class B {     double _val;     A* _a; public:      B(double val)         :_val(val)     {     }      void SetA(A *a)     {         _a = a;         _a->Print();     }      void Print()     {         cout<<"Type:B val="<<_val<<endl;     } };       main.cpp  #include "B.h" #include <iostream>  int main(int argc, char* argv[]) {     A a(10);     B b(3.14);     a.Print();     a.SetB(&b);     b.Print();     b.SetA(&a);     return 0; }


My computer is showing signs of impending hard drive disaster. Time Machine recently killed all my backups and has not cooperated since. I tried backing up with Super Duper, but it quit after about a minute. The Super Duper log reported 'Too many open files'. I attempted a backup with Rsync and it hummed along fine for about an hour until it too started spitting out 'too many open files' errors and not copying anything. Carbon Copy Cloner worked longer but skipped a bunch of files.   Based on other posts here, I have maxed the open file limit and am running rsync again.  Though this process has not completed yet, I am posting here because I do not feel optimistic. I am seeing this 'Too many open files' error all over the place suddenly, so I fear that maxing the file limit is a workaround at best. (assuming it even works)  The first time I saw the 'Too many open files' error, I was running a shell script that involved uploading an archive to a remote server and unzipping it. I had done this numerous times before without incident. The number of files hadn't changed. I got this error again while running a Python script to build files using Jinja2. This was also a script I had run previously without any problems.   The sudden proliferation of errors of this kind coincides with a general degradation in the performance of my computer, which most frequently takes the form of app and system freezes that can only be resolved with forced restarts. At the very same time rsync choked this evening, Safari was hanging also. As ever, Force Quit was not available and so I had to force a shutdown. There are also more crashes than usual. A recent Apple update that crashed my computer on restart seems to have made everything much worse.    Carbon Copy Clone's Disk Center said my Hard Drive seemed to have Read/Write errors, though the Apple Hardware Test and Disk Utility have reported nothing out of the ordinary. Activity Monitor also does not show anything unusual, though I am not an expert in interpreting its output. I think there may be more disk activity than usual. CPU and Memory stats all seem fine.  Any ideas on what's going wrong here? Is it appropriate to assume the hard drive is the problem? It came with the computer, which is now four years old. Any other possibilities? Any recommendations on how to get everything backed up before the drive -- or whatever -- dies altogether?  I am running Snow Leopard on a mid 2010 15" MacBook Pro. I am attempting to back up to a brand new portable USB-connected portable drive which seems to work fine.

Which command / configuration file controls the open file limits on OS X?  Is there a different command for OS X 10.5 / 10.6 / 10.7?  The options I explore below are ulimit, sysctl, and launchctl  "Too many open files" is apparently a common error on Leopard, perhaps other versions of OS X:        There are many (related?) ways to view the open file limits:  $ ulimit -a core file size          (blocks, -c) 0 data seg size           (kbytes, -d) unlimited file size               (blocks, -f) unlimited max locked memory       (kbytes, -l) unlimited max memory size         (kbytes, -m) unlimited open files                      (-n) 2048 pipe size            (512 bytes, -p) 1 stack size              (kbytes, -s) 8192 cpu time               (seconds, -t) unlimited max user processes              (-u) 512 virtual memory          (kbytes, -v) unlimited   $ launchctl limit cpu         unlimited      unlimited       filesize    unlimited      unlimited       data        unlimited      unlimited       stack       8388608        67104768        core        0              unlimited       rss         unlimited      unlimited       memlock     unlimited      unlimited       maxproc     1024           2048            maxfiles    2048           4096         $ sysctl -a | grep files kern.maxfiles = 32768 kern.maxfilesperproc = 16384 kern.maxfiles: 32768 kern.maxfilesperproc: 16384 kern.num_files: 2049   It has been claimed in some of the above posts that these can be modified with the following commands:  sudo launchctl limit maxfiles 16384 32768 sudo ulimit -n 32768 sudo sysctl -w kern.maxfilesperproc=16384 sudo sysctl -w kern.maxfiles=32768   However, out of the above commands, only the sysctl commands have any apparently effect (i.e. ulimit -n and launchctl limit show no change after the above commands have been entered, while sysctl -a does show the requested changes).  The corresponding locations to change these parameters for the OS are:  /etc/sysctl.conf /etc/launchd.conf   I also discovered one  which reads that ulimit only controls the current shell.  How can I adjust upwards the max files / max open files limits on macOS?


As an example, consider the plus sign (+). The code $x + y$ generates x + y. How can you make it look like x+y? In other words, how can you treat + like a letter rather than an operator? I'm looking for a local solution rather than a global one.  MWE :   \documentclass{article} \begin{document} $x + y$ \end{document}

LaTeX commands like this:  Here again, four different simulations are run on networks of size  $C^{G} = 25 \times\ 25 = 625$, $C^{G} = 50 \times\ 50 = 2500$, $C^{G} = 250 \times\ 250 = 62500$, and $C^{G} = 500 \times\ 500 = 250000$...   When compiled generate the following:    The spacing in math mode really irritates me. There's too much white space around the equal sign, and the multiplication sign has more right padding than left padding. Is there any way to reduce this spacing?


If I do an edit, and while it is pending (being approved), someone comes and does the same edit, my edit gets rejected by 'Community'. It doesn't contribute to my edit ban, but it does still contribute to my 'number of rejected edits', which is shown to all the reviewers when I edit something. This seems pointless, as in fact, my edit was good, and was, in a way, implemented. I shouldn't be penalised for it.  I don't think that this should increment the rejected edits number for no reason, even if it still doesn't award the +2 rep and increment the accepted edits number either.

Currently, once an edit by a user without full edit privilege is suggested, it can be either approved or rejected.  There is a known edge case that cause suggested edits to get auto rejected: (aka edit conflict)   User with full edit privilege click "edit" and start typing. Let's name this user Joe. Since the user from previous step did not yet send the edit, users without full edit privilege can still click the "edit" as well, oblivious to the fact someone else is editing the same post in those very seconds. Such user click "edit" too and start typing. Let's name this user Kenny. Kenny is faster than Joe: he send his edit first, creating new suggested edit. Joe is still typing. Joe finally done typing. He send his edit to its merry way oblivious to the consequences. As result of the full edit made by Joe, Kenny's suggested edit is kicked away and rejected. Boom.   This is all known and reported many times.  where the user got it hard with at least two auto rejections in short period of time. Some concrete examples: , , .  For edge case, it became pretty thick edge. This is not just minor hassle: enough rejections, and the user is banned from suggesting for a whole week: and remember we're talking here about good edits made by good users. The above used to count for the ban, but . Thanks Gilles for requesting such a change!   I know it was already suggested to lock edits and similar solutions, but I suggest whole different approach: instead of auto rejecting the suggested edit, dismiss it, i.e. cancel it like it never existed same way a bounty can be revoked by moderator.  In the edit suggestion page it will show "Dismissed" instead of Approved or Rejected maybe with a tooltip explaining what caused this. This will soften the blow from those edge cases, taking the edge out of them. :)


Is AirBnb categorized as "hotel" or "staying with a person" for schengen visa online application from India? I am confused about putting hotel name and other details like phone number and email. Staying with a person probably means without paying, but I paid for AirBnb. Please help.

We (Russian citizens) are planning to go to Munich in late June. We would like to book our accommodation on AirBnB, but it is not very clear whether it will be accepted by the German embassy when we apply for a Schengen visa.  I can't find such information on the German embassy site or on the VFS-Global site. I've also searched for it on the Internet, and, while most sites agree that AirBnB booking is generally OK for a visa, I don't see a clear answer for Germany specifically, and there seems to be some exceptions for other European countries.


What is the most user friendly IDE for HTML, CSS and JS on ubuntu? I have heard it said that programming on the Linux platform can be quite potent when creating server applications. Can you good people post your photos or screenshots of workspaces where any IDEs are used heavily. Thanks tons...

This question exists because it has historical significance, but it is not considered a good, on-topic question for this site, so please do not use it as evidence that you can ask similar questions here. See  for more information.   This is a community wiki for IDEs available on Ubuntu. Please post one IDE per answer (including more than just a screenshot or a link, please at least put a short description).  In your answer, tell us what the IDE is for (which language(s) or if it is RAD capable).


Specifically on large media drives. I'm interested in this subject because I just purchased a 8TB external hard drive (WD White Label) that is specifically going to be used to store hi-res images, music, and 1080p/4k video files. I also plan on editing some of these files as needed, so fragmentation is to be expected. My goal is to use an optimal AUS size with a good balance between speed and fragmentation prevention. Images will be the smallest files and will average around 1mb each.

I'm formatting a 1TB external hard drive as a single NTFS partition.  This drive is mainly meant for storing media.  Should I choose something other than the default allocation unit size?  The options range from 512 bytes to 64K.  Are there any guidelines that I should use with partitions storing other data?  Should I stop poking around and just leave it at "default"?


I have a table (Excel, csv) with county names and three additional column headings. I would like to ensure that everything under the three additional headings have a zero rather than a 'null' value.   I do not know Python (I see Python as an answer in other questions).

I am having some difficulties to change "NULL" values to zero in geodatabase. I have tried the following python code in ArcGIS 10.1 ("Field Calculator") to change it but did not work.   Pre-Logic Script Code:  def RemoveNULL(x):     if x is None:         return ''     elif x == '':         return '0'     else: return x   Calculation field:  RemoveNULL(str( !DEAD_VOL_PER_HA_SPP1_125!))   Error message:  ERROR: 999999: Error executing function The value type is incompatible with the field type. [dead_pine] Failed to execute (calculate field)


I'm trying to create a 1 command block house for a datapack function (as I'm learning how to create datapacks) and I want a sign in the basement of my house however I can't get the sign to be coloured at all. I'm able to give myself a custom sign:  /give @p oak_sign{BlockEntityTag:{Text1:"{\"text\":\"Push For\",\"color\":\"dark_red\"}",Text2:"{\"text\":\"a\"}",Text3:"{\"text\":\"b\"}",Text4:"{\"text\":\"c\"}"}}   However when I try to put the entitytag into a /setblock command it doesn't work and just creates a blank sign. This is the command I'm using to test.  /setblock ~ ~ ~ oak_sign{BlockEntityTag:{Text1:"{\"text\":\"Push For\",\"color\":\"dark_red\"}",Text2:"{\"text\":\"a\"}",Text3:"{\"text\":\"b\"}",Text4:"{\"text\":\"c\"}"}}   Is there a different method for when I use /setblock?  Edit for anyone who might have the same problem: When setting block you don't need the "BlockEntityTag". You can just use:  {Text1:"{\"text\":\"Push For\",\"color\":\"dark_red\"}",Text2:"{\"text\":\"a\"}",Text3:"{\"text\":\"b\"}",Text4:"{\"text\":\"c\"}"}  (Make sure to delete the extra } on the end of the command.

I tried the custom loot tables here:                                (with his website:  ).  I successfully obtained my chest with the custom loot using:   /give @p minecraft:chest 1 0 {BlockEntityTag:{LootTable:"mctools:chests/loot_table"}}   The problem is that I want to summon the chest instead of giving it to the player. I tried the command:   /setblock ~1 ~ ~ chest 0 replace {BlockEntityTag:{LootTable:"mctools:chests/loot_table"}}   The chest did place, but when I opened it, the chest was always empty. Why can't I retrieve my loot this way? And if possible, how can this be done?


I see some tags have images and some do not, why is this?

What does an icon on the tag mean, for example the "rg" before the sql-server tag as pictured below?


Can we use superlative when we are talking about 2 or more items? I'm not quite sure about that since the rule says: "Superlative adjectives are used to describe an object which is at the upper or lower limit of a quality".   I wanted to figure out this before talking to my student who wrote the following sentence:"Only a few games are the most popular in the world".

When speaking with my mother a couple of days ago, I read to her a message I was sending to my cousin on her behalf ending with: "... the birthday of your youngest." [implying her child]  She immediately leapt on this and said that as my cousin only had two children, the use of the superlative was not permitted and the comparative must be used instead: "... the birthday of your younger child."  She was adamant that this was a solid grammatical rule that she was taught throughout her education.  As a younger Briton, I have relatively little formal grammatical education to older people who were better taught in this regard, so I usually defer to her on grammatical rule knowledge.  Is she right?  Are superlatives not permitted when the domain of the object is only two?  To me it seems bizarre.  The minimum or maximum of any set does not only exist when there are different minima and maxima, or indeed something which is neither.


i have this struct that is in theory 14 bytes  typedef struct ActionArgument{  ManagedObjectId managed_object;   uint32_t scope1;                          OIDType action_type;              uint16_t length; } ActionArgument;   the struct ManagedObjectId is 6 bytes , scope is "suposedly" 4 bytes , OIDType is a uint16_t ( 2 bytes ) so is length. But the problem is when i print the size of scope i get 4 bytes which is right , but the size of struct ActionArgument becomes 16.  I tried to correct this by spliting scope to 2 uint16_t variables (scope1 and scope2) and it worked . But i am still intrigued why the size of a uint23_t is 4 but when i put it in a struct it becomes 6? can some one explain to me ?   I am using kalilinux 4.14.0-kali3-amd64  thanks.

Why does the sizeof operator return a size larger for a structure than the total sizes of the structure's members?


Let's say there is a virtual digital pet, who is aging, as a computer simulation. And there is one flying computer, launched from far way, which is now close to the earth and is moving away from the earth to a star. There is another flying computer moving toward the earth from the star. Those 2 flying computers both are in 0.9c speed.  The earthlings upload this digital pet to the computer moving away from the earth, when it is close to the earth. Then it flies 100 LY away from the earthling's view. At that place, it encounters the other computer moving toward the earth. The virtual pet, now who is a little aged, is copied to the computer moving toward the earth. Sometime later, this computer finally gets close to the earth again. The earthlings download the virtual pet, and check its age.  Now, who is older? The earthlings or the virtual pet? It's easy to say, the computers flied fast and their time delayed. But from the virtual pet's view, the earthlings always moved at very fast speed, though the direction changed. Did the earthlings' time delay? How can we explain this version of twin paradox? I think this captures the essence of twin paradox. There is no acceleration and no gravity.  I know this is really similar to 2 clocks and synchronizing version of twin paradox. But in this way, I think we can clearly see the traveling one also as  another independent observer.

Alright, so David Griffiths in his "Introduction to Electrodynamics" states that the Twin Paradox is not a paradox at all since the traveling twin returns to Earth. By returning to Earth, the twin had to reverse direction, thus undergoes acceleration, and therefore cannot claim to be a stationary observer.   However, what if the traveling twin simply Skypes the twin that is on Earth. The twin on earth will still appear older, which would make no sense since in that case the rocket can be seen as the stationary frame of reference while the Earth "travels" at a speed close to the speed of light. No acceleration is undergone, yet the paradox remains.   Is Griffiths just completely glossing over important nuance again?


On p. 24 "Clifford Algebra and Spinors" (2.2 Double Ring of  $\:{}^2\mathbb{R}$ of $\mathbb{R}$) by Petri Lounesto the author mentions Study numbers as an equivalent alternative to complex numbers. The Study numbers are pair of two real numbers (a,b) $\in \mathcal{\mathbb{R}}^2$ such as $$a+jb, \quad j^2=1 ,\quad j \neq 1$$ He introduces Study conjugate as $(a+jb)^-=a-jb$, then they can be written in hyperbolic polar form e t c. It seems that the use of such numbers can be as powerful as the use of complex numbers then. My questions are  Why Study numbers are not widely known and used? Can someone point me to the reference to the Study numbers? I can not find it either in Wikipedia, neither in literature.  PS The mathematician is . He approached the dual quaternions with the dual numbers.

How many "super imaginary" numbers are there? Numbers like $i$? I always wanted to come up with a number like $i$ but it seemed like it was impossible, until I thought about the relation of $i$ and rotation, but what about hyperbolic rotation? Like we have a complex number $$ z = a + bi $$ can describe a matrix $$ \begin{bmatrix} a & -b \\ b & a\end{bmatrix} $$ You can "discover" $i$ by doing (which is used for another discovery) $$ \begin{pmatrix} a \\ b \end{pmatrix} \cdot \begin{bmatrix} c & -d \\ d & c\end{bmatrix} = \begin{pmatrix} ac - bd \\ ad + bc \end{pmatrix} $$ $$ (a + bi) \cdot (c + di) = ac + adi + bci + bdi^2 $$ From here on you can infer that $ i^2 = -1 $.  So what if we do the same thing, but a different matrix? $$ z = a + bh$$ can describe a matrix $$ \begin{bmatrix} a & b \\ b & a\end{bmatrix} $$ and we can discover it the same way $$ \begin{pmatrix} a \\ b \end{pmatrix} \cdot \begin{bmatrix} c & d \\ d & c\end{bmatrix} = \begin{pmatrix} ac + bd \\ ad + bc \end{pmatrix} $$ $$ (a + bh) \cdot (c + dh) = ac + adh + bch + bdh^2 $$ From here we infer that $ h^2 = 1 $.  Also $$ e^x = 1 + \frac{x}{1!} + \frac{x^2}{2!} + \frac{x^3}{3!} + \frac{x^4}{4!} + \frac{x^5}{5!} + \cdots  $$ $$ \begin{align} e^{xh} & = 1 + \frac{xh}{1!} + \frac{(xh)^2}{2!} + \frac{(xh)^3}{3!} + \frac{(xh)^4}{4!} + \frac{(xh)^5}{5!} + \cdots \\ & = 1 + \frac{xh}{1!} + \frac{x^2}{2!} + \frac{x^3h}{3!} + \frac{x^4}{4!} + \frac{x^5h}{5!} + \cdots \\ & = \cosh{x} + h \cdot \sinh{x} \end{align} $$  How many more numbers like this are there? And does that mean that for each set of trigonometric functions there exists a number which can turn multiplication into a rotation using those trigonometric functions?  (Sorry if I got some things wrong)


I asked a question at UTC 2:00:16 (16 seconds past UTC 2 am), which was 7 PM in US Mountain Standard Time, but I didn't get the hat for that.    Do I need to be accurate to +/- 10 seconds or something?  Or is the hat broken?

During Winter Bash, users can earn hats. But sometimes it seems that a hat was awarded even though its requirements weren't (yet) met, or vice versa.  What could be the reason for this?


I've been messing around in Photoshop trying to re-create this nice effect. Does anyone know how to achieve a straight shadow like this?

I want to make a long shadow just like in this image.  I can create this shadow with shapes and by deleting the unwanted shadows after rasterizing the layer. But it's not very reusable. I can't resize the layer after rasterizing it.  Is there any easy way to make a long shadow like in the image below?


I have N random variables: $X_{1}, X_{2}, ... X_{n}$ which are all independent.  The probability density function for the ith random variable is $f_{i}(x)$.  What is the pdf $f_{X}(x)$ where $f_{X}(x)$ is the sum of all the random variables?  This is similar to calculating the sum of n dice, but a little more complicated.  Does anyone have any suggestions, tips, or places for me to look to help guide me to the solution?  Thanks in advance!

This may sound too trivial but I am having difficulty to solve an assignment problem where I need to determine the distribution and density of a random variable $Z$ which is the sum of random variables with different distributions.  In general, what is the technique to find the distribution and the density when there are random variables of different distribution?


FICH10=primero.sh FICH20=segundo.sh  for i in 10 20 do    echo $FICH($i)  # I want resolved first $i and then resolver var FICH10 done  I want it to first solve $i and concatenate it to the FICH shoreline and thus return the value of $FICH10 or $FICH20 but without having to put the numbers, but they are resolved by the loop I don't solved with the response asocciate $ for i in 10 20 > do > echo $((FICH$i)) > done ksh: line 3: primero: parameter not set

I am trying to print a simple value for $AR1_p1 but the variable $i is not evaluating. for i in 1 2 3 4 do     AR1_p1=22     AR1_p2=23     AR1_p3=24     AR1_p3=25     echo $AR1_p$i done   It's like concatenating dynamically. Any suggestions on how to fix this?.


What good is an eSATA connection on the outside of my PC with no access to power. Without a power source it seems useless.  Am I not thinking this through correctly — is there something I am not seeing?

I got eSATA slot in my laptop (HP DV-7) + WD 1TB (The exact model: Caviar Green WD10EADS)  What I want to know, it's if I need something else except from the . Does the eSATA cable provide also power to the HD?  If I'll purchase this cable - do I need something else?  Thanks.


Are there any books I can use to learn about the situation of Westeros right after Aegon's conquest? I am looking for things such as lore supplements or game books.

As I can read, the author of the series created several books in the series starting with the book A Game of Thrones. I'm watching the series on TV (I haven't read the books).  When I watched something in the show that I do not fully understand or want to brush up on, I go search the web and usually find the information in Wikipedia. Often I also find a full timeline from before the first book, and I wonder where does this information come from? Whoever wrote this must have this information from somewhere - I just don't seem to understand where, since the first book starts around the same time the first episode of the first series in the TV show?


we are trying to deploy farm solution wsp file on the SharePoint server via PowerShell. The wsp is a webpart. I got this script by browsing forums...  Foll. is our code:-  $oUrl="http://mysite:9999/"     $solutionPath="C:\MySolutions\"  $solution="FarmSolution.wsp" $path= $solutionPath + $solution  Add-SPSolution -LiteralPath $path install-spsolution -Identity $solution -WebApplication $oUrl -GACDeployment  WaitForJobToFinish   Using the above PowerShell the wsp gets successfully deployed into the GAC. The webpart can then be added to page and used successfully.  My question is on the foll. line:-  install-spsolution -Identity $solution -WebApplication $oUrl -GACDeployment    Since the wsp gets deployed to the GAC, then what is purpose of using -WebApplication $oUrl. Can I remove this part? Generally, the only purpose of using the -WebApplication $oURL without following -GACDeployment is to deploy the wsp to inetpub/site/bin.  Now, if our goal is to deploy the wsp to GAC, then why not use it as:-  install-spsolution -Identity $solution -GACDeployment    Would this be correct?  This question doesnt look to be duplicate of  as the question addresses the concern of using either -WebApplication or -GACDeployment or both together in powershell to deploy an feature. Also, the answer shows that the value of the 3rd column (Depyoled To) under Manage farm solutions depends upon the use of -WebApplication or -GACDeployment in powershell while deploying as explained by @Waqas Sarwar MCSE which I have marked as an answer.

There are different levels of scope for deployment, but I have not been able to find a definitive explaination of when each applies and what the restrictions are that require loosening (or tightening) the scope.  I've looked around for some time, and have found tidbits of information here and there, but so far I have not found a definitive explaination.  For features, I know I can set the feature scope in the feature properties page.  For the most part I try to deploy to the smallest scope possible and only increase it if, while developing, I receive the error that I must deploy at a feature at a specific scope.  For solutions, there is the WebApplication to deploy to.  I would prefer to deploy most of my solutions to just one web application, but that is often disallowed with a PowerShell window  full of red text that tells me I must deploy to all web applications.  Similarly, I am often forced to deploy to the GAC when I don't see any reason for the requirement.  So to frame this as a question that I hope can be answered; can someone explain (or direct me to a page that explains) when each scope is required and what conditions need to be met to restrict a solution to a specific scope?  Thanks


I am looking to install SQL developer  I downloaded the .app file.  When I try and open it I get  “SQLDeveloper.app” can’t be opened because the identity of the developer cannot be confirmed.

Just updated the mountain lion, and download the latest Eclipse 4.2 to upgrade the old one. However when opening the application, it shows that it is from an unidentified developer and the gatekeeper refuses to open it.  I know that there is an option to change the security and privacy option to allow it, however I want to know whether there is a way to just add eclipse into the list. Any hint on this?  More information: before updating I have the Eclipse 3.7.2 on machine, and after updating it works smoothly (I think I have added it into the allow list). So is there a way to do this to Eclipse 4.2?  Thanks in advance!


I want to click macro pictures, so was wondering closeup filter for my 18-55mm and 50-200mm as a cheap macro solution. Lately I've been doing more macro work, so I've been thinking about cheap solutions. I mostly take macro shots of insects.  I know DOF is slim at the best of times in macro work, but my question is this: Would there be any difference in DOF when using a closeup filter vs a dedicated macro lens? Or better is closeup filter a best option for cheap macro setup?  Any suggestion will be appreciated.

I was browsing Amazon looking at a few items and came across :     4-piece Close-Up Macro Lens Kit   - Included are +1, +2, +4 and +10 Close- Up Lenses.   High-Quality lenses are diopters for close up photography. They shorten the close focusing distance of the lens, this allows the lens to go closer to the subject and achieves a larger image scale. Lenses may be used individually or in combination for a greater effect.   from what I can tell these screw onto a lens. I do not do macro work but I might want to play around some with macro photography and the price is decent. Are these really worth anything or they junk?  Please Note: I am an amateur and just getting into DSLR World and not a professional.


An individual electron possesses an electric charge.  Can the existence of this charge be explained further, or is this simply a current "fundamental" of physics?

Baryons have charges that are the result of a polynomial calculation of their building blocks (quarks)'s fractional charges. But what gives these quarks electric charges? What interactions do they have with photons? And what about leptons, like muons and electrons? How do they get their -1 charge? And then, how do positrons and anti-muons get +1 charge? Same goes for quarks: how does up-antiquarks get -2/3 charge? Or I may want to formulate my question this way:  How does any elementary particle interact with the EM-Force to get an electric charge?


Is it possible to enable a Windows 10-eque "window snap" in OpenBox? By this, I mean that windows will automatically resize by dragging them to the side and/or corner of the screen. I know that this is possible using keyboard shortcuts (and, indeed, there are at least a few questions on here regarding such). I'm looking for a solution using the mouse, if possible. Can this be done and, if so, how?

I would like to have window snap behaviour in Openbox. For me, this would mean that dragging a window to the edge of the display using the mouse would change the size of the window such that it is docked in half or quarter of the display, as can be done in Unity7. How can this be done in Openbox?


Let $G\subset \mathbb{R}$ be the additive subgroup of $(\mathbb{R},+)$ defined by $G=\mathbb{Z}+\sqrt{2}\mathbb{Z}$. I want to prove that for every $\epsilon>0$ there exists an element $g_\epsilon\in G$ with $\epsilon>g_\epsilon>0$. Can anybody imagine a nice proof?  (I coundn't think of an appropriate tag for this question. Please feel free to add or remove one)

I am having trouble proving the statement:     Let $$S = \{m + n\sqrt 2 : m, n \in\mathbb Z\}$$ Prove that for every $\epsilon > 0$, the intersection of $S$ and $(0, \epsilon)$ is nonempty.


I am implementing a Gibbs sampler in order to estimate the parameters of a mixture model.  Assuming that the parameters are contained in a vector $\theta$ what I will do is:   Implement and run the sampler. Wait to reach a stationary distribution (so to remove the impact of my initialization); say that we reach the stationary distribution at iteration $n$. After iteration $n$, I start collecting the sampled parameters into a list $[\theta_n,...\theta_{n+m}]$ Last, I evaluate the expected value of $\theta$ doing $$ \theta_{m,estimated} = \sum_{i=1}^{m} \theta_{n+i}/m $$    Now, I have some questions:   Two subsequent samples $\theta_{n+i}, \theta_{n+i+1} $ will obviosly be correlated.  Should I skip some samples in order to ensure independence between the samples I use to calculate my estimator? If yes, there is some standard heuristic to do this?  Can I say that (if the sampler is properly implemented) $\theta_{m,estimated}$ is a consistent estimator of $\theta$?

I am getting familiar with Bayesian statistics by reading the book Doing Bayesian Data Analysis, by John K. Kruschke also known as the "puppy book". In chapter 9, hierarchical models are introduced with this simple example: \begin{align} y_{ji}   &\sim {\rm Bernoulli}(\theta_j)  \\ \theta_j &\sim {\rm Beta}(\mu\kappa, (1-\mu)\kappa)  \\ \mu      &\sim {\rm Beta}(A_\mu, B_\mu)   \\ \kappa   &\sim {\rm Gamma}(S_\kappa, R_\kappa) \end{align} and the Bernoulli observations are 3 coins, each 10 flips. One shows 9 heads, the other 5 heads and the other 1 head.  I have used pymc to infer the hyperparamteres.  with pm.Model() as model: # define the          mu = pm.Beta('mu', 2, 2)     kappa = pm.Gamma('kappa', 1, 0.1)     # define the prior     theta = pm.Beta('theta', mu * kappa, (1 - mu) * kappa, shape=len(N))     # define the likelihood     y = pm.Bernoulli('y', p=theta[coin], observed=y)      # Generate a MCMC chain     step = pm.Metropolis()     trace = pm.sample(5000, step, progressbar=True)     trace = pm.sample(5000, step, progressbar=True)   burnin = 2000  # posterior samples to discard thin = 10  # thinning  pm.autocorrplot(trace[burnin::thin], vars =[mu, kappa])   My question is regarding the autocorrelation. How shall I interpret autocorrelation? Could you please help me to interpret the autocorrelation plot?    It says as the samples gets further from each other the correlation between them reduces. right? Can we use this to plot to find the optimum thinning? Does the thinning affect the posterior samples? after all, what is the use of this plot?


Why do texts on classical mechanics never mention any derivative of position beyond the jerk, while at the same time being general in the sense of using of generalized coordinates?

Why is the Lagrangian a function of the position and velocity (possibly also of time) and why are dependences on higher order derivatives (acceleration, jerk,...) excluded?  Is there a good reason for this or is it simply "because it works".


Once Blur event is called, alert box should be displayed.Blur event is working for default row, but not in dynamically added rows. I even tried class selector also but didn't worked.  HTML:

<input type="button" value="Add" class="plusbtn" />	      <input type="button" value="Remove" class="minusbtn" />

Fname	Lname

     <input type='text' id="Fname" >	     <input type='text' id="Lname"  >

   Jquery:      I am unable to solve the issue.Please make suggestions.Thanks in advance.

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.


I'm new to C++ programming and am going through some examples that I found a while back. Since I am a decent Java programmer, I'm making good progress (at least from my perspective :D).  Now I've come across something I cannot figure out what it does:  Threading::Thread ^ th = Threading::Thread::CurrentThread; Net::IPEndPoint^ hostEp;   What is the purpose of the ^? And is there a difference between the useage in the two lines I've only known this to be the XOR Operator.  Thanks in advance

I just came across this code and a few Google searches turn up no explanation of this mysterious (to me) syntax.  Hashtable^ tempHash = gcnew Hashtable(iterators_);  IDictionaryEnumerator^ enumerator = tempHash->GetEnumerator();   What the heck does the caret mean? (The gcnew is also new to me, and I asked about that .)


I need to send a header If-Modified-Since to this address and only download if the server returns 200 not 304. Is there a way I can add/modify the header in this code?  new java.net.URL(API.JSON_ZIP_OF_ALL_FILES).openStream()

Im trying to improve the Java Html Document a little but i'm running into problems with the HttpUrlConntion. One thing is that some servers block a request if the user agent is a Java VM. Another problem is that the HttpUrlConnection does not set the Referrer or Location header field. Since several sites use these fields to verify that the content was accessed from their own site, I'm blocked here as well. As far as I can see the only resolution is to replace the URL handler of the HTTP protocol. Or is there any way to modify the default HTTP Handler?


Let $$0 \overset{d_{n+1}}{\rightarrow} G_n \overset{d_n}{\rightarrow} G_{n-1}\overset{d_{n-1}}{\rightarrow}\ldots\overset{d_2}{\rightarrow}G_1 \overset{d_1}{\rightarrow} 0$$ be a sequence of modules and homomorphisms over the commuative ring $R$ such that $d_i \circ d_{i+1}=0$ for all $i=1,..,n-1$, and suppose that $G_i$ has finite length for all $i$. Set $H_i=\ker d_i / \text{im} \, d_{i+1}$. Show that $H_i$ has finite length for all $i$ and that $$\sum_{i=0}^{n} (-1)^i l(H_i)=\sum_{i=0}^{n} (-1)^i l(G_i)$$  It's obvious to see that $H_i$ has finite length by the exact sequence $$0 \to Im \; d_{i+1}\to Ker \; d_i \to Ker \; d_i / Im \; d_{i+1}\to 0$$ But I can indicate that $\sum_{i=0}^{n} (-1)^i l(H_i)=\sum_{i=0}^{n} (-1)^i l(G_i)$. Can anyone help me?

Let $C_*$ be a chain complex such that each $C_i$ is a torsion-free, finite-range abelian group with $C_i=0$ for all $i<0$. Suppose that $C_i=0$ for all $i$ is large enough. The Euler characteristic of $C_*$ chain complex is defined as $$\chi(C_*)=\sum_{i\geq 0}(-1)^iRank(C_i)$$ Prove that $$\chi(C_*)=\sum_{i\geq 0}(-1)^iRank(H_i(C_*))$$  I have to prove that $\sum_{i\geq 0}(-1)^iRank(C_i)=\sum_{i\geq 0}(-1)^iRank(H_i(C_*))$, I think that one way to do this is by showing that $Rank(C_i)=Rank(H_i(C_*))$ but I do not know if this is true in general, in a nutshell, I want to show that the cardinality of the base of any $C_i$ is the same as the cardinality of the basis of the corresponding homology, how can I do this? Thank you


I need to convert the following image into a line .shp file. I can make the image into whatever type of image file it needs to be before converting. For context, I had started mapping an area by drawing over the map in photoshop but then came across QGIS and finished the project by mapping over the image using lines shapefile layers. I'm now trying to run the lines through a matlab code and the code can only use shapefiles.  I haven't used QGIS extensively.

How can I convert raster (stream segments result of a watershed analysis) to vector polylines, preferably shapefile. In ArcGIS this is easily acomplished with the Raster to Polyline tool.  I only see Polygonize (Raster to Vector) tool under the Raster -> Conversion menu.


When I want to run “sudo apt upgrade”, this error shows up: You don’t have enough free space in /var/cache/apt/archives.  Then, I run this code: sudo apt autoclean   and also sudo apt clean  and also sudo apt-get autoclean  However, nothing changes and the same error appears again when upgrading.

When I run the command to install the package solr-jetty, I am told   You don't have enough free space in /var/cache/apt/archives/   Here's the result of the df -H command:    I have installed Ubuntu with VirtualBox on my Mac.  How can I fix this problem?


I have been looking for a good approach to solve this issue, but many examples are when words are separated by spaces and it makes a solution easier, like in this example: ifstream fin(“marks.txt”);      string name;     int var1;     int var2;     int var3;      while (fin >> name >> var1 >> var2 >> var3)     {         /* do something with name, var1 etc. */         cout << name << var1 << var2 << var3 << “\n”;     }  but what if my file has the following: word1,word2,word3,word4,word5 word6,word,word,word,word,word  How should implement a code for this! I will appreciate any help, newbie in c++ Thanks in advance

I'm trying to iterate over the words of a string.  The string can be assumed to be composed of words separated by whitespace.  Note that I'm not interested in C string functions or that kind of character manipulation/access. Also, please give precedence to elegance over efficiency in your answer.  The best solution I have right now is:  #include <iostream> #include <sstream> #include <string>  using namespace std;  int main() {     string s = "Somewhere down the road";     istringstream iss(s);      do     {         string subs;         iss >> subs;         cout << "Substring: " << subs << endl;     } while (iss); }   Is there a more elegant way to do this?


Is there a Stack Exchange site where users post their questions not to get answers or to get up voted or down voted for quality, but to decide on which site to post their questions? If not, does anybody else think that a site like this should be created? Up votes and down votes could be allotted for how obvious the correct site to post to is. For example, a question that obviously asks about why their code is broken would be sent to SO possibly with down votes. However, a question that spans both programming and academia where it is unclear which subject is dominant, could get up votes for its complexity and deserving to be asked.   Is helping to decide where questions go a function of Meta Stack Exchange or should another site be created?  Are there any negatives to creating a site like this?

The Problem - The Stack Exchange network has so many sites with more being added all the time, a user probably doesn't know that a Stack Exchange site exists to answer a question they might have. In addition, when asking a question, the user might not know the best place to put the question. Asking the question on the wrong site could be downvoted, and it might not be in the user's best interest to ask the question if he/she doesn't know exactly where it belongs.  The Idea - A Stack Exchange site where you can ask any question, and it's up to reviewers of the question to decide which site would be best suited to answer the question.   I don't know much about the process for migrating questions to other sites as they stand today, but I think a voting system would be good, to allow reviewers to vote where the question belongs best, or someone with enough rep is allowed to move it directly.   The conditions that determine when a question is migrated could vary. Some ideas:   After a certain period of inactivity When the vote gap between the #1 and #2 result is large enough   The voting system should also have some way to denote that this question doesn't (yet) have a Stack Exchange site suited to answer the question.   When asking the question, the page could provide a list of similar questions as it does now, and "suggested site" box. This way, if they're writing the question they could see some suggestions as to where the question might belong. They could then select one of those sites and have it submitted on that site. The primary data source for this would probably be the tags. For instance, if the user enters tags that have a lot of followers on StackOverflow, the page would suggest that the question might belong on StackOverflow.  This feature would allow users to ask questions without being as concerned about where it belongs among the vast Stack Exchange network. In addition, this could be a valuable resource in determining what Stack Exchange sites people would like to see. If there are a lot of questions that are filed as "Site Doesn't Yet Exist To Answer This Question™", that would be an indicator that there is a need that Stack Exchange isn't currently fulfilling.  Please comment with any suggestions or criticisms.   PS: I hope that this is the correct place to post this suggestion.  Edit  Maybe a dumbed-down version of this might be useful. Instead of having the review process, just have a page for a user to enter their question, get suggestions to where it might belong, and choose at the end where the question belongs. Right now, choosing where to ask the question is the first step. I think moving it to a later point in the conception of the question would allow the asker to better categorize the question.


I was asked to enter "how much money do you have in savings" while I was filling my UK Visa form. I have entered the amount I current have in my Bank Account.  I have also invested in mutual funds and stock market, could I add those amounts to my bank balance and include it in my savings ?  If the answer to question above is NO then :  I can sell shares and redeem my mutual funds and I will receive the amount in my Bank account within 1-2 days ? Could I then show it as my savings ?  I am a salaried person so I can show proofs for funds added to my account by submitting salary slips, but How will I show proofs for the amount credited to my account by selling shares or redeeming mutual funds ?  Please help !

I am an Indian citizen studying in Italy on an Italian visa that expires 19 November, 2015. I have permesso di soggiorno. I want to visit the United Kingdom for my vacations for a week during March. I know the procedures already, however I am a little bit confused about the amount that I must show as a proof of support with my bank statements. I will stay for a week with my friends who are also students in Italy and will be in London for 5 days. What would be the amount in Euros that I need to show for my visit to UK?


How much $G$ is required to bend light?. Also, please explain what happens if a powerful light beam in a vacuum is intercepted by electromagnetic fields on either sides.

I understand that a black hole bends the fabric of space time to a point that no object can escape.   I understand that light travels in a straight line along spacetime unless distorted by gravity. If spacetime is being curved by gravity then light should follow that bend in spacetime.  In Newton's Law of Universal Gravitation, the mass of both objects must be entered, but photon has no mass, why should a massless photon  be affected by gravity in by Newton's equations?  What am I missing?


I have created a stored procedure that creates multiple temp tables for use in the sproc and then drops them at the end of the sproc. The problem I am encountering is I can execute the stored procedure just fine in management studio, but when I attempt to create an SSIS data flow that retrieves the rows returned by the sproc, it give me the following error:     Invalid object name '#tempRuns'   Is there something special I need to do in order for temp tables to work with SSIS in Azure?

I have revised a procedure that builds a dynamic SQL statement to create and populate a temporary table. The syntax was something like this:  ...'create #temp_' + CAST(GETGUID() AS VARCHAR(36)) ...   I asked a colleague if he knew why a unique identifier was being concatenated to the table name. He told me that in the past there were cases where temporary tables were shared across sessions and the data was messed up.  I know this is not possible since MSDN clearly states:     You can create local and global temporary tables. Local temporary   tables are visible only in the current session, and global temporary   tables are visible to all sessions.   Now (remembering the case) some colleagues think we should use the syntax above as a good practice but I do not like it and need proof there is no such bug or if it was it is already fixed.  Could anyone with experience in SQL Server 2005/2008 tell me if there ever was such case?