i want to calculate running time of method (encryptTree)and this method call inside it other method(encrypt) as the follwoing:  public  BloomFilterIndex encryptTree(BloomFilterIndex tree) {     for(int m=0;m<tree.root.children.size();m++){         BloomFilterIndex.BFINode<Integer>n = (BloomFilterIndex.BFINode<Integer>) tree.root.children.get(m);         encrypt(n);     }     return tree; }  public void encrypt(BloomFilterIndex.BFINode<Integer> root) {     List<double[]> ress = new ArrayList<>();     if(!root.isLeaf()){         c = new double[root.value.size()];         for (int i = 0; i < root.value.size(); i++) {             c[i] =root.value.getBitSet().getWord(i);                                                                                }          ress.add(c);         root.value = null;         root.value2 = ress;          for(BloomFilterIndex.BFINode<Integer> g:root.children)             encrypt(g);       } else {         double[] y = new double[400];         double[] z = new double[400];         Random r = new Random();         Integer g1 = r.nextInt();         double m5 = (double) ((double) Math.round(g1 * 10) / 10.0);         java.util.Vector<Double> m6 = new java.util.Vector<Double>(400);         java.util.Vector<Double> n1 = new java.util.Vector<Double>(400);          for (int i = 0; i < s.size(); i++) {             if (s.get(i) == 1) {                 m6.add((double) root.value.getBitSet().getWord(i));                 n1.add((double) root.value.getBitSet().getWord(i));             } else {                 m6.add( 0.5 * (root.value.getBitSet().getWord(i))+m5);                 n1.add( 0.5 * (root.value.getBitSet().getWord(i))+m5 );             }         }          for (int i = 0; i < 400;i++) {             for (int j = 0; j < 400; j++) {                 y[i] += a2[i][j] * m6.get(j);                 z[i] += b2[i][j] * n1.get(j);             }         }         ress.add(y);         ress.add(z);         root.value = null;         root.value2 = ress;     } }   i want to use new Date().getTime() to calculate the running time of encryptTree that guarantee it contain all method inside it. when i try to use it as:  public  BloomFilterIndex encryptTree(BloomFilterIndex tree) {     startTime9=new Date().getTime();     for(int m=0;m<tree.root.children.size();m++){         BloomFilterIndex.BFINode<Integer> n = (BloomFilterIndex.BFINode<Integer>) tree.root.children.get(m);         encrypt(n);     }     end=new Date().getTime()-startTime9;     end/=1000.0;     System.out.println("encrypt node in :"+end);      return tree; }   but i not get the correct result.

How do I get a method's execution time?   Is there a Timer utility class for things like timing how long a task takes, etc?     Most of the searches on Google return results for timers that schedule threads and tasks, which is not what I want.


I'm a member of a high-traffic skype group, which is often too much noise for me to concentrate with.  Can I prevent messages to the group from popping up as new notifications?

I'm in a conversation and I don't really want to leave because the people there keep adding me back so it's just whatever. But I would like to mute the conversation or something like I do on Facebook so I won't take notifications or anything from there unless I press on the group and see what's going on. Because for now I have my Skype having a new notifications every half a second.  Any solutions to that?


So I have some data that would be obvious to be used in a boxplot. However, I tend to think boxplots are quite boring, and not very drawing - visualization wise at least.  So basically my data would follow the same idea as:    So I just wanted to ask if there were a more beautiful way of presenting data as this without using boxplots. Again, something that draws the reader a bit more.

I am working on creating a website, which displays the census data for a user selected Polygons & would like to graphically show the distribution of various parameters (one graph per parameter).  The data usually has the following properties:   The sample size tend to be large (say around 10,000 data points) The range in values tends to be quire large (for example, the minimum population can be less than 100 & the maximum can be something like 500,000) q1 usually is close to the minimum (say 200) while q2 & q3 will be within 10,000 It doesn't look anything like a normal distribution   I am not a statistician and hence my description might not be exactly clear.  I would like to show this distribution on a graph, which will be seen by citizens (the layman, if you like).  I would have best liked to use a histogram, but it is not possible due to the large range of values, due to which making bins is not really easy & straight forward.  From what little I know about statistics,  a box plot is what is often used to show this kind of data, but I feel that for a layperson, deciphering the Box plot is not easy.  What are my options to show this data in an easy to understand manner?


We have a apex trigger that send mails. In this mails, we can see:  reply_to_email@fmm65sbh16h2kh67.xxwomdonwmb2otze.3p1x6n6.1j-8cbreaq.cs102.bnc.sandbox.salesforce.com   How can remove this reply to"?  I checked this article, but it does not work:

I want to set a from address in a salesforce SingleEmailMessage, but can't see a way to do this and there is no standard method described in the documentation.   I want the email to be sent from doNotReply@blahblah.com, however, the email address of the user editing the record (which triggers the email send) is used as from address.  I'm using the following code:  mail.setReplyTo(fromaddress); mail.setSenderDisplayName(fromaddress);   But my code only changes the display name, not the email address.  Full code:   public static void sendSingleMail(id objId, ID templateId, string fromaddress) {      Messaging.SingleEmailMessage mail = new Messaging.SingleEmailMessage();     mail.setReplyTo(fromaddress);     mail.setTemplateId(templateId);     mail.setTargetObjectId(objId);     mail.saveAsActivity = false;     mail.setReplyTo(fromaddress);     mail.setSenderDisplayName(fromaddress);      ErrLogger.logger('Email being sent to :');     ErrLogger.logger('objId found:  ' + objId);     ErrLogger.logger('templateId found:  ' + templateId);     ErrLogger.logger('fromaddress found:  ' + fromaddress);      Messaging.sendEmail(new Messaging.SingleEmailmessage[] {mail}); }


while learning C language I have learned that when you pass a variable to a function. you are not passing the variable itself you are passing a copy of it so the actual varible's value will not change unless the function returns a value and you assign that value to the variable. but I just executed this program and this happened when I passed "Newobj" object to a "changer" function and then change the values of the variables and then print the new variables values it is working. It should not happen right? because I am sending the copy of "Newobj" to "copyobj". explain please I am confused.  Note: Explain in detail please. My brain is slow. I know the concepts of c and few concepts of c++;   here is my code:  public class PassObjects { int regno; String name; double per;  PassObjects(int a,String s,double p){     regno=a;     name=s;     per=p; } PassObjects changer (PassObjects copyobj){     copyobj.regno=797;     copyobj.name="Srimanth";     copyobj.per=70.9;     return copyobj;  }  public static void main(String[] args){      PassObjects Newobj= new PassObjects(86,"srimanth",85.4);     System.out.println("The original values of Instance variables are "+Newobj.regno+" "+Newobj.name+" "+Newobj.per);     Newobj.changer(Newobj);     System.out.println("The changeed values of Newobj are "+Newobj.regno+" "+Newobj.name+" "+Newobj.per); }  }   output is here:  The original values of Instance variables are 86 srimanth 85.4 The changeed values of Newobj are 797 Srimanth 70.9

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


I am using letter R for notation for my relation. I have to use the wRw notation. My problem is that I can't write \not R as I would like to. So I would like to write that, let's say a,b are not in relation with each other and type a\not R b.  It just doesn't look good.  Any tips?

In proximity theory, we use \delta and \ll as binary relations on the power set of a set X.  How can one display NOT \delta or NOT \ll similar to how we can do \not\in.  Using \not\delta and \not\ll place the strike-through in bad positions over the \delta and \ll.  For NOT \delta, I am currently using   \!\!\not\!\delta   For NOT \ll, I am using   \hskip 0.4mm \not \hskip -0.4mm \ll   There are a few problems here.  Sometimes the placement of the "not" over the "delta" is a little off but it varies throughout the pages.  Also, at the end of the line, I may get the \not appearing at the end of the current line and the \delta appearing at the beginning of the next line.  I have not noticed this issue with my defininition of NOT \ll.  What is the best way to define these symbols?  How can one make sure that the "not" is on the same line as the "delta"?


While reading tom Dieck's Algebraic Topology, I've come across to the fact which mention that a homomorphism $\phi\colon G\to H$ of topological groups is continuous if it is continuous at $e_G$. I couldn't come up with a proof for this, so I started searching. It seems we can take any $g \in G$ instead of $e_G$ and that the fact has something to do with $\lambda_g\colon x \mapsto gx$ being homeomorphisms. But I still don't see how to prove this. I'm a little afraid to ask this since it fells like I'm missing something trivial.

Let $G,H$ be topological groups and let $\rho: G \rightarrow H$ be a homomorphism of topological groups.  I understand this to mean that $\rho$ preserves group structure and is a map between the topologies.    If we say $\rho$ is continuous I understand that this means the map between the two topologies must be a continuous map i.e. the preimage of open sets will be open etc.  However I have come across the following claim, which in my eyes using the definitions above seems trivial. It goes as follows:  Let $G,H$ be topological groups and let $\rho: G \rightarrow H$ be a homomorphism of topological groups. Then $\rho$ is continuous if and only if $\rho^{-1} (V)$ is open for each $V$ in a basis of neighbourhoods $\mathcal{V}$  of the identity $1_h$.   Maybe I have not fully grasped one of the definitions.


I am looking to upload complete Java Project into eclipse, I was wondering if this is possible. Or if I have to create a project and then do it. Regardless im quite lost.

Comment on Duplicate Reference: Why would this be marked duplicate when it was asked years prior to the question referenced as a duplicate?  I also believe the question, detail, and response is much better than the referenced question.  I've been a C++ programmer for quite a while but I'm new to Java and new to Eclipse.  I want to use the  to visualize some data I'm working with.  This code is organized like this:  ./com ./com/touchgraph ./com/touchgraph/graphlayout ./com/touchgraph/graphlayout/Edge.java ./com/touchgraph/graphlayout/GLPanel.java ./com/touchgraph/graphlayout/graphelements ./com/touchgraph/graphlayout/graphelements/GESUtils.java ./com/touchgraph/graphlayout/graphelements/GraphEltSet.java ./com/touchgraph/graphlayout/graphelements/ImmutableGraphEltSet.java ./com/touchgraph/graphlayout/graphelements/Locality.java ./com/touchgraph/graphlayout/graphelements/TGForEachEdge.java ./com/touchgraph/graphlayout/graphelements/TGForEachNode.java ./com/touchgraph/graphlayout/graphelements/TGForEachNodePair.java ./com/touchgraph/graphlayout/graphelements/TGNodeQueue.java ./com/touchgraph/graphlayout/graphelements/VisibleLocality.java ./com/touchgraph/graphlayout/GraphLayoutApplet.java ./com/touchgraph/graphlayout/GraphListener.java ./com/touchgraph/graphlayout/interaction ./com/touchgraph/graphlayout/interaction/DragAddUI.java ./com/touchgraph/graphlayout/interaction/DragMultiselectUI.java ./com/touchgraph/graphlayout/interaction/DragNodeUI.java ./com/touchgraph/graphlayout/interaction/GLEditUI.java ./com/touchgraph/graphlayout/interaction/GLNavigateUI.java ./com/touchgraph/graphlayout/interaction/HVRotateDragUI.java ./com/touchgraph/graphlayout/interaction/HVScroll.java ./com/touchgraph/graphlayout/interaction/HyperScroll.java ./com/touchgraph/graphlayout/interaction/LocalityScroll.java ./com/touchgraph/graphlayout/interaction/RotateScroll.java ./com/touchgraph/graphlayout/interaction/TGAbstractClickUI.java ./com/touchgraph/graphlayout/interaction/TGAbstractDragUI.java ./com/touchgraph/graphlayout/interaction/TGAbstractMouseMotionUI.java ./com/touchgraph/graphlayout/interaction/TGAbstractMousePausedUI.java ./com/touchgraph/graphlayout/interaction/TGSelfDeactivatingUI.java ./com/touchgraph/graphlayout/interaction/TGUIManager.java ./com/touchgraph/graphlayout/interaction/TGUserInterface.java ./com/touchgraph/graphlayout/interaction/ZoomScroll.java ./com/touchgraph/graphlayout/LocalityUtils.java ./com/touchgraph/graphlayout/Node.java ./com/touchgraph/graphlayout/TGAbstractLens.java ./com/touchgraph/graphlayout/TGException.java ./com/touchgraph/graphlayout/TGLayout.java ./com/touchgraph/graphlayout/TGLensSet.java ./com/touchgraph/graphlayout/TGPaintListener.java ./com/touchgraph/graphlayout/TGPanel.java ./com/touchgraph/graphlayout/TGPoint2D.java ./com/touchgraph/graphlayout/TGScrollPane.java ./TG-APACHE-LICENSE.txt ./TGGL ReleaseNotes.txt ./TGGraphLayout.html ./TGGraphLayout.jar   How do I add this project in Eclipse and get it compiling and running quickly?


For example, when I run man ioctl the page says IOCTL(2) at the top. What does that mean? Is there an IOCTL(1)? And how does one navigate between these?

For example: man(1), find(3), updatedb(2)?   What do the numbers in parentheses (Brit. "brackets") mean?


The first equation of motion is $v = u + at$. The second equation of motion is $s = ut + \frac{at^2}{2}$. If we divide the second equation of motion by time $t$, why don't we get the first equation of motion where has $1/2$ come from?

I'm preparing for my exam, but I have difficulties in perceiving why there is a $\frac{1}{2}$ in the distance formula $d=\frac{1}{2}at^2$?


Which one is correct in terms of the combination of two locations.  You work in Starbucks at the mall You work at Starbucks in the mall You work in Starbucks in the mall You work at Starbucks at the mall  What is the rule behind the usage of at and in for this specific context?

Which is correct?         I am writing to apply for the position of ____ in your company.   I am writinng to apply for the position of ____ at your company.   I am writinng to apply for the position of ____ for your company.


here are two questions about the exercise that I am doing for practicing of setInterval fuction   from following code, I tried to print out the variable which is self-adding by 10 within 1000 milliseconds, but when I ran it, in the console of browser, it only showed 10 times of same word "num", how do I figure it out ?      $(function() {   var timmer;   GoCount();    function GoCount() {     timmer = setInterval(function() {       var num = 0;       num += 10;       console.log(num);     }, 1000);   } }); <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>      and the second question is what's the difference between setInterval and for loop

What is the scope of variables in javascript? Do they have the same scope inside as opposed to outside a function? Or does it even matter? Also, where are the variables stored if they are defined globally?


$(X_n)_{n \in \Bbb N}$ independent and identical. $S_n = \sum_{i=1}^n X_i$ Now I want to show: $$\frac{S_n}{n} \xrightarrow{\text{almost surely}} a, \mathrm{with}\: a \in \Bbb R\Rightarrow a=\Bbb E[X_1]$$ In our lecture we showed: $(X_n)_{n \in \Bbb N}$ independent and identical, with $\Bbb E[X_1] \lt \infty$ , then $\frac{S_n}{n} \xrightarrow{\text{almost surely}} \Bbb E[X_1]$  In other words, either there's a problem with the uniqueness of the limit or the fact that we don't know from the start if the expectation values are finite. I'm stuck on this problem. Does someone have any ideas or tipps on how to solve this? Thanks in advance!

Let $(\Omega,\mathcal F,P)$ be a finite measure space.  Let $X_n:\Omega \rightarrow \mathbb R$ be a sequence of iid r.v's  I need to prove that if:  $ n^{-1}\sum _{k=1}^{n} {X_k} $ converges almost surely to $Y$ then all $X_k$ have expectation.  If I understand correctly then $X_k$ has expectations means $X_k$ is in $\mathcal L^1(\Omega)$.  And I know that on finite measure space Converging in expectations is converging in $\mathcal L^1(\Omega)$ and it's stronger than almost sure convergence.  And I know that from linearity of expectation even if one of the sequence is not in $\mathcal L^1(\Omega)$ then $Y$ is not in $\mathcal L^1(\Omega)$.  How do I continue?


I wonder how I can link manually to the smallest filesize for the_post_thumbnail() within its filter function …  add_filter( 'post_thumbnail_html', 'post_thumbnail_html', 10, 3 );  function post_thumbnail_html( $html, $post_id, $post_image_id ) {      $html = '' . '' . '';      return $html;  }   So now my image src is just the post_id (e.g. 38). How can I link to the smallest filesize possible and add another data-attribute that links to the largest file?  My output should finally look like this …      Thank you in advance!  edit/update: I'd love to do the same for images inside the_content(). Any idea how to apply the same thing to normal images in posts. The src should always hold the smallest size wordpress creates and the data attribute should link to the largest filesize.

I want WordPress to return the first post image or a default image if no featured image has been set. My theme uses the_post_thumbnail many times, so I don't want to go through and change all references to a new function. I'd rather filter the core. Here's what I've added to functions.php:  add_filter('post_thumbnail_html', 'my_thumbnail_html', 10, 5);  function my_thumbnail_html( $html, $post_id, $post_thumbnail_id, $size, $attr ) {     global $post, $posts;     if (has_post_thumbnail() ) {         echo get_the_post_thumbnail( null, $size, $attr );     }     else {         $first_img = '';         ob_start();         ob_end_clean();         $output = preg_match_all('/<img.+src=[\'"]([^\'"]+)[\'"].*>/i', $post->post_content, $matches);         $first_img = $matches [1] [0];         if(empty($first_img)){             $first_img = get_bloginfo("template_url") . '/images/default.gif';         }         return $first_img;     } }   How do I hook this correctly?


In a MacBook Pro, is the counter for charge cycles in the battery or in the motherboard?   (I'm thinking it should be in the battery, but I've taken apart a MacBook Air, and those batteries don't appear to have any place to put a counter.)

I've been  on battery cycle counts and checked out my current count on my MacBook (13-inch, Aluminum, Late 2008) - recommended maximum cycle count is 500.  I've had this laptop now for over 4 years and at the 2 year mark I had the battery replaced by AppleCare. The first time I checked out the cycle count was today and it's currently on 1004. Now my question is, is this the cycle count of the battery since I replaced it (as in, it reads the cycle count from the battery), or is it the combined cycle count (as in, it stores the count somewhere and increments occasionally)? My assumption is that it's the count of that battery but I have no idea how to verify this.  Either way, it looks like I need a new battery ;)


I am baffled by the following question bounty banner:  When is a bounty attributed to Community ♦?

I decided on poking around some profiles and I hit the . I knew that Community was a background process but then I noticed that it had set some bounties. What criteria does Community follow to know what questions to set bounties on? Are these questions with a lot of views or upvotes or all of the above?


In this sentence:     I'm proud we're not one of those couples who have to snoop through   each other's belongings.   Is the above correct? Or should it be "each others' belongings"? Can you ever say each others' in any situation?  Thanks for any advice!

If a possessive noun, which is plural, is preceded by "each", then should it use the singular or plural possessive form?  For example, which of the following is correct?    spend time in each other's presence spend time in each others' presence


I am using aria2 to download some data with the option --on-download-complete to run a bash script automatically to process the data.   aria2c --http-user='***' --http-passwd='***' --check-certificate=false --max-concurrent-downloads=2 -M products.meta4 --on-download-complete=/my/path/script_gpt.sh   Focusing on my bash script,   #!/bin/bash  oldEnd=.zip newEnd=_processed.dim  for i in $(ls -d -1 /my/path/S1*.zip) do if [ -f ${i%$oldEnd}$newEnd ]; then     echo "Already processed" else    gpt /my/path/graph.xml -Pinput1=$i -Poutput1=${i%$oldEnd}$newEnd fi done    Basically, everytime a download is finished, a for loop starts. First it checks if the downloaded product has been already processed and if not it runs a specific task.   My issue is that everytime a download is completed, the bash script is run. This means that if the analysis is not finished from the previous time the bash script was run, both tasks will overlap and eat all my memory resources.  Ideally, I would like to:   Each time the bash script is run, check if there is still and ongoing process.  If so, wait until it is finished and then run   Its like creating a queu of task (like in a for loop where each iteration waits until the previous one is finished).  I have tried to implement the solutin with wait or identifying the PID but nothing succesfull.  Maybe changing the approach and instead of using aria2 to process the data that is just donwloaded, implemente another solution?

What's a quick-and-dirty way to make sure that only one instance of a shell script is running at a given time?


I am trying to find a way to make a copy or duplicate a database, because I want to have a same database from MacOS computer to a Windows computer.   First, I want to use mysqldump but I can't. This related to my other  Output when I tried in Terminal:  So I tried to find another way, I go to /usr/local/mysql/ and attempt to make a copy like you can do with a .mdf file from Windows. But the data folder is restricted and I could not copy or open it.  So is there any alternative to make a copy of structures and its data from a database without mysqldump in MacOS?

Without local access to the server, is there any way to duplicate/clone a MySQL db (with content and without content) into another without using mysqldump?  I am currently using MySQL 4.0.


Can I bring a decorative clay adorned goat skull to the US from Guatemala? It is a real goat skull but covered with clay on the front and stones. It has its horns still as well. Is this legal or will I be fined if it was found?

I bought this traditionally painted cow skull, a typical decoration item for the day of the dead. Since its bone (completely clean though) can I bring it with me on a plane as carry-on or special luggage, without having to declare it or having it confiscated?    []


I am currently using windows 10 home single language as a direct updrade from windows 8(not 8.1), i had to refresh as my display drivers didn't work along with other things, but anyways can i use the key from single language to install multi language windows 10 home

I have a product key for windows 8.1 (Single language edition or not that i can't remember). I have currently windows 10 pro installed.  I am planning to install windows 10 Home so i activate with windows 8.1 key.  So my question is will i be able to activate it if the Product Key is Windows 8.1 Single Language and i install Windows 10 Home(Multiple language edition) or vice versa.


Before asking questions, I'd like to clarify that I will be talking about Ubuntu 16.04.1.  I often find myself trying to paste (or create) files in folders which require that I have superuser privileges to do so, leading to a disabled "New folder/document" or "Paste" option. Is there any way that I can bypass that other than running sudo nautilus or sudo cp? The truth is I find the pop-up window that Windows provide too nice to part with.   I was able to find similar questions, but none of the answers mentioned anything like what I am looking for (plus most of them are about 3 years old).  I was also able to find  (I guess I could use it to launch Files as root), but:   There are three .desktop's in my /usr/share/applications/ (all with the same properties except for the size - the first one being 465 bytes, the second one 647 and the last one 704) so I don't know which one I should edit. I would still not be entirely satisfied as by using the root launcher I could end up accidentally "breaking things".

Mainly I am looking for a way to pin an application to the Unity launch bar, and run it as root.  Currently, even if I start the application with sudo, and pin it after it starts, it will start as current user next time.  Sad, but there is no context menu option "run as ...".  Update: I switched to gnome3 and now I'm happy, I'm missing only the search.


I recently encountered a problem in relation to my study of conflicts and performance. The two types of conflict in the study, task and relationship conflict, both correlated with performance $(-.39, P < .01)$ and $(-.37, P < .01)$. When I put these in a regression, the regression model came out significant, and it explained $22.1\%$ of the variance $(F\ (3, 82) = 7.76,\ P < .01)$. None of the two IVs were, however, significant coefficients! There were no other variables in the regression analysis. How could this be?

My multiple regression analysis model has a statistically significant F value however all beta values are statistically non-significant.   All the regression assumptions are met. No multicollinearity was found. Correlations among all predictors are all less than 0.60.   What else might be the cause of the insignificant predictors?


I am new to linux.  I have installed the 14.04.1 i386 on an old computer (Intel Pentium due core E2180, 32bit, 2GHz, 2GB RAM).  Install itself was smooth, but only some apps are working.  Many will cause the computer to hang.  Maybe, I should be using an older Ubuntu release to match up with the computer?  If yes, which one, the 10. or the 12. ? Appreciate any ideas and advice. -KL

For a given hardware configuration, how do I find out if Ubuntu will run on it? What considerations should I take into account when choosing an Ubuntu version and  such as:    with a lighter desktop than the usual Gnome and Unity  with the even lighter LXDE desktop   Obviously Ubuntu does not run on some processor architectures. So how do I go about choosing the right version and derivate. How can I find out the minmal system requirements?


It's often used as a "set of values", however, it's not a set as there's no repetition in a set.   Also operations such as $X^2$ are carried out, which will apply the operation to each element in the "set".  So I'm wondering what this $X$ is actually referred to as, whether references to it as a set are informal, or if there's some different meaning of a set in statistics.  For example $( X - \bar{X})^2$

What do they mean when they say "random variable"?


I insert to my Activity section and look at this... The BADGES section height is too long and up on the tabs section (I use Google Chrome).

When I visit  I see this:     The "Congratulations! You've earned (badge)" section has dropped down completely beneath the tabs under it. The "You've earned a new privilege!" section has a gap at the bottom:     Shog9 says in comments how to reproduce this:     Gotta have earned a badge, not dismissed the notification, and be looking at your own profile.


I want to prove that for a ring $R$, $R[x]$ is an integral domain if and only if $R$ is an integral domain.  I have one direction of the proof ($R$ an integral domain implies $R[x]$) an integral domain, but I am having trouble proving the other direction.  Here is the first direction:  Let $R$ be an integral domain, and suppose on the contrary that $R[x]$ is not an integral domain, meaning that it has zero divisors. In particular, let $f(x),g(x)\neq 0\in R[x]$ such that $\deg(f)=n$ and $\deg(g)=m$ and $f(x)g(x)=0$. Specifically, $f(x)=a_nx^n+...a_1x+a_0$ and $g(x)=b_mx^m+...b_1x+b_0$ where $a_i,b_j\in R$ for all $0\leq i,j\leq n,m$. Now, consider the polynomial term $a_nb_mx^{n+m}\in f(x)g(x)$. Because $f(x)g(x)=0$, this means that each polynomial coefficient must be zero, so in particular $a_nb_m=0$. But, $R$ is an integral domain so either $a_n=0$ or $b_m=0$, contradicting the degree of $f(x)$ or $g(x)$. Thus, $R[x]$ is an integral domain.  And here is what I have so far for the other direction, but I'm not sure if I have the right set-up. Any hints or comments are appreciated.  Now, suppose conversely that $R[x]$ is an integral domain, and suppose on the contrary that $R$ is not, meaning that it has zero divisors. In particular, let $ab=0$ where $a\neq 0$ and $b\neq 0$ for $a_0,b_0\in R$. Furthermore, consider the polynomial product $f(x)g(x)=0$ for $f(x),g(x)\in R[x]$, where $f(x)$ and $g(x)$ are defined in the same way as above. Because $R[x]$ is an integral domain, either $f(x)=0$ or $g(x)=0$.

Here is an exercise(p.129, ex.1.15) from Algebra: Chapter 0 by P.Aluffi.     Prove that $R[x]$ is an integral domain if and only if $R$ is an integral domain.   The implication part makes no problems, because $R$ is a subring of $R[x]$. For the ''if'' part, however..  Let $R$ be an integral domain.  Now let's review pairs $f(x)=\sum \nolimits a_ix^i,g(x)= \sum \nolimits b_ix_i \in R[x]$ such that $f(x)g(x) = 0$ So, we have $\sum \limits_{k=0}^{\infty} \sum \nolimits_{i+j=k} a_ib_jx^{i+j} = 0$.  Now, I'm not sure how to deduce that $f(x) = 0 \vee g(x) = 0$  If I look at $f(x),g(x)$ such that, for example, $deg((f(x))=3, deg((g(x))=2)$, it makes sense. I begin by something like that "if $f(x)g(x)=0$ then $a_0b_0=0$ then $a_0 = 0 \vee b_0 = 0$. If $a_0 =0 $, then $a_0b_1 = a_0b_2 = 0$" and so on.  As I understand, it comes down to proving the following implication: $(\forall k \in \mathbb{N} \sum \nolimits_{i+j=k} a_ib_j = 0)(1) \Rightarrow ((\forall n \in \mathbb{N} \ \ a_n = 0) \vee (\forall m \in \mathbb{N} \ \ b_m = 0))(2)$  We can say that $(1)$ is a system of equations in $R$. And $(2)$ is it solution.


Why are there 2 syllables in the word "naked"? Why is the second syllable pronounced "id" and is there only one pronunciation for this word?

The word "baked" is pronounced as:      /ˈbeɪkt/   While "naked" is pronounced as:      /ˈneɪkɪd/   Why are these two words not pronounced the same?


Whenever we define main() function in any code, why don't we pass any argument in it?

So I'm in Linux and I want to have a program accept arguments when you execute it from the command line.  For example,   ./myprogram 42 -b -s  So then the program would store that number 42 as an int and execute certain parts of code depending on what arguments it gets like -b or -s.


Child is 2 years and 1 month old.  No, I will not close her nose to make her open her mouth.  What are the other non torturous ways to give bitter medicine to the child?

My 4 year old daughter recently have scarlet fever. It seems antibiotics are non-negociable for it, and since she has great chance of being allergic to Penicillin, there is only one antibiotic she can get. It is not the first time we have to give it to her, and probably not the last time.  Apparently, that medicine tastes really REALLY bad. She cries a lot, panics every time we say it's time for this medicine, and vomit it most of the time, resulting in even more medicine being force into her mouth.  It is only this medicine that causes problem. She does not tantrum for other medicine, and most of them, she can take the dose we give her all by herself.  We tried reassuring her, explaining why it is mandatory to get it, explaining it will make the scarlet fever go away. We tried mixing it into other food (which seems clearly worse, taste-wise). We tried asking her to take her herself. It seems we tried everything, and the only thing that achieve it for the moment is actually forcing it into her.  We really do not want to force her in any way. Her mother cried yesterday because we had to force her, and we need to do it twice a day. It is very exhausting, and we would welcome any input or new ideas on how to give her this really bad tasting medicine to her.  EDIT : For clarification, it is a liquid medicine that is administrated with a syringe. It seems there are no alternative, although we will check with the doctor again (particularly if pills are available)


I am learning common lisp.  It's not explained anywhere but I tried:  (eq '(a b c) '(a b c))   which evaluates to NIL.  Why returning Nil from lisp's perspective? I am interested to know how it evaluates to Nil in this case.  Thank you.

What's the difference between eq, eql, equal and equalp, in Common Lisp?  I understand that some of them check types, some of them check across types an all that, but which is which?  When is one better to use than the others?


I have been having quite the struggle trying to update my Mid-2009 MBP to the "latest" MacOS.  Initially I wanted to install Sierra. I booted (CMD-R), wiped the main partition, then attempted to upgrade. The only available option was Mountain Lion, which was already installed. Even this install was not possible as when I entered my Apple ID, I kept receiving the "This Action Could not be completed, please try again".  Finally I gave up, and restored from backup.  Since then I realized that it's not possible to update to Sierra as this Mac is too old. So I would like to install El Capitan. However it's not available in the app store.  I have a developer account, so I downloaded the combo update, but of course it can't be installed on top of mountain lion.  I've tried creating USB installers, however none of them have worked, they just show the "prohibited" symbol (/).  Can anyone help me get El Capitan installed? Thanks so much.

We have an older iMac (Model A1311, Mid 2011). It has been running Yosemite. We have run into some of the WIFI issues associated with Yosemite.   Is it possible to upgrade to El Capitan but not Sierra?   El Cap has been out longer. Its my wife's computer, its older, and I really don't want to be debugging Sierra until a few  more "dot" releases come out.


I'm trying to learn how to use curlpp to send http requests in C++. So far the examples on their own work fine, but I'm trying to save the result into a std::string variable using stringstreams. The code looks like this:  31                 std::stringstream result; 39                 request.perform(); 40  41                 result << request; 42                 std::string jsonstring; 43                 result >> jsonstring; 44                 std::cout << jsonstring << "\n";   But the the result only returns a portion of the actual string This is ./a.out should look like:  {"mrpickie":{"id":25755422,"name":"Mr PickIe","profileIconId":19,"summonerLevel":30,"revisionDate":1454122204000}}   This is what it looks like:  {"mrpickie":{"id":25755422,"name":"Mr   What's up with that? I'm new to C++, so I imagine it has something to do with how I'm using stringstreams or declaring my string variable. If you want any more lines from my code I'd have no problem sharing  Thanks in advance

I wanted to use fstream to read a txt file.  I am using inFile >> characterToConvert, but the problem is that this omits any spaces and newline.  I am writing an encryption program so I need to include the spaces and newlines.  What would be the proper way to go about accomplishing this?


In both ESB and TLJ, the Empire and First Order deploy walkers to attack the rebels. However, how they are deployed to the surface from the Star destroyers in orbit. How is this done?

I'm curious how these beasts got down to the surface of Hoth.    Did the Galactic Empire land them in big ships, if so which ones?


I want to remove all the files from different directories, and want to keep only latest files 20 files. is this the correct command to do this?  ls -t1 /mnt/dwh/ftp/dwh_ftp_cbs/ARLOGS/ | tail -n +22 | xargs rm -f

I`m trying to delete old files from directory and leave only 3 newest files.   cd /home/user1/test  while [ `ls -lAR | grep ^- | wc -l` < 3 ] ; do      rm `ls -t1 /home/user/test | tail -1`     echo " - - - "  done   something is wrong with conditional statement.


I read a text in which "brethren" was used instead of "brothers". Is that common to use or it is an older plural form for "brother"?

In English books, I read  that the plural of brother was given as brethren, but I hear people in movies or serials using brothers.   Which one is correct?  Is it the difference due to difference in American and British English?


I believe this question was asked before but I think my case is a little bit different. My father works at the French embassy and so I have a Schengen visa issued for me from the French Embassy. Now I never visited France before and I plan to go Germany next week. Is it ok to go straight to Berlin with a visa issued by France. Again I will not be landing or visitng France at all.

In case, if I get a multiple-entry Schengen visa in one of the embassies in Ukraine, Kyiv - should my first trip be to the country which issued the visa?  Any there any requirements of this sort? Does this condition vary depending on embassy which issued the visa?  What are the possible consequences on not visiting that country first? Does it somehow depend on country where the embassy is (i.e. non-Schengen and not EU members)?


This is the first time i use a linux distribution and i have a problem. I installed ubuntu without any problems but i can not connect networks. I simply can not turn on wifi because function keys do not work anymore. I am a beginner but, i think it can be a result of not having a driver for wireless, but i do not know how to find or install linux drivers.I do not have a lot of knowledge about linux so please try to be simple as possible. Thanks.  Edit: Now i am able to use function keys but still i can not turn on the wifi. Edit 2: my wireless card is broadcom bcm4313 802.11b/g/n

I'm having serious problems installing the Broadcom drivers for Ubuntu. It worked perfectly on my previous version, but now, it is impossible.   What are the steps to install Broadcom wireless drivers for a BCM43xx card?  I'm a user with no advance knowledge in Linux, so I would need clear explanations on how to make, compile, etc.    lspci -vnn | grep Network showed:   Broadcom Corporation BCM4322 802.11a/b/g/n Wireless LAN Controller [14e4:432b]      iwconfig showed:  lo        no wireless extensions. eth0      no wireless extensions.   NOTE: Answer below is updated every time new information is added and confirmed working.


Trying to find a book I read in highschool in the early-mid 90's, and it may have been part of the highschool reading list (in australia) .I vaguely remember that one or two boys crash into a cave (or something like this) and it is inhabited by an alien life form which creates a paradise for them. Then later it sabotages their effort to return home and won't let them leave.

I am trying to find a book I read as a child (in England in mid 1980's) which was about 2 boys (I think) who rented(?) or found a space craft which had a 'range extender' sort of key left in it which allowed them permission to go beyond their immediate part of galaxy with resulting adventures.  I seem to recall that the cover had a drawing of them standing near the ship pointing at a planet.   I suppose the book must have been written in 1970s/early 1980s.


I am using the new Nexus 7 running Android 4.3 and I am getting really long load times especially when opening questions and in general. I can browse the stack exchange sites so much faster just in chrome.   To be clear, the page template loads fast and just waiting for the question data.  Is this a common experience?

I've toyed with this on my tablet, and I've noticed that the application is incredibly slow when AdBlock Plus is enabled on my mobile device.  It just sits there at "Loading your user information...".  There aren't any error dialogs as best as I can tell.  If I navigate away to another window, sometimes another action is able to get through, but I'm reluctant to call that "consistent" behavior.  I can access  and  on my tablet just fine. To my understanding, there aren't any firewalls enabled on the tablet. There aren't any firewalls on my router that would restrict me from hitting those sites.  It seems like a bug - all of my other applications work just fine with ABP enabled.


I would like to swap from csh to bash, then I have to set the .bashrc with the commands I use. Translating alias with parameters seems to be not easier as I believed. csh:  alias gr 'xmgrace -legend load -nxy \!* -free -noask&'   the param \!* means all params on the command line; Then I tried for bash:  alias gr='xmgrace -legend load -nxy $@ -free -noask&' alias gr='xmgrace -legend load -nxy $(@) -free -noask&'   But neither worked.  The other issue comes from memorizing the current directory csh:  alias t 'set t=\`pwd\``;echo $t' alias tt 'cd $t'   I tried a lot of things but without any results.

I want to make an alias in my .bashrc or .bashrc_aliases file (probably the latter).  Specifically, I want to call the clang command for my *.c file I'm writing. What I'm looking for is best summed up if I provide an example:  I have program1.c written I want to be able to type (in the terminal) compile program1, and something like the following should be actually run:  clang -ggdb -std=c99 -Wall -Werror   program1.c -lcrypt -lcs50 -lm -o program1   For those who have taken Harvard's CS50 class, you will recognize this as their make command. So if the above is impossible, and you know another way to make this happen, I'm all ears. I'm trying to avoid using their VM, as my netbook isn't really up to par to handle a VM.


How might I go about making a smooth, variable width, stroke in Inkscape where the path is complex like in the image?

What is an easy way to create this pattern in Inkscape?    So far using Creat Tiled Clones I have been able to achieve following outputs:   This is without alteration on the column. As you can see the pattern shifts down.  If I enable the per columen alternation I get following result. Now the gap between the columns varies, because the horizontal shift changes its sign as well as as the vertical.    About the scaling I'm not even sure where to start. The Scale tab, does not help, because I need to scale the segments individually, but the original is single combined path.


I'm trying to code a simple algorithm that prints out the $n^{th}$ Fibonacci number. However, my program requires the initial seed values $F_0 = 0$ and $F_1 = 1$, when I'm hopeful I can figure something out to not require initial seed values.  Where does $F_0$ and $F_1$ come from anyway? Recursively, $F_n = F_{n-1} + F_{n-2}$, for all $n > 1$, but is there a mathematical approach to infer $F_0$ and $F_1$? Basically, how would I approach the values $F_0$ and $F_1$ without knowing them beforehand?  edit; I wanted to add since there seems to be confusion: I'm only concerned with the below sequence.  $$0, 1, 1, 2, 3, 5, 8, ...$$  I'm curious to how the $0, 1$ is defined, because every other term can be derived recursively, but the first two cannot (or can they?).

The Fibonacci Series is based on the principle that the succeeding number is the sum of the previous two numbers. Then how is it logical to start with a 0? Shouldn't it start with 1 directly?


I have a windows 8 Gateway desktop PC and I was wanting to install Ubuntu (13.10) on it.  Firstly I created a bootable USB using , the process was successful, and when I plug the flashdrive in using windows 7 AND 8, it is no longer recognized as TOSHIBA 8GB, but Install Ubuntu (H:), whenever I go into the BIOS of the Gateway PC, I set my removable disk as the first boot priority, and disable secure boot, and Launch CSM was set to always, and even after all these setting changes I still boot into windows 8.  I did notice that the motherboard in the Gateway PC was an exclusive motherboard, I don't know if that means anything but it is very frustrating and I would like some help to resolve this issue.  Thanks in advance, Gage

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


What would you call someone who dislikes, say, the taste of chocolate?  They have a non-preference for it.  '-phobe' doesn't seem to fit as it implies they want it to suffer or be destroyed, or they are frightened of it.  'antiphile' isn't a word and neither is 'contraphile'.  The closest similar question I've found was ''.  EDIT: As mentioned by @ermanen there is a very similar question:   I was not necessarily after a suffix and was looking for an 'identity' term.  EG: A person who dislikes the taste of chocolate and is quite secure in and not embarrassed by it.  This person does not bear ill will to those that do like the taste of chocolate.

For instance trichomania is a love of hair, and trichophobia is a fear of hair. But what suffix would denote a loathing of hair?  Edit: Maybe I'm looking at the wrong end of the word, and I should be considering the prefix "miso-".


I could have sworn this was working 2 months ago and now it seems suddenly broken (there are some slight changes I have tried to make today - making the method calls @future in @testsetup, also adding startTest and stopTest into testSetup - to no avail) What could I do to try and fix? or even to debug it -> not able to track where and why it is erroring out (I understand about making callouts and ensuring DML after the callout and/or different transaction and/or @future). If I remove the steps in @testsetup it works but those steps are needed to setup the admin data needed. I am 100% sure it worked fine about 2 months ago and I was getting 92% coverage. It seems to work ok on the QA/UAT server as well - just not in my SB all of a sudden  SyncUserTest.cls      @IsTest     private class SyncUserTest {         @testSetup         static void setupData(){            test.startTest(); //trying everything to create a separate txn            createAdminData();            createUsers();            test.stopTest();              }          @future //doesn't need to be @future but trying everything here to create separate txn         static void createAdminData(){             List<Application_Properties__c> custSettings=new List<Application_Properties__c>();             custSettings.add(new Application_Properties__c(name='DS_API_Enable',value__c='true'));             ......             insert CustSettings; //these custom settings are needed to pass parameters to the callout         }              @future //this definitely needed to be @future to avoid mixed DML issue         static void createUsers(){             UserDataFactory userDataFactory = new UserDataFactory(User.SObjectType);                  List<User> users = new List<User>();             .....             insert users;         }      @IsTest     static void testClose() {         List<User> listUsers = [select id from User where Isactive = false'];         test.startTest();         test.setMock(HTTPCalloutMock.class,new MockHTTPResponseGenerator());         Id batchId1= callBatches('CLOSE');         Test.stopTest();         listUsers = [select id from User where Isactive = false'];         system.assertEquals(...);     }      private static Id callBatches(String theMethod) {         return Database.executeBatch(new SyncUser(theMethod));     }   SyncUser.cls  global class SyncUser implements Database.Stateful, Database.Batchable<sObject>, Database.AllowsCallouts,Schedulable{ global Database.QueryLocator start(Database.BatchableContext BC){         ...         initRequest()         ... } global void initRequest() {         HttpRequest req = new HttpRequest();         req.setMethod('POST');         String authendpoint = settingsMap.get('DS_API_AuthEndpoint');         req.setEndPoint(authendpoint);         req.setHeader('Content-type', 'application/x-www-form-urlencoded');         ....         req.setBody(requestBody);         try{             Http http = new Http();             System.debug(Limits.getDMLStatements());             HTTPResponse res = http.send(req);         }         catch (Exception e) {             loginError= 'Error occurred during initial token management process: \n'+e.getMessage();             System.debug(loginError);         }   Debug log:  13:06:29.913 (2053116965)|EXCEPTION_THROWN|[120]|System.CalloutException: You have uncommitted work pending. Please commit or rollback before calling out 13:06:29.913 (2053368109)|USER_DEBUG|[151]|DEBUG|Error occurred during initial token management process:  You have uncommitted work pending. Please commit or rollback before calling out  I don't believe I need to move initRequest() to a separate @future method as I am not doing any DML there at all. AFAIK, the only DML I am doing so far, until the point of the error is in the testsetup where I am creating custom settings and test users (I have removed all triggers from UAT). I Can't move the lines in-between startTest and stopTest in testClose() because I need to mock the callout.

What else, other than insert/update/upsert/delete, can cause "System.CalloutException: You have uncommitted work pending. Please commit or rollback before calling out"?  I've search the debug logs multiple times, and there absolutely is not a DML statement executed between the startTest and the failing callout.  Are there any other commands, or perhaps another callout (even though it's only an inquiry), that can cause this?  Does anyone know how to get around this problem?


Theorem Any collection of subsets $\mathcal{A}$ of a nonempty set $X$ forms the subbasis for a unique topology $\tau$ on $X$. This theorem is absolutely amazing to me. I really enjoy the idea of it as a powerful tool, but I have come up with a counterexample that I just can't get over. So the theorem states that any collection of subsets of a nonempty $X$ form a subbasis for a unique topology on $X$. The emphasis there is any. So, consider the following counterexample: Let $X= \{a,b,c,d,e\}$ and let $\mathcal{A}=\{\{a\}\}$. Clearly, this is a collection of subsets of $X$. Assume that, by our theorem, then $\mathcal{A}=\{\{a\}\}$ is a subbasis for some topology on $X$. Okay, so since $\mathcal{A}$ is a subbasis of some topology on $X$, let's try taking intersections of members of $\mathcal{A}$. Well, $\{a\}\cap\{a\}=\{a\}$. Then our basis for our topology is $\mathcal{B} = \{\{a\}\}$ This is problematic because this means that our basis $\mathcal{B}$ is just $\{a\}$, but note that $\displaystyle\bigcup \mathcal{B} = \{a\}$ and $\{a\} \neq X.$ Therefore, $X \not \in \tau.$ How do we get $X$ in $\tau$? Is my counterexample logically consistent?

Theorem Any class $\mathcal{A}$ of subsets of a nonempty set $X$ is the subbase for a unique topology $\tau$ on $X$. That is to say, the finite intersections of members of $\mathcal{A}$ form a base for the topology $\tau$ on $X$. Example Consider $X=\{a,b,c,d\}$ Let $\mathcal{A}=\{\{a,b\},\{b,c\},\{d\}\}$ The finite intersection of members of $\mathcal{A}$ give us: $$\mathcal{B}=\{\{a,b\},\{b,c\},\{d\},\{b\},\varnothing,X\}$$  How is it true that $X \in \mathcal{B}$ ? By definition of subbase, the finite intersection of members of $\mathcal{A}$ are the members of some base $\mathcal{B}$. But for $a_i \in \mathcal{A}, \displaystyle\bigcap a_i \neq X$ for any finite intersection of $a_i$'s. Look: $\{a,b\}\cap\{b,c\}\cap \{d\} \neq \{a,b,c,d\}$ nor do any other intersection of elements of $\mathcal{B}$ result in $X$. Anybody know what's going on here? Why is $X \in \mathcal{B}$?


There is binary file for update my switch configuration in src/main/resources directory in run time. when i try it with debug mode in eclipse the file exist and there is no problem, but when i create an executable jar file for real application this file does not exist.  Where is the problem?  String filePath  = new File("/resources/firmwares/myConfigFile.bin").getAbsolutePath();  File f = new File(filePath);     if (f.exists())              upload();

In my application I load resources in this manner:  WinProcessor.class.getResource("repository").toString();   and this gives me:  file:/root/app/repository   (and I replace "file:" with empty string)   This works fine when I run my application from the IDE, but when I run the jar of my application:  java -jar app.jar   The path becomes:  jar:/root/app.jar!/repository   is there any way to solve this problem?  I'll use the "repository" dir name in order to create this:  ConfigurationContext ctx = (ConfigurationContext) ConfigurationContextFactory.createConfigurationContextFromFileSystem(repositoryString, null);   In the same manner, I'll get one file name (instead of a dir) and I'll use it this way:  System.setProperty("javax.net.ssl.trustStore", fileNameString)


Homework question:     Let $G$ a finite group with order of $2p$, where $p > 2$ is prime. given that there's $a \in Z(G)$ such that $o(a) = 2$. Prove: $G$ is abelian.    Can you give me some hints and help to solve it? Thanks in advance.

Let $G$ be a group of order $2p$ , where $p$ is a prime greater than $2$. Then, G is isomorphic to $Z_{2p}$ or $D_p$ .  Gallian gives a proof as follows : They prove that G = $\langle a \rangle \bigcup b \langle a \rangle$ where $a$ is an element of order $p$ and $b$ is an element of order $2$.... $(1)$  Now consider $ab$. Since $ab \notin \langle a \rangle$, it is proved that $ab$ has order $2$. Hence , $ab = (ab)−1 = b^{−1}a^{−1} = ba^{−1} $(as $b$ has order $2$).   Furthermore, $a^ib = ba^{−i} ~\forall ~i \geq 1$ , so this relation completely determines the multiplication table for $G$.  Since the multiplication tables of all non cyclic groups of order $2p$ are uniquely determined , they must all be isomorphic to each other.    Attempt : I have trouble understanding the above statement in bold. I do have an intuition that $a^ib = ba^{−i} ~\forall ~i \geq 1$ , might be able to completely determine the multiplication table for $G$ because :   Order of $ab = 2$ { as proved in Gallian}  Any element in G is of the form $a^l b a^m $    But to prove that the mutliplication tables for all non cyclic groups of order $2p$ are uniquely determined, if we consider the multiplication of two elements $x,y$ $\in G$ , we   $x y = a^{l_1} b a^{m_1} a^{l_2} b a^{m_2}$  How is this uniquely determined?   And if they are uniquely determined, why should all non cyclic groups of order $2p$ be isomorphic to each other?  Attempt :  If they are uniquely determined, then i can think of a one to one correspondence between the cayley tables of two groups $G_1$ and $G_2$ . They will surely be onto as well as both $G_1$ and $G_2$ are of order $2p$ .  But to prove isomorphism, how do i prove the group function operation preservation?


I downloaded MODIS Vegetation Indices 16-day L3 Global 500m (MOD13A1) from which i only loaded NDVI value. but the range is 5.25478e+06 to 7.76892e+07. how should I convert it into normal NDVI range of -1 to 1

I'm new to StackExchange and to remote sensing.  I am working with MOD13Q1 250m 16-day MVCs.  My goal is to use NDVI time-series to classify cropping pattern and crop type, then link this data to water issues and rainfall.  I am working with ENVI 5.1, which is also new to me.  I have used the Modis Reprojeciton Tool to reproject and mosaic two MODIS tiles covering Sri Lanka.  The data has been reprojected into WGS84_UTM_44N.  I output the data as a GeoTiff and have successfully loaded this into ENVI.    Here's my question:  the pixels in the reprojected/mosaicked raster for the NDVI band (which is what i will need for the time-series analysis) run from -32768 to 32767, not from -1 to 1.  Is this just some silly misinterpretation on my part, do I need to manipulate the raster somehow with ENVI, or have I distorted the data when reprojecting it?


Even if you disable Chrome's automatic sign-in in the browser's settings:    Google seems to follow you when a website offers Login with Google:   Is there a way to disable Login with Google at all for external websites?

I've recently begun seeing common pop-ups on sites on which I do not have an account. The pop-ups prompt me with my real name and Google sign-in email, which is being provided either by being signed in to Google/Gmail or being signed in to the desktop Chrome browser.  Sign in to example.com with Google Your Name email@example.com CONTINUE AS NAME To create your account, Google will share your name, email address, and profile picture with example.com. By continuing, you agree to example.com's privacy policy and terms of service.  The functionality providing this seems to be variously called: "Google ", "Google ", "You Only Log-in Once", the GoogleYOLO API for OpenYOLO, "Google One-tap sign-up and automatic sign-in", "Google Account sign-in prompts", "Sign in with Google", "Log in with Google", "Join with Google".  One-tap sign-up and automatic sign-in  You can provide seamless authentication flows to your users with Google's one-tap sign-up and automatic sign-in APIs. With one-tap sign-up, users are prompted to create an account with a dialog that's inline with your page's content, so they're never taken out of context by a sign-up page. With just one tap, they get a secure, token-based, passwordless account with your service, protected by their Google Account. And, of course, since there's such little sign-up friction, users are much more likely to register.  I frequently see the pop-up, obscuring the content, .  It is also being added to :   Large websites using this sign-in method include:   Sign in to medium.com with Google Sign in to nytimes.com with Google Sign in to eBay with Google Sign in to Quora with Google Sign in to trulia.com with Google Sign in to Tripadvisor with Google Use Pinterest with Google Use hipmunk.com with Google Create a wayfair.com account with Google    I don't object in principle to using my Google account to sign up for a service, but I do not want these pop-ups obscuring the site contents on page load. This pop-up feels like a "notification" from Chrome, prompting me to use my signed-in Chrome account. It appears to be something I should be able to disable, like , in my local copy of my web browser software. Or, if not a Chrome browser notification, it also feels like something I should be able to disable from my Google account settings. How do I disable these pop-ups and ensure they are not shown on any website? Settings-type changes preferred over content blockers, if possible.


I want to be more up to date with current events and ideas in SQA. I was wondering if anyone could offer any suggestions for Software Testing Blogs.

I've tried my best to keep this question non-subjective so am not asking which blogs are definitively "the BEST" but instead am using the opportunity to just try to broaden my scope of reading around the subject.   I am already reading blogs by Michael Bolton, James Bach, Alan Richardson, Dorothy Graham, the Google Testing blog (James Whittaker) and the Weekend Testing blog.      Can anyone make some further recommendations?


As stated in the title: Why can't a closed interval $[a,b]$ on R be written as the disjoint union of countably infinite many closed intervals $[a_i,b_i]$?

Can you express $[0,1]$ as a countable disjoint union of closed sets, other than the trivial way of doing this?


What is right way to calculate this integral and why?     $$ \int\frac{1}{2x}\text dx $$   I thought, that this substitution is right: $$ t = 2x $$ $$ \text dt = 2\text dx $$ $$ \frac{\text dt}{2} = \text dx $$ $$ \int\frac{1}{2x}\text dx=\int\frac{1}{t}\frac{\text dt}{2}=\frac{1}{2}\ln|2x| + C . $$  But it's not right, because this is the correct answer: $$ \int\frac{1}{2x}\text dx=\frac{1}{2}\int\frac{1}{x}\text dx=\frac{1}{2}\ln|x| + C . $$  Can someone explain me, why is the first way wrong? When I derive both results, I get the same result.

Given the very simple integral  \begin{equation} \int -\frac{1}{2x} dx \end{equation}  The obvious solution is  \begin{equation} \int -\frac{1}{2x} dx = -\frac{1}{2} \int \frac{1}{x} dx = -\frac{1}{2} \ln{|x|} + C \end{equation}  However, by the following integration rule \begin{equation} \int \frac{1}{ax + b} dx = \frac{1}{a} \ln{|ax + b|} + C \end{equation}  the following solution is obtained \begin{equation} \int -\frac{1}{2x} dx = -\frac{1}{2}\ln{|-2x|} + C \end{equation}  Why are these solutions different? Which is correct?   The second solution can be simplified \begin{equation} -\frac{1}{2}\ln{|-2x|} + C = -\frac{1}{2}\ln{|-2|} -\frac{1}{2}\ln{|x|} + C= -\ln{\frac{1}{\sqrt{2}}} - \frac{1}{2}\ln{|x|} + C \end{equation} but they still differ.


Hii Guys can anyone help with this? i am having some trouble with automatic weights. when i substract the weight under the right leg.its just not getting a smooth substract. it just shrink itself when i substract the weights. please can anyone solve my problem?

Blend :   My self made rig completely deforms after automatic weights. I've altered the rotation of the IK bone, in pose mode and reset the rotation of the bones with alt+G. When I created the bones, I did not pay attention to rotation axes. Did I mention I did not took the time to rename the bones?  What I might think is the problem is the legs, of the original mesh were not completely in T Pose.  Furthermore, the lower part of the mesh breaks after the process, which is caused by other problems. I Followed this tutorial


I am a beginner in R. I am doing logistic regression using around 80 independent variables using glm function in R. The dependent variable is churn which says whether a customer churned or not. I want to know how to identify the right combination of variables to get a good predictive logistic regression model in R.  I also want to know how to identify the same for making good decision tree in R ( I am using the ctree function from the party package). So far, I had used drop1 function  and  anova(LogMdl, test="Chisq") where LogMdl is my logistic regression model to drop unwanted variables in the predictive model.  But maximum accuracy I was able to achieve was only 60%.   Also I am not sure if I am using the drop1 and anova functions correctly. I dropped the variables with lowest AIC using drop1 function.  Using anova function, I dropped variables with p value > 0.05  Kindly help me how to identify the right set of variables for both logistic regression and decision tree models to increase my model's predictive accuracy to close to 90% or more than that if possible.     library(party) setwd("D:/CIS/Project work") CellData <- read.csv("Cell2Cell_SPSS_Data - Orig.csv") trainData <- subset(CellData,calibrat=="1") testData <- subset(CellData,calibrat=="0") # validation or test data set LogMdl = glm(formula=churn ~ revenue  + mou    + recchrge+ directas+                 overage + roam    + changem +                changer  +dropvce + blckvce + unansvce+                 custcare+ threeway+ mourec  +                outcalls +incalls + peakvce + opeakvce+                 dropblk + callfwdv+ callwait+                months  + uniqsubs+ actvsubs+  phones  + models  +                eqpdays  +customer+ age1    + age2    +                 children+ credita + creditaa+                creditb  +creditc + creditde+ creditgy+ creditz +                 prizmrur+ prizmub +                prizmtwn +refurb  + webcap  + truck   +                 rv      + occprof + occcler +                occcrft  +occstud + occhmkr + occret  +                 occself + ownrent + marryun +                marryyes +marryno + mailord + mailres +                 mailflag+ travel  + pcown   +                creditcd +retcalls+ retaccpt+ newcelly+ newcelln+                 refer   + incmiss +                income   +mcycle  + creditad+ setprcm + setprc  + retcall,                 data=trainData, family=binomial(link="logit"),                control = list(maxit = 50)) ProbMdl = predict(LogMdl, testData, type = "response") testData$churndep = rep(0,31047)  # replacing all churndep with zero testData$churndep[ProbMdl>0.5] = 1   # converting records with prob > 0.5 as churned table(testData$churndep,testData$churn)  # comparing predicted and actual churn mean(testData$churndep!=testData$churn)    # prints the error %   Link for documentation of variables:   Link for Dataset (.csv file) :    I could not produce the output of dput since the data size is more than 5 MB. So I have zipped the file and placed in the above link.   Description of important variables: * churn is the variable that says whether a customer churned or not..... * churndep is the variable that needs to be predicted in the test data (validation data) and has to be compared with the churn variable which is already populated with actual churn. For both churn and churndep, value of 1 means churned and 0 means not churned.

My situation:   small sample size: 116 binary outcome variable long list of explanatory variables: 44 explanatory variables did not come from the top of my head; their choice was based on the literature.   Statistical test chosen: logistic regression  I need to find the variables that best explain variations in the outcome variable (I am not interested in making predictions).  The problem: This question is a follow-up on the 2 questions listed below. From them, I got that performing automated stepwise regression has its downsides. Anyway, it seems that my sample size would be too small for that. It seems that my sample is also too small to enter all variables at once (using the SPSS 'Enter' method). This leaves me with my issue unresolved: how can I select a subset of variables from my original long list in order to perform multivariate logistic regression analysis?  UPDATE1: I am not an statistician, so I would appreciate if jargons can be reduced to the minimum. I am working with SPSS and am not familiar with other packages, so options that could be run with that software would be highly preferable.  UPDATE2: It seems that SPSS does not support LASSO for logistic regression. So following one of your suggestions, I am now struggling with R. I have passed through the basics, and managed to run a univariate logistic regression routine successfully using the glm code. But as I tried glmnet with the same dataset, I am receiving an error message. How could I fix it? Below is the code I used, followed by the error message:  data1 <- read.table("C:\\\data1.csv",header=TRUE,sep=";",na.string=99:9999)  y <- data1[,1]  x <- data1[,2:45]  glmnet(x,y,family="binomial",alpha=1)    **in lognet(x, is.sparse, ix, jx, y, weights, offset, alpha, nobs,  :  (list) object cannot be coerced to type 'double'**   UPDATE3: I got another error message, now related to missing values. My question concerning that matter is .


I am new to Salesforce. I am using the Contacts object with two different record types. I want to create a separate tab for one of the record type. How can I achieve this?

Hello Folks,              I have a question which might be more on the admin side of the force.com platform but involves development.  Question: If I create record types for an object, how can I create separate tabs for the same object but different record types. And, since they all are going to share the same fields, how can I distinguish the labeling?  I dont think this is currently possible, but I would like to know how can it be achieved?  What I have tried: I tried creating visualforce pages with enhanced lists but then in the enhanced list I can not specify the record type.  Please let me know how can I achieve this! Thank you for the help.


Translators are often at a loss to exactly translate a word, phrase or even an entire sentence because the source language and the target language are so far removed from each other culturally and linguistically.   For example, there seems to be no English equivalent for the Marathi concept, "Vihin Bai". It refers to the relationship between the mothers of the man and the woman who are/are going to be married. Since the concept does not exist in the same form in English-speaking societies, there's probably no equivalent.  What I need to find out is whether there is a word to describe the translator's inability to translate such culture-specific terms.

I've run into this situation several times, being a native Spanish speaker.   There are some words you just can't translate into another language. Is there a particular word to describe this?  I'm not refering to idioms.  Also, if its a noun, people tend to use them by surrounding them in quotes. Is this appropiate?  Example:     I arrived at around 5 pm and had some quesadillas.   Edit:  I also meant to cover words that exist in English, but cannot be translated into another language.   Example:      There isn't a word for "drive-thru" in your language.


In a salesforce application we have a requirement to invoke the visual force pages based on the user is logged in from mobile or desktop.  How can I identify if a user is logged in from mobile or desktop?

I have a Visualforce page that is used in both Salesforce1 and the desktop. On that page is a button. That button should only display if the user is loading the page on the desktop. It should be hidden on Salesforce1. Any suggestions?  Essentially I am just looking for a way to detect if the Visualforce page is loaded in Salesforce1 or not. I can handle the logic of displaying the button, I just don't know if it is possible to tell if it is Salesforce1 or not.


Let's consider the process $q\bar{q}\rightarrow gg$. Is the following Feynman diagram allowed:  I ask because of the following reason: At the upper vertex, the $q$ emits a gluon $g$ and the propagator would then be a $q$, I guess, but at the lower vertex, the propagator would then emit a gluon $g$ and turn into a $\bar{q}$. Would this not be a violation of electric charge at the lower vertex, because the gluon $g$ does not have any charge?

Let's consider the t-channel version of the process $q\bar{q} \rightarrow gg$. What is the mediator in this case, a $q$ or a $\bar{q}$? Naively, I would have thought a $q$ (as to have one fermion line), but I am not $100 \%$ sure.


User A asks a question, user B answers it and A marks B's answer as accepted. I however realize that B's answer is not entirely wrong but is totally not solving the issue for me.  How and where can I state my problem, how can I ask for further information, how can I make the stack-community re-think this question from a different angle?   I could comment on B's answer, but this would make just him think about it. This will also not un-mark his/her answer as accepted. I could edit the question of A and state "Edited by Blauhirn: The given solution may be working, but lacks the following problem: ...". Is this how edits are supposed to be used? It seems to me I should be commenting on A's question instead, but this will again not bump the entire question. I could re-ask the question myself and include "The question was already answered here, but it is not working for me." But since I'd basically be asking the same question again, it would get marked as duplicate.    Commenting is never satisfying anyway, for the commented post's author could be inactive.    edit: I flagged this very question as duplicate because I just found a similar one

Possible Duplicates:      I have a question I'd like to ask, but an exact duplicate exists. It was asked by another user and has an accepted answer (unsatisfactory for me) more than a year ago. Is it acceptable to re-ask the question in hopes that a year has brought some additional insight or suggestions? Should I just bump the original question as ? See also:


Hello I have a little game I made for practice. I am able to put a JLabel on the screen but, when I run the ActionListener actionPerformed third if statement it stops the game. Also i have no idea what to change for the "Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException" Error. Thanks :) Here's the code:  package me.mikail.movement;  import java.awt.BorderLayout; import java.awt.Color; import java.awt.Graphics; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.awt.event.KeyEvent; import java.awt.event.KeyListener;  import javax.swing.JComponent; import javax.swing.JFrame; import javax.swing.JLabel; import javax.swing.Timer;  public class Player extends JComponent implements ActionListener, KeyListener{  Timer time = new Timer(10, this); private int x = 0, xSpeed = 3, y = 0, ySpeed = 4, stickX = 0, stickY = 400; private JFrame frame; private int oneup = 0; private JLabel info;  public static void main(String[] args){     Player p = new Player();     JFrame frame = new JFrame("Player Practice");     JLabel info = new JLabel(" ");     frame.setSize(500,500);     frame.setVisible(true);     frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);     frame.add(p);     frame.getContentPane().setBackground(Color.BLACK);     frame.setResizable(false);     frame.addKeyListener(p);     info.setOpaque(true);     info.setBackground(Color.WHITE);     frame.add(info, BorderLayout.SOUTH); }  public void paintComponent(Graphics g){     super.paintComponents(g);     //Ball     g.setColor(Color.BLUE);     g.fillRect(x, y, 30, 30);     //Stick     g.setColor(Color.RED);     g.fillRect(stickX, stickY, 75, 10);     time.start(); } public void points(){     int counter[] = {0,1,2,3,4,5,6,7,8,9,10};     for(int i = 0; i<=oneup; i++){         info.setText("You have "+counter[i]+" point(s)");     }     frame.add(info, BorderLayout.SOUTH); } public void actionPerformed(ActionEvent e) {     //Y's 0 is on the top     //X's 0  is on the left     if(x<0){         xSpeed = -(xSpeed);     }     if(x>=470){         xSpeed = -(xSpeed);     }     //when block hits stick     if(y==stickY){         if(x>=(stickX)&&x<=(stickX+75)){             ySpeed = -(ySpeed);             oneup = (1+oneup);             points();         }else{         }     }     if(y<0){         ySpeed = -(ySpeed);     }     if(y>=450){         ySpeed = -(ySpeed);     }     x = (x + xSpeed);     y = (y + ySpeed);     repaint();  }  public void keyPressed(KeyEvent e) {     int key = e.getKeyCode();     if(key == KeyEvent.VK_A|| key == KeyEvent.VK_LEFT){         stickX = (stickX - 50);     }else if(key == KeyEvent.VK_D|| key ==  KeyEvent.VK_RIGHT){         stickX = (stickX + 50);     }else{         System.out.println("Why did you type that?");     } }  public void keyReleased(KeyEvent e) { }  public void keyTyped(KeyEvent e) { } }

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


How do you pivot a table on the value in the field? I have to admit that while I can write some pretty nifty queries, have my CTEs down, and enjoy a wide knowledge of T-SQL programming, Pivots get into a wonky area that I am uncomfortable and unfamiliar with.  Let me describe my issue, and see if you can help.  I have the following tables:  CREATE TABLE [dbo].[Itinerary] (    [ItineraryID] [int] IDENTITY(1,1) NOT NULL primary key,    [RoadTripID] [int] not NULL,    [ItineraryDate] [date] not NULL,    EstimatedMiles int not null,    Destination varchar(64) not null,    DestinationState varchar(2) not null,    DayTypeID int not null )  Create Table dbo.DayType  (    DayTypeID int primary key identity,    DayTypeCode varchar(2) not null,     DayTypeDescription varchar(32) not null  )   DayType is a helper table with nine values:  Insert into DayType values    ('XX', 'Planning/Prep'),   ('SE', 'Short Event'),   ('LE', 'Long Event'),   ('WD', 'Writing Day'),   ('TD', 'Tech Day'),   ('HD', 'Hiking Day'),   ('PD', 'Photography Day'),   ('LD', 'Layover Day'),   ('LH', 'Long Haul')   When I enter a row into Itinerary it looks like this:  insert into itinerary  values(1, '11/27/2014', 361, 'Amarillo', 'TX', 1)   The last piece of the puzzle (and the question itself) is that I want to report out on how many of each type of day I've planned.  I am currently using the tried-and-true-(and awful) method:  Select     s.ItineraryID, R.ShortName as RoadTripName,     sum(EstimatedMiles) as TotalMiles,     count(itineraryid) as TotalDays,     (select count() from Itinerary i1 with (nolock) where daytypeid = 1 and i1.itineraryid = s.itineraryid) as 'Planning/Prep',    (select count() from Itinerary i2 with (nolock) where daytypeid = 2 and i2.itineraryid = s.itineraryid) as 'Short Event',    (select count() from Itinerary i3 with (nolock) where daytypeid = 3 and i3.itineraryid = s.itineraryid) as 'Long Event',    (select count() from Itinerary i4 with (nolock) where daytypeid = 4 and i4.itineraryid = s.itineraryid) as 'Writing Day',    (select count() from Itinerary i5 with (nolock) where daytypeid = 5 and i5.itineraryid = s.itineraryid) as 'Tech Day',    (select count() from Itinerary i6 with (nolock) where daytypeid = 6 and i6.itineraryid = s.itineraryid) as 'Hiking Day',    (select count() from Itinerary i7 with (nolock) where daytypeid = 7 and i7.itineraryid = s.itineraryid) as 'Photography Day',    (select count() from Itinerary i8 with (nolock) where daytypeid = 8 and i8.itineraryid = s.itineraryid) as 'Layover Day',    (select count(*) from Itinerary i9 with (nolock) where daytypeid = 9 and i9.itineraryid = s.itineraryid) as 'Long Haul' from     RoadTrip r  inner join     Itinerary s on r.roadtripid = s.roadtripid group by     s.itineraryid, r.shortname   which returns:    Obviously (hopefully!) there needs to be a better way. How can I pivot those nine values, and their total count each into this query?

My table is like this:  Sitecode    Month  Amount --------    -----  ------ XX          Jan     1000 XX          Jan     3000 XX          Apr     3000 XX          Apr     1000   What I want is, to show the result something like this:  Sitecode    MonthJAN   MonthAPR --------    --------   -------- XX          4000       4000


I am still fighting with mirroring. Doesnt matter if I use Ctrl+M or Mirror modifier. My rivets go only in bad way. I mean I want them mirrored nicely along global axis to fit the opposite site. BUT the rivets are mirroring only along local transformations corresponding their base slope face.  Check the screenshots:    From pictures you can see that rivets want to be mirrored in the face direction they were created at. I used Snapping during transform (magnet icon) on the face and I had applied "Align rotation with the snapping target".   On the other faces it all worked fine, as you can ssee they are mirrored properly. But this last face which is not perpendicular doesn't work for me. What do I wrong?  Thanks !  I must also say, that If I change GLobal transforamtion to local, or gimbal or whatever the result is still the same !  It behaves like it is a bug there?... Please help Karel

I'm learning how to use the mirror modifier and I am having some trouble.  When I apply the modifier to my object I don't see a mirrored version of it.  What am I doing wrong?


I have a string that looks like KATIE+DAMAN-SUZANNE+DANIELS How do I replace both + signs? I tried the following which does not work. string.replace(/+/g, ' ');

I am tired of always trying to guess, if I should escape special characters like '()[]{}|' etc. when using many implementations of regexps.  It is different with, for example, Python, sed, grep, awk, Perl, rename, Apache, find and so on. Is there any rule set which tells when I should, and when I should not, escape special characters? Does it depend on the regexp type, like PCRE, POSIX or extended regexps?


My daughter and I will be traveling from Canada to the US for a one-day lacrosse game on Saturday.  Her passport is in the process of being renewed. Will she be OK to cross the border into the US and back again into Canada with a government-issued license and a birth certificate?

Can we drive across the blue water bridge from Canada to the US and back without a passport?   We have proof of Canadian citizenship but our passports just expired.


I have a relatively new PS4 controller (one or two months old).  One day, I took it over to my mate's house to play some FIFA, when I can home later that day I went to plug in my controller and connect like normal. The light went orange to show it had been connected and so I pressed the PlayStation button, but all it does is flash with the white light? This is also happening with other controllers I try to connect... already synced ones connect no problem. I thought it may have been a random thing but it connects to other people's PlayStations, just not mine.  Any ideas what is wrong?

I was playing my PS4 two days ago and then packed it up with two controllers that were both connected to this PS4.   I got to where I was going, set everything up and now the controllers won't connect. They show pulsing orange when they plug in, but when I hit the PS Button to connect, it blinks white 1-2 times and goes back to orange.   I have tried resetting them both.  Can anyone help?


I know what the binomial coefficient means in combinatorics, e.g. $\binom6{2}$ means "6 choose 2" i.e. how many different subsets of size 2 can there be, out of a set of 6 elements.  But what does it mean when there is a comma in the bottom of the coefficient, for example $\binom6{2,2}$?  I saw this usage in the first answer here, and I'd never seen it before:

I'm reading through  paper (on Dyck Paths). Near the middle of the second page, the author states the following:     Remark For the set $h_n$ there are ${k\choose t_1, t_2, ... , t_m }$ $n + k \choose{k}$ $=$ $ n + k\choose {n, t_1, t_2, ..., t_m}$ different Dyck paths.   What does ${k\choose t_1, t_2, ... , t_m }$ mean? I know what the binomial coefficient is, but I'm not sure how to interpret it when one of the parameters is a set.


I have a VPS which I rent and it is running Centos 6. The VPS has ZPanel installed which is used to host some websites and emails.  One of my clients has noticed thousands of 'undeliverable' messages in her inbox. (FYI, Roundcube Webmail is used for email).  This lasted for a few days and now her email does not work at all.  I have come to the conclusion that her email address is sending out Spam and now the emails have stopped working because the domain has been blacklisted.  I checked out MXToolbox and I have confirmed that there are many blacklists.  I want to stop all spam from being sent out so here is my action plan:   Complete a virus scan on my server Change my client's webmail password Change all FTP passwords Change my ZAdmin Password Change the server root password Request removal from blacklists   I am nervous about this issue because I do not have a lot of experience with servers and I have heard that if I am black listed too many times it can become permanent. (This is the fourth time however I believe the previous occurrences were from bad reverse DNS settings??)  What further actions would you recommend I take? I need to be 100% sure that my sever is secure.  (FYI, my Antivirus is ClamAV).

This is a  about Server Security - Responding to Breach Events (Hacking)   See Also:                  Canonical Version I suspect that one or more of my servers is compromised by a hacker, virus, or other mechanism:   What are my first steps? When I arrive on site should I disconnect the server, preserve "evidence", are there other initial considerations? How do I go about getting services back online? How do I prevent the same thing from happening immediately again? Are there best practices or methodologies for learning from this incident? If I wanted to put a Incident Response Plan together, where would I start? Should this be part of my Disaster Recovery or Business Continuity Planning?   Original Version       2011.01.02 - I'm on my way into work at 9.30 p.m. on a Sunday because our server has been compromised somehow and was resulting in a    attack on our provider. The servers access to the Internet   has been shut down which means over 5-600 of our clients sites are now   down. Now this could be an FTP hack, or some weakness in code   somewhere. I'm not sure till I get there.      How can I track this down quickly? We're in for a whole lot of   litigation if I don't get the server back up ASAP. Any help is   appreciated. We are running Open SUSE 11.0.            2011.01.03 - Thanks to everyone for your help. Luckily I WASN'T the only person responsible for this server, just the nearest. We managed   to resolve this problem, although it may not apply to many others in a   different situation. I'll detail what we did.      We unplugged the server from the net. It was performing (attempting to   perform) a Denial Of Service attack on another server in Indonesia,   and the guilty party was also based there.      We firstly tried to identify where on the server this was coming from,   considering we have over 500 sites on the server, we expected to be   moonlighting for some time. However, with SSH access still, we ran a   command to find all files edited or created in the time the attacks   started. Luckily, the offending file was created over the winter   holidays which meant that not many other files were created on the   server at that time.      We were then able to identify the offending file which was inside the   uploaded images folder within a  website.      After a short cigarette break we concluded that, due to the files   location, it must have been uploaded via a file upload facility that   was inadequetly secured. After some googling, we found that there was   a security vulnerability that allowed files to be uploaded, within the   ZenCart admin panel, for a picture for a record company. (The section   that it never really even used), posting this form just uploaded any   file, it did not check the extension of the file, and didn't even   check to see if the user was logged in.      This meant that any files could be uploaded, including a PHP file for   the attack. We secured the vulnerability with ZenCart on the infected   site, and removed the offending files.      The job was done, and I was home for 2 a.m.            The Moral   - Always apply security patches for ZenCart, or any other CMS system for that matter. As when security updates are released, the whole   world is made aware of the vulnerability.   - Always do backups, and backup your backups.   - Employ or arrange for someone that will be there in times like these. To prevent anyone from relying on a panicy post on Server   Fault.


I am reading a book "Beginning Algorithms" by Simon Harris and James Ross.  In the early pages, there is a section on Understanding Big-O Notation. I read this section, and re-read this section maybe about a dozen times. I still am not able to wrap my head around a couple of things. I appreciate any help to get rid of my confusion.  The author / authors state "The precise number of operations is not actually that important. The complexity of an algorithm is usually defined in terms of the order of magnitude of the number of operations required to perform a function, denoted by a capital O for order of followed by an expression representing some growth relative to the size of the problem denoted by the letter N."  This really made my head hurt, and unfortunately, everything else following this paragraph made no sense to me because this paragraph is supposed to lay the foundation for the next reading.  The book does not define "order of magnitude." I googled this and the results just told me that order of magnitude are defined in powers of 10. But what does that even mean? Do you take the number of operations and define that number in a power of 10, and that equals the complexity? Also, what is considered the "size of the problem?" Is the size of the problem the number of operations? Or is the size of the problem the "order of magnitude of the number of operations required to perform a function."  Any practical examples and a proper explanation of this would really help.  Thanks!

I'd prefer as little formal definition as possible and simple mathematics.


global class agreementupdate implements Database.Batchable, Database.Stateful{  global Integer recordsProcessed = 0; //for debugging, to find out the number of records processed global Database.QueryLocator start(Database.BatchableContext bc){     Date tdy = System.today();     return Database.getQueryLocator('SELECT Id, Service_Contract_Expired__c FROM Asset WHERE Service_Contract_Type__c != NULL and Service_Contract_Expiration_Date__c <=: tdy AND Service_Contract_Expired__c = FALSE'); }  global void execute(Database.BatchableContext bc, List<Asset> scope){     //process batch of Asset records     List<Asset> Assets = new List<Asset>();     for(Asset asst : scope){         asst.Service_Contract_Expired__c = TRUE;         Assets.add(asst);         recordsProcessed = recordsProcessed + 1;     }     Update Assets; } global void finish(Database.BatchableContext bc){     }   }  Test class:  @IsTest   private class agreementupdateTest{  @isTest static void updateExpiredRecords(){  Date tdy = System.today();  Account testAccount = new Account (Name = 'Asset Account', BillingCountry = 'United Kingdom'); insert testAccount;  List<Asset> AssetList = new List<Asset>();  for(Integer i=0; i<5; i++){     AssetList.add(new Asset(     Name = 'Test'+i,     AccountId = testAccount.Id,     CurrencyIsoCode = 'GBP',     Service_Contract_Type__c = 'Type'+i,     Service_Contract_Expiration_Date__c = tdy ));     }     insert AssetList;       Test.startTest();     agreementupdateupExp = new agreementupdate();      Database.executeBatch(upExp,100);     Test.stopTest();      System.assertEquals(5, [SELECT COUNT() FROM Asset WHERE Service_Contract_Expired__c = TRUE]);  }   }

This is a canonical question and answer developed by the community to help address common questions. If you've been directed here, or your question has been closed as a duplicate, please look through the resources here and use them to shape more specific questions. To browse all canonical questions and answers, including more unit test resources, navigate to the  tag.  This canonical question is intended to address several classes of common questions by providing a quick summary and links to comprehensive resources:   How is code coverage obtained and calculated? How do I increase my coverage?  Why can't I cover these lines? Why isn't the body of my loop or conditional statement covered?


I want to upload to the Gumroad or Blendermarket some Blender scenes with complex volumetric materials. They are pretty "heavy" and I would like to specify minimum computer requirements for those scenes. Is there any way to find out right inside Blender how much RAM and graphics card memory is used while rendering exact scene? Maybe some kind of statistics? Or in other case how else do I approach this task?

Is there a way to get Statistic info in Blender? Or heads up display? Like when I select a group of vertices, I need a way to know how many vertices are selected and How many polygons "or triangles my scene has.


I have a PC with Windows XP SP3. It has a 320GB hard drive. Disk Management shows 2 partitions:   C:\, Windows XP, 74.52GB D:\, Files, 223.56GB   I need to transfer just the C:\ to a new hard drive I bought, a 1TB Seagate Barracuda (I haven't looked at it but I'm sure it's not yet partitioned). I've been doing research about this and I've decided to use EaseUS Todo Backup.  However, I'm not sure of the whole process that I have to do. I have these questions:   How would I work this out with only 1 SATA cable? Will the MBR be fixed automatically with the new drive?   Additional notes:   I have an Ubuntu and a Parted Magic Live CD I have a 500GB external hard disk, with 100GB free space.   I'm pretty knowledgeable about these tech stuff, but it's my first time cloning a disk and I need some guidance. Please help. Thank you.  UPDATE:  I went on and read more about this and realized that doing a backup and a clone are two different things. Good thing I did that before I cloned my hard disk to my external drive.  Anyway, I found out that I could use the SATA cable and SATA power cable that my DVD drive was using. So I ended up plugging both my hard drives in (had to convert my new drive from Dynamic to Basic disk), doing the Disk Clone from EaseUS Todo Backup.  I unplugged my older drive and used the new one and voila! Everything worked okay and the transition was smooth. I appreciate all the help. :)

I subjected my hard disk (C drive) to a disk scan and found that there was 12 KB of bad sectors. I now consider that disk to be unreliable, and am looking forward to transferring all my data to another file.  The problem is, I want to clone the complete drive (including the apps, OSes, files and everything, verbatim) to another drive. I know there would be some crazy software activation issues, like Windows Not Genuine problem and so on. But I wonder whether is there a tool powerful enough to do the cloning and at the same time maintain the  OS and apps?


I am going to buy a webcam to be installed in Ubuntu 16.04. I am going to use it for skype

I have a device on which I would like to install Ubuntu. How do I find out if Ubuntu will work on it?


How can I create a shortcut of my frequently used software, files and folders? I did some research and found a way which tells I can do so by making a link of a folder and then copy paste the link on the desktop. I did but each time I reboot my PC I see the shortcut is broken! Then I read  and followed the ways mentioned in the answers with no luck!  Isn't there any way to create shortcuts like Windows in Linux?

I'm using ubuntu 14.04 LTS. When I start my pc and click on any bookmark from the file manager it shows this error:   Unable to find the requested file. Please check the spelling and try again. Unhandled error message: Error when getting information for file '/media/angel/DOC/edu': No such file or directory   But when I open DOC drive and again clink on the same bookmark it works properly. Can anybody tell me why is this happening and how to solve this issue?   Edit: Output of lsblk is following: (ubuntu is installed in sda5)  NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT sda      8:0    0 119.2G  0 disk  ├─sda1   8:1    0  91.3G  0 part  ├─sda2   8:2    0     1K  0 part  ├─sda5   8:5    0  24.1G  0 part / └─sda6   8:6    0   3.8G  0 part [SWAP] sdb      8:16   0 465.8G  0 disk  ├─sdb1   8:17   0  93.2G  0 part  ├─sdb2   8:18   0     1K  0 part  ├─sdb5   8:21   0  93.2G  0 part  ├─sdb6   8:22   0  89.3G  0 part  ├─sdb7   8:23   0  93.2G  0 part  ├─sdb8   8:24   0  93.2G  0 part  └─sdb9   8:25   0   3.8G  0 part  sr0     11:0    1  1024M  0 rom     After opening the disk drive the output of lsblk is bellow:   NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT sda      8:0    0 119.2G  0 disk  ├─sda1   8:1    0  91.3G  0 part  ├─sda2   8:2    0     1K  0 part  ├─sda5   8:5    0  24.1G  0 part / └─sda6   8:6    0   3.8G  0 part [SWAP] sdb      8:16   0 465.8G  0 disk  ├─sdb1   8:17   0  93.2G  0 part  ├─sdb2   8:18   0     1K  0 part  ├─sdb5   8:21   0  93.2G  0 part  ├─sdb6   8:22   0  89.3G  0 part /media/angel/DOC ├─sdb7   8:23   0  93.2G  0 part  ├─sdb8   8:24   0  93.2G  0 part  └─sdb9   8:25   0   3.8G  0 part  sr0     11:0    1  1024M  0 rom   The output of sudo blkid gives the following information about sdb6:  /dev/sdb6: LABEL="DOC" UUID="04280A22280A12FA" TYPE="ntfs"


This article  got me thinking about the "identity"  $$1 + 2 + 3 + \cdots = -1/12,$$  and I wanted to convince myself there was nothing particularly unique about this identity or the Riemann zeta construction. More precisely, this identity only really makes sense if you think of an integer $n$ as being the specialization at $z=-1$ of the function $n^{-z}$. So here's a question:  For any complex number $c$, does there exist a domain $\Omega \subset \mathbb{C}$, and analytic functions $F(n, s)_{n\in\mathbb{N}}$ and $f(s)$ on $\Omega$, such that the following hold  i. $F(n,0) = n$  ii. $\sum_{n=1}^\infty F(n,s) = f(s)$ on $\Omega$ in some reasonable sense (maybe converges uniformly on compact subsets of $\Omega$?)  iii. $f$ can be extended holomorphically to some domain containing both $\Omega$ and $0$ such that $f(0) = c$.   So shifting the Euler series and Riemann zeta would be such a construction for $c=-1/12$. As the question stands, I feel that the answer is almost certainly yes, although to be fair the functions $n^{-s}$ have a lot more structure than "holomorphic functions on some domain". So a follow-up question would be: are there "natural" additional constraints for which the answer to this question is No?  I apologize that this is kind of open-ended, but the goal is to convince myself that there is nothing particularly canonical about $-1/12$ (or to hear an explanation of why it is canonical).

Physicists often assign a finite value to a divergent series $\sum_{n=0}^\infty a_n$ via the following regularization scheme: they find a sequence of analytic functions $f_n(z)$ such that $f_n(0) = a_n$ and $g(z) := \sum_{n=0}^\infty f_n(z)$ converges for $z$ in some open set $U$ (which does not contain 0, or else $\sum_{n=0}^\infty a_n$ would converge), then analytically continue $g(z)$ to $z=0$ and assign $\sum_{n=0}^\infty a_n$ the value $g(0)$.  Does this prescription always yield a unique finite answer, or do there exist two different sets of regularization functions $f_n(z)$ and $h_n(z)$ that agree at $z=0$, such that applying the analytic continuation procedure above to $f_n(z)$ and to $h_n(z)$ yields two different, finite values?


Can someone suggest a way to compare the values of two dates greater than, less than, and not in the past using JavaScript? The values will be coming from text boxes.