Can a POCO contain a constructor? Could you tell me if this class is correct? I also read that a POCO must have a parameterless constructor. Is that correct and why? If I accept this parameterless constructor, I'll have a problem with my read only Id property. For me, it seems logical that if this property must be read-only, then the only way to initialize it is in the constructor.  [DataContract] public class MembershipUser {     public MembershipUser(Guid idValue)     {         this.Id = idValue;     }      [DataMember]     public virtual readonly Guid Id { get; set; }      [DataMember]     public virtual string UserName { get; set; }      [DataMember]     public virtual string Email { get; set; } }

Can someone define what exactly 'POCO' means? I am encountering the term more and more often, and I'm wondering if it is only about plain classes or it means something more?


What is the best (fastest) way to clip a variable using C++ on a modern processor. e.g. If it is below a value, clip it to that value.  I'm aware of a few ways to do it, however, branch prediction comes to mind about the speed.  For example:  double ClipValue(double value) {   if (value < 0)   {     value = 0.0;   }    return value; }   I would guess that the above would have to branch some of the time.  double ClipValue(double value) {   return value < 0.0 ? 0.0 : value; }   This may not.  double ClipValue(double value) {   return std::max(value, 0.0); }   And I'm unsure how this would behave.  I guess a lot of it comes down to the compiler and optimizations settings, but what is generally considered the fastest method to saturate a variable. I have used double in this example but I'm equally interested in integers.

Is there a more efficient way to clamp real numbers than using if statements or ternary operators? I want to do this both for doubles and for a 32-bit fixpoint implementation (16.16). I'm not asking for code that can handle both cases; they will be handled in separate functions.  Obviously, I can do something like:  double clampedA; double a = calculate(); clampedA = a > MY_MAX ? MY_MAX : a; clampedA = a < MY_MIN ? MY_MIN : a;   or  double a = calculate(); double clampedA = a; if(clampedA > MY_MAX)     clampedA = MY_MAX; else if(clampedA < MY_MIN)     clampedA = MY_MIN;   The fixpoint version would use functions/macros for comparisons.  This is done in a performance-critical part of the code, so I'm looking for an as efficient way to do it as possible (which I suspect would involve bit-manipulation)   EDIT: It has to be standard/portable C, platform-specific functionality is not of any interest here. Also, MY_MIN and MY_MAX are the same type as the value I want clamped (doubles in the examples above).


It just seems to me like these things can grow in size without injesting anything. The most outrageous example I can think of is that thing from the med pod in Prometheus (even though not the same species as the Alien alien), but they all seem to be able to do it.  Has any canonical explanation ever been given for this or is it just space magic?

In the movies  and , what do the aliens eat? You would think they first feed from the body host, but then when the human host awakens he doesn't have anything visibly wrong, so the human host was used only to incubate the young alien. When they get out of the body they keep growing but when they encounter humans, they don't eat them, they just kill them or use them as new hosts.  So, what do they eat? How can they grow that tall?


I have a different country sim to my country of origin account. When I put in the new number, I receive the OTP  so that works fine, but it will not let me get past the email address. It says it is already registered. The email address is the same as my country of origin account.  I want to book an Uber in NZ but can’t get beyond the prompt that says my email account is already registered.. please advise.

I use Uber app heavily to get taxis basically in any country that has Uber, and I also get a local sim card sometimes.   I always have my roaming turned on but the problem is in receiving calls, I don't want the drivers to call me and it will be considered an international call for them, some might cancel because of that.   I have played around the app and tried to edit the account info, it redirects me to the website, and in the website its grayed out, i can't edit the phone number and a note says contact customer service. It seems there is no easy way to change the phone number. I have tried on another uber account as well, same result.  Is there a more practical and easy way to change the phone number when I land in a new country and get a local sim then change it back after leaving without contacting customer service?


Can it happen that a direct sum of a free module and a non-free module is (isomorphic to) a free module?

Let $M$, $L$, $N$ be $A$-modules and $M=N\oplus L$. If $M$ and $N$ are free, is $L$ necessarily free?


$\text{Mode} = L \ + \frac{f_{m}-f_{m-1}}{(f_{m}-f_{m-1}) + f_{m}-f_{m+1}} \cdot w$  where,        • L is the lower class boundary of the modal group.        • fm-1 is the frequency of the group before the modal group.        • fm is the frequency of the modal group.        • fm+1 is the frequency of the group after the modal group.        • w is the group width.      Mode is the most frequently occurring value in a data set - I don't understand why this formula would give the mode of grouped frequencies. Why would the mode even be in the modal group? It could be inside any other group, right!?

A formula to calculate the mode for grouped data's is given in my text book: Mode = $l + \dfrac{(f_1 - f_0)h}{2f_1 - f_0 - f_2} $ Where, $l = $ lower limit of the modal class, $h = $ size of the class interval, $f_1 = $  frequency of the modal class, $f_0 = $ frequency of the class preceding the modal class, $f_2 =$ frequency of the class succeeding the modal class. Can you please explain the derivation of this formula, as it is not given in my T.B. Thanks .


I am absolutely clueless here, I know that $\mathbb{R}$ has a countable dense subset, if below propositions hold true:  The rationals $\mathbb{Q}$ are a countable set, and when you give $\mathbb{R}$ the standard (order) topology, then the rationals $\mathbb{Q}$ are dense in $\mathbb{R}$.   So, based on these definitions, if I declare $[0,1)$ and $[1,2)$ which follows the notaions of floor topology, then how should I prove or show that they have a countable basis and dense subset in $T_{ll}$?  Need help on this.

I am trying to understand this proof from Munkres' book which shows that the Sorgenfrey line does not have a countable basis. His proof is:  Let $\beta$ be a basis for $\mathbb{R}_l$. Choose for each $x$ an element $B_x \in \beta$ such that $x \in B_x \subset [x, x+1)$. If $y$ is not equal to $x$ then $B_y \neq B_x$ since inf($B_x$) = $x$ and $y$ = inf($B_y$). Therefore $\beta$ must be uncountable.   I am new to topology so I am probably just missing a simple point but I do not see why $\beta$ must be uncountable according to this argument. I agree that $B_y \neq B_x$ but isn't it possible that $y \in B_x$ (and thus the set $B_y$ is not needed as part of the basis)? Thanks in advance for your help.


I am attempting to draw the following graph in tikz.   My attempt so far has gotten me to here.   \documentclass[border=3mm]{standalone} \usepackage[dvipsnames]{xcolor} \usepackage{pgfplots} \pgfplotsset{width=8cm,compat=newest} \usetikzlibrary{arrows}    \begin{document}      \begin{tikzpicture}     \begin{axis}[  xtick = \empty,    ytick = \empty, xlabel = {$t$}, x label style = {at={(1,0)},anchor=west}, ylabel = {$q$}, y label style = {at={(0,1)},rotate=-90,anchor=south}, axis lines=left, enlargelimits=0.2,                 ]               \addplot[mark=none, blue] coordinates {(1.85,1.1)(0.0,3)};  \addplot[color=red,smooth,thick,-] coordinates  {     (0.3,2.7) (1.3,1) (2.5,2) (4,0.65)  (6,0.8)};       \end{axis}     \end{tikzpicture} \end{document}   The output is;     This has taken me most of the day to draw. I can't understand how to write the coordinates to get the shape of the tangent curve I want. I am wondering is there a knack to this and can anyone offer me advice on how to shape things correctly. There must be a better way than I am currently going about things!

I am drawing some graphs with tangents. I calculated the tangent should be centered at x=57/27 which is approximately x=2.11. I'm currently using the pos and sloped keys for nodes to draw tangents, but I'm not happy about the result; the tangents don't really align.   I think this is because the pos key calculates the actual length of the graph while the graphs don't have the same length.  I'm sure I can somehow let LaTeX do the calculations for me so as to align the slopes vertically at an x value of my choice. But how?  PS: The below document requires a working installation of gnuplot to compile.    \documentclass{standalone}   \usepackage{pgfplots} \pgfplotsset{compat=1.10} \usetikzlibrary{arrows, decorations.markings,intersections}  \makeatletter \tikzset{     nomorepostaction/.code=\makeatletter\let\tikz@postactions\pgfutil@empty,      my axis/.style={         postaction={             decoration={                 markings,                 mark=at position 1 with {                     \arrow[ultra thick]{latex}                 }             },             decorate,             nomorepostaction         },         thin,         -,         every path/.append style=my axis     } } \makeatother  \definecolor{headtitle}{RGB}{167,63,63}  \begin{document} \begin{tikzpicture}   \begin{axis}[%       axis line style={my axis},       xlabel = $U_A$,       ylabel = $S$,       xmin = 0, xmax = 3.25,       ymin = 0,       xtick={1,1.5},       xticklabels={$U_{B,\mathrm{initial}}$,$U_{A,\mathrm{initial}}$},       xticklabel style={             inner sep=0pt,             anchor=north east,             rotate=35         },       ytick=\empty,       height=.66\linewidth, width=\linewidth-4.5\tabcolsep,       axis lines*=left,       every axis y label/.style={at=(current axis.above origin),anchor=east},       every axis x label/.style={at=(current axis.right of origin),anchor=west}]%     \addplot+[mark={},draw=headtitle] gnuplot[raw gnuplot] {%       set samples 51;       plot [0:3] log(3*(3-x)+1);       } node[sloped,above,pos=.63333,       minimum height=1cm,minimum width=1cm] (SB) {} node[pos=0.6,pin=45:{\color{black}{$S_B$}}] {};      \addplot+[mark={},draw=headtitle] gnuplot[raw gnuplot] {%       set samples 51;       plot [0:3] log(9*x^2+6*x+1);       } node[sloped,above,pos=.83333,       minimum height=1cm,minimum width=1cm] (SA) {} node[pos=0.25,pin=-15:{\color{black}{$S_A$}}] {};       \addplot+[mark={},draw=headtitle] gnuplot[raw gnuplot] {%       set samples 51;       plot [0:3] log(9*x^2+6*x+1)+log(3*(3-x)+1);       } node[sloped,above,pos=.775,       minimum height=1cm,minimum width=1cm] (St) {} node[pos=0.525,pin=165:{\color{black}{$S_\mathrm{total}$}}] {};      \path (SB.south east) edge[headtitle,very thick] node {} (SB.south west);      \path (SA.south east) edge[headtitle,very thick] node {} (SA.south west);      \path (St.south east) edge[headtitle,very thick] node {} (St.south west);   \end{axis}% \end{tikzpicture}% \end{document}


I was reading  pdf and on page 6 proposition 8 states:    I don't really understand the steps that bring from  $$\alpha = \sum_{j=1}^n\sum_{i=1}^n a_{ij} x_{i} x_{j}$$  to its derivative   $$\frac{\partial \alpha}{\partial \bf{x}} = \sum_{j=1}^n a_{kj} x_J + \sum_{i=1}^n a_{ik}x_i$$  and then back to the final result:  $$\frac{\partial \alpha}{\partial \bf{x}} = \bf{x}^T A^T + \bf{x}^T A$$  Can someone please help me?

It's stated that the gradient of:  $$\frac{1}{2}x^TAx - b^Tx +c$$  is   $$\frac{1}{2}A^Tx + \frac{1}{2}Ax - b$$  How do you grind out this equation? Or specifically, how do you get from $x^TAx$ to $A^Tx + Ax$?


on my new laptop I installed the latest LTS of kubuntu (16.04).   After adding some widgets and program shortcuts to the desktop I found that I am not able to rizise the widgets and icons (which are really large)  My old Computer I was running kubuntu 14.04. There could change the size by hovering the cursor over the icon and then selecting resize in the "popup" . This popup isn't showing in 16.04 (the widgets are unlocked). Also in the context menu I found no resize option.   Any suggestions?

Until Plasma 5.4.2 (wily) widgets could be unlocked and showed a side menu when hovering over them with the mouse. The side menu allowed moving, resizing and removing the widget. With Plasma 5.5.5 (xenial) the side menu does not appear anymore.


When I got confused with the meaning of the phrase "empty use" I searched on the internet for the meaning. I found a section in the book CBSE(Central Board of Secondary Education) entitled INTERACT IN ENGLISH WORK BOOK-Class 9. In this book under Unit-4 (Modals) they say, "Empty use of can and could." Below this headline they gave some examples:         I can smell a fire.   I can hear a weird noise.   She could feel her hair standing up.      Now my question here is why they used the phrase "empty use." I need to know how to use modal verbs in depth because my first language is Kannada so it's very difficult to learn this aspect of English.

I'm reading a book titled Comprehensive High School English Grammar & Composition. The author, who is Indian, says this on the use of the modal verbs can and could:      Can is used to express "empty use":         I can walk.   I can feel summer heat.   Birds can sing in the trees.         Could is used to express "empty use":         I could feel the touch of cool breeze.   They could enjoy soothing showers.       But I'm not getting what the meaning of the phrase "empty use" is, and why the author used this term here, and whether it's a standard term or concept, or unique to this (non-native) author.  Is "empty use" a recognized term among linguists? If so, what does it mean?


If $R_1,...,R_n$ are rings with identity and $I$ is an ideal in $R_1\times...\times R_n$, then $I=A_1\times...\times A_m$,where each $A_i$ is an ideal in $R_i$.   My proof:  Given $I$ let $A_k=\pi_k(I)$,where $\pi_k$ is the canonical epimorphism. Since $\pi_k$ is an epimorphism and $I$ is an ideal in $R_1\times...\times R_n$,then $A_k=\pi_k(I)$ is an ideal in $R_k$. And I can get $I$ has the form $A_1\times...\times A_m$.   I don't know why I need the condition that rings $R_i$ have identities.

I am trying to solve this problem:      Let $ R_1,...,R_n$ be rings with identity. Every ideal of $R=\prod_{i=1}^n R_i$ is of the form $\prod_{i=1}^n I_i$  where $ I_i$ is an ideal of $R_i$.    The first part is clearly if $J$ an ideal of $R$ then $J\subset \prod_{i=1}^n I_i$, but i can complete the rest..any help..


so kind of a small problem, but i find the Regex expressions very hard to understand, i've been trying to look for a solution to my problem. So, i have a class where i handle File types by their ending extensions as such: public static bool IsPythonFile(string pattern)     {         if (Regex.IsMatch(pattern, ".py$", RegexOptions.IgnoreCase) ||             Regex.IsMatch(pattern, ".pyw$", RegexOptions.IgnoreCase) ||             Regex.IsMatch(pattern, ".py3$", RegexOptions.IgnoreCase) ||             Regex.IsMatch(pattern, ".pyi$", RegexOptions.IgnoreCase) ||             Regex.IsMatch(pattern, ".pyx$", RegexOptions.IgnoreCase) ||             Regex.IsMatch(pattern, ".py*$", RegexOptions.IgnoreCase) ||             Regex.IsMatch(pattern, ".pyw*$", RegexOptions.IgnoreCase) ||             Regex.IsMatch(pattern, ".py3*$", RegexOptions.IgnoreCase) ||             Regex.IsMatch(pattern, ".pyi*$", RegexOptions.IgnoreCase) ||             Regex.IsMatch(pattern, ".pyx*$", RegexOptions.IgnoreCase))         {             return true;         }          return false;     }  So the '*' (star sign) that i'm trying to implement comes from a Tabcontrol, when Text_Changed is triggered, signifying that the file has been modified. I want to include '.py' or '.py*' at the ending of the end of the Tabpage text, and i would want to return true in this bool. Does anybody know the pattern? Thanks for the help.

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


I want to remove unnecessary commas in file, with below code:   const data: any = utils.sheet_to_csv(ws); let blob = new Blob(['\ufeff' + data], { type: 'text;charset=utf-8;' }); let dwldLink = document.createElement("a"); let url = URL.createObjectURL(blob);   I am getting below output from 1st line:  ,,,,,       ,NTD00539,100000,01,Varsha,20180607      How to remove first 5 commas?

How do I trim a string in JavaScript? That is, how do I remove all whitespace from the beginning and the end of the string in JavaScript?


I got used to being able to submit forms using the Ctrl+Enter key combination. Could it be made that Ctrl+Enter submits the form after typing in an answer (and question, if title and tags are set)?

As far as I can tell, whenever I try to submit an answer with CTRL + Enter, it doesn't work. As this is allowed on edits, reviews, and question asks I would be very happy to see this on answers too.


[after edit 1] I have seen the other answers here in SO, and from looking at my code, I find that I am adhering to the principle of Java's pass-by-value-of-reference. But still my array is not getting sorted. Please can someone point out any errors I am making in my code?  [after edit 2] Found the problem. It was nothing to do with array passing. In my merge method, it should be if (end-start<=0) not the other way round!   I am trying to implement mergesort. However, I am unable to display values of my array and am unsure of how to pass my arrays in Java such that the original array can be modified.   How can I modify my current code to display the values of the sorted array?  I , but doesnt this mean that the original array gets modified?  CODE:  I am calling mergesort method from my main method.  public static void main(String[] args) {         int[] qn = {10,22,33,4,5,6,1};         qn= mergesort(qn,0,qn.length-1);         for (int i=0;i<qn.length;i++){ //print to see values if sorted/not                System.out.print(qn[i]+ " ");         }      }  public static int[] mergesort(int[] arr,int start,int end){             int mid = (end+start)/2;         if (end - start<=0){             return arr;         }             else if (end-start>=1){                  arr=mergesort(arr,start,mid);             arr=mergesort(arr,mid+1,end);          }             arr=merge(arr,start,end);             for (int i=0;i<arr.length;i++){                    System.out.print(arr[i]+ " ");             }             System.out.println();             return arr;     }      public static int[] merge(int[] arr,int start,int end){             int mid= (start+end)/2;         if(start-end<=0){             return arr;         }          int a= start; int b = mid+1;         while (a<=mid && b <=end){             if (arr[b]<arr[a]){             int tmp = arr[b++];                 for(int i=++mid;i>a;i--){                 arr[i]=arr[i-1];                 }             arr[a++]=tmp;                     }             else if (arr[b]>arr[a]){             a++;             }             else{ //arr[b]=arr[a]                 if(a==mid && b == end){                 break; //all between mid and end will be equal too                  }                 int tmp= arr[b++];                             a++;                 for (int i=++mid;i>a;i--){                 arr[i]=arr[i-1];                 }                 arr[a++]=tmp;                 //a++;                 //b++;             }                     }             return arr;     }     }   modified my answer based on Manu's below. but it's still not working. Attaching code below:  public static void mergesort(int[] arr,int start,int end){         int mid = (end+start)/2;     if (end - start<=0){         return;     }         else if (end-start>=1){              mergesort(arr,start,mid);         mergesort(arr,mid+1,end);      }         merge(arr,start,end);         for (int i=0;i<arr.length;i++){                System.out.print(arr[i]+ " ");         }         System.out.println();         return; }  public static void merge(int[] arr,int start,int end){         int mid= (start+end)/2;     if(start-end<=0){         return;     }      int a= start; int b = mid+1;     while (a<=mid && b <=end){         if (arr[b]<arr[a]){         int tmp = arr[b++];             for(int i=++mid;i>a;i--){             arr[i]=arr[i-1];             }         arr[a++]=tmp;                 }         else if (arr[b]>arr[a]){         a++;         }         else{ //arr[b]=arr[a]             if(a==mid && b == end){             break; //all between mid and end will be equal too (pearl)             }             int tmp= arr[b++];                         a++;             for (int i=++mid;i>a;i--){             arr[i]=arr[i-1];             }             arr[a++]=tmp;             //a++;             //b++;         }                 }         return; } }

In Java, arrays don't override toString(), so if you try to print one directly, you get the className + '@' + the hex of the  of the array, as defined by Object.toString():  int[] intArray = new int[] {1, 2, 3, 4, 5}; System.out.println(intArray);     // prints something like '[I@3343c8b3'   But usually, we'd actually want something more like [1, 2, 3, 4, 5]. What's the simplest way of doing that? Here are some example inputs and outputs:  // Array of primitives: int[] intArray = new int[] {1, 2, 3, 4, 5}; //output: [1, 2, 3, 4, 5]  // Array of object references: String[] strArray = new String[] {"John", "Mary", "Bob"}; //output: [John, Mary, Bob]


I keep getting email sent to similar email addresses as mine.  for example, if my email address is:  jfrank@gmail.com, I also get emails addressed to j.frank@gmail.com.  This j.frank email is not associated with my email address, so I cannot remove the association.    How can I block these type emails?

I'm not really sure how email routing works, but someone ordered something on Amazon and I received the email instead of them.  Or maybe we both got it, I don't know.  The order doesn't show up in my account, so I'm certain I wasn't charged for it, but I shouldn't be getting other peoples' emails.  We'll say that my email is johndoe1@gmail.com, and somebody who's email is john.doe1@gmail.com places an order on Amazon.  The confirmation email is sent to me at johndoe1@gmail.com.  I checked the email header, and it did say To: john.doe1@gmail.com which is not my email address.  At first I thought that Google ignores periods in email addresses, but I tested the account setup and it doesn't give any error when you put a period in the address.  I didn't create the account; I just used the "check availability" function and the address I chose with a period was fine.  Maybe someone with knowledge about how Email works could tell me why this happened.  Is this a bug in the way Amazon sends emails?  Or is it a bug in how Google receives them?  Who should I report this issue to?


Since there are quite many questions with large number of upvotes being (correctly closed) as "too broad" - should there actually be a site where they could be migrated to.  Part of the problem might be that close votes for questions that are actually more "primarily opinion based" go to "too broad".

Take , and note the description:     Proposed Q&A site for professional and expert amateur chefs interested in the more subjective aspects of cooking; this would be to Cooking SE as Programmers SE is to Stack Overflow    It seems like  is MASSIVELY popular (has more views per-day than any other proposal by a factor of almost 2). There's also a .  Should we allow this trend to continue, possible resulting in things like a subjective web applications proposal? It seems like almost ANY proposal's users could benefit from having a place to ask subjective questions, seeing how much the subjective programmers proposal took off, how many good questions are asked and closed as subjective, and how many successful blogs and discussion sites there are.  But it seems like having totally different sites for this is wrong, as they would share no more official connection between them than with a gaming and skateboarding proposal. If they could be linked somehow, at the least like Stack Overflow and Server Fault are linked as part of a trilogy, they could both be more prosperous.   Another idea would be having a subjective version of every site (subjective.blah.com, like every site has a meta.blah.com). This would be a great way to link the two, and the separation would still be there as it. Heck we could even do it with the existing trilogy sites, with a 'belongs on subjective' auto-move feature like 'belongs on meta'. It's obvious that people want to ask subjective questions. The issue at hand is how (or if) we choose to enable them to do that with the Stack Exchange model. This is a much more long term issue that will need heavy discussion before any consensus can be reached.  EDIT: I see this question proposed something like this for polls. What I am proposing is a separate dominion for all questions that are valid except for being subjective. Hence every site could have a normal section, a subjective section, and a chat section. This may seem complicated, but IMHO it's a great way to divide up a topic. There would be a place to answer questions, discuss topics, and just talk. As far as I can see this covers every area users would be concerned with, leading to a one-stop site that would provide good organization for all areas of a topic.  Thoughts? (sorry for the big wall of text ;)


About a week and a half ago I tried to update from 12.04 to 12.10 doing the sequential upgrades to get to the new OS 13.1. I downloaded 12.1 from the software center which I've been told since that the SFC was not the best place to download an upgrade. The system took a long time to download but when it finished and rebooted it stuck on a black screen. So on google in search of answers I go, what I found was this page    the 4th problem on that page sounds like the issue I'm having so I followed the instructions in it, after I do a nomodeset and and ctrl + x there is a bit of a load screen, some commands flashing on the screen, then I see user log in. I log in and at this point if I was reading the solution page correctly I need to in install my graphics driver, ok, so I go here to learn how to do that from the terminal, since I am not a command line power user (I hardly know what it is).    I do "jockey-text --list" and what is returned is that jockey, or jockey-text is not a command or program..so basically I think I know the problem (I don't have a graphics driver) I just need help getting that downloaded and installed to my PC. this is all I know about my laptops hardware     Also If it is of any value, I did try to reinstall ubuntu before I learned that it was a driver issue, at this time my computer will not load anything from the CD or USB drives...is that related to the issues I'm having or is that a BIOS issue? help me please and thank you.

Can someone help me out and explain or point me in the right direction on how to check video drivers and see if my video card running okay?  I had 10.04 installed on my Thinkpad r61 with Compiz Manager and life was great, until the machine took water damage. I bought an ASUS (X54H) since and am trying out 12.04, but the desktop just doesn't look right.  I always struggled with video driver installation. There are no proprietary drivers available in the hardware manager.  When I run lspci | grep VGA:  00:02.0 VGA compatible controller: Intel Corporation 2nd Generation Core Processor Family Integrated Graphics Controller (rev 09)   I will greatly appreciate your help. I want to use Linux more, but like I said video drivers appear to be my biggest concern. I have also tried 12.04 on my desktop PC, but again failed to configure video card, so switched back to Windows 7.


By definition, I know I have to show there exists a $1$-$1$ onto map $f:A\to B$ I am pretty stuck on how to go to the process of proving this.   I understand the basic definitions of 1-1 and onto. I recall basic definitions of $1$-$1$ and onto from high school, I know a function is $1$-$1$ if it passes the horizontal and vertical line test and a function is onto if for all $Y$ there exists an $x$ in $X$ such that $f(x) = y$, but I am really not sure how to go about proving this at all. Could someone maybe point me in the direction of an example to help me understand each step in the process?

Question:  Prove that the interval $[0,2)$ and $[5,6) \cup [7,8)$ have the same cardinality by constructing a bijection between the two sets. You can add a graph to support your argument.   I tried graphing a function with domain $[0,2)$  and target space $[5,6) \cup [7,8)$ but I can't come up with an explicit formula. Will the function be linear?


I am sorry it is not 'research level'. A quick answer will do. When I attempt using the Square root of 2 method to prove the rationality of Square root of 4 according to how it was done in a book, 2 became Irrational. I think it has to do with primality but all the proofs I have seen didn't mention that. Is there something I am missing?

I have read a few proofs that $\sqrt{2}$ is irrational.  I have never, however, been able to really grasp what they were talking about.  Is there a simplified proof that $\sqrt{2}$ is irrational?


So. I have this old laptop and I installed Ubuntu Server on it so I would have just the terminal to play with. Now I'm trying to play video without seeing/installing any GUI. I installed mplayer but mplayer needs a "display" (GUI?) to play video (no, ASCII-art isn't what I'm looking for)  Any suggestions? Is it possible to get mplayer working without any GUI?  PS I don't mind installing GUI but I want to be able to create a program where you enter a password and then see a video in fullscreen, without seeing any GUI (so looks like a hacker screen).

If I don't want to install a GUI, just install a minimal Ubuntu amd64.  Ok, but: I heard that I can still run e.g.: Firefox in a "framebuffer" (?), so I'm asking, that how can I run e.g.: a VLC media player through a framebuffer under console, without "GUI"?


I try to stop the refresh on my form when I use the change event.  JavaScript:  $(function() {      $("input[type='file']").change(function () {         console.log("on change ok");          $("#modifier").submit(function (e) {              console.log("on submit ok");             /*                treatment             */             e.preventDefault();             return false;         });     }); }    HTML:  <form action="" method="POST" enctype="multipart/form-data" id="modifier" >     <input type="hidden" name="action" value="test" />     <input type="file" name="upload" /> </form>   When picture is uploaded (input[type='file']), I'd like to submit it but I don't meed to refresh my page and do some treatment.

I would like to upload a file asynchronously with jQuery.     $(document).ready(function () {     $("#uploadbutton").click(function () {         var filename = $("#file").val();          $.ajax({             type: "POST",             url: "addFile.do",             enctype: 'multipart/form-data',             data: {                 file: filename             },             success: function () {                 alert("Data Uploaded: ");             }         });     }); });  File <input type="file" id="file" name="file" size="10"/> <input id="uploadbutton" type="button" value="Upload"/>     Instead of the file being uploaded, I am only getting the filename. What can I do to fix this problem?


We have a handful of thin clients that are about 6 years old. We primarily use Citrix and Google apps.

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


I want to do something like this:  INSERT INTO temp_table (temp_value) VALUES ( SELECT source_value FROM the_table WHERE condition_value = some_value ) WHERE temp_condition = some_value_condition   Do you guys know a way of doing this?  Any advice is appreciated

I am trying to INSERT INTO a table using the input from another table. Although this is entirely feasible for many database engines, I always seem to struggle to remember the correct syntax for the SQL engine of the day (, , , , and ).  Is there a silver-bullet syntax coming from an SQL standard (for example, ) that would allow me to insert the values without worrying about the underlying database?


The  displays more users that approve an edit, than are listed in the overview of an edit.  For example the edit  list the 4 users      Approved 6 mins ago:         martineau reviewed this 5 mins ago: Approve   WATTO Studios reviewed this 5 mins ago: Approve   pXL reviewed this 9 mins ago: Reject   This edit is incorrect or an attempt to reply to or comment on the existing post.   Royston Pinto reviewed this 11 mins ago: Approve      but in the Tools the following users are listed     approved by Volatility, toro2k, danodonovan, Kaz Dragon, Royston   Pinto, WATTO Studios, martineau, pXL 7 mins ago   Also has user pXL rejected the edit and not approved.  I think the Tools list all users that reviewed the edit, but the edit overview lists only first users that reviewed the edit to complete the review state.   If its the case the Tools should say reviewed by.

I recall :    It was one that I knew could use a bit more spit and polish, but I didn't have the inclination or energy to edit it myself, so I skipped it.  I wander my way over to  (10K only), and look at the listing...    ...so, when did I approve this again? I skipped the question; that doesn't mean I gave my tacit approval, does it?  Seems like the dashboard needs to agree with the suggested edits view.


I'm looking for a book series from the mid-1960's. I only ever got to read the first book as (apparently) the others hadn't come out yet - this would have been in the 1965-66 time range. If I recall correctly it vaguely resembled the Tripod series, but was set in the eastern United States. One plot element I remember clearly was that the parents of the protagonist were worried that the protagonist's younger sister was unusually small and might be declared to be "a dwarf", although I don't recall why that was such a terrible thing. Any pointers appreciated.  EDIT  Sorry - poor explanation on my part. If I recall correctly it's set in a post-apocalyptic future world - it may have been a nuclear holocaust, or it may have been aliens-coming-down-from-the-skies - where technology has regressed to the late-middle-ages level - lots of mud, not much in the way of "modern" conveniences like electricity and running water. I recall that there's a "religion", and that one of the protagonists friends is chosen to be trained as a "priest" of this religion. Before being "chosen" he was very religious, but afterwards he (apparently) learned it was all a sham and would answer questions about it by hanging his head and saying something like, "Yes, the gods are real...". The protagonist, BTW, was male.

I am looking for a story I remember reading in the mid-90s. I can't remember if it was a trilogy or just a three part book, but I know it was in paperback book form. I also know it was found in the Young Adult section of the library at that time.  The general premise was that there had been some sort of war in the past and machines were outlawed. People visited priests who used magic. I remember that the main character discovers that the priest aren't using magic but are actually using machines.  I can also remember the main character ends up leaving the nation he is in and ends up in a neighboring nation where machines are allowed. I remember there being a scene where he watches a "movie" which I think was more like an old fashioned moving picture.  For some reason I keep wanting to tie this whole thing back to a sword, or blue sword, or something like that, but I might be mixing stories. Other things I keep linking to it: the character was in training to be a priest, he was forced to leave, he ended up using the neighboring nation to conquer his homeland. Again, still not sure if I am mixing things but they keep popping up.  I do know that it is not The Blue Sword by Robin McKinley, or its prequel, The Hero and the Crown.


I am trying to center a div on screen. I have used this method countless of time, but this time when I set margin top 50%, it tends to go beyound 50% I specified, on chrome it disappears, which is strange. Please help me with this.
Some text

I want to center a div vertically with CSS. I don't want tables or JavaScript, but only pure CSS. I found some solutions, but all of them are missing Internet Explorer 6 support.
Div to be aligned vertically
   How can I center a div vertically in all major browsers, including Internet Explorer 6?


This is my code.  Code 1 : StringBuilder sb = new StringBuilder("select * from user");  Code 2 : StringBuffer sb1 = new StringBuffer("select * from user");  Which one is correct? and Why?  EDIT : I have seen in some code StringBuffer is used and in other StringBuilder is used. For the query like this, which will be passed to get PreparedStatement, which approach is better. Also tell me what would happen for insert queries.

What is the main difference between StringBuffer and StringBuilder? Is there any performance issues when deciding on any one of these?


I am trying to install Java and plugins for Firefox. I installed both the JDK and JRE.  When I try with the sudo update-alternatives --config java command it shows only one choice available.  Plugins are not usable in Firefox.

How do I install Java, including in my browser, so websites with Java work?


I'm a beginner coder in a high school environment. I'm currently an AP Computer Science A student, and I have an in-class project to create a "fun" activity. I was trying to make a Card and Deck class in order to create different games with it, but I keep getting a NullPointerException run-time error from what I believe is in the Deck class. Can someone point me in the direction of why my code is behaving this way? The two classes are below. Thank you!    public class Card{   private String suit, color, name;   private int value;    public Card (){     suit = "Diamond";     color = "Red";     name = "One";     value = 1;   }    public Card(String n, String s, String c, int v){     suit = s;     color = c;     name = n;     value = v;   }    public String getSuit(){     return suit;   }    public void setSuit(String s){     suit = s;   }    public String getColor(){     return color;   }    public void setColor(String c){     color = c;   }    public String getName(){     return name;   }    public void setName(String n){     name = n;   }    public int getValue(){     return value;   }    public void setValue(int v){     value = v;   } }     public class Deck{   private Card[] decks;    public Deck(){      decks = new Card[52];     for (int i = 0; i<52; i++){       if(i<26){         decks[i].setColor("Red");       }       else{         decks[i].setColor("Black");       }        if(i<13){       decks[i].setSuit("Diamond");       decks[i].setValue(i+1);       }       else if (i<26){       decks[i].setSuit("Heart");       decks[i].setValue(i-13+1);       }       else if (i<39){       decks[i].setSuit("Spade");       decks[i].setValue(i-26+1);       }       else{       decks[i].setSuit("Clover");       decks[i].setValue(i-39+1);       }      }      for(int i=0; i<52; i++){       if(decks[i].getValue() == 1){         decks[i].setName("Ace");       }       else if (decks[i].getValue() == 11){         decks[i].setName("Jack");       }       else if (decks[i].getValue() == 12){         decks[i].setName("Queen");       }       else if (decks[i].getValue() == 13){         decks[i].setName("King");       }       else{         decks[i].setName(changeName(i));       }     }   }    public String changeName(int value){     if (value == 1)       return "One";     else if (value == 2)       return "Two";     else if (value == 3)       return "Three";     else if (value == 4)       return "Four";     else if (value == 5)       return "Five";     else if (value == 6)       return "Six";     else if (value == 7)       return "Seven";     else if (value == 8)       return "Eight";     else if (value == 9)       return "Nine";     else       return "Ten";   }    public void swap(Card[] d){     int rand = (int)(Math.random()*26 + 1);     int rand2 = (int)(Math.random()*26 + 27);     Card temp = decks[rand];     d[rand] = d[rand2];     d[rand2] = temp;   }      public void shuffle(){     for(int i = 0; i<26; i++){       swap(decks);     }   }    public Card getCard(int n){     return decks[n];   }    public int getValue(int n){     return decks[n].getValue();   }    public String getName(int n){     return decks[n].getName();   }    public String getSuit(int n){     return decks[n].getSuit();   }    public String getColor(int n){     return decks[n].getColor();   }    public Card[] getDeck(){     return decks;   } }

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


I just finished writing for one of them but I still have two more to write. Though my interactions with all three of them have been on different occasions, there are still limited things I can write about myself without overdoing things. I am just not sure how should I approach writing the rest two? Should I just repeat everything I wrote in the first one? I am quite sure they will add/remove a couple of lines only. So if I just copy the contents, they will look all the same. If I don't then I fear I will miss important points about myself.

If a student needs a reference letter for graduate admissions or that sort of thing, some profs will ask the student to write a reference letter for themself before sending it off to the prof for minor edits and finalization. This seems to be a somewhat common practice given that some graduate schools ask for several letters of recommendation even when it is not reasonable for the student to have developed deep connections with that many professors, and that most professors are just too busy to write quality letters for all the students that ask them to.  Is it acceptable to write most of the reference letter and have the prof make minor edits? Do academic institutions frown upon this practice? Would it be considered an academic offense if a student wrote a reference letter for themselves and had a prof sign it?


I'm using a system which sends out some useless emails and some very important emails. However, they share the same title, so they're grouped into the same conversation by Gmail. I'm trying to apply a filter that adds a "Useless" label to the useless emails. However, this adds the label to the entire conversation. If there are useful and useless messages in the same conversation, how do I make sure that the useless ones don't show up in my inbox?

I have been emailing my Gmail account error messages from a project I am working on.   I am trying to use Gmail filters/labels to sort out the class of errors.  But because the subject line is basically always the same even if I have a specific filter for 3 known error cases, the label is applied to the conversation, instead of the specific message.  Therefore, all the errors get all the filters.  I do not yet want to delete the errors, but would rather file them separately.   I have not yet used the NOT contains string yet, but that looks to be non-scalable as I get to the fourth or fifth error case I am done with handling.  Is there any option other than turning off Conversations for all my email?  (I guess I could use one of my spare accounts to turn off conversations and do the work there but would be nice to have such an option).


I am readind about Heisenberg's Uncertainty Principle and although the main formula most texts use is  $$\Delta x\Delta p_{x}\geq \frac{\hbar}{2}$$  or equivalently  $$\Delta x\Delta p_{x}\geq \frac{h}{4\pi}$$  I have seen it written as  $$\Delta x\Delta p_{x}\geq \hbar$$  or  $$\Delta x\Delta p_{x}\geq h$$  First of all, are all those correct formulas? If so, then how are they equivalent with each other?

Some websites and textbooks refer to $$\Delta x \Delta p \geq \frac{\hbar}{2}$$ as the correct formula for the uncertainty principle whereas other sources use the formula $$\Delta x \Delta p \geq \hbar.$$ Question: Which one is correct and why?  The latter is used in the textbook "Physics II for Dummies" (German edition) for several examples and the author also derives that formula so I assume that this is not a typing error.  This is the mentioned derivation:     $\sin \theta = \frac{\lambda}{\Delta y}$      assuming $\theta$ is small:      $\tan \theta = \frac{\lambda}{\Delta y}$      de Broglie equation:      $\lambda = \frac{h}{p_x}$      $\Rightarrow \tan \theta \approx \frac{h}{p_x \cdot \Delta y}$      but also:      $\tan \theta = \frac{\Delta p_y}{p_x}$      equalize $\tan \theta$:      $\frac{h}{p_x \cdot \Delta y} \approx \frac{\Delta p_y}{p_x}$      $\Rightarrow \frac{h}{\Delta y} \approx \Delta p_y \Rightarrow \Delta p_y \Delta y \approx h$      $\Rightarrow \Delta p_y \Delta y \geq \frac{h}{2 \pi}$      $\Rightarrow \Delta p \Delta x \geq \frac{h}{2 \pi}$   So: Which one is correct and why?


I have a test.aspx page on which i have inserted a web part i.e. OOTB web part which is a library. According to the requirements, I need to disable drag and drop functionality for the users. User will not be able to add any documents on this web part, web part will only show them the list view of all the documents in the library. I changed the "style" to"Shaded" used css but still no success.

Before I start - I'm new to this SharePoint development lark and am slowly familiarising myself with it.  We're using SharePoint online and I have amended the SharePoint out-of-the-box document library to include some extra fields that are required when the user adds a new document.  If the user creates or uploads a new document then they are prompted to enter the required information. However if they use the drag and drop functionality the entry of the necessary fields is bypassed.  During my search I came across  which asks how to enforce metadata entry (which would be another good option for me). It also mentions disabling the drag and drop functionality by editing dragdrop.js and removing content from various methods.  I've had a look at the site collection I'm working on (to which I have full control) and I can't seem to find dragdrop.js (or the layouts folder for that matter).   Is this something that's held at site collection level or is it held at a higher level? I don't have admin rights above my site collection, do I need them? Do I need to use Visual Studio to make the necessary changes? (Currently I'm doing things through the web and having a bit of a play with Napa I don't have Visual Studio installed)  When I get there is it obvious what methods need to be removed? How can I tell SharePoint to use the new version of dragdrop.js? Is it just a case of saving a copy of the existing one to a different name and then editing the existing file?      I suppose the best place for me to have asked this question would probably have been on the existing post, but I am unable to post a comment on there, sorry...


TL;DR I have a class in which some function names conflict with the parent class's function. How to call functions from the parent class in C++? My problem I'm trying to make a class with stream functionality. So, I inherited my class from std::basic_iostream . But my class has many functions which conflict with the base class. So, I defined a dedicated class for stream and a function within the main class which will return the stream object. I implemented the constructor of the main class such way so it will create stream objects on object creation. My code was like this: class mystream : public std::basic_iostream<char> {     ... };  class myclass {     protected:         mystream* stream;     public:         myclass() {             stream = new mystream(args);         }         mystream& io() {             return (*stream);         } };  What I'm trying to do now It works great when I access the stream with io member, but I want to use << and >> operator without calling io member and any member function of mystream with io member. Now I have to access stream like this: myclass object; object.io() << "Some output"; object.io().flush();  But I want to access << and >> operators directly from object and any member of mystream by io function, like this: myclass object; object << "Some output"; object.io().flush();  What I tried I tried to add this to my class, but it misbehaves and can't handle IO manipulators like std::endl : template <typename type> std::ostream& operator << (type data) {     return ((*stream) << data); } template <typename type> std::istream& operator >> (type &data) {     return ((*stream) >> data); }

How do I call the parent function from a derived class using C++? For example, I have a class called parent, and a class called child which is derived from parent. Within  each class there is a print function.  In the definition of the child's print function I would like to make a call to the parents print function.  How would I go about doing this?


I have recently been the victim of revenge downvoting.  I think the evidence is pretty clear:    Except for the Roslyn one, these are all ancient questions.  I don't often get downvotes on questions, but it happens from time to time.  The fact that:   They came so close together Yet were cunningly separated by a short time interval Were old questions Were questions (and therefore free to the downvoter) in contrast to answers I (and I assume most people) do not ever get questions downvoted en masse   I believe this is pernicious behavior.  I hate to even bring it up, but at the minimum, attention should be brought to tactics such as these.  Do I have any recourse?  So far, this has been about 48 hours.

I just noticed that I lost a bunch of points from my reputation score, and I used the "reputation" tab on my user profile page to try and track down the cause.  During my investigation, I noticed there was an unusual event of type "reversal". In the normal place of a question title, it says "voting corrected".     What does this mean, and what caused it?  Did I do something wrong? Why did I lose all of that reputation? Is the system punishing me for leaving too many good answers?  Is there any way to earn it back?


To solve this question I have almost finished the proof but I need a little detail to be rigorous.   Let $K$ be the prime fields $\mathbb Q$ or $\mathbb F_p$. Prove that $$f(x)=x^4+1\in K[x]\space\text {is irreducible over }K\iff K=\mathbb Q.$$

How to show that $x^4+1$ is irreducible in $\mathbb Z[x]$ but it is reducible modulo every prime $p$?   For example I know that $x^4+1=(x+1)^4\bmod 2$. Also $\bmod 3$ we have that $0,1,2$ are not solutions of $x^4+1=0$ then if it is reducible the factors are of degree $2$. This gives that $x^4+1=(x^2+ax+b)(x^2+cx+d)$ and solving this system of equations $\bmod 3$  gives that $x^4+1=(x^2+x+2) (x^2+2x+2) \pmod 3$. But is there a simpler method to factor $x^4+1$ modulo a prime $p$?


Suppose I pick one random point in a plane, then there are many circles passing through it, then say I pick another point, there are a lesser number of circles passing through the two points. Now suppose I keep repeating this procedure, how many points should be taken at minimum such that they determine a unique circle passes through all of them? The answer is often said to be three, but why? Note: I want the points taken to be the ones on boundary of the circle which is drawn finally

Prove that three points are enough to draw/define one and only one circle, how would this be done?


I have a bunch of USB-C power supplies (some at different wattages).  Would my Mac charge faster (or blow up) if I plug two power supplies into the same computer (different USB-C slots)

Apple's  decision to convert all the ports on their 2016 MacBook Pro lineup to USB-C ports contributes to blur the difference between ports that supply power (such as a power adapters) and ports that can power external devices (such as USB keys, mice or other gadgets).    This made me think about the following scenario: you sit at a table where your laptop is plugged in on the right, and don't notice that it is plugged in, so you decide to charge it with a second nearby charger that is laying around (i.e. belonging to someone who lives with you and who recently sat at the same spot).  What would happen then?   Would the computer charge twice as fast, would one of the chargers be dismissed by the system (which one?), or would it generate a surcharge that would destroy the computer?  I couldn't find anything about this online, but since I am always trying to force a USB in the MagSafe charger of my MacBook Air, I think that I could easily end up making this kind of mistake.  Note: My question asks what happens when two chargers are inserted into a MacBook Pro, but I am also wondering what would happend if 3, or 4 chargers were inserted. Although this scenario is unlikely to happen by mistake, it would constitute an obvious vulnerability to an exposed device, i.e. in a public space.


Currently I am trying to prevent contacts with the matching first and last names from being assigned to the same Account. Currently on contact I have an custom Account Id field on contact that's updated via a workflow rule.   My active matching rule looks like the following:  (Contact: Account_Id EXACT MatchBlank = FALSE) AND (Contact: FirstName EXACT MatchBlank = FALSE) AND (Contact: LastName EXACT MatchBlank = FALSE)   My duplicate rule has the following settings:   Bypass sharing Block on update Block on edit  No conditions Active The matching rule mentioned earlier   I'm unsure of why it's not blocking the creation. At first I thought it was because () workflow rules trigger after Duplication rule checks are made but I ensured those fields were populated and tested it again.   For example:   We have John Smith assigned to Generic LLC. I should be able to add Alex Smith, John Brown, Alex Brown, etc. But I shouldn't be able to add another John Smith to Generic LLC. I should be able to add John Smith to Other Company Inc. but there can't be two contacts with the same first and last name assigned to one account.   Note: When using the Contact object for matching rules this is an example of what the options will look like.    Currently the only issue I'm experiencing is if I create an account that has the same first and last name as an inactive account and is associated with the same account the new contact is not blocked. New / updated Active Contact with existing duplicate Active contact does block.  As suggested I have created a trigger that looks like the following:   trigger ContactTrigger on Contact (after delete, after insert, after undelete,  after update, before delete, before insert, before update) {     if(Trigger.isBefore && !Trigger.isDelete){         for(Contact c : trigger.new){             if(c.RecordTypeId == RecordTypes__c.getValues('Inactive Contacts').Id__c){                 c.Account_Id__c= c.AccountMap__c;             }             else{c.Account_Id__c = c.AccountId;}         }     } }   AccountMap is the same thing as AccountId but it's done in a custom field so Inactive contacts don't show up on the account page.  Trouble shooting tip: Sometimes turning off and on duplicate rules fixes things.

I have a requirement where we need to prevent Duplicate Contacts. The criteria should be based on First Name, last Name and Account id. I am trying to implement 'Duplicate management' functionality.  Account is related to Contact on a Look up relationship. Account Name is available in Standard Fields list and we enter it in UI. But Account Id is not available in Standard Field list. So it's not available to pick when I create 'Duplicate Rules'. But it's available to pick in 'Validation Rules', I am not sure how. Does anyone has any idea on this?


I try to combine two pictures.  cat 1.png 2.png > combined.png   Combined.png is 1.png instead of 1+2.png  How to combine them?

Is there a tool in Ubuntu to automatically merge two images having a common strip? I need to scan a large image, which will not fit at once in the scanner. I was thinking about scanning it in two parts and hand-editing the result in Gimp to join them. But probably an automatic tool can do the same more quickly and better.  EDIT I think I may have not made my point clear. My difficulty is not aligning two images. My problem is that one has to compensate for the rotation or distortion introduced by the manual process of putting the sheet into the scanner, and an automatic tool should obtain more precise results at analyzing common patterns in the two images to rotate and align them seamlessly.


How can I find the m(x) (that is, EY|X=x), in a non-parametric regression, when Y and X have a joint bivariant normal pdf with both mean 0 and variance 1 (unknown correlation)? $f(x,y)=\frac{\exp \left\{ -\frac 1{2(1-\rho ^2)}\left[ \left( \frac{x-\mu _x% }{\sigma _x}\right) ^2-2\rho \left( \frac{x-\mu _x}{\sigma _x}\right) \left(  \frac{y-\mu _y}{\sigma _y}\right) +\left( \frac{y-\mu _y}{\sigma _y}\right) ^2\right] \right\} }{2\pi \sigma _x\sigma _y\sqrt{1-\rho ^2}} $ I have tried to integrate respect to dy the f(x,y), that is, a normal pdf of X divided by f(x,y) to find the conditional probability, and then make the integral of y times the conditional probability here, but I believe something is wrong. UPDATED: If you find the conditional probability, that is $\frac{f(x, y)}{f(x)}$, and simplify, you would found a pdf of a Normal with mean $\rho x$ and variance $1-\rho^2$, so m(x) = E(Y|X)= $\rho x$

Can you help me?  Find the conditional expectation $\mathbb{E}[X|Y]$ if $(X,Y)$ possesses a bivariate normal distribution.  Is $\mathbb{E}[X|Y=y]=\mu_X+\sigma_X\rho(\frac{\displaystyle y-\mu_Y}{\displaystyle \sigma_Y})$ the solution?  My question: Is the same $\mathbb{E}[X|Y=y]$ and $\mathbb{E}[X|Y]$?


how to create a sqlite database with data inside? I search for a tutorial for that but i saw only that they create only a table in database then they make a method for inserting a data into certain table. I want to make a database with a data itself upon creating a database.

If your application requires a database and it comes with built in data, what is the best way to ship that application? Should I:   Precreate the SQLite database and include it in the .apk? Include the SQL commands with the application and have it create the database and insert the data on first use?   The drawbacks I see are:   Possible SQLite version mismatches might cause problems and I currently don't know where the database should go and how to access it. It may take a really long time to create and populate the database on the device.   Any suggestions? Pointers to the documentation regarding any issues would be greatly appreciated.


I want to draw some random simple smooth closed curves. Each  smooth curve must have the same perimeter but different area. See the following figure to illustrate what I meant clearly.  Each smooth curve is assumed to have the same perimeter.    How to do this with PSTricks (preferred) or TikZ or Metapost or Asymptote?  The following template is provided to save your time.  \documentclass{pstricks,border=12pt,12pt}  \begin{document} \psLoop{10}{% \begin{pspicture}(-5,-5)(5,5) \end{pspicture}} \end{document}

I want to fill a part of a picture with more or less evenly and randomly distributed circles which should not overlap. It would be okay if circles are only partly inside the shape.  The density should be like what you see on this page  with values 80-100. (But I do not need so many circles, 30 should be enough, I could repeat the pattern).   I cannot use a grid and "wobble" the circles a bit: The circles are too large and it simply does not look randomly.   Currently I am thinking about a random attempt: Get some random point, measure its distance to existing circles, either paint or throw the point away. Try 100 times and hope that you get the right number of circles (and that it does not take too long). But perhaps someone has a better idea.   The example draws the circles simply manually:  \documentclass{article} \usepackage{tikz} \usetikzlibrary{backgrounds} \begin{document}   \begin{tikzpicture}[framed,gridded,radius=0.5cm]  \draw[red](0,0) rectangle (5,5);   \draw (1,1) circle;   \draw (2.3,1.1) circle ;   \draw (4.5,0.8) circle ;   \draw (5.1,1.8) circle ;   \draw (0.4,3.3) circle ;   \draw (2.1,2.8) circle ;   \draw (3.8,3.5) circle ;   \draw (4.8,4.2) circle ;   \draw (0.8,4.9) circle ;   \draw (2.1,4.1) circle ;   \draw (3.8,2.0) circle ;   \draw (3.5,0.6) circle ;   \draw (3.0,5.0) circle ;      \draw (4.1,5.1) circle ;             \draw (0.9,2.1) circle ;  \end{tikzpicture}  \end{document}


I found this command that allows you to insert an Adobe font like Helvetica  \renewcommand{\stitlefont}{\fontfamily{phv}\fontsize{14pt}{14pt}\selectfont}  I have more questions:   phv is an abbreviation? Are there others? Similarly I can insert font ttf? Just change the name between braces, like {berasans}?   Thanks!

Could you provide me with a list of Berry names for LaTeX font families?  I am currently working on a paper comparing various LaTeX fonts, particularly their support of extended Latin and it took some time to figure out these obsolete three-letter codes for the TeX Gyre families (to change font families using \fontfamily{nnn}\selectfont). Rather than gathering all the .map files, I tried to look them up on the Internet, but with no success.  The documentation of the  features the following packages: times, palatino, helvet, avant, newcent, bookman, courier, pifont, chancery, mathptm, mathpple, charter, utopia, mathpazo. It is possible to extract the codes, but it is unnecessarily time-consuming and some are still missing (such as TeX Gyre).  Should someone look for the same, here are the Berry names of TeX Gyre families:   Adventor – qag  Bonum – qbk Chorus – qzc Cursor – qcr Heros – qhv Pagella – qpl Schola – qcs Termes – qtm


I would like to send an email to a group from my Contacts by just typing the group name (as you can do in Gmail).    Is this possible in Inbox by Google?

Is it possible to send an email to a  from Inbox? In Gmail you could type the name of a group to automatically add all group members as recipients, but that doesn't seem to work anymore.   Is there no way to do this now?


When there are two spin-1/2 particles, the possible states can be grouped into a singlet and a triplet.   When there are three spin-1/2 particles, there are two possible values for the total angular momentum number, j. These two values are j=s=3/2 and j=s=1/2. How do I determine the possible states for this three particle system in the {j,m} basis, where j is the total angular momentum of the system, and m is the total z component of the angular momentum of the system? Can I treat the j=1/2 case as if there is only one spin 1/2 particle, or is it necessary to still consider all three particles for the j=1/2 case? Note that I am not considering orbital angular momentum at all. Also, for the j=3/2 case, how many particles are involved in this situation? I know that m ranges from -j to j in integer steps, so then for the j=3/2 case, the m value takes on values of -3/2, -1/2, 1/2, and 3/2.   Is there--for the j=3/2 situation of the three particle system--a tricky singlet and triplet grouping as in the case of the two spin-1/2 particle case mentioned at the beginning of this question?  In summary, I am confused about how many particles to consider for each value of j, for the system of three spin-1/2 particles, with j taking on two different values.   Thank you!

I've learned how to add two 1/2-spins, which you can do with C-G-coefficients. There are 4 states (one singlet, three triplet states). States are symmetric or antisymmetric and the quantum numbers needed are total spin and total z-component.  But how do you add three 1/2-spins? It should yield 8 different eigenstates. Which quantum numbers do you need to characterise the 8 states?  It is not as easy as using C-G-coefficients and the usual quantum numbers as for the total momentum the doubly degenerate 1/2 state and quadruple degenerate 3/2 state can describe only 6 or the 8 states. You will need an additional quantum number for the degeneracy.  So how do you get the result?  (I actually tried out myself with a large 8x8 matrix. The total spin 1/2 is each doubly degenerate. For the additional quantum number I chose the cyclic permutation. Spin 1/2 states are neither symmetric nor antisymmetric. But what is the usual way to derive this?)  EDIT: For reference I'm adding my results for up to 4 spins from some time ago:   If you recall the basics of quantum mechanics with matrices it is actually a straightforward matrix diagonalization and requires no specialized knowledge. However, you still need to find an additional operator which breaks degeneracy. I chose the cyclic permutation, which seems to do the job. Please refer to the below answer, since I haven't checked all details.


I've put together a thesis title page but I want to turn it into a template à la Beamer. That is: I want to define variables for the title, author, supervisor, university logo and name and jury members--this last one optional!  Here's my MWE:  \documentclass[12pt]{article} \usepackage[utf8]{inputenc} \usepackage{fontenc} \usepackage{graphicx} \usepackage[osf]{mathpazo} \usepackage[left=2.5cm,right=2.5cm,top=2.5cm,bottom=1.8cm]{geometry} \begin{document} \begin{titlepage} \begin{center} \vfill { \includegraphics[scale=0.5]{logo.png}\par \fontsize{29}{25}\selectfont \textbf{The Poison Ivy University} \par     {         \fontsize{15}{13}\selectfont Doctoral Programme on Antidisestablishmentarianist Phisphology at the Institute of Useless Research and the Department of Occult Sciences     \par} \rule{\textwidth}{2pt} }  {\fontsize{22}{37}\selectfont% \textbf{Rather obnoxious, unnecessarily long and incomprehensible title on a very obscure and unimportant topic}} \vfill {     \fontsize{19}{19}\selectfont%     \textsc{thesis}\par }  {     \fontsize{14}{19}\selectfont     To obtain the futile degree of \par } {     \fontsize{16}{19}\selectfont     \textsc{doctor of phisphology} } \vfill {\fontsize{14}{19}\selectfont Submitted by:\par}  {     \fontsize{18}{16}\selectfont%     Bashed Grad Student\par } \vfill  {     \fontsize{16}{16}\selectfont%      Advisor:       Herr Prof. Dr. Hab. Merkwürdige Liebe \par}   {\fontsize{12}{14}\selectfont Department of Explosive Relaxation, PIU\par} \vfill  {     \fontsize{14}{25}\selectfont%     Members of the Jury:\par }      {     \fontsize{18}{25}\selectfont     Dr. Prost. Vogon Jeltz\par         {         \fontsize{12}{14}\selectfont Department of Transplutonian Literary Theory, PIU         \par         }     }      {     \fontsize{18}{25}\selectfont     Dr. Hab. Gent. Tristram Shandy\par     }     {     \fontsize{12}{14}\selectfont Department of Lifes and Opinions, PIU     \par     }  \vfill {\fontsize{14}{12}\selectfont {Arkham, Massachusetts, Brumaire \textsc{anno v}}} \end{center} \vfill \rule{\textwidth}{2pt} \end{titlepage} \end{document}   There are many questions that ask on formatting of a title page (e.g.  and ) but I think I've got that sorted out. What I want are variables for the contents of the title page; of course the code above requires a beginning and ending of a document, but in real-life I'd like just to input the "variables" on the preamble and use a \maketitle command or something simimlar to produce the output; that is, I want to be able to type in the preamble something like \institution, \advisor, \jurymember (this one is optional), \advisor, etc.  Any ideas?  PS. I include the logo.png file and a screencap of the output just for the sake of completeness.

The standard titlepage is quite simple. I am looking for a very  and need help customizing my title page.  It should match the  classicthesis doctoral thesis template  Below a minimal working example:   \documentclass[12pt,a4paper,footinclude=true,twoside,headinclude=true]{scrbook} \XeTeXinputencoding iso-8859-1 \usepackage[marginparsep=8pt,left=3.5cm,right=3.5cm,top=3cm,bottom=3cm]{geometry}  \usepackage[parts,pdfspacing,dottedtoc]{classicthesis}    \frontmatter  \begin{document}     \pagestyle{scrheadings}        %this is the place to set up my cover sheet.       %*******************************************************      % Abstract     %*******************************************************    %\renewcommand{\abstractname}{Abstract}    \pdfbookmark[1]{Résumé}{Résumé}   \begingroup    \let\clearpage\relax    \let\cleardoublepage\relax    \let\cleardoublepage\relax       \chapter{Résumé}     Résumé de la thèse en français\dots      \vfill      \chapter*{Summary}   Résumé de la thèse en anglais\dots    \endgroup             \vfill     \end{document}


Which number is bigger? $1.01^{101}$ or $2$? and how about $e^{\pi}$ or $\pi^e$?  Tried some algebraic manipulations to no end, so would love some suggestions or some different ways to approach those kind of problem

How can I  compare (without calculator or similar device) the values of $\pi^e$ and $e^\pi$ ?


I have some legacy 32-bit software that I'd really like to keep running on my brand new MBP (odds and ends, but mainly Keynote 5.3 — i.e., from the iWork 2009 suite). On my (2015) iMac, I have two partitions: one for El Capitan and one for Catalina. I'd like to create the same setup on the MBP, but I believe that the IT folks at my organization have deployed the computer so that I can't create a new partition to give it a whirl. They tell me that it won't work anyway — the computer's too new, but it's not like the chips are that different. (Is Apple really crippling older OSes in this way?!) Anyway, before I ask them to create a second partition to let me try, I thought I'd double-check that it's in fact hopeless. Their view does get some support from the fact that when I attempt to boot from an external carbon-copy-cloner-cloned volume of ElCap, the boot halts with the message: "A software update is required to use this startup disk" (with options of choosing another disk or "updating", which does nothing). Has anyone been down this road before. Any other ideas? I've tried Parallels and can finagle an installation of ElCap there, but Keynote's graphics are broken in it. It runs most of the other apps I need, though, so maybe I just cut bait and deal with the crappy new version of Keynote. Thanks much!

I need Mac OS X 10.6.8 (Snow Leopard) in order to work with some legacy software and I want to buy new Mac Mini computer.  Is it possible to install this OS on a new Mac Mini or it's not compatible with it?  If so, what is the latest model of Mac Mini that I can use in this scenario?


Problem: Prove that if $R$ is a commutative ring, then $R[x]$ is never a field.   My attempt: We prove that by contradiction. Suppose $R[x]$ is a field, then we have $a_0 + a_1x + \dots +a_nx^n \in R[x]$, then $x(a_0 + a_1x + \dots +a_nx^n) = 1$. So we have $a_0x + a_1x^2 + a_2x^3 + \dots +a_nx^{n+1} = 1 \Rightarrow 0 + a_0x + a_1x^2 + a_2x^3 + \dots +a_nx^{n+1} = 1 + 0x + 0x^2 + \dots +0x^{n+1}$. Identities coefficients we have $a_n=0, \dots, a_2=0,a_1=0,0=1$, which means $R$ is a trivial ring $\Rightarrow$ contradiction. Q.E.D  Is that right?? Thank all!!!

I'm currently studying Polynomial Rings, but I can't figure out why they are Rings, not Fields. In the definition of a Field, a Set builds a Commutative Group with Addition and Multiplication. This implies an inverse multiple for every Element in the Set.   The book doesn't elaborate on this, however. I don't understand why a Polynomial Ring couldn't have an inverse multiplicative for every element (at least in the Whole numbers, and it's already given that it has a neutral element). Could somebody please explain why this can't be so?


My trusty MBP 17" 2011 is now hitting the failing AMD GPU issues.  This is what I understand from my research:   This has been a known problem, and Apple addressed with an extended warranty on these models's GPUs, which ended Dec 31st 2016.  My local repair shop, which is usually pretty handy, says it can't fix it. You can revert to using just the internal Intel graphics.  Basically, boot into Single User mode and move some of AMD*.kext files from /System/Library/Extensions/ elsewhere.   This covers it pretty well:     Unfortunately, the System/Library/Extensions directory fall under Sierra's SIP protection so I can't carry out those instructions. crutils disable, to disable SIP, won't work in Single User mode. SIP can only be disabled in Recovery mode... which fails because it is a graphical environment and I have a failing GPU.   [EDIT re point 3 only] (as far as just the SIP issues goes:   is correct: Cmd + R + S, at least on Sierra, gets you recovery and single user and you can csrutil disable from there).  Question: Can I do the following:   Boot my Mac from a bootable Linux USB, mount the HD and move those AMD*.kext using Linux, thereby forcing use of the Intel graphics?   Anyone have any experience doing such a thing?  A particular challenge I have is that I'd have to prep the bootable USB from a Windows or Linux machine, as my Mac is stuck in single-user mode.  What Linux distribution/USB prep tool should I be using?  Mind you, I don't need to boot into a graphical Linux, just the command line is good enough and less likely to hit the GPU issue.

Before you respond that this isn't possible, hear me out. I have a Mac Pro 4,1 (with 5,1 firmware), running MacOS Sierra. I want to disable System Integrity Protection (otherwise known as SIP), but have run into a snag. I don't have a flashed graphics card, so I can't see my boot screen (or recovery mode or safe mode) on my computer. Therefore I can't see how to disable SIP on my computer. I have tried:  Boot Mac Pro into target disk mode and connect MacBook Air (OS X 10.9 - pre-SIP) via FireWire To MP. Boot MBA from Mac Pro's recovery partition, (MacOS 10.12 recovery). Disable SIP, reboot. Doing this worked on the MBA. But when I turned on the Mac Pro again, SIP was enabled. I assumed that because of this, the SIP disable was linked to the hardware.  Question 1: Is this assumption correct?  Question 2: is it possible to disable the SIP without using the graphics card in the Mac Pro? I have an iMac running MacOS Sierra and a MBA running OS X 10.9 at my disposal. Possible solutions can include (but don't have to be limited to): ssh, screensharing, target disk mode).  I would appreciate any help. Please post questions as comments and feel free to suggest edits. Thank you!


I see some mismatch with the Stack Exchange site counts. In  page it shows "A list of all 151 Stack Exchange" sites In  page it shows "A list of all 153 Stack Exchange" sites And in the Stack Exchange  section it describes "Stack Exchange is a network of 150 communities that are created ... " Is this a bug or cache? Or the shown communities are calculated in some other way? Screenshot from Meta Stack Exchange:    Screenshot from Stack Exchange Tour page:

I assume the difference in the number of Stack Exchange sites/communities is a mistake... correct?


When I write functions in Python, I typically need to pass quite a few variables to the function. Also, output of such functions contains more than a few variables. In order to manage this variables I/O, I resort to the dictionary datatype, where I pack all input variables into a dictionary to inject into a function and then compile another dictionary at the end of the function for returning to the main program. This of course needs another unpacking of the output dictionary.   dict_in = {'var1':var1,            'var2':var2,            'varn':varn}      def foo(dict_in):     var1 = dict_in['var1']     var2 = dict_in['var2']     varn = dict_in['varn']      """ my code """      dict_out = {'op1':op1,                 'op2':op2,                 'op_m':op_m}     return dict_out   As the list of variables grows, I suspect that this will be an inefficient approach to deal with the variables I/O.   Can someone suggest a better, more efficient and less error-prone approach to this practice?

The canonical way to return multiple values in languages that support it is often . Option: Using a tuple Consider this trivial example: def f(x):   y0 = x + 1   y1 = x * 3   y2 = y0 ** y3   return (y0, y1, y2)  However, this quickly gets problematic as the number of values returned increases. What if you want to return four or five values? Sure, you could keep tupling them, but it gets easy to forget which value is where. It's also rather ugly to unpack them wherever you want to receive them. Option: Using a dictionary The next logical step seems to be to introduce some sort of 'record notation'. In Python, the obvious way to do this is by means of a dict. Consider the following: def g(x):   y0 = x + 1   y1 = x * 3   y2 = y0 ** y3   return {'y0': y0, 'y1': y1 ,'y2': y2}  (Just to be clear, y0, y1, and y2 are just meant as abstract identifiers. As pointed out, in practice you'd use meaningful identifiers.) Now, we have a mechanism whereby we can project out a particular member of the returned object. For example, result['y0']  Option: Using a class However, there is another option. We could instead return a specialized structure. I've framed this in the context of Python, but I'm sure it applies to other languages as well. Indeed, if you were working in C this might very well be your only option. Here goes: class ReturnValue:   def __init__(self, y0, y1, y2):      self.y0 = y0      self.y1 = y1      self.y2 = y2  def g(x):   y0 = x + 1   y1 = x * 3   y2 = y0 ** y3   return ReturnValue(y0, y1, y2)  In Python the previous two are perhaps very similar in terms of plumbing - after all { y0, y1, y2 } just end up being entries in the internal __dict__ of the ReturnValue. There is one additional feature provided by Python though for tiny objects, the __slots__ attribute. The class could be expressed as: class ReturnValue(object):   __slots__ = ["y0", "y1", "y2"]   def __init__(self, y0, y1, y2):      self.y0 = y0      self.y1 = y1      self.y2 = y2  From the :  The __slots__ declaration takes a sequence of instance variables and reserves just enough space in each instance to hold a value for each variable. Space is saved because __dict__ is not created for each instance.  Option: Using a  (Python 3.7+) Using Python 3.7's new dataclasses, return a class with automatically added special methods, typing and other useful tools: @dataclass class Returnvalue:     y0: int     y1: float     y3: int  def total_cost(x):     y0 = x + 1     y1 = x * 3     y2 = y0 ** y3     return ReturnValue(y0, y1, y2)  Option: Using a list Another suggestion which I'd overlooked comes from Bill the Lizard: def h(x):   result = [x + 1]   result.append(x * 3)   result.append(y0 ** y3)   return result  This is my least favorite method though. I suppose I'm tainted by exposure to Haskell, but the idea of mixed-type lists has always felt uncomfortable to me. In this particular example the list is -not- mixed type, but it conceivably could be. A list used in this way really doesn't gain anything with respect to the tuple as far as I can tell. The only real difference between lists and tuples in Python is that lists are , whereas tuples are not. I personally tend to carry over the conventions from functional programming: use lists for any number of elements of the same type, and tuples for a fixed number of elements of predetermined types. Question After the lengthy preamble, comes the inevitable question. Which method (do you think) is best?


I'd like to be able to see how much reputations I got from asking questions (i.e. up/down votes on the questions) and from answering questions (up/down votes and the answer-accepted rep bump). I wish there was some UI for that on the profile page.

I have asked some question and also answered some questions on . How can I know how much reputation questionwise and answerwise separately ?   Is there any way to check this ?  It will be good if we have easy access to this. For example a tooltip will be helpful on user profile page something like this:


I don't get to understand the meaning of "should" in this sentence.     She stared out of the window with her lips pinched together, and it   seemed quite natural that the rain should have begun to pour down in   slanting lines and splash and stream down the window-panes.   Does that mean the same as "the rain had begun to pour down"? If so, is this use of "should" common in everyday speking? I didn't get to find a site that describes that use of "should."

What is the difference between saying:   I should think so. I would think so. I think so.   And also what does using should in this way mean?     It is strange you should say you have seen her, seeing as she left yesterday and hasn’t been back since.


I'm using a Bitvise SSH to connect with the server of digital ocean it was working good till yesterday but accidentally I fire the command "sudo chmod -R 0777 /" after that I am not able to connect using SSH. when I am trying to connect get the error as below.     Reason:FlowSocketReader: Error receiving bytes. Windows error 10054: An existing connection was forcibly closed by the remote host.   How can I solve this?

I accidently ran  sudo chmod 755 -R /   instead of  sudo chmod 755 -R ./   I stopped it after few seconds, but now there is some problems such as  sudo: must be setuid root   How can I revert permissions back?


The problem is as follows: $\displaystyle\min_{V}$ trace($V^TH^T\Phi HV$)$\\$ s.t. $V^TV=I_d$ in the case when $H$ is not known.  When $H$ is known, the solution is given by the eigenvectors corresponding to $d$ minimum eigenvalues of $ H^T\Phi H$.   Is there anyway to solve the problem in the absence of $H$? $H$ is a full column rank matrix. $\Phi$ is symmetric and positive semi-definite.  I hope to receive the suggestions if there are any. Or is there any technique that I can rephrase the problem.  Thank you for your help.


I'm trying to read the # part of an Url using HttpContext.Current.Request in my current application. For example, I've reading a Url .  The HttpContext.Current.Request.Url.RawUrl returns "" and excluds "#divId" part of it. I didn't find it in the Request object.   A quick help is required.   Thanks Chandana

I know on client side (javascript) you can use windows.location.hash but could not find anyway to access from the server side. I'm using asp.net.


My boyfriend is inviting me to visit him in the UK. He's originally from our country and migrated there almost 20 years ago. He's now a citizen. He will pay for my roundtrip tickets, accommodation and I will only pay for the visa application here.  We have already completed all the requirements we think we need. I have my passport, certificate of employment, bank statements, payslip etc. He also gave everything above to me already EXCEPT for his bank statements. He said it would not be required on his end. I know he earns a lot there according to his payslips and P60, but I really do think that his bank statements are required. What do you think? Any help would really be appreciated. Thanks in advance!

The UK Visas and Immigration Directorate publishes  that provides helpful tips that can result in successful visa applications. Section 2 of this guidance opens is entitled "other documents you may want to provide" (emphasis mine).  Section 2: other documents you may want to provide – all visitors This section provides guidance on the types of documents that you may want to provide to help us consider your application against the Immigration Rules. Previous travel documents/passports, which show previous travel. Financial documents showing that you have sufficient funds available.  These must clearly show that you have access to the funds, such as:  bank statements building society book proof of earnings such as a letter from employer confirming employment details (start date of employment, salary, role, company contact details) where a third party (who is either in the UK or will be legally in the UK at the time of your visit) is providing financial support to you e.g. a business, a friend or a relative, documents to show that they have sufficient resources to support you in addition to themselves and any dependant family should be provided   The first item is "bank statements" and this ties in with the , which says...  evidence that you can support yourself during your trip, eg bank statements or payslips from the last 6 months  (Note 'eg' is a Latin abbreviation meaning "for example"; this appears to be optional rather than a fixed requirement.) Question: How should someone interpret this such that the chances of success are maximized? How many statements should I submit? What are they looking for and what do my bank statements tell about me?


Here are 2 reviews that were completed today (on Unix.SE):   A  review. A  review.   Things to notice about these reviews:   both reviews are related to the , and both reviews were reviewed by the , aka me.   My question: Should the same user be able to review the same answer as  and also as ?  IMO this question is not a duplicate of "", for these reasons:   My scenario was created using 2 different browser tabs (similar to what  mentioned in a comment here). Though I bet using any of these variations, with the same user id, would lead to a similar result (none of them are mentioned in the above mentioned question):   2 different browser windows. 2 different browsers. 2 different devices.  The accepted answer to the above mentioned question talks about using the  I'm Done button. However, in my 2 reviews mentioned above, it says that I used the No Action Needed-button. And since those 2 buttons are mutually exclusive, I think it proofs that in my case I was not even able to use the I'm Done button. So that accepted answer seems to not apply to my question/scenario.   BTW, a similar scenario seems possible for these variations:   First Posts versus Low Quality Posts. Late Answers versus Low Quality Posts.

I've been occasionally seeing the same post show up in both First Post and Late Answers review queues, and I'm wondering what the expected behavior is if it appears again - should I flag it a 2nd time as a poor posting in the 2nd review category or just always press skip? It's tempting to flag again and have that count as an additional review but I don't want to annoy moderators this would come across as abusive double flagging.  I'm also wondering why review would show it to me a 2nd time if I've already indicated it has a problem in another review category, is that intentional for some reason or just maybe something that happens infrequently enough to not be worth coding a filter for?  Sorry If this has been asked before in a different way, I searched around for a bit and these were the closest questions I could find but didn't address showing up in multiple review categories:


if g is an element of a group G and g has finite order, let's say n. then prove that the order of g^k is equal to (n/gcd(n,k)) i.e |g^k|= n/gcd(n,k) my attempt: if n divides k then g^k=e. then the order of g^k is 1 and 1 = n/gcd(n,k) = n/n if n doesn't divide k then k= nr+s, where s<n and r,s are integers then g^k= g^nr g^s = g^s then I do not know what to do I am stuck here

This is an exercise from "Contemporary Abstract Algebra" I'm not sure how to solve.     Exercise: Let $\langle a\rangle $ be a (cyclic) group of order $n$. Prove that the order of $a^k=\frac{n}{\gcd(n,k)}$.   Direction: (1) Let $d=\gcd(n,k)$, thus by the Euclidian algorithm we can find $X,Y\in\mathbb{Z}$ s.t. $d=Xn+Yk$, thus, $a^d=a^{Xn+Yk}=a^{Xn}a^{Yk}=(a^n)^X(a^k)^Y=(a^k)^Y$. What to do from here?  (2) We know that $d|n$, thus $\langle a^{n/d} \rangle$ is of order $d$ and $\langle a^d \rangle$ is of order $\frac{n}{d}=\frac{n}{\gcd(n,k)}$. Is it mean that $d=k$? Where is my mistake?


I'm a relatively new (active) user from Mathematics SE. We are about to have an election and I asked a similar question on the Q&A thread, where I was encouraged to post it here. Rounding up, our current moderators were elected {8,8,7,7,6,6,3,2,2} years ago. My limited experience with them has been positive: as far as I can tell, they are doing a great job to keep the site working as it's supposed to. However, two-thirds of them have served for over five years, which is a rather long time, specifically when elections happen somewhat infrequently. More to the point, as far as I can tell re-elections are non-existent: once elected, mods are free to retain their privileges indefinitely. My questions:  How frequently are elections "supposed" to take place? Are re-elections a thing? Several mods indicated it is a network-wide policy that moderators do not have term limits. If this is correct, why is this so?  Personally I am in favor of gentle term limits. Over at MSE, which is a larger site, 3-5 years is probably a good length of time to get acclimated to the responsibilities and make meaningful contributions while allowing other active users to participate in the same way. Being a mod is a lot of work but I think most people have enjoyed doing it and more people should have the opportunity. Maybe the length can vary by community. To be clear: the mods at MSE are doing good work! Update: I am aware that a similar question was asked in a thread 11 years ago. I think this discussion is worth having anew.

While I applaud the excellent work of , the question has come up:     How long will be the elected moderator’s “mandate”? Is it for life, or are we going to have “moderator elections” regularly?   Of course, any community moderator who wishes to recuse him or herself can certainly do that at any time.   Should we have term limits that require community moderators be cycled out periodically, so others get a chance to moderate? Should we hold regular (say, yearly) moderator elections? Is it better to have a larger pool of community moderators, and let the normal ebb and flow of turnover get us "natural" variability in moderation?   What are your thoughts on this?


Can you recommend some magazines or other GIS-related papers (printed or digital) which are released on a monthly basis (or every 2-3 months);  I am looking to keep in touch with the GIS fast-growing world and I would prefer something other than books or websites.  Maybe some of you already have a subscription at some magazine.  I am quite interested in Open Source Software but not only.  This post would be the magazine equivalent to another one with useful information about books:

What books, journals, and/or electronic resources have you found most valuable for expanding your knowledge in the GIS field, and why?


i'm trying to get the logged in user to show its informations in jsf index page which you need to be logged in to access it , i can't access the login page because the exception preventing the project from working, like the title says i'm getting nullpointer exception , i'm using spring 4 , java 7 . Managed bean :     @PostConstruct public void init() {     Object principal = SecurityContextHolder.getContext().getAuthentication().getPrincipal();     if (principal instanceof UserDetails) {        login = ((UserDetails)principal).getUsername();     } else {        login = principal.toString();     }  web xml :          <listener>         <listener-class>             org.springframework.web.context.ContextLoaderListener         </listener-class>       </listener>       <listener>         <listener-class>             org.springframework.web.context.request.RequestContextListener         </listener-class>       </listener>         <!-- CONTEXT  -->             <context-param>                     <param-name>contextConfigLocation</param-name>                     <param-value>/WEB-INF/ApplicationContext.xml , /WEB-INF/spring-security.xml</param-value>                    </context-param>        <filter>         <filter-name>springSecurityFilterChain</filter-name>         <filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class>     </filter>     <filter-mapping>         <filter-name>springSecurityFilterChain</filter-name>         <url-pattern>/*</url-pattern>     </filter-mapping>  Spring security xml :   <http      authentication-manager-ref="jdbc-auth"       use-expressions="true" >                          <intercept-url pattern="/loggedout.xhtml" access="permitAll" />                  <intercept-url pattern="/login.xhtml" access="permitAll" />             <intercept-url pattern="/denied.xhtml" access="isAuthenticated()" />                          <intercept-url pattern="/member/**" access="isAuthenticated()" />             <intercept-url pattern="/admin/**" access="Administrateur-portail" />                                <form-login  login-page="/login.xhtml" login-processing-url="/j_spring_security_check"               username-parameter="username" password-parameter="password" authentication-failure-url="/denied.xhtml" />     <csrf disabled="true"/>      </http>

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?


Can  (v 7.1.3) help identify code that does not apply the "using" keyword when instantiating objects that implement IDisposable (i.e. SqlConnection, StreamReader)?

Is there a setting in Resharper 4 (or even Visual Studio itself...) that forces a warning if I forget to wrap code in a using block, or ommit the proper Dispose call in a finally block?


Let $\mathbb{N}=\{1,2,\cdots\}$.  Does there exist a bijective function $\pi:\mathbb{N} \to \mathbb{N}$ such that $$\sum_{n=1}^{\infty}\dfrac{\pi{(n)}}{n^2}<\infty ?$$  My try: note $$\sum_{n=1}^{\infty}\dfrac{1}{n^2} $$ is convergent,  and then I can't. Thank you.

We know that $\displaystyle\zeta(2)=\sum\limits_{n=1}^{\infty} \frac{1}{n^2} = \frac{\pi^2}{6}$ and it converges.        Does there exists a bijective map $f:\mathbb{N} \to \mathbb{N}$ such that the sum $$\sum\limits_{n=1}^{\infty} \frac{f(n)}{n^2}$$ converges.      If our $s=2$ was not fixed, then can we have a function such that $\displaystyle \zeta(s)=\sum\limits_{n=1}^{\infty} \frac{f(n)}{n^s}$ converges


Please assume that we are now within a directory containing 13 files that were named as follows:  p1 p2 p3 ... p11 p12 p13   Through bash, when we execute the following command:  for i in p*; do echo $i; done   The star * wildcard seems to be expanded without an ascending order:  p1 p10 p11 ... p7 p8 p9   Yet for example, the following piece of commands expand the numerical values in an ascending order:  for i in p{1..13}; do echo $i; done   Is there any bash settings to alter this default star * wildcard behaviour?  If not, could you please tell us what is the motivation behind this preference for such an expansion?  PS: For a similar question, please refer to: . Yet herein I wonder if we can change the default behaviour of bash, and if so, how?

I have a directory filled with files with names like logXX where XX is a two-character, zero-padded, uppercase hex number such as:  log00 log01 log02 ... log0A log0B log0C ... log4E log4F log50 ...   Generally there will be fewer than say 20 or 30 files total.  The date and time on my particular system is not something that can be relied up on (an embedded system with no reliable NTP or GPS time sources).  However the filenames will reliably increment as shown above.  I wish to grep through all the files for the single most recent log entry of a certain type, I was hoping to cat the files together such as...  cat /tmp/logs/log* | grep 'WARNING 07 -' | tail -n1   However it occurred to me that different versions of bash or sh or zsh etc. might have different ideas about how the * is expanded.  The man bash page doesn't say whether or not the expansion of * would be a definitely ascending alphabetical list of matching filenames.  It does seem to be ascending every time I've tried it on all the systems I have available to me -- but is it DEFINED behaviour or just implementation specific?  In other words can I absolutely rely on cat /tmp/logs/log* to concatenate all my log files together in alphabetical order?


During playback of a video file (on the HDD) the screen attempts to go blank.  If I move the mouse the blank screen disappears and I am able to see the video again. I have checked the settings; Tools>Preferences>All (to select the Advanced Menu)>Video and placed a check mark (ticked) Turn off Screensaver (which, by the way, was already selected) but this seems to have no effect.  The screen is still trying to go blank during video playback. I do not believe that this is an issue with VLC at this point.  However, I have been wrong B-4. Any help with this matter is greatly appreciated.  My OS is Linux Ubuntu Ultimate Edition 3.2  Thank you in advance.

I am using Ubuntu 11.10 and my screensaver keeps coming on while I'm watching a movie.  I don't remember this happening in 11.04 and can't remember how to stop it?