I am working on a quite complicated code that I want to include threads in. For a better understanding, I was playing around with threads a little and got a NullPointerException that I don't know why it is there:  Here is my main method and the two classes that are used:  public static void main (String args[]) {          listInteger list = new listInteger();          for(int i = 0; i < 10; i++) {             list.add(i);         }         printList printy = new printList(list);         Thread no1 = new Thread(printy);         Thread no2 = new Thread(printy);         no1.start();         no2.start();     }   public class printList implements Runnable {      public listInteger list;      public printList(listInteger list) {         this.list = list;     }      @Override     public void run() {         while(list.size() > 0) {             System.out.println(list.getFirst());             list.removeFirst();         }     }    }   public class listInteger {     public LinkedList<Integer> list;      public Integer getFirst() {         return list.getFirst();     }      public void removeFirst() {         list.removeFirst();     }      public int size() {         return list.size();     }      public void add(Integer e) {         list.add(e);     }   }   I thought it would just print out the numbers. I wanted to see when the thread gets terminated and also play around with synchronized to see the difference of the output. The list was supposed to show me what the threads are doing but I didn't even get to that point. When does it point to null? Am I doing something wrong with .add()? (I am working on my actual code for many hours now. Forgive me if it is obvious, I just don't see it.)

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?


Sometimes I unplug my USB drive only to find out files were not written to it.  I suppose the only way to ensure files are written to it is to right click on the USB drive on the desktop and then select "un-mount", but sometimes I forget.  What is the best way to ensure files are written to the USB drive instantly? This way I can remove the USB drive as soon as I notice the LED light on the USB drive stopped blinking.  OS: CentOS 6

Sometimes I unplug my usb drive only to find out files were not written to it.   I suppose the only way to ensure files are written to it is to right click on the USB drive on the desktop and then select "un-mount", but sometimes I forget.  What is the best way to ensure files are written to the USB drive instantly? This way I can remove the USB drive as soon as I notice the LED light on the USB drive stopped blinking.  OS: CentOS 6


I have a research paper accepted to a journal and the editor asked me to use certain file  with .cls and I am confused about where exactly I need to dump this file .cls ?  I tried to dump it to /usr/local/share/texmf/  but it is not giving me the right pdf file. Can you help please ?

I know how to define a package or a class, but how do I make it available (to myself) at all times?  Say I have the package file commonstuff.sty (or myprettyclass.cls), that I want to be able to include in any .tex file I create on my computer. Where do I put it? Do I need to run some installer on it, or is it enough to keep it in a certain folder?  Note: I know I can just place it in the same folder as the .tex file, but that's not what I'm after here. I'm looking for a way to "install" the package centrally on my computer.


I have created a basic signup/login form with PHP.   Now I want to let my website create a subdomain for every user signed up on my website.   For example, My domain is "mydomain.com" and "Tom Smith" registers through the 'register form' with his name. I would like my website to automatically create a subdomain: "tomsmith.mydomain.com".   What is the best way to do this?

How do I create subdomain like  ? Do i have to access htaccess somehow? Is it actually simply possible to create it via pure php code or I need to use some external script-server side language?  To those who answered: Well, then, should i ask my hosting if they provide some sort of DNS access??


I want add two numbers which is actually string and having floating point. Here is my code which is working for integers and not for float. NOTE: I do not want to use the pythonic way. num1= "999" num2 = "82.2"  # print(float(num1)+float(num2))   Input: num1= "999" num2 = "82"  class Solution:     def addStrings(self, num1, num2):         i = len(num1) -1         j = len(num2) -1         carry =0         res =[]         while i>=0 or j >=0:             a = 0 if i<0 else int(num1[i])             b = 0 if j<0 else int(num2[j])             tmp = a +b + carry             res.append((str(tmp%10)))             carry =(tmp // 10)             i -= 1             j -= 1         res.reverse()         res_str = ''.join(res)         return str(carry)+res_str if carry else res_str print(Solution().addStrings(num1,num2))  This is giving output as expected - 1081 If I change the input like below it is not working. Please help me modify my code.  num1= "999" num2 = "82.25"  or   num1= "99.11" num2 = "15.2"  The way it is solved in java same way I want to solve it in python. public class AddStrings {      public static void main(String[] args) {          //Example 1:         String str1 = "123.52";         String str2 = "11.2";         String ans = new AddStrings().addString(str1, str2);         System.out.println(ans);          //Example 2:         str1 = "110.75";         str2 = "9";         ans = new AddStrings().addString(str1, str2);         System.out.println(ans);     }      private static final String ZERO = "0";      // Time: O(Max (N, M)); N = str1 length, M = str2 length     // Space: O(N + M)     public String addString(String str1, String str2) {          String[] s1 = str1.split("\\.");         String[] s2 = str2.split("\\.");          StringBuilder sb = new StringBuilder();          // step 1. calculate decimal points after.         // decimal points         // prepare decimal point.         String sd1 = s1.length > 1 ? s1[1] : ZERO;         String sd2 = s2.length > 1 ? s2[1] : ZERO;         while (sd1.length() != sd2.length()) {             if (sd1.length() < sd2.length()) {                 sd1 += ZERO;             } else {                 sd2 += ZERO;             }         }         int carry = addStringHelper(sd1, sd2, sb, 0);          sb.append(".");          // Step 2. Calculate the Number before the decimal point.         // Number         addStringHelper(s1[0], s2[0], sb, carry);         return sb.reverse().toString();     }      private int addStringHelper(String str1, String str2, StringBuilder sb, int carry) {         int i = str1.length() - 1;         int j = str2.length() - 1;         while (i >= 0 || j >= 0) {             int sum = carry;              if (j >= 0) {                 sum += str2.charAt(j--) - '0';             }             if (i >= 0) {                 sum += str1.charAt(i--) - '0';             }             carry = sum / 10;             sb.append(sum % 10);         }         return carry;     } }

In Python, how can I parse a numeric string like "545.2222" to its corresponding float value, 545.2222? Or parse the string "31" to an integer, 31?  I just want to know how to parse a float str to a float, and (separately) an int str to an int.


I am trying to prove the title using induction and here is my attempt:  Base Case: n = 1 : $2>1$ which is True  I.H. : $2^k > k^2$ for some $k$  Inductive Step:   $2^{k+1} = 2^k 2$  $2^{k+1} > 2k^2$ by I.H.  But I am not quite sure what to do next.

Let $S(n)$ be the proposition "$2^n > n^2$"  Basis step: $S(5)$ is true, since $2^5 = 32$, $ 32 > 25 = 5^ 2$  Inductive step:  Induction hypothesis:   Assume $S(K)$ is true, $2^K > K^2$.  Then  $2^{K+1} = 2.2^K > K^2 + K^2$   I don't know how to proceed after this. How to complete this proof?


I am trying to understand if the division for n-1 in the calculation of standard deviation related to degrees of freedom, unbiasing of the estimator, or both.   I understand what is a degree of freedom when we talk about t, chi, f distribution and so on.   I was also trying to understand what is a degree of freedom in respect of the standard deviation.   I became aware of another explanation, which relates to the bias of the estimation of $\sigma$.  Now I am confused: why do we divide by $n-1$?  Is it because of the degrees of freedom (and in this case, what does it actually mean?) or is it because we want to have an unbiased estimator? Or are the two explanations connected in some way?  (Is it normal that the concept of DOF is so slippery and difficult to understand? Or is that just me?)  --I have read the suggested topic, and I think that it only apparently answered my question. The OP of that topic asked about degrees of freedom, and the answer talked about biased estimator. I don't understand how they relate to each other.

would someone please explain why the degrees of freedom for a random sample is n-1 instead of n ?   I'm looking for an explanation that is intuitive and easily understood by a high school student.


It is well known that every linear operator on a finite dimensional normed space is bounded (continuous).  The question that presents itself: is the reverse also true ?   I mean: let $X$ be a normed space (we don't whether it is finite or infinite dimensional). In addition, every linear operator on $X$ is bounded (continuous). Is it possible to infer that the space $X$ is finite dimensional ?

I have started learning Functional Analysis:  I have encountered a theorem which states that if     If $X(NLS)$  is finite dimensional then every linear operator on $X$ is bounded.   Is the converse true?i.e if every linear operator on $X$ is bounded then is $\dim X<\infty$?  In order to show this ;Proceed by contradiction; suppose that $\dim X=\infty$ I want to show that there exits an unbounded linear operator on $X$.Let $X$ have a Hamel Basis say $(e_n)$,then any $x\in X$ can be expressed uniquely as $x=\sum_{k=1}^n c_ie_i$.  How should I define $f(x)$ now to get $f(x)$ unbounded?Any hints will be helpful. Please ensure to give some hints why it should be unbounded ?


I am talking about this question     In this question OP is user "SDG - Shubh Dasgupta"  but user "Varun Vohra" has opened bounty.  My question is for information only who is going to accept the answer .. I think it should be OP only but since Varun has spent 100 reputation points he might be able to accept the answer.  What happens in this kind of situation?

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


I want to learn SharePoint Development 2013 from scratch. I found many courses for SharePoint 2010 But I could not find same Essential Training for beginners in SharePoint 2013.  Is there a great book ? or Online course that is dedicated for SharePoint 2013 ?  Or should I watch both tutorials of SharePoint 2010 and 2013 ?

I have very little knowledge of SharePoint, and want to learn about SharePoint 2013.  Most of the resources that I've found are either about what's new in 2013, or they have a bunch of links to SharePoint 2010.  I also don't have the time to read a thousand page book.  A hundred or so would be fine.  Can anyone recommend a resource (site / book / video / tutorial) for a beginner to learn the basics of SharePoint 2013 in a few days?  I've downloaded a Kindle book, "Getting Started With SharePoint 2013."  It's perfect for absolute beginners, who just want to know how to upload & download documents, but I'm looking for more than that.


A is a $n\times k $ matrix.  I have to show that $\|A\|_2\leq \sqrt{\|A\|_1\cdot \|A\|_\infty}$.   I know that $\|A\|_2^2 = \rho(A^H\cdot A)\leq \|A^H \cdot A\| $ for every $\| \cdot  \|$ submultiplicative matrix norm, but I don't know how to conclude.  Any idea?

With the definition of $ \lVert A \rVert_2$ and $\lVert A \rVert_1$ and $\lVert A \rVert_ \infty$ that is:  \begin{gather} \lVert A\rVert_1 = \max_{j} \sum_{i=1}^m \lvert a_{ij}\rvert\\ \lVert A\rVert_2 = \sqrt{\rho(A^HA)}\\ \lVert A\rVert_\infty = \max_{i} \sum_{j=1}^n \lvert a_{ij}\rvert \end{gather}  prove that:  $$\lVert A \rVert_2^2 \leq  \lVert A \rVert_1 \lVert A \rVert_\infty$$


I am trying to understand the definition of abelian categories. I have found two different definitions which it seems they are not equivalent. If you think they are equivalent, then how can we prove that? And if they are not equivalent, then what is the right definition of abelian categories? The first one is: An abelian category is an additive category where (i) every morphism admits a kernel and cokernel, (ii) every monomorphism is a kernel and every epimorphism is a cokernel. And the second one is: An abelian category is an additive category where (i) every morphism admits a kernel and cokernel, (ii) every monomorphism is the kernel of its cokernel and every epimorphism is the cokernel of its kernel, (iii) every morphism is expressible as the composite of an epimorphism and a monomorphism.

Let's fix some terminology first. A category $\mathcal{C}$ is preabelian if:  1) $Hom_{\mathcal{C}}(A,B)$ is an abelian group for every $A,B$ such that composition is biadditive,  2) $\mathcal{C}$ has a zero object,  3) $\mathcal{C}$ has binary products,  4) $\mathcal{C}$ has kernels and cokernels.  A category $\mathcal{C}$ is abelian if it is preabelian and satisfies:  5) every monomorphism is a kernel and every epimorphism is a cokernel.  Define the coimage of a map to be the cokernel of its kernel, and the image to be the kernel of its cokernel. We have the following commutative diagram:    where $\overline{f}$ is the only existing map (because of universality of kernel and cokernel).  I'm having trouble proving the following:     A preabelian category $\mathcal{C}$ is abelian iff $\overline{f}$ is an isomorphism.   The converse is easily shown, I'm having trouble proving $\Rightarrow$...


When using the Lato font (e.g.,  or ), I get completely overlapping text:    When I view the PDF in Google Chrome's PDF viewer, it looks fine on the screen:    but it still prints like the bad version, and I am really only concerned with the printed output for this document.  This is what I'm using to produce the above:  \documentclass{article} \usepackage{fontspec} \setmainfont{Baskerville} \newfontfamily\kgtitlefont[Scale=2]{Lato} \begin{document} {\kgtitlefont{This would make a good title}}\\ This would make good text. \end{document}   I know that this is XeTeX-specific because if I use LuaTeX (through TeXworks or TeXShop in both cases), the Lato looks fine, but LuaTeX can't find Baskerville:  luaotfload | Updating the font names database: luaotfload | Scanning TEXMF fonts... luaotfload | Scanning OS fonts... luaotfload | Font names database saved: %s  : /Users/kayhan/Library/texlive/2012/texmf-var/luatex-cache/generic/names/otfl- names.lua  !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ! ./testroboto.tex:3: fontspec error: "font-not-found" !  ! The font "Baskerville" cannot be found. !  ! See the fontspec documentation for further information. !  ! For immediate help type H <return>. !...............................................    l.3 \setmainfont{Baskerville}   I would rather fix Lato in XeTeX, but would be okay with fixing Baskerville in LuaTeX.  I am fairly experienced with LaTeX on Linux, but am relatively new to XeTeX, fontspec, and Mac OS X.  Update: I have TeX Live 2012 Version beta-0.70.2-2012062819 (TeX Live 2012) and the baskerville font I have is a ttc, so that this may be the problem. The XeLaTeX problem appears in adobe acroreader and preview. It does not appear in chrome, though. I will try to update TeX Live on my 10.8.5 system and see what happens. It will take a little time to download this. I'll report back when done.  Update 2: After installing TeX Live 2013 (thank you BitTorrent!), I can get the document to work with Lua(La)TeX (i.e., get LuaTeX to find and use the Baskerville .ttc font I have), but with XeTeX, the font spacing is still messed up.  Note that the Scale=2 option does not change anything.  The following also produces illegible font spacing with XeTeX:  \documentclass{article} \usepackage{fontspec} \setmainfont{Baskerville} \newfontfamily\kgtitlefont{Lato} \begin{document} {\kgtitlefont{This would make a good title}}\\ This would make good text. \end{document}   So I have a good work-around (Use LuaTeX instead of XeTeX), I am still interested in getting it to work with XeTeX, if only to understand better how it works.  Update 3: After reading @Nils L.'s comment, here is an even more minimal working example:  \documentclass{article} \usepackage{fontspec} \setmainfont{Lato} \begin{document} This is even more minimal. \end{document}   which produces the following:    Note that in some PDF viewers (TeXWorks, Google Chrome) it looks fine on the screen, but with most PDF viewers (acroread, preview, safari) it looks awful on the screen. For all PDF viewers it prints incorrectly.  Update 4: When changing \setmainfont{Lato} to \setmainfont{Lato-Reg.ttf}, it works correctly. I don't understand why this makes a difference, but I guess I have a lot to learn about fontspec.

The following example must be compiled with XeLaTeX to reproduce the issue.  % arara: xelatex \documentclass{article} \usepackage{fontawesome} \begin{document} Text Text \faMobilePhone\ Text Text \end{document}   Normally I am using TeXworks to compile and view the output. With the internal viewer I am getting the desired result. The following image demonstrates it:    However if I open the pdf with Preview (viewer of Mac) the scaling of the icon fails.     If I open the pdf file with Adobe Acrobat Reader the icon is still scaled correctly. If I print the page my printer is also not able to scale the icons correctly.   If I use LuaLaTeX everything seems to work correctly.   Can you reproduce the issue and do you know a solution?


So I want to store full Ubuntu on a flash drive so when I plug in the flash drive in a computer with the BIOS edited full Ubuntu starts up. I already have a bootable USB 32GB with and i know how to start it. I don't want the live version. I don't have too much experience with Linux.

Every issue of Ubuntu LTS since 8.04, I have made a Full install of Ubuntu to USB flash drive, and recorded each step..  This has been intended to make a guide/check list for users wishing to create Full install bootable flash drives.  Previously the procedure worked for BIOS boot if created in BIOS and for UEFI boot if created in UEFI.  This year for 20.04 the instructions should work for both creating and running the drive booted from either BIOS or UEFI.  The question is:  How to Create a Full Install of Ubuntu to USB device with Step by Step instructions that work in either BIOS or UEFI.


I'm trying to run multiple Nodejs applications on Nginx server running on CentOS 7. I noticed that when I run a Nodejs app on some ports I get an 502 Bad Gateway error in the browser so I checked the error logs:  [notice] 12806#0: signal process started [crit] 12807#0: *13 connect() to 127.0.0.1:7777 failed (13: Permission denied) while connecting to upstream, client: **.**.99.58, server: myapp.com, request: "GET / HTTP/1.1", upstream: "http://127.0.0.1:7777/", host: "myapp.com" [crit] 12807#0: *13 connect() to [::1]:7777 failed (13: Permission denied) while connecting to upstream, client: **.**.99.58, server: myapp.com, request: "GET / HTTP/1.1", upstream: "http://[::1]:7777/", host: "myapp.com"   when I change the app to listen to 8008 for example everything is working fine. I checked permissions and if the process is running as root and everything seems ok. I played with the timeouts as well but no result. Can anyone help?

I'm struggling with some strange permission related behavior: when I configure nginx to listen to port 8080 everything works as expected, but when I use any other port I get something like  2014/01/10 09:20:02 [emerg] 30181#0: bind() to 0.0.0.0:8090 failed (13: Permission denied)   in /var/log/nginx/error.log  I have no clue where to look at so I don't really know what parts of the configuration might be interesting.  in nginx.conf nginx is configured to run as nginx:  user  nginx;   Also user nginx is in another group 'git'  in the site-config I tried to listen like this:  server {     listen 8090; #does not work     #listen 8080; #works     #listen 9090; #does not work     #listen 9090 default; #does not work neighter     #listen 80; #works!     server_name <some IP>;     ... }   I have only one more listener which serves port 443.  When I start some other service e.g. a SimpleHTTPServer on port 8090 etc. as non-root everything works fine:  $ python -m SimpleHTTPServer 8090 Serving HTTP on 0.0.0.0 port 8090 ... localhost.localdomain - - [10/Jan/2014 09:34:19] "GET / HTTP/1.1" 200 -   What can the reasons be for denied permissions in general?  System is Fedora 18 ngnix is stock fedora 1.2.9


I'm finding that when I use find's -or operator in combination with -exec, I don't get the result I expect. When searching for .cpp and .h files, the command works as expected if I don't use -exec:  find . -name '*.cpp' -or -name '*.h' ./file1.cpp ./file1.h ./file2.cpp ./file2.h   However, when I use -exec, only the .h files seem to be passed:  find . -name '*.cpp' -or -name '*.h' -exec echo '{}' \; ./file1.h ./file2.h   It works fine when I use the more generalized approach for returning the result:  echo $(find . -name '*.cpp' -or -name '*.h') ./file1.cpp ./file1.h ./file2.cpp ./file2.h   However, I'd like to know what I'm doing wrong with -exec, as it's often more convenient. I'm using Mac OSX 10.9, but the same issue occurs in a Cygwin terminal. What's going wrong here? How can I make -exec work the way I want?

When I'm using  find . -type f -name "*.htm*" -o -name "*.js*" -o -name "*.txt"  it finds all the types of file. But when I add -exec at the end:  find . -type f -name "*.htm*" -o -name "*.js*" -o -name "*.txt" -exec sh -c 'echo "$0"' {} \;  it seems it only prints .txt files. What am I doing wrong?  Note: using MINGW (Git Bash)


I have a list which contains strings: list = ['string', 'string', 'string', ...] Those strings are like: 'NumberDescription 33.3' I want to extract only the numbers without the 'NumberDescription' part.  I've tried it with regex and the filter function with re.match. But this results in an empty list.  dat_re = re.compile(r'\d+.\d')   dat_list = list(filter(dat_re.match, list))   As I said, I only want the numbers from the list and in a last step, I want to convert the elements of the list into floating numbers.

What is the difference between the search() and match() functions in the ?  I've read the  (), but I never seem to remember it.  I keep having to look it up and re-learn it.  I'm hoping that someone will answer it clearly with examples so that (perhaps) it will stick in my head.  Or at least I'll have a better place to return with my question and it will take less time to re-learn it.


I'm currently looking through some of my "dynamically generated" HTML and noticed this:
<...  My C# looks like this: <asp:Label ID="newsLabel" runat="server" />  Is there any way to change the SPAN to a DIV? I'm getting some ugly XHTML Validation errors.

How can I use the  tag within an ASP.NET application? I want it to be valid, accessible, and usable.  I understand the optimal HTML way is this:  Username: <input type="text" id="Username" runat="server" />   But if the above code is in an ASP.NET user control, the input ID will change, meaning the label's "for" attribute is useless. I could make the label tag a server control and set its "for" attribute in the code (Username.ClientID), but it seems like a lot of work for such a simple thing.  I've also seen this HTML used in the past:       Username     <input type="text" id="Username" runat="server" />    What is the proper approach?


Here is a scenario that actually happened to me...   I asked a question I got less than helpful answers  I created a bounty With hardly any time left on the bounty, someone posted an answer   Here is the problem: I didn't have time to check the answer to see if it worked before the bounty ran out.  So I propose a '24 hr. bounty extension' button. This gives the person a chance to try answers posted at the last minute.  One more thing I thought of... probably this 'bounty extension' should prevent new answers from being considered - or the process could end up repeating itself.

Since  is not really intended behaviour apparently, I propose a period of 24 hours after the bounty has expired during which the question will not be on the featured tab but the promoter can still manually award the bounty. The "cost" of this would be that no new bounty could be set up until the old one were awarded.  Similar to , which got closed as a duplicate without duplicate link... (Well, according to Robert's comment there, it's , to which he replied with basically what I am proposing here, but an answer is not a feature-request...)


I'm trying to implement my own strcpy function , here is the code :  #include<stdio.h> #include <stdlib.h>    void Strcat(char *p1,char*p2) {     while(*p1!='\0'){p1++;}; //this increments the pointer till the end of the array (it then points to the last element which is '\0')      while(*p2!='\0'){*p1++=*p2++;}; } int main() {     char txt1[]="hell";     char txt2[]="o!";      printf("before :%s\n",txt1);     Strcat(txt1,txt2);     printf("after :%s\n",txt1);  }   Everything works fine .  However , when I change  char txt1[]="hell"; char txt2[]="o!";   to   char *txt1="hell"; char *txt2="o!";   I face a Segmentation fault ,  Why is that ?   Aren't they ( both initialization methods) equivalent ? Aren't "txt1" and "txt2" both act like a pointer to the first element of the char array ?

The following code receives seg fault on line 2:  char *str = "string"; str[0] = 'z';  // could be also written as *str = 'z' printf("%s\n", str);   While this works perfectly well:  char str[] = "string"; str[0] = 'z'; printf("%s\n", str);   Tested with MSVC and GCC.


I am a frequent reviewer, mostly in suggested edits, and something I notice a lot is people submitting the same kinds of stupid and incorrect suggested edits over and over, most of the time being rejected, but occasionally being accepted by lazy-reviewers. There is generally loads of unnecessary suggested edits in the queue (although not as many as there are in the close votes-queue), and people never quite seem to learn.  A way to prevent more of these edits could be to put users submitting three rejected edits on a cooldown for a day or more, presenting it with a page/guide for how to correctly edit posts.  I'm adding this as a , let me know if you think this is a good idea or not, or what could improve it. Thanks.

First time I've got the following message on SO:     Too many of your edits were rejected,   try again in 7 days.   Although, I have made ~50 accepted edits this day.  I'm sure that should outweigh the ~5 rejected edits, right?    My suggestion:  bool allowEdit(USER u) {     if(u.rejected * 5 > u.accepted)         return(false);     else         return(true); }   Think of it this way: if I do a 1000 accepted edits, and mess up on 5 [rejected], does that mean I should get banned for 7 days?    Hmmm... There seems to be a bug; the message only appears when clicking edit from review.  But otherwise, I can't edit , even when going to it from the homepage.


I have the need to pass multiple parameters to find dynamically. I'm doing that using this function:  GEN_FIND_PARAMS() {     PARAM=""      for WORD in $1; do         ADD=""          if [ X"$PARAM" != "X" ]; then             ADD="-o"         fi         ADD="-name '$WORD' $ADD"          PARAM="$ADD $PARAM"     done      echo $PARAM }   If I run the function by itself, I get correct results:  SHD_FILES="*.rev *.db *.cdb" GEN_FIND_PARAMS "$SHD_FILES"   Outputs correctly  -name '*.rev' -o -name '*.db' -o -name '*.cdb'   However, when I using it fully, it just doesn't find anything:  find /dev/shm $(GEN_FIND_PARAMS "$SHD_FILES")   Outputs nothing, even though I know the files are there, because running it plainly works:  find /dev/shm -name '*.rev' -o -name '*.db' -o -name '*.cdb'   Is there something wrong in the value substitution? I'm also open to other ways to do this (there must be a better one)

Or, an introductory guide to robust filename handling and other string passing in shell scripts.  I wrote a shell script which works well most of the time. But it chokes on some inputs (e.g. on some file names).  I encountered a problem such as the following:   I have a file name containing a space hello world, and it was treated as two separate files hello and world. I have an input line with two consecutive spaces and they shrank to one in the input. Leading and trailing whitespace disappears from input lines. Sometimes, when the input contains one of the characters \[*?, they are replaced by some text which is is actually the name of files. There is an apostrophe ' (or a double quote ") in the input and things got weird after that point. There is a backslash in the input (or: I am using Cygwin and some of my file names have Windows-style \ separators).   What is going on and how do I fix it?


I want to get a motorola moto x (2nd generation) but I am unsure if the phone can work in other countries outside of the United States, specifically China.

Sometimes it's desirable to use a device on a carrier that does not officially sell it. Often this is due to regional differences and travel (for example, using a US phone in Europe) but also because some carriers simply do not offer phones that other carriers do.  How can I determine if it's possible to use my phone on a different carrier, and which carriers it is compatible with?    This community wiki is intended to be a canonical answer to a common question. If you feel that improvements could be made then please edit the post(s).


There is a book I saw once in the bookstore and have always regretted not reading. I maybe saw it in the early 2000s. 01-04?  The concept was that society is so advanced that everyone has a computer linked to their brains to help them process the overwhelming amount of information they encounter. Crimes are punished by disconnecting that computer and forcing people to live without the extra processing power. And the protagonist is maybe wrongfully convicted or involved in some kind of black market.  The central conflict is fuzzy but the concept is what stands out.

I read a sci-fi novel 14 years ago (April/May 2003) that haven't been able to find since then.  It was in a shared book locker in a reception battalion barracks at Ft. Leonard Wood, MO.  The book was a paperback, it may have been part of a series of at least two books, and i may not have read the first (unsure).  I think the cover was blue/yellow/green or something similar in a 90's styling (slanted text, text overlayed on full cover imagery).  Seems like it was published by one of the big science fiction publishers of the 90s.  It was extreme futuristic, multiple planets.  With humans being augmented at birth or shortly after with enhanced brain implants.  These augmentations enabled extreme levels of math, and the price the parents paid for these augmentations depended on their child's future success.  I believe the primary protagonist was a female.  If I recall correctly the story included items like the protagonist's augmentation was removed, and the protagonist was mentally hampered, and then a new one inserted, but it took a while for the brain to "wire it in" or something to that sort.  I don't actually remember the plot, just the technology.  Which seems like what Neuralink is trying to accomplish, but letting the brain do the heavy lifting and letting the augmentation be "additional processing power".  The cost of the implants were extremely high, like an entire adult's lifetime income or something similarity severe.  I believe the augmentation gave the protagonist probabilistic predictive power or some other extremely cool ability.  I seem to remember that the female protagonist was tutored by a famous mathematician, and when she got her second powerful implant she had to go back to him to retrain or for assistance.


I had a bug on my pc and I had to turn it off by power button. When I turn it on again the second screen did not turn on. I tried to restart it, but the problem remains. At startup and closing, screen shows the bios. Also when choose windows to load (I have them installed too) the second screen works perfectly. One week ago I had the same problem and I formated the linux. It worked, but I don't want every week to format them. Have you any idea to propose?  I have a Dell SE2717H and a Flatron L1718S screens with nvidia geforce 1050Ti, and B250M-DD3H motherboard. The dell is connected on gpu(HDMI) and the flatron on motherboard(VGA).  Finally I ran this: sudo ubuntu-drivers autoinstall And it my screen is now repaired. Thanks Everyone. (If you have the same problem see )

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


I'm trying to put together a comprehensive regex to validate phone numbers. Ideally it would handle international formats, but it must handle US formats, including the following:   1-234-567-8901 1-234-567-8901 x1234 1-234-567-8901 ext1234 1 (234) 567-8901 1.234.567.8901 1/234/567/8901 12345678901   I'll answer with my current attempt, but I'm hoping somebody has something better and/or more elegant.


how linked files in vss repository can be migrated to svn repository

I am in the process of moving from VSS to SVN and I'm not sure how to share files in SVN.  Basically we have the following structure in VSS  $MOSS   - Components     - ComponentA       - bin     - ComponentB       - bin   - GAC Mirror   GAC Mirror holds a shared copy of all the Dlls from the bin folders of the components to allow for easy copying to the GAC.  In VSS all you do is drag the Dll from the bin folder to the GAC Mirror folder and it works it's life out.  How would I do this in SVN?  Thanks in advance.


I am trying to understand electromagnetism. I would like to pare myself down to the minimum number of necessary concepts.  From my physics education (high school only), I understand that a moving charge creates a magnetic field. The implication is that magnetism is a discrete concept that I also need to understand.  However, is this view actually confusing: is it the case that a magnetic field is a moving charge?  Either way, a link to a primer accessible to someone with a engineering degree level maths would be wonderful. If it is the case magnetism is a moving charge, then an introduction following this approach would be wonderful.  Thank you!

I'm tutoring high school students. I've always taught them that:     A charged particle moving without acceleration produces an electric as well as a magnetic field.   It produces an electric field because it's a charge particle. But when it is at rest, it doesn't produce a magnetic field. All of a sudden when it starts moving, it starts producing a magnetic field. Why? What happens to it when it starts moving? What makes it produce a magnetic field when it starts moving?


For a while now, logging onto your google account has required you to enter your username and hit next, before entering your password like this:    Recently yahoo has implemented a similar system.  What are the benefits to this over a standard Username, Password, Login form?  Thanks.

I am not asking about the two factor authentication process where the user needs to enter both a password and a one-time-password.  Gmail recently (I don't know from when exactly) changed their login process which is depicted in the following screenshot:     So, the new steps are as follows:   Enter email   Click Next  Enter password   Click Sign In    as opposed to the previous and usual way of logging in:   Enter email and password   Click Sign In    Isn't the new process non-user friendly requiring extra user interactions?  Since, Google does not usually make UX blunders can you explain the reasoning behind the new process? I'm looking for details like user interaction simplicity or any other hidden advantages.  Note: The question  doesn't cover the reason behind the change while Mervin Johnsingh's answer cites Google's reason.


What is the remainder when $1!+2!+3!....+100!$ is divided by $3$ and please can you explain the formula for finding sum of factorials?  Also is there a sequence for last digits when a factorial sum is divided by a prime number?

What is the remainder when $$1! + 2! + 3! +\cdots+ 1000!$$ is divided by $12$.  I have tried to find the answer using the Binomial Theorem but that doesn't help. How will we do this?  Please help.


I've defined my header file column.h: #ifndef COLUMN_H_ #define COLUMN_H_  #include "include.h"  template <class T> class Column { private:     std::string column;             // Column Name     unsigned int data_type;         // type of elements it stores     std::vector<T> elements;        // Container for elements     size_t CHAR_MAX;                // Used for VARCHAR types  public:     Column();     Column(std::string, std::vector<int>);     Column(std::string, std::vector<float>);     Column(std::string, std::vector<char>); };  #endif // COLUMN_H_  And my declaration file column.cpp: #include "column.h"  template <class T> Column<T>::Column() {     this->column = std::string("undefined");     this->data_type = 0;     this->elements = std::vector<T>(); }   template <class T> Column<T>::Column(std::string column, std::vector<int> elements) {     this->column = column;     this->elements = elements;     this->data_type = 0; }  template <class T> Column<T>::Column(std::string column, std::vector<float> elements) {     this->column = column;     this->elements = elements;     this->data_type = 1; }  template <class T> Column<T>::Column(std::string column, std::vector<char> elements) {     this->column = column;     this->elements = elements;     this->data_type = 2; }  I attempt to create a templated column object with Column<int> newCol(column, std::vector<int>());  but I am hit with the error: undefined reference to `Column<int>::Column(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::vector<int, std::allocator<int> >)'  I call column constructor in another file, table.cpp.  table.cpp includes table.h table.h includes column.h  Why doesn't the compiler see the reference to the Column constructor when it's included by table.h? Could this be a CMake issue?

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


Let $x,y \in \mathbb{R}$.   Show that $$ x^{n+1}-y^{n+1}=(x-y)\sum_{k=0}^n x^k y^{n-k} $$  for all $n \in\mathbb{N}_0$  I need to prove this via induction.  My attempt: base case (k=0) = $$x^{0+1}-y^{0+1}=(x-y)(x^0 y^{n-0}) $$                   $$x-y=(x-y)(y^n)$$ Here is where I get lost, does this disprove this? This statement is only true if $y^n = 1$? Doesn't this mean that this isn't true for all $x,y$ in $\mathbb R$?

How many different proofs are there that $a^n-b^n =(a-b)\sum_{i=0}^{n-1} a^i b^{n-1-i} $ for positive integer $n$ and real $a, b$?  You can use any techniques you want. My proof just uses algebra, summation, and induction, but if you want to use invariant sheaves over covalent topologies, that is fine.  I decided that I would try to produce a proof by induction. I find it interesting that my proof shows that if it is true for $n-1$, then it is true for $n+1$. This means that two base cases have to be proven: $n=1$ and $n=2$. Fortunately, those are easy.  I am sure that my proof is known,  but I do not recall having seen it before.  Here is the induction step:  $\begin{array}\\ a^{n+1}-b^{n+1} &=a^{n+1}-a^nb+a^nb-b^{n+1}\\ &=a^{n+1}-a^nb +a^nb-ab^n +ab^n-b^{n+1}\\  &=(a-b)a^n +ab(a^{n-1}-b^{n-1}) +(a-b)b^n\\  &=(a-b)(a^n+b^n) +ab(a^{n-1}-b^{n-1}) \\  &=(a-b)(a^n+b^n) +ab((a-b)\sum_{i=0}^{n-2} a^i b^{n-2-i}) \ \  \text{(The induction hypothesis)} \\  &=(a-b)(a^n+b^n+ab\sum_{i=0}^{n-2} a^i b^{n-2-i}) \\  &=(a-b)(a^n+b^n+\sum_{i=0}^{n-2} a^{i+1} b^{n-1-i}) \\  &=(a-b)(a^n+b^n+\sum_{i=1}^{n-1} a^{i} b^{n-i}) \\  &=(a-b)\sum_{i=0}^{n} a^{i} b^{n-i} \\  \end{array} $


I have this situation: The boss has flipped the gold card with a path card. The path there was blocked by both a green and a blue card. We had one profiteur, a blue dwarf, a green dwarf, a sabotuer and a boss. Who wins and how much gold? I found  with an answer to a different question by the creator of the game, where it states that the boss would get 4 points but I am still confused, I can't find it anywhere on the rules how the boss would get 4 points from this situation. More than that, what if the profiteer flips the gold card, what happens then? EDIT : I'm still confused. Rules say that if ONLY ONE dwarf wins, he wins 5 gold, if 2 dwarves win, then it's 4 gold each. Why does he win 4 gold? Does the profiteer also win if he is the one flipping the gold card? How much? Do they both get 4 gold each? 5 gold to boss and 3 to profiteer or what? EDIT2 : So if I have a blue dwarf, a boss and a profiteer in the game, there's just 1 dwarf counted as winner, that's 5 gold for him, 4 for boss and 3 for profiteer. But if I have just a boss and a profiteer, if any of them flip the gold card, then it's 2 winners and they get 3 - boss and 2 - profiteer? In conclusion when there's no dwarves to get to the gold, boss and profiteer are both counted as winning dwarves regardless, but when there are colored dwarves, then these two are not included as winners? I don't even want to include geologists in these situation.. My opinion is that you can interpret these rules as you want and that's a huge slip from the creator. I for one, agree that if neither saboteurs or colored dwarves get to the gold, then noone gets anything (except geologists where it's clear what they get). This messy slip up can REALLY ruin friendships...

If you construct a path from a ladder to an end card with a blue or green door in the path, the end card is flipped. If the card is the gold, all dwarves on that colored team (blue or green) win, as does the boss and profiteer.  What happens if you construct a path from a ladder to an end card while both doors are in the path?


I'm an undergraduate math student, and I'm thinking about topics for an undergraduate thesis. I have an interest in topological spaces and number theory, but I'm having trouble identifying a relationship between those and cryptographic theory. In On Post-Modern Cryptography, Goldreich talks a lot about rigorous analysis. But it's still not giving me a clear understanding of what type of math a person doing research in theory does in general. Is cryptographic research in the same line as formal mathematical proof? Is there a need for abstract mathematics in modern cryptography? I can program, but application is not really my interest and it would take too long in my degree to add a formal computer science aspect.

What are the mainstream techniques borrowed from algebraic geometry (or some other branch of mathematics) which are currently used in cryptography/coding theory? I've only heard about a small subset of elliptic curves and hermitian curves. I've also heard about research of hyperelliptic curves but I don't know if some software has already implemented it.  Could you mention some other branches of mathematics being strongly used in cryptography/coding theory and its state? (mainstream/in research)


I have this command:  for file in file??.txt; do awk -f vypis_z_dcout.awk "$file" > "$file".csv; done   The result is a column of numbers from each file and I want to connect results  from all files in one file like its columns. How to add to this command?   paste <(cat f.csv) <(cat f1.csv) <(cat f2.csv) <(cat f3.csv) <(cat f4.csv) .... insert "$file".csv ... > out.csv   Or how to get a file where in the first column will be file01.csv, in the second file02.csv and so on? Thank you

I want to print two files in two columns -- first file on the left side and second on the right side. paste doesn't do the job, because it can only insert a character as delimiter, so if first file lines have different length output will be twisted: $ cat file1 looooooooong line line $ cat file2 hello world $ paste file1 file2 looooooooong line   hello line    world  If it was a command to add trailing spaces like fmt --add-spaces --width 50 the problem would be solved: $ paste <(fmt --add-spaces --width 50 file1) file2 looooooooong line                                 hello line                                              world  But I don't know a simple way to do this. So how to merge and print several files horizontally without twisting? Actually, I just want to look at them simultaneously.  UPD: command to add trailing spaces does exist (for example, xargs -d '\n' printf '%-50s\n') But solution like $ paste <(add-trailing-spaces file1) file2  does not work as expected when file1 has fewer lines than file2.


First of all, I understand that then cannot be used as a conjunction with simply a comma (lacking a semicolon or start of new sentence) to connect two independent clauses and that a semicolon or a FANBOYS conjunction must be used with it for that to work. However, my question is: what if it's connecting a dependent clause? To be more specific, one that has to deal with sequence. I will list a few examples below:  I went to the store then home.  I'm going to cook the steak on the stove, then finish it off on the skillet.  Bob opened the door, then shut it right back.  Tracy and Jill came out first, then Brittany.  We ate all of our food, then grabbed some dessert.  Dictionary.com and a few other places state that it can be used in instances like some of those. However, I don't know if I trust that or not. I tend to follow rules in between traditional and modern, but in some cases, I think that they should always be followed. Therefore, I need know, in the strictest of terms, what the rules are regarding then.  I have seen the link of "Than vs then", and while it does provide some points, it does not fully explain the use of then with a dependent clause. The Op in that thread uses two independent clause, which is what I already stated was not allowed.

I was writing an email in Outlook and its grammar correction suggested I change this:     I need to do something, then I'll call you.   to this:     I need to do something, and then I'll call you.   Is the "and" needed there to be correct?


$\{x^k\}^\infty_{k=0}$ is not basis in $C[0;1]$.  I know how to show that a system of functions is basis if it is orthogonal (Parseval's identity), but I do not understand how to show it for arbitrary system.  Possibly, we should find a continuous function that has some problems with approximation with an infinite sum of monomials, but I have no idea what contradiction we need to obtain.

why the monomials are not a Schauder basis for $C[0,1]$?  $p_n(x)=x^n$ such that $(p_n)$ does not form a Schauder basis for $C[0,1]$  span$\lbrace p_n : n\ge 0\rbrace$ is dense in $C[0,1]$ by Weierstrass approxmation theorem, but I cannot figure out why they are not a Schauder basis.  Could you please explain


I have centre of sphere at x y z. now I want to rotate any point (a b c) on the sphere about centre. how can I do it in c++.

I have some models that I want to rotate using quaternions in the normal manner, except instead of rotation about the origin, I want it to be offset slightly. I know that you don't say, in 3d space, that you rotate about a point; you say you rotate about an axis. So I'm visualizing it as rotating about a vector whose tail is positioned not at the local origin.  All affine transformations in my rendering / physics engine are stored using SQT (scale, quaternion, translation; an idea borrowed from the book Game Engine Architecture.) So I build a matrix each frame from these components and pass it to the vertex shader. In this system, translation is applied, then scale, then rotation.  In one specific case, I need to translate an object in world space, scale it, and rotate it about a vertex not centered at the object's local origin.  Question: Given the constraints of my current system described above, how can I achieve a local rotation centered about a point other than the origin? Automatic upvote to anyone who can describe how to do this using only matrices as well :)


My user icon, which I have used since my start with this site, changed. I know I do not use a personalized one, but I have gotten a sentimental attachment to it. Has the rendering been changed for a good reason?  I have attached the screenshot from my flair page which shows the original (purple) rendering, as opposed to the newer (khaki) one.    EDIT: I have digested the suggested question this is determined to be a duplicate of, and have this to add:   The account used on this site has, is, and continues to be, the same for my entire tenure. Using the 'Change your image' button on my profile page yields a suggested THIRD icon for the same account. I didn't choose it, because it's clearly the ugliest so far. If it must be changed through no input or choice of my own, I would (but shall not like it) stay with the khaki one.

When I first signed up on a Stack Exchange site and got a profile image, it was this one (see my current user card I'm actually not sure what I look like any more):     Later, I got  and SEDE profiles, and my user image there was a different identicon. Because . I would have a picture of it, but that's the problem. ... Thanks to , I have a picture:     On those two sites, it changed from that purple one to this new one recently:   I don't know when the change happened exactly, but I KNOW I didn't change it (I don't know how to change it, otherwise I would have changed it to my main pink one).  Why did this change? Can I get my other icon back or will I be stuck with this new one?   Also, are the gravatars at Area 51 and SEDE securely generated?    After looking in my profile settings, I really confused (I am seeing my wrong avatar in more and more places since I first posted this.):        Seriously.......    What...?    (I'm using this , but be warned that they will try to IP block you after a certain number of requests to force you to pay... May look for a better alternative later.)


I am beginner in python. I'm trying to make a Fibonacci series, but it gives me an error and says "invalid syntax." Second thing is that I should be able to add any float value, not only integers. Code:  n = input "Enter a number:"  s1=0, s2=1,i=1,sum=0  while i <= n:     print s1      sum = s1 + s2      s1 = s2      s2 = sum     i += 1

I had originally coded the program wrongly. Instead of returning the Fibonacci numbers between a range (ie. startNumber 1, endNumber 20 should = only those numbers between 1 & 20), I have written for the program to display all Fibonacci numbers between a range (ie. startNumber 1, endNumber 20 displays = First 20 Fibonacci numbers). I thought I had a sure-fire code. I also do not see why this is happening.  startNumber = int(raw_input("Enter the start number here ")) endNumber = int(raw_input("Enter the end number here "))  def fib(n):     if n < 2:         return n     return fib(n-2) + fib(n-1)  print map(fib, range(startNumber, endNumber))   Someone pointed out in my Part II (which was closed for being a duplicate - ) that I need to pass the startNumber and endNumber through a generator using a while loop. Can someone please point me in the direction on how to do this? Any help is welcome.    I'm a learning programmer and I've run into a bit of a jumble. I am asked to write a program that will compute and display Fibonacci's Sequence by a user inputted start number and end number (ie. startNumber = 20 endNumber = 100 and it will display only the numbers between that range). The trick is to use it inclusively (which I do not know how to do in Python? - I'm assuming this means to use an inclusive range?).  What I have so far is no actual coding but rather:   Write Fib sequence formula to infinite Display startNumber to endNumber only from Fib sequence.   I have no idea where to start and I am asking for ideas or insight into how to write this. I also have tried to write the Fib sequence forumla but I get lost on that as well.


Chapter 22 of Order of the Phoenix contains this alarming line (emphasis mine):  "That’s right," said Sirius encouragingly, "come on, let’s all ... let’s all have a drink while we’re waiting. Accio Butterbeer!" He raised his wand as he spoke and half a dozen bottles came flying toward them out of the pantry  To memory, this is the first time that he is shown with a wand and it is widely presumed that his old one was snapped after his arrest. So, how did he - a very wanted man - get a new wand that suits him?

Sirius Black and a few Death Eaters escape Azkaban and seem to operate after that with their wands intact.  How come?  If a mere expulsion from Hogwarts entails wand destruction (as happened with Hagrid), shouldn't an Azkaban sentence entail the same?  And even if we imagine that the perceived impossibility of escape from Azkaban made it seem unnecessary to destroy the wand, this would apply to Sirius but not to Death Eaters.  PS: Two comments suggested that the escapees acquired new wands. It would be nice to have a more definitive answer than just a suggestion or a list of possibilities. Thanks.  PPS: Returning the personal property to a released prisoner is one thing, but the wand is a different matter: this is usually the tool of the crime, and I don't see how it can be argued that it should be returned and not destroyed. Again, Hagrid had his wand destroyed and he was not even sentenced to Azkaban.  PPPS: Maybe wand destruction is only done for non-fully-qualified wizards?


I want to put a movie on a DVD and then watch them on my T.V. how can I do that? When I put a movie on a DVD and then put it on my T.V it can't read it.  Thank you!

I have several .dvd files which were created using . To export the videos from OpenShot, I used the DV-NTSC widescreen and DV-PAL Widescreen property.  Can anyone tell me how I can burn these *.dvd files into a DVD that can be played with my external Sony CD/DVD 5.1 Player which is connected to a TV?


Good afternoon.  My question is: When I update the Linux repositories with the command sudo apt-get update and sudo apt-get upgrade, some error occurs:  sudo: /var/lib/sudo writable by non-owner (040777), should be mode 0700   What do I need to do to avoid this error?

I get error message always when I work with sudo command.  It shows always sudo: /var/lib/sudo writable by non-owner (040777), should be mode 0700.   A while ago I changed the permission of /var folder to 777.   How can I fix it?


I have some updates I'd like to make on converted leads. I had it in my lead code - first convert the lead, then query for the converted contact and update. However, that was triggering CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY.  I refactored it out to update custom fields on lead, mapped them to contact, and put the contact updates in a Contact trigger.  My tests are failing, indicating that the contact updates aren't happening. When I query the mapped fields, they are updated as expected.  I put some debugging in to both triggers - the before insert on lead, after insert on lead which runs the conversion, and before insert on Contact. I don't see that the contact triggers are firing!  Does anyone know what the order of execution is with Lead conversion/contact triggers?

I've got a project where I'm looking to tweak the standard lead conversion process.   Triggers and lead conversion has always been funky in past projects so I was hoping to start the design off by reviewing the order of execution, but after a long google search I'm coming up empty handed.   Anyone out there know the specific trigger order for lead conversion?    Edit: I'm not asking about trigger execution order for any object, but all the objects created in the lead conversion process.  I'd think it would be something like this:        Lead Before Update Triggers (isConverted = false, convertedAccountId = null, convertContactId = null, convertedOpportunityId = null)         Account Before Insert Triggers (not fired if merged with existing account)   Account After Insert Triggers (not fired if merged with existing account)   Contact Before Insert Triggers (not fired if merged with existing contact)   Contact After Insert Triggers (not fired if merged with existing contact)   Opportunity Before Insert Triggers (not fired if no opportunity) (OpportunityContactRoles null)   Opportunity After Insert Triggers (not fired if no opportunity) (OpportunityContactRoles = convertedContactId)   Lead After Update Triggers (isConverted = true, convertedAccountId = XXX, convertedContactId = XXX, convertedOpportunityId = XXX)


Running Ubuntu 16.04 on 64bit in a VM.  To be clear, I'm wondering why that specific version of nodejs is the one in the repo. Is it because the developer of nodejs choose to make that the default or is it due to something else?

Why are packages in the official Ubuntu repositories older than the latest (upstream) versions from Debian Sid, PPAs, the authors, etc.?


We have to find the remainder when $x^{100}$ is divided by $x^2-3x+2$.I tried to use the remainder theorem but am not just able to solve it.please help.

What will be the remainder obtained when the polynomial $x^{100}$ is divided by the polynomial $(x-2)(x-1)$.  I used remainder theorem but it had no impact in the solution.


I need to call an authenticated Apex Rest API from Site.com page. The way I am trying is using Username-Password Oauth authorization flow, to get access token.  Below is the javascript code I am trying,  $(document).ready(function() {     $.ajax({         type: 'POST',         url: 'https://login.salesforce.com/services/oauth2/token',         headers: {             'Content-Type' : 'application/x-www-form-urlencoded'         },         data: {             'grant_type': 'password',             'client_id': 'xxxxxxxxxxxxxxxxxxxxxxxx',             'client_secret': 'xxxxxxx',             'username': 'xxx@xxxx.com',             'password': '*******'         },         success: function(response) {             console.log('Successfully retrieved ' + response);             //Other logic here         },         error: function(response) {             console.log('Failed ' + response.status + ' ' + response.statusText);             //Other logic here         }     }); });   But when I preview the site page, I receive a Cross Domain Access error in the browser console,     XMLHttpRequest cannot load   . No   'Access-Control-Allow-Origin' header is present on the requested   resource. Origin   '' is therefore   not allowed access.   Does anybody have a solution for this issue?  Thanks in advance!!

I have two different developer orgs. One contains apex REST web service, and I want to call that REST service from my second org. I have tried to call that REST service using normal ajax post request and forcetk.js, But I got following error     XMLHttpRequest cannot load   . Origin    is not allowed by   Access-Control-Allow-Origin.   I searched about this problem then I got to know that Salesforce never allows CORS (Cross-Origin-Resource-Sharing).  Initially I was using apex to call that REST web service, that time I was able to post data from apex. But as we have callout limitation in salesforce, I want to use javascript.  Can anybody please help me?


I was creating an info graphic in Photoshop when I noticed that the color is quite different between my two monitors:    Which one is the "real" color? I would expect the answer to that to be neither. So how can you know which is the color that will be printed on paper? Also, how can you set the monitors (or at least Photoshop) to show the "real" colors?

I use a dual monitor.  The colors appear entirely different on the new monitor than they do on my laptop.  When you are selecting colors etc, to be included in a website design, it totally freaks me out.  Is there no software solution that finds how the settings of one of the monitor is and puts that to the second one?  Otherwise what all settings do I need to change manually on the second monitor to make it appear as it does on the laptop?  Thanks in advance.


As the title suggests, whenever I attempt to make a new print composer (in either windows or Linux, I have tried both) with my map, it goes blank and the file is not exported.  When I attempt to export as a PDF, I get the message "Advanced composition effects such as blend modes or vector layer transparency are enabled in this project, which cannot be printed as vectors. Printing as a raster is recommended." Would this prevent my ability to make a PDF from the print composer?   If so, how can I rectify this?  Since I have a low reputation, if you need pictures I can provide them in the comments.

I am using 64bit 2.10.1-Pisa on Windows 10.  When I set up my composer to print, everything looks fine until I try to print or export. The composer goes completely blank and outputs a corrupted PDF using the Export to PDF function. The PDF file won't even open.  I had the same result exporting to PNG.  When I try to use the PDF document printer instead of exporting, QGIS stops responding indefinitely.


I've got some cards (forms) created with ng-angular based on Array list. On each card i have onClick event which doesn't trigger. If I copy paste the function code on browser console, all events work ! I guess that events aren't bind when the DOM is fully loaded.  These are my functions :          $('.floating-open').on('click', function () {         var $this = $(this);         $this.parents('.clickable-button').addClass('clicked');         $this.parents('.clickable-button').next('.layered-content').addClass('active');          setTimeout(function () {             $this.parents('.card-heading').css('overflow', 'hidden');         }, 100);      });      $('.floating-close').on('click', function () {         var $this = $(this);         $this.parents('.layered-content').prev('.clickable-button').removeClass('clicked');         $this.parents('.layered-content').removeClass('active');          setTimeout(function () {             $this.parents('.card-heading').css('overflow', 'initial');         }, 600);      });   Thanks in advance for your help

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


I am exporting some tables from PostGIS to a geopackage. My command to do is task is as follows ogr2ogr -append -f GPKG E:\workspace\test.gpkg PG:service=XXXX -where app_einzugsgebiet.hauptgemeinde=70346  app_einzugsgebiet -nln Einzugsgebiet -nlt MULTIPOLYGON -lco GEOMETRY_NAME=shape -a_srs EPSG:31287  Now, I would like to use the WHERE IN clause in my command. However, I could not figure out how. I tried the following command ogr2ogr -append -f GPKG E:\workspace\test.gpkg PG:service=XXXX -where app_einzugsgebiet.hauptgemeinde IN (70319, 70101, 70346) app_einzugsgebiet -nln Einzugsgebiet -nlt MULTIPOLYGON -lco GEOMETRY_NAME=shape -a_srs EPSG:31287  I am getting an error that says ERROR 1: Couldn't fetch requested layer 'IN'!. I tried with square bracket but it did not help either. Obviously, my syntax is not okay. So how do I do that?

I am writing a shapefile after some processing; however, in the final step I need to do some selection by attributes from the the shapefile.  I am using the command in a shell with the aim of using it in a Python script when it works.  ogr2ogr -f "ESRI Shapefile" -select * where ID="1" outfile.shp infile.shp   I am getting the error message:   FAILURE:  Unable to open datasource `Downloads' with the following drivers.   What could I be doing wrong?


6/2(2+1) = 9 or 6/2(2+1) = 1 I am not really sure which is the correct answer. I think the latter is much more correct than the former. If we assume the property of distribution then the latter can be made into this 6/2(2+1) = 6/(2*2 + 2*1) = 1.

There is a huge debate on the internet on the value of $48\div2(9+3)$. I believe the answer $2$ as I believe it is part of the bracket operation in BEDMAS.  yields the same answer. I also believe that if $48\div2\times(9+3)$ was asked it would be $288$ which Mathway agrees with as well. However,  says it is $288$ either way. A friend of mine (who is better at math) told me that there is no such thing as 'implicit multiplication', only shorthand so that is in fact done after the division (going left to right, not necessarily because division occurs before multiplication. But he didn't explicitly give a reason) What is the answer and why?


Does the the UK rule, to apply for a visa up to 3 months before travel, start from the date of the online application or from the date of the appointment?

Does the the UK rule, to apply for visa up to 3 months before travel, start from the date of the online application or from the date of the appointment? And, should I pay my fees on the day of the appointment?


I need to use log-log regression and because I have lots of zero values I tried to add a very small constant c=8E-12 to x and it works pretty good. Xs are very small probabilities.  lnY= a + b ln (x+c)  But how do I interpret that model? Thanks

neatly explains how to interpret a log transformed predictor in OLS. Does the interpretation change if there are 0s in the data and the transformation becomes log(1 + x) instead?   Some authors (e.g. Fox and Weisberg 2011) recommend adding a start (i.e. a positive constant) if a log transformation is necessary to correct skewness and improve symmetry, but the data contains zeros.   Consider a variation of the Ornstein example in CAR (p. 303):   require(car) data(Ornstein) boxplot(Ornstein$interlocks, horizontal = T)      The data is clearly right skewed, and contains 0s.   summary(powerTransform(1 + Ornstein$interlocks)) ## bcPower Transformation to Normality  ##  ##                         Est.Power Std.Err. Wald Lower Bound Wald Upper Bound ## 1 + Ornstein$interlocks    0.1248    0.053           0.0209           0.2287 ##  ## Likelihood ratio tests about transformation parameters ##                              LRT df      pval ## LR test, lambda = (0)   5.502335  1 0.0189911 ## LR test, lambda = (1) 262.431991  1 0.0000000   The powerTransform() function suggests that a log(1 + x) transformation here could be useful.   boxplot(log(1 + Ornstein$interlocks), horizontal = T)     As you can see, symmetry is indeed improved.   Question: If this transformed variable were to be included in an OLS regression as an IV, would the coefficient estimates still have the usual interpretation of log transformed variables?


My flight arrives at Narita and, after a 9 hour layover, I connect to another flight from Haneda airport to my final destination, Kuala Lumpur. Do I need to apply for a visa if I’m going to be transferred from one airport to another?

I'm arriving from New Delhi, India (Indian passport) with JAL at Narita on 11th July at 07:30 and departing for San Francisco with JAL at 00:05 on 12th July from Haneda. Do I need a transit visa as I'll be switching airports and spending a few hours at JAL City Haneda Airport Hotel?  Previously I had connecting flights from Narita to San Francisco and obtained shore passes to relax at Narita Nikko Hotel. Now I'm travelling with my elderly Mom and do not want complications at Narita immigration or later in the day while going from Narita Airport to Haneda airport. Please advise.


My c++ code   #include <iostream> using namespace std ;  struct Node {     int data ;     struct Node *next; };  int main(){     struct Node *head = NULL;     struct Node *second = NULL;     cout << sizeof(struct Node); }   output to terminal  16   How is the size 16 ? Size of int is 4bytes.  How come it's multiplied by 4 ? Please can anyone give detailed calculation ? Thanks !

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


After pasting the answer from clipboard, I was welcomed with captcha to prove I'm a human. It wasn't as easy as I thought:     Not correct words? Are you kidding?  It seems people have some problems with captcha in the past, like here:   However, now captchas are much much worse. Those old ones were a children play compared to that! And in place of old bug we have a new one, much worse!  I have refreshed the image like mad about 30 times, about 10 times I've tried to guess before succeeding. Each time I've got similar gibberish!  Please fix that. Choose other provider if needed, because that below even doesn't look like any English words.

The reCAPTCHAs have suddenly become almost illegible. I regularly have to change it four or five times before I find one I can read. I am tempted to just enter the known word (an easy guess), and leave the other. Can something be done?


Cohle has had a couple of hallucinations in True Detective, especially during the final showdown. I am wondering if those hallucinations mean anything in particular.

What was the galaxy formation Rust saw before confronting Erol Childress in  S01E08?  It was weird like out of the series. I guess it was some sort of hallucination, a product of Rust's madness or addiction.


I cannot get Atlas to export maps with web layers correctly.   When I look at the preview within composer everything works fine. When I export an atlas the first page renders ok but for subsequent pages only a couple of tiles are usually generated.  My suspicion is that QGIS is rendering faster than the web layers can be downloaded.  I suggest that if it is possible to slow down the rendering process this will allow time for tiles to download.  I have no idea how to do this but maybe a developer can tell me how to slow down the Atlas rendering process to allow for tile downloads?   A similar question has been raised before on the GIS SE as .   My question is not the same because I am looking for a way to either test out my hypothesis or for somebody to tell me that my hypothesis completely wrong.

when I export my data genereated with the openLayers using Atlas rendering is always incomplete. Atlas is rendering too fast so that the data from openLayers is not completely loaded.   Do anyone knows how to handle this?


I have been trying to get only date from a column with date and time.  Here is a sample:  Select BDATE  from PersonData   Current output:  1977-12-05 15:40:54.000    Desired output:  1977-12-05   How can I use the CONVERT date from datetime?  Thanks in advance

SELECT GETDATE()   Returns: 2008-09-22 15:24:13.790  I want that date part without the time part: 2008-09-22 00:00:00.000  How can I get that?


For the purpose of playing online games, I'd like to have some sort of display on the taskbar showing the ping times to a particular server. Is there a way to set this up? (I'm hoping to avoid writing a whole GUI program just for this. I don't even know that I can.)  Even just being able to show the command line's output on the taskbar would be fine.  Something sort of like this would be perfect:    I did Google around for a solution. I found  which is sort of similar, but the only answer there has some issues - the suggested app only distinguishes between "successful ping" and "unsuccessful ping", whereas I want to know more precisely how much ping I have.  I found zero results for displaying command line output on the taskbar.

I'm looking for a way to monitor my current internet connection quality by showing the ping-response to a website like google in the taskbar on the right side. I'm using Windows 8.1. Kind of like , but for the ping. Any suggestions?  I want to stop using the command line to ping Google.


I have use Nmap -a to view all open ports on my laptop. However, I noticed that the states are different. Some have ESTABLISHED, some LISTENING and some were stateless. What do they mean?

I use netstat to check my port status.  I was wondering what's the difference between port status LISTENING, TIME_WAIT, CLOSE_WAIT, FIN_WAIT1 and ESTABLISHED?


Prove that if $Z/m\oplus Z/n = Z/mn$ then $(n,m)=1$.   I have proved the converse, but here there is something I am missing. Hints instead of full answers are appreciated. Thanks.

Let $m,n$ be positive integers bigger than $1$. Show that $\mathbb{Z}_m \times \mathbb Z_n$ is cyclic if and only if $\gcd(m,n)=1$.    I have no idea on how to start. Anyone hints are much helpful.


Do you know of some font which has an ant as a character?  (I need it in a document I'm preparing in plain tex that is to be processed by pdftex.)

I used the OzTeX implementation of TeX, also I used to typeset my docs in plain TeX, not LaTeX for me, so I had no problem to insert an image using the OzTeX, now I'm back to TeX docs, am using the TeXWorks frontend, but I can't insert an .eps image file, it seems the \includegraphics macro its only for LaTeX, so I can't use it, any idea on how to insert an image when using plain TeX?


I come from world of java but have been working in nodejs + angularjs for my current project. I have some "key Strings" which are frequently used at many places both in client and server side.  In java it is practice to declare all key strings as final variables and use through the final variables so as to avoid typing mistake while using them. Is there any similar concept in javascript?  public static final String KEY_WORD = "frequently used string"     public static final String KEY_WORD2 = "another frequently used string"

Is there a way to use constants in JavaScript?  If not, what's the common practice for specifying variables that are used as constants?


I am trying to prove the following identity:  $$\sum_{k=0}^N\left({2 \, N - 2 \, k \choose N - k}{2 \, k \choose k}\right)=4^N$$  I have tried writing $4^N=2^{2N}=(1+1)^{2N}=(1+1)^N(1+1)^N$, and expanding each of these as a binomial expansion, but I have found nothing but dead ends so far. Any ideas?  I am currently working through a Ch. 3 "Generating Functions" from  Analysis of Algorithms by Sedgewick/Flajolet. This is problem #30.  Thanks.

It's not difficult to show that  $$(1-z^2)^{-1/2}=\sum_{n=0}^\infty \binom{2n}{n}2^{-2n}z^{2n}$$  On the other hand, we have $(1-z^2)^{-1}=\sum z^{2n}$.  Squaring the first power series and comparing terms gives us  $$\sum_{k=0}^n \binom{2k}{k}\binom{2(n-k)}{n-k}2^{-2n}=1$$  that is,  $$\sum_{k=0}^n \binom{2k}{k}\binom{2(n-k)}{n-k}=2^{2n}$$  My question: is there a more direct, combinatorial proof of this identity?  I've been racking my brains trying to come up with one but I'm not having much success.


I am creating a bash function that should return true/false if a specified symlink refers to specified target. I based myself on   However, I am having trouble getting readlink to work as I want:  is_symlink_to () { # $1 = symlink / $2 = symlink target     echo "arg1: $1 and arg2: $2"     echo readlink arg 1 is: $(readlink -v $1 )   # -v for troubleshooting     if  [ "$(readlink -- $1)" = $2 ]; then         echo "$1 is a symlink to $2"         return 0;     else         return 1;    fi }  ...  if is_symlink_to "~/$file" "$dir/$file" ; then     echo "is already symlinked" else    ... fi   Question: Why does readlink -v return No such file or directory?  arg1: ~/.bash_profile and arg2: /home/me/dotfiles/.bash_profile readlink: '~/.bash_profile': No such file or directory readlink arg 1 is:   If I run readlink from a bash shell, it works fine:  me@mango:~/dotfiles$ readlink -v ~/.bash_profile /home/me/dotfiles/.bash_profile

According to  and my own understanding, the tilde expands to the home directory:  $ echo ~ /home/braiam   Now, whenever I want the shell expansion to work, i. e. using variable names such $FOO, and do not break due unexpected characters, such spaces, etc. one should use double quotes ":  $ FOO="some string with spaces" $ BAR="echo $FOO" $ echo $BAR echo some string with spaces   Why doesn't this expansion works with the tilde?  $ echo ~/some/path /home/braiam/some/path $ echo "~/some/path" ~/some/path


Suppose we have a sequence of elements, for example of fruits on a shelf. Let's say I want to ask about the position of the apple in the sequence. The answer, of course, is an (ordinal) number. But what is the question I should use?  I construct tables with data and often there's a name of an element in one column and in the other column there's the ordinal number of the element. The column has got its name. Its name should be short and clear. A short question which the value (the ordinal number) responds to would be a proper name.  I have an impression that the name "Which" sounds bad because "which?" is a question one would ask if there was a small set of possible answers (for example "red, blue, green" or "first, second, third"). Here the ordinal number might be much bigger. "WhichOne" sounds like the better version of "Which", but still having the same problem. "WhichNumber" sounds extremely childish and in fact the answer to the question "Which number?" should be a (regular) number, not an ordinal number. "WhichInTheOrder" doesn't sound bad to me but I'm not sure if a native speaker would ask a question like "Which in the order is the apple?".  What would be the correct and specific question to ask in order to receive an answer like "The apple is 10th".?

How to ask the position(?) of a president (like 10th) of a country, correctly?


Is there a way that I can get rid of all the extra white space apart from the rectangle shown in the image.   Please let me know if I need to provide some extra input.

Does anyone know if it's possible to create a new document in illustrator that is boundless? And once you have entered all the content you define the size before exporting?


Is there any relationship between the sum of positive numbers and the sum of the reciprocals of the same numbers? For example:  $A=1+2+3.5$ and $B=1+1/2+ 10/35$  Thanks!

If we knew $\sum_{i=1}^{n} f(i)=S$  ($n$ can be $\infty$), is there anything we could say about $\sum_{i=1}^{n} \dfrac {1}{f(i)}$ in terms of $S$?  The only thing I was able to find on the web is . If there is no known relationship, is it possible for there to exist one that we just haven't discovered?


I am novice in Visualforce . I am learning few tags . I have used following code to display a list of Accounts in a tabular format in VF page. My expectations was all i get is list of atleast 20 records or all Accounts. But i am getting only 2 records which are just newly created by while learning VF. Please help me .Following is code  <apex:page standardController="Account" recordSetVar="accounts" > <apex:form>     <apex:pageBlock title="All Accounts across Org">         <apex:pageBlockTable  value="{!accounts}" var="a">             <apex:column value="{!a.Name}"/>             <apex:column value="{!a.AccountNumber}"/>             <apex:column value="{!a.Website}"/>             <apex:column value="{!a.Type}"/>         </apex:pageBlockTable>     </apex:pageBlock>  </apex:form>

I was looking at some code and in the 'apex:page' tag, an attribute called recordSetVar was mentioned. I'm new to VisualForce so could someone please tell me when and why is it used?


I've been working on a hmmwv and it was going fine until this glitch randomly appeared on every object in the scene.   The 'Texture' of object mode/edit mode has black fuzzy bits in it and some of the mesh you can see through some of the mesh you can't but their is clearly a face their as when I go into face select mode I can highlight the ones I can see through. I've also tried to fix it by highlighting it and removing doubles but that doesn't seem to do anything.   I have a screenshot of what I mean:

I was following  on creating a watch and noticed that when I rendered the watch, some pieces were messed up.  I'm new to 3D modeling and I've just learned Blender, I can't explain it well, so here's a picture:    Other examples:     I don't know if it's a problem with my World texture, the object, or the object's texture/material, so I can't even guess how to fix it. What causes this? Is it possible to fix it?


I'm trying to get my Galaxy Tab 3 to run on Ubuntu. Can anyone help guide me in installing and running it?

With the announcement of the Ubuntu Phone OS I'd like to know what phone (and tablet) models are supported at this time.  Note from foss & Oli: We are making this the master question for all future "Will this work on <insert random tablet/phone/device here>?!" questions


This answer  has the curious sentence  The singularity of a black hole is not a point at its center, it's a spacelike singularity.  What is that supposed to mean and is it accurate (according to our models)?

General relativity is expressed in terms of differential geometry, which allows you to do interesting things with the coordinates: multiple coordinates may refer to a single point, eg. the  has whole lines at the top and the bottom that correspond to the North and South poles, respectively; or a single coordinate may refer to multiple points, for example by using inverse geometry the origin refers to all the points infinitely far away.  So, is the singularity just a single point in the curved spacetime, or can it be a more extended object, described by a single coordinate?


I recently built an Ubuntu machine and having no knowledge at all about Linux, I was curious about what it's like :)  I used 1 HDD when I installed Ubuntu. A couple of days ago I decided to add one more HDD connected directly into the motherboard using SATA cable.  My question is: How do I make that 2nd HDD permanent, just like my main HDD?  It seems that my computer recognizes my additional HDD as a removable drive (it has a "unmount button" next to it).  If you could please guide me a step-by-step procedure, it would be greatly helpful. Thanks

I am going to put an additional (non-USB) hard drive in my system. I already have Ubuntu on my other hard drive so I do not want to install Ubuntu on the additional drive but only use it for storage. How do I add the additional hard drive to my Ubuntu system, e.g. make Ubuntu recognize it and mount it properly?


I happened to wander around John Lewis's electronics sections yesterday (for the uninitiated it's a chain of upmarket department stores in the UK) and I came across an , 1 metre long that retailed for 59.99 pounds (or about 94 dollars). Only recently I bought a 2 metre-long HDMI cable for 2.99 (or about 4.70 dollars) that I have been perfectly happy with.  Is there any practical difference? I mean the price difference is just staggering, what more could I possibly get by shelling out for such an expensive HDMI cable apart from possibly better coating and that swivel adapter? Are these cables really faster and in what respect?

I really don't want to pay a ridiculous price for a "name brand" HDMI cable if it doesn't really do anything for me. I'm just curious: now that most transmission is digital (packetized) is there such a thing as a "quality" cable?    I suspect that if the cable works at all, I'm safe saying I have a quality connection. I just want to double check. Some of these reviewers complain that generic cables "create noise, lack bandwidth, can't handle X, etc". I'm skeptical of these reviews.  If the logic for HDMI cables and quality can be applied to cables in general, please elaborate on that as well.


I'm new to Blender and I like very much the esthetics of the viewport. Is it possible to replicate those settings when rendering it?    I got this look when those settings are applied.    Bigger resolution image:

In the same way as you can currently render the active viewport in Open GL? Some aspects of the Workbench renderer look as if they will be very useful for NPR people.


Let $f: [a,b] \rightarrow \mathbb{R}$ continous on [a,b] and differentiable on $(a,b)$. Asume there exist some $c \in \mathbb{R}$ so $f'(x) \rightarrow c$ for $x \rightarrow a+$. Show $f$ is differentiable at the endpoint with $a$ with $f'(a)=c$  Here's what I'm thinking...  I need to prove $\frac{f(x) - f(a)}{x - a}\rightarrow c$ as $x \rightarrow a+$. My guess would be to use the mean value theorem and replacing $b$ with $x$, so there exists a $\xi$ so $f'(\xi) = \frac{f(x) - f(a)}{x - a}$ where $\xi \rightarrow a$ as $x \rightarrow a+$? (since $\xi \in (a,x)$). But is this valid?

Let $f$ be a real-valued function continuous on $[a,b]$ and differentiable on $(a,b)$. Suppose that $\lim_{x\rightarrow a}f'(x)$ exists. Then, prove that $f$ is differentiable at $a$ and $f'(a)=\lim_{x\rightarrow a}f'(x)$.    It seems like an easy example, but a little bit tricky. I'm not sure which theorems should be used in here.    ==============================================================  Using @David Mitra's advice and @Pete L. Clark's notes I tried to solve this proof. I want to know my proof is correct or not.  By MVT, for $h>0$ and $c_h \in (a,a+h)$ $$\frac{f(a+h)-f(a)}{h}=f'(c_h)$$ and $\lim_{h \rightarrow 0^+}c_h=a$.    Then $$\lim_{h \rightarrow 0^+}\frac{f(a+h)-f(a)}{h}=\lim_{h \rightarrow 0^+}f'(c_h)=\lim_{h \rightarrow 0^+}f'(a)$$   But that's enough? I think I should show something more, but don't know what it is.


Sorry for not providing more info, I just don't know where to start with this, would be cool to learn how to recreate this effect.

I've been interested in creating Geometric Polygonal art illustrations, i.e. making polygons and shapes with different color shading represent a face, or an object, see  set of .  How are they achieved? Is there some script for Illustrator which alters the image adding the shapes according to the colors or shades? How would I transform a normal image of Marilyn Monroe for example, to a polygonal illustration of her?


I have been given the a file containing a bunch of lat long coordinates along with this information that came from a ".prj" file alongside a ".shp" file: GEOGCS["GCS_GDA_1994",DATUM["D_GDA_1994",SPHEROID["GRS_1980",6378137.0,298.257222101]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]] I need to convert the lat/long coordinates which I've parsed out of the ".shp" file to northing/easting coordinates, but I don't understand this data - I'm a software engineer with very little knowledge of GIS, and I'm unsure where to start, and as far as I can tell, the above WKT isn't enough to perform the conversion. I have some other data which is already in northing/easting format, and I need to make sure the two are aligned. I'm using the NetTopologySuite.Proj4Net library.

I'm exploring how we can use NetTopologySuite to address a geoprocessing task. based on some code sample I found, I was able to piece together a sample application that reads a shapefile and checks if a point falls within a polygon. The issue is, my point is in WGS84 but the shapefile is in EPSG:2810. I need to transform the input point to the CRS of the shapefile.  How do I convert a point from WGS to EPSG:2810 using NetTopologySuite 1.13.3?  Here's some of the code I have so far:  string shpFilename = @"C:\...\polygons.shp"; GeometryFactory factory = new GeometryFactory(); var coord = new Coordinate(-90.00, 45.00); var point = factory.CreatePoint(coord);   I should also note that when I manually convert from WGS84 to the projected system and use those converted values, my code works as designed. This confirms this is a matter of transforming the coordinates before attempting to determine if they fall within a polygon.


Let's say you have a two-dimensional plane with 2 points (called a and N1 and N2) on it. N1= [9 * H // 8 , 0] N2= [9 * H // 8 , W] How do I check if my third point which is P= (int(x1), int(y1)) is intersecting the line that is crossing N1 and N2?  (please note that p or third point might be moving anywhere on the plane, I only what not know when it is on the line) So let's say  what I can think of is:             N1 = np.array([9 * H // 8, 0])             N2 = np.array([9 * H // 8, W]);              p_aftertop = (int(x1), int(y1))              v1 = (0,W )  # Vector 1             v2 = (9 * H // 8 - int(x1),  W- int(y1))  # Vector 1              xp = v1[0] * v2[1] - v1[1] * v2[0]  # Cross product             if (xp != 0):                 status = cv2.imwrite('/img' + str(i) + '.jpg', frame)                 print('on the line')                 i +=1  I do not know why my method does not work well. How do I know when this point is on the line that crosses those two points?

Let's say you have a two dimensional plane with 2 points (called a and b) on it represented by an x integer and a y integer for each point.  How can you determine if another point c is on the line segment defined by a and b?  I use python most, but examples in any language would be helpful.


I would like to create a border with 2 two colors inside. The first color will be in blue and the next in white.   In my code, there is the colors which are inverted... The white before the blue... I don't understand why ?    .border-color-blue{   height: 182px;   width: 260px;   background-color: blue;  } .border-white{   border: 1px solid #e0e0e0;   background: white;   width: 260px;  }

Lorem ipsum dolor sit amet, ei cum option deserunt, sed cu dicta albucius dissentias.

Say I have the following CSS and HTML code:    #header {   height: 150px; }

Header title
   Header content (one or multiple lines)
     The header section is fixed height, but the header content may change.  I would like the content of the header to be vertically aligned to the bottom of the header section, so the last line of text "sticks" to the bottom of the header section.  So if there is only one line of text, it would be like:   ----------------------------- | Header title | | | | header content (resulting in one line) -----------------------------   And if there were three lines:   ----------------------------- | Header title | | header content (which is so | much stuff that it perfectly | spans over three lines) -----------------------------   How can this be done in CSS?


I was trying to declare multidimensional array in python (array[3][3]) and I did it wrong way like this :  >>> a = [[None] * 3] * 3 >>> a [[None, None, None], [None, None, None], [None, None, None]] >>> a[0][0] = 1 >>> a [[1, None, None], [1, None, None], [1, None, None]]   I understand that the first array is not duplicated but referenced three times but I don't understand why.  Can someone explains to me how python understand this declaration ?

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


what is the differences between pushtopics and platform events? When i can use the pushtopics and when i can use the platform events? thanks

Salesforce offers two variants of the  -  and .  In Summer '17 (v40.0)  are now also Generally Available (GA).  How do they differ and why would you use one over the other?


How can I make a command block emit a redstone signal after 20 mins. I want it to emit a  redstone signal after 20 mins to power another command block that will have /tp to send all players to a certain area. It will also need some thing that resets it to 20 mins

I found 11 questions like this on gamingSE already, but none of them have proper and up-to-date answers. So I'm creating this Q&A:  How do you either activate a command x seconds/minutes/hours/… in the future or every x seconds/minutes/… in a loop?  Repeating command blocks and ticking functions execute 20 times per second, redstone is  in many situations and most of the extremely fancy solutions, like falling blocks in cobwebs, have broken over time or are needlessly complicated.


If I view a Stack Exchange page without being logged in there are three banners which I have to remove first before browsing. The page looks for example like this:    That's totally unusable for me. As I remember those banners are a relatively new "feature".   Is there any trick to get rid of the banners when not logged in for example by tweaking some cookie settings in my browser or by blocking specific IP's in my hosts file (I am working with ubuntu 18.04)?

With left nav, responsive design, and various new-user notices, this is what an anonymous user currently sees (browser window here is 1090px wide):    I realize that a lot of this content -- code of conduct, new-user intro, cookies notice -- is important.  And I get that the left nav is an important design element, and responsive design dictates the width of the right column.  But when you add it all up, Q&A -- what the site is about -- gets a distressingly small portion of the screen.  Can we do better?   Maybe we can make that intro/mini-tour shorter? Maybe we can hide the right column for anonymous users? Maybe some things can wait until the user's viewed a few pages? Maybe other things I haven't thought of?   My concern is that anonymous users -- people coming from Google, people who were referred to a site by users hoping to recruit them, or others who find their way to us but aren't invested in us -- will turn away before seeing how rich and helpful our sites are.  Which would be a real shame, because our sites are awesome.  First impressions matter.  When I'm asking a rabbi to check out Mi Yodeya or a professional chef to check out Seasoned Advice or my vet to check out Pets (all of these have happened), I want to make a good impression.  I want the person to see more than 2.5 questions; I want to increase the chances the person will see something interesting or say "oh I can answer that!" and dig deeper.  Yes, the other stuff is important, but maybe not now?  Is there a better way to "stage" all this information for people we haven't yet hooked?