Is there any way to solve a differential equation with composite function?

What could one do to find analytic solutions for $f'(x) = f(x + a)$ for various values of $a$?  I know that $c_1\sin(x + c_2)$ is solution when $a = \frac{1}{2}\pi$, and of course $c_1e^x$ when $a = 0$.  For instance, is there a function satisfying $f'(x) = f(x + 1)$?  What about negative or imaginary $a$?  Is there possibly a generalization?


let φ: G-H be an isomorphism of groups and show that Z(G)≌Z(H). I have no idea how to deal with it.

The center of a group $G$ is denoted $Z(G)$ and is equal to  $\{ x \in G \mid \forall y \in G \;xy = yx \}$.  Let $G_1$ and $G_2$ be two groups. I want to show that $G_1 \cong G_2 \implies Z(G_1) \cong Z(G_2)$.   What is the first step I should do? Can anyone show me the steps of solving this problem? Thank you!


I am learning Java basic concept recently, when I tried some code samples about String.intern there was a weird thing happened. Code below:  Snippet 1(normal):  String str1 = new String("0") + new String("0"); str1.intern(); String str2 = "00"; assertTrue(str1 == str2); // pass assertTrue(str1.equals(str2)); // pass   Snippet 2(weird):  String str1 = new String("1") + new String("1"); str1.intern(); String str2 = "11"; assertTrue(str1 == str2); // fail; what happened??? assertTrue(str1.equals(str2)); // pass   Snippet 3(normal):  String str1 = new String("2") + new String("2"); str1.intern(); String str2 = "22"; assertTrue(str1 == str2); // pass assertTrue(str1.equals(str2)); // pass   So, I don't understand what happened about new String("1"), it's really really confused, I need your help, Thanks a lot!

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


I would appreciate if somebody could help me with the following problem  Q: Seeking a combinatorial proof $(\binom{n}{k}=\frac{n!}{k! (n-k)!} )$  $$\sum _{k=0}^{2n} (-1)^k \binom{4n-2k}{2n-k}\binom{2k}{k}=\binom{2n}{n}\times  2^{2n}$$

In  I prove, using generating functions, a statement equivalent to  $$\sum_{k=0}^n \binom{2k}{k} \binom{2n-2k}{n-k} (-1)^k = 2^n \binom{n}{n/2}$$ when $n$ is even.  (Clearly the sum is $0$ when $n$ is odd.)  The nice expression on the right-hand side indicates that there should be a pretty combinatorial proof of this statement.  The proof should start by associating objects with even parity and objects with odd parity counted by the left-hand side.  The number of leftover (unassociated) objects should have even parity and should "obviously" be $2^n \binom{n}{n/2}$.  I'm having trouble finding such a proof, though.  So, my question is     Can someone produce a combinatorial proof that, for even $n$, $$\sum_{k=0}^n \binom{2k}{k} \binom{2n-2k}{n-k} (-1)^k = 2^n \binom{n}{n/2}?$$   Some thoughts so far:   Combinatorial proofs for $\sum_{k=0}^n \binom{2k}{k} \binom{2n-2k}{n-k}  = 4^n$ are given by  and by .  The proofs are basically equivalent.  In Phira's argument, both sides count the number of paths of length $2n$ starting from $(0,0)$ using steps of $(1,1)$ and $(1,-1)$.  By conditioning on the largest value of $2k$ for which a particular path returns to the horizontal axis at $(2k,0)$ and using the facts that there are $\binom{2k}{k}$ paths from $(0,0)$ to $(2k,0)$ and $\binom{2n-2k}{n-k}$ paths of length $2n-2k$ that start at the horizontal axis but never return to the axis we obtain the left-hand side.  With these interpretations of the central binomial coefficients $2^n \binom{n}{n/2}$ could count (1) paths that do not return to the horizontal axis by the path's halfway point of $(n,0)$, or (2) paths that touch the point $(n,0)$.  But I haven't been able to construct the association that makes these the leftover paths (nor do all of these paths have even parity anyway).  So perhaps there's some other interpretation of $2^n \binom{n}{n/2}$ as the number of leftover paths.    Update. Some more thoughts:  There's another way to view the identity $\sum_{k=0}^n \binom{2k}{k} \binom{2n-2k}{n-k}  = 4^n$.  Both sides count the number of lattice paths of length $n$ when north, south, east, and west steps are allowed.  The right side is obvious. The left side has a similar interpretation as before: $\binom{2k}{k}$ counts the number of NSEW lattice paths of length $k$ that end on the line $y=0$, and $\binom{2n-2k}{n-k}$ counts the number of NSEW lattice paths of length $n-k$ that never return to the line $y =0$.  So far, this isn't much different as before.  However, $2^n \binom{n}{n/2}$ has an intriguing interpretation: It counts the number of NSEW lattice paths that end on the diagonal $y = x$ (or, equivalently, $y = -x$).  So maybe there's an involution that leaves these as the leftover paths.  (Proofs of all of these claims can be found on , for those who are interested.)


I am hosting an HTML file, created using MS Word, on GitHub. For some reason, when I open the site, it shows question mark symbols in place of other symbols. .  I have no background in anything related to this (no web programming or MS Word) so I am confused. Why is this happening and how can I fix it?  Thanks!  Edit: .

I have a webserver administration question. In this website:   All PHP generated pages contain the following line:  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-2" />   But this is somehow disregarded probably via the php-apache processing and the page displays in browsers with an UTF-8 header. As a result of that question marks (�) are shown in the page text instead of accented characters (éáöőóüűúí). I tested this in Firefox, IE, Chrome and Seamonkey.  The strangest in this phenomenon, that this symptom started only yesterday, after I upgraded my server to Debian 8.0 Jessie from 7.0 Wheezy. During the upgrade I also upgraded all other packages as well, including apache, php, and so on, and selected "yes" for overwriting config files with factory default ones. After this I fine-tuned my config files to have everything the way I like, but I did not find a way to fix this. Before the upgrade, the page displayed just fine.  Here is a screenshot, where you can see that Firefox sees the "charset=iso-8859-2" definition, but still displays the page with UTF-8 encoding.    My suspicion is, that this is a server configuration issue, but it could also be, that one part of the processing component (Apache, php) changed due to the upgrade in some way, resulting this strange behavior. The problem is, I can't pinpoint, what could possibly cause this problem.  Can anyone solve this mistery? What could be possibly going wrong during the processing of the page?


So I have a simple snippet of code: class Base { public:     virtual void print() {cout<<"Base print"<<endl;} };  class Derived: public Base { public:     virtual void print() {cout<<"Derived print"<<endl;} };  now in my main.cpp, when I downcast a Base class that is instantiated as Derived, I can only downcast if it's a heap variable and not a stack variable, any idea why? This seems like a simple issue, but I can't find an answer online for it. Works int main() {          Base* x = new Derived();     Derived* d = dynamic_cast<Derived*>(x);          if (d){         d->print(); // This line executes     } else {         cout<<"Cast failed"<<endl;     }      return 0; }  Doesn't Work: int main() {          Base x = Derived();     Derived* d = dynamic_cast<Derived*>(&x);          if (d){         d->print();      } else {         cout<<"Cast failed"<<endl; // This line executes     }      return 0; }

Someone mentioned it in the IRC as the slicing problem.


Take this linear mixed effects model, which is discussed on the CMM website:   $y_{ij} = \beta_0 + \beta_1X_{ij} + \beta_2\bar{X}_j + u_j + e_{ij}$  The variable $X$ is included as both a level 1 and level 2 explanatory variable. The value of $X$ is included for each person $i$ in each group $j$ and it is also included as the mean for each group $j$.  But if $X$ is included as the mean for each group $j$, why would it be necessary to include a random intercept for each group $j$ as well?

I am doing an analysis with 2 groups of patients (control and disease) whose blood pressures have been measured continuously for 24 hours. My first goal is to test the effect of GROUP on BP. In the beginning, I built the mixed effect model with TIME as random effect variable and group as fixed effect model. The model I used is listed below:  mod <- lme(BP ~ factor(GROUP), random=~1+ TIME| ID, data=gdata)   However, the experimenter wants to know the effects of GROUP on the slope of blood pressure changing per hour. In another words, we need to have blood pressure slope, which is the change of blood pressure by time, as response variable in the model. And I generated another model as bellow:  mod <- lme(BP ~ factor(GROUP)*TIME, random=~1+ TIME| ID , data=gdata)   However, in the new model, the time works both as random effect variable and fixed effect variable. I am not sure if this is allowed in the mixed effect model.


I have a custom object in salesforce where I want to enforce uniqueness across two lookup fields and a date field.  I do not want to allow two records to have all three of those fields in common, but if any one is different, then it is ok.  Is there an accepted best practice for achieving this?  I've thought of a few ways to accomplish this, but I want to do it "right".   Create another field on the record that is a concatenation of all three fields. Use a workflow rule to populate it every time a record is created and check the unique checkbox on that field. Try to accomplish this with a Validation Rule.  (I've tried a few things here, and didn't have much luck.) Write a full-blown bulkified trigger specifically for this instance.  (This seems like a little bit of overkill to do something so standard)   Any comments on these methods or other ones I haven't thought of would be greatly appreciated.

I have a custom object. I want to put in a business rule so that a combination of two fields must be unique.   So I have Field1 and Field2 and want the combination to be unique:  Field1=4, Field2=7 Field1=4, Field2=8   is ok  But,   Field1=4, Field2=7 Field1=4, Field2=7   is not ok  What is the easiest / best way to do this? Thanks.


I'm facing a strange result sizeof() during testing. How T1 and T2 are the same size as the types used in T2 is smaller than T1?  #include <iostream>  using namespace std;  struct T1 {     int     id;     int     enable; };  struct T2 {     int     id;     char    enable; };   int main() {     cout << sizeof(T1) << endl; // Print 8     cout << sizeof(T2) << endl; // Print 8     return 0; }

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


I was going through an english ACT test and came across this question:     Walker Lee __________ his career in hand forged ironwork at the age of 30.   The possible answers are:   had begun  began   Assuming that Walker Lee is still in ironwork, which is correct and why?  I know there are articles on this concept and I have searched the internet but I am yet to find a concrete explanation.

It is not such a pretty place as I (expected / had expected / have expected).   Which is the correct tense to use here ? I am not able to figure out any difference in the meaning of the three difference tenses used here.  Edit : I used google translate to translate it in my native language, have expected sounds wrong to me here but still had expected and expected seem to convey almost same meaning.


I would like to read the values from the company field of linefc, if the values from this field in table then a the WORSTOFFENDER field should be updated with the value YES, if it is not, then NO.  What needs to be added to complete this?  with arcpy.da.SearchCursor(linefc,["Company"]) as cursor:     for row in cursor:         linecur =row[0]  with arcpy.da.SearchCursor(table,["DAMAGING_PARTY"]) as tablecursor:     for tablerow in tablecursor:         tablecur =  tablerow[0]   print "DONE"

Shapefile: "table1.shp"   Field name: "Name" Field name: "Result"   Flat file: "referenceTable"   Field name: "STREET" Field name: "AKA"   I need to compare the value "Name" in "table1.shp" to the value "STREET" in "referenceTable"  If the values are the same then put the "AKA" value into the "Result" in "table1.shp"     Here is my code.  I got stuck on accessing the elements from the array  import arcpy, os, sys, string from array import *   table1 = "G:\\xStreetNew\\table1.shp" table1_column = ['Name', 'Result'] referenceTable = "G:\\xStreetNew\\Test.gdb\\referenceTable" referenceTable_column = ['STREET', 'AKA']  referenceTable_List = [] with arcpy.da.SearchCursor(referenceTable, referenceTable_column) as rCur: for r_row in rCur:     reference_row = r_row[0].split(",")     referenceTable_List.insert(0,reference_row) ##print sorted(referenceTable_List)  Table1_Update_Cursor = arcpy.da.UpdateCursor(table1, "Name") for row in Table1_Update_Cursor:   if row[0] == None:   row[0] = row[0] else:   row[0] = row[0].replace(";",",")   Table1_Update_Cursor.updateRow(row)  table1_List = [] with arcpy.da.SearchCursor(table1, table1_column) as tCur: for t_row in tCur:     row = t_row[0].split(",")     table1_List.insert(0,row) ##print sorted(table1_List)  Table1_row = len(table1_List) Table1_column = len([table1_List]) ref_row = len(referenceTable_List) for i in range(0,Table1_row):  #Table Row   for ii in range(0,Table1_column):   #Table Column     print table1_List[i][ii]   Below was my old post.  Sorry for the confusion.  I have a shapefile named "table1.shp".     I would like to get all values from fielname "Name" from this table and put them into a list. Able to output each element from the list     So far, I'm able to create a list but not too sure how to get to value "AVENUE 33" or "CHAPMAN ST"  This is my code:  import arcpy, os, sys, string from array import *   table1 = "G:\\xStreetNew\\table1.shp" referenceTable = "G:\\xStreetNew\\Test.gdb\\referenceTable" cursor = arcpy.da.UpdateCursor(table1, "Name") for row in cursor: if row[0] == None:     row[0] = row[0] else:     row[0] = row[0].replace(";",",") cursor.updateRow(row) table1_column = ['Name'] table1_curObj = arcpy.da.SearchCursor(table1, table1_column) table1_List = [] for row in table1_curObj:    table1_row = row[0].split(",")    table1_List.insert(0,table1_row)    print table1_List[0]


Let $M$ and $N$ be square matrices such that $M^2+N^2=MN$. Then prove that $MN-NM$ is singular.  So basically I have to prove: $\det(MN-NM)=0$. I tried to prove this by multiplying the given condition by the inverse of matrices $M$ and $N$, but could not come to the answer. Could anyone please give a hint?

The question is:     Are there square matrices $A,B$ over $\mathbb{C}$ s.t. $A^2+B^2=AB$ and $BA-AB$ is non-singular?   From $A^2+B^2=AB$ one could obtain $A^3+B^3=0$. Can we get something from this?  Edit:  $$A^2+B^2=AB\implies\\ A(A^2+B^2)=A^2B \implies\\ A^3+AB^2=A^2B \implies \\ A^3+(A^2+B^2)B=A^2B \implies \\  A^3+A^2B+B^3=A^2B \implies \\ A^3+B^3=0 $$


First sentence:     If you live in Los Angeles, then you live in California   Second sentence:     If you don't live in California, then you don't live in Los Angeles.   I am not sure, but I would like to say that the first sentence is NOT a sufficient condition because it is necessary you must live in Los Angeles to live in California.  Is it correct that the first sentence is NOT a sufficient condition, and the second sentence IS a necessary condition?

If I have $A \iff B,$ does that means $A$ is sufficient for $B$ to occurs and $B$ is necessary for $A$ to occurs?  I am confused about the direction of meaning sufficient and meaning necessary, I usually say $\implies$ this direction means the premises is sufficient for the result i.e. $A \implies B$ means $A$ is sufficient for $B$ to occur. And $\Longleftarrow $ means the premises is sufficient for the result i.e. $B \impliedby A$ means $B$ is necessary for $A$ to occur.   But I have seen some people not sticking to this and taking reverse directions for necessary and sufficient. Could anyone explains this for me please?


I want to compare two String for exemple str="abc" and str2="bca" or str3="bac" are all twins (contains the same char) i have this code   package com.hr.access.chaine;  public class ChaineCaractere {  public static void main(String[] args) {     System.out.println(Solution.isTwin("hello", "world"));// false     System.out.println(Solution.isTwin("abc", "cab"));// true     System.out.println(Solution.isTwin("Lookout", "outlook"));// true }  }   and the other class for Solution.isTwins is there   package com.hr.access.chaine;  public class Solution {  public static boolean isTwin(String a, String b) {     int longA = a.length();     int longB = b.length();     boolean retourneValeur;     if (longA != longB) {         System.out.println("Le deux chaine ne sont pas jumeau");         retourneValeur = false;     } else {          // I want to add the code in this place to compare into two string        retourneValeur = true;     }      return retourneValeur; }}   I want to add the another code in the bloc of else and i will affect this if the two string are twins or no Help me please my friend :)

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


Assume you have 52 cards in a deck, and you have to draw 10 cards. Assuming you have to put back the card after each draw, what is the probability that you will draw at least one repeated card?  Here's what I was thinking...   Draw 1: $\frac{52}{52}$ since first card is allowed to be any card. Draw 2: $\frac{1}{52}$ since you want to try to draw the first card.  ... Draw 9: $\frac{8}{52}$ since you want to try to draw one of the last 8 cards. Draw 10: $\frac{9}{52}$ since you want to try to draw one of the last 9 cards.   So $\frac{52}{52} \times \frac{1}{52} \times ... \times \frac{8}{52} \times \frac{9}{52} = 1.31 \times 10^{-10}$ or $0\%$ chance of getting at least one repeat.  Is this the correct answer?

Assume you have 52 cards in a deck, and you have to draw 10 cards. Assuming you have to put back the card after each draw, what is the probability that you will not draw any repeated cards?  Here's what I was thinking...   Draw 1: $\frac{52}{52}$ since first card is allowed to be any card. Draw 2: $\frac{51}{52}$ since you don't want to draw the first card, you're now allowed to draw 51 of the remaining cards.  ... Draw 9: $\frac{44}{52}$ since you don't want to draw the last 8 cards, you're now allowed to draw 44 of the remaining cards. Draw 10: $\frac{43}{52}$ since you don't want to draw the last 9 cards, you're now allowed to draw 43 of the remaining cards.   So $\frac{52}{52} \times \frac{51}{52} \times ... \times \frac{44}{52} \times \frac{43}{52} = 0.397$ or $39.7\%$ chance of not getting a repeat.  Just wanted to check if this is the correct approach to the problem or not.


I have a dentistry student who writes things like: "the need for molars removal" and "molar removal treatment" which sounds off to me. I prefer to say (write) "the need to remove molars" and "treatment involving removal of molars", which sound more 'direct' to me. Yet, I am struggling to explain why my version is more direct. I'd be most obliged for any pointers... Thank you!

I would be very grateful for some advice on how to decide whether to use an attributive noun or the "of genitive" (periphrastic genitive).  It seems to me that an attributive noun is generally preferable, except when it leads to ambiguity, often due to the combination of several modifiers with mixed dependent relationships.  Additionally, the of-genitive, when used stand-alone, seems to impart a more formal tone, a higher register.  Simple examples (preferred first, less-preferred second):  The department secretary vs. the secretary of the department.  But:  The excellent secretary of the department vs. the excellent department secretary.  Any additional guidelines would be most welcome.


Greeting, I am working on a problem that involves optimizing the shape of a tank so that the level drops at a constant rate.  Problem and my attempt  Working on the problem, here is what I know. There is an axially symmetrical tank whose wall shape is given by $f(z) = R(\frac{z}{H})^n$ which is shown in the figure. The spigot of the tank has cross-sectional area, a and there is no vena contracta. What I need to do is find $n$ so I can satisfy these conditions.   Here is what I have done so far to start on the problem. I am assuming that the area where the spigot is in the tank will not have any significant effects on the total volume of the tank if I integrate.  Doing a mass balance on the tank I get that    $In-out+Generation = Accumulation$ where $Generation; In = 0$  $-\rho Q_{out}=\frac{\rho dV}{dT}$ as a consequence of the mass balance. And since density is constant $-Q_{out}=\frac{dV}{dT}$ To get $Q_{out}$ use the fact that $u_2a = Q_{out}$ Using Bernoulli's Equation to get an expression for $u_2$. Between 1 and 2 I get $\frac{u_1^2}2+gz_1+\frac{P_1}{\rho}=\frac{u_2^2}2+gz_2+\frac{P_2}{\rho}$  Using the relation that $P_1=P_2=P_{atm}$ (4) can be simplified to $\frac{u_1^2}2+gz_1+=\frac{u_2^2}2+gz_2$ and saying that $u_1 = \frac{dz}{dt}$ I now have $\frac{\frac{dz}{dt}^2}2+gz_1+=\frac{u_2^2}2+gz_2$ Solving (5) for $u_2$ I get that $u_2 = \frac{dz}{dt} + \sqrt{2g(z_1-z_2)}$    My issue  This is where I start to run into issues relating what I know. I know that $\frac{dz}{dt} = constant$ and I know that I need to solve for $n$ in the $f(z)$ function. I am guess that do solve equation (2) for the volume of the tank which is $a_t\frac{dz}{dt}$. I assume since $\frac{dz}{dt}$ is present on both sides it will cancel out. Why does the rate of the flow even matter though? Why is it not valid just to say that the velocity of the water in the tank will be irrelevant in comparison to the velocity coming out of the spigot? Typically that is a valid assumption, or am I in correct in that?   And one small struggle is getting the area of the tank by just knowing $f(z)$. It has been a while since I've done calculus. The first thought in my mind is a solid of revolution. I think that $f(z)$ is a function that relates z and radius so $r = f(z) = R(\frac{z}{H})^n$ and if so, would I be doing $V = \int_a^b \pi r^2 dz$ which is $ V = \int_a^b \pi R(\frac{z}{H})^n dz$? This integral seems very difficult to calculate though and leads me to believe that I have done something wrong. Any push in the right direction would be greatly appreciated!

The ancients undoubtedly discovered the ideal shape of a water clock by trial and error. In examining some ancient water clocks I notice the shape is different depending on the size. For example, a 9-inch water clock will have a different shape than a 5-inch water clock. Obviously the size of the orifice is very important also, and for that reason water clocks were made from metal, even gold, or from hardened ceramic, so that the orifice could be sized very exactly.  Should a modern person wish to make a water clock without going through the agony of many hundreds of hours of experimentation, what theory could be used to determine the ideal shape using the principles of physics alone?  The type of clepsydra I am envision is one that would provide the height of the water as a linear function of time.


I tried to disable trackpad on my MacBook Pro 2015 my operating system is Mac OS X Mojave there is not have Accessability menu in System properties. So, how to disable it from Terminal?

How can I disable the trackpad (without restarting my computer) from the command-line on OS X Mavericks?


I want to get txt files from directory with using c++. I searched in google and found "dirent.h" but I can't using this library. It gives me a C1083 fault. Here is my codes.I'm already included fstream,dirent.h vs...  ifstream fin; string dir, filepath; int num; DIR *dp; struct dirent *dirp; struct stat filestat;  cout << "dir to get files of: " << flush; getline(cin, dir);    dp = opendir(dir.c_str()); if (dp == NULL) {     cout << "Error(" << errno << ") opening " << dir << endl;     return errno; }  while ((dirp = readdir(dp))) {     filepath = dir + "/" + dirp->d_name;       if (stat(filepath.c_str(), &filestat)) continue;     if (S_ISDIR(filestat.st_mode))         continue;       fin.open(filepath.c_str());     if (fin >> num)         cout << filepath << ": " << num << endl;     fin.close(); }   `

How can I determine the list of files in a directory from inside my C or C++ code?  I'm not allowed to execute the ls command and parse the results from within my program.


I have a dependent variable Cost and an independent variable VPT. I want to perform a power transformation on VPTwith the .  In the end I am looking for something like this:  C~ I(VPT^(lambda))   What are the steps to get lambda? I read it is possible to do it with the library , but I am also open for other options to get lambda.

I'm trying to fit a linear model on some data with just one predictor (say (x,y)). The data is such that for small values of x, the y values give a tight fit to a straight line, however as x values increase, the y values become more volatile. Here is an example of such data (R code)  y = c(3.2,3.4,3.5,3.8,4.2,5.5,4.5,6.8,7.4,5.9) x = seq(1,10,1)   I'm curious to know if there exists any power transform (Box cox perhaps?) that lets me get a better fit for the data than simply doing a linear fit as shown below.  fit = lm(y ~ x)


There are some molerat corpses hanging around my Red Rocket Station that I would like to get rid of. Most of the time, I just pickup up corpses and drag them away. However, I'm not allowed to pick these up for some reason.  The game tells me that they're too heavy. This seems odd, as I can pick up and drag around full-size humans.  How do I pick these corpses up and move them, so that I can dispose of them?  Before you suggest using the console, let me point out that I'm playing on XBox One.

So I killed a bunch of raiders from a settlement, now their rotting fly infested corpses are lying around clogging up the joint.  How do I dispose of their corpses?


Star Wars prequel trilogy introduced The Galactic Republic and to make it compatible with the original trilogy, Lucas showed how Galactic Empire was established replacing The Galactic Republic.  This thing looks similar to how Roman Empire replaced Roman Republic in 27 BC. Did Lucas ever told that he was inspired by the same?

There's some  in Star Wars, and perhaps a bit of  , but is there any borrowing from Ancient Rome in Star Wars?  During the original trilogy, there was an existing republic taken over by an empire, which also happened with Ancient Rome - was this a deliberate parallel?


i'm create table using javascript but i stuck when i'll click table td,get dynamically td text value in jquery without using for loop/each     function table_form(day, month, year) {   var tr = '';   var table = '

<	Mar	>		<	2016	>

Sun	Mon	Tue	Wed	Thu	Fri	Sat

';   //~ dynamic_date_form(2,2016);   var tr_inc = 0;   for (var i = 0; i < 5; i++) {     tr += '
';     for (var j = 0; j < 7; j++) {       tr_inc++;       tr += '' + tr_inc + '';     }   }   tr += '
';   tr_inc++;   return table += tr; }  $(document).ready(function() {   $("#date_id").one("click", function() {     this.insertAdjacentHTML("afterEnd", "

");     $('#lbl_date').html(table_form(1, 1, 1));   });      $('#tbl').click(function() {     alert($(this).text());   }); }); #lbl_date{     position: absolute;     background-color:#FFAA41; }  <input type="text"  id="date_id" class="date" /> date

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


I have been trying to get this working to pass information back to the main activity without restarting it.  The app crashes on return to the parent activity with this error:     java.lang.RuntimeException: Failure delivering result   ResultInfo{who=null, request=1, result=1, data=Intent { (has extras)   }} to activity {....CustomerMapActivity}:   java.lang.NullPointerException: Attempt to invoke virtual method 'void   android.widget.TextView.setText(java.lang.CharSequence)' on a null   object reference   Also indicates:     Caused by: java.lang.NullPointerException: Attempt to invoke virtual   method 'void android.widget.TextView.setText(java.lang.CharSequence)'   on a null object reference           at   which is this line in the parent code:  mDateSelected.setText(mDate);   This is the code for my parent activity:   A button to start the child activity  mSelectPickupTime.setOnClickListener(new View.OnClickListener() {     @Override     public void onClick(View v) {          Intent intent = new Intent(CustomerMapActivity.this, DateCalendarActivity.class);         startActivityForResult(intent, 1);      } });  a function to receive the result from the child activity.  protected void onActivityResult(int requestCode, int resultCode, Intent data) {     super.onActivityResult(requestCode, resultCode, data);      if (requestCode == 1) {         if (resultCode == RESULT_OK) {             if (data != null) {                 mDate = data.getStringExtra("date");                 mDateSelected.setText(mDate);                 mTime = data.getStringExtra("time");                 mTimeSelected.setText(mTime);             } else {                 Log.d("TAG_MA", "data is null");             }         }         if (resultCode == RESULT_CANCELED) {             mSelectPickupTime.setText("Please choose time and date");         }     } }    The code for the child activity looks like this:  public class DateCalendarActivity extends AppCompatActivity implements TimePickerDialog.OnTimeSetListener { private TextView mDateSelected, mTimeSelected; private Button mSelectTime, mConfirmDateAndTime; private CalendarView mCalendarView; private String mDate, mTime;  @Override protected void onCreate(Bundle savedInstanceState) {     super.onCreate(savedInstanceState);     setContentView(R.layout.activity_date_calendar);       mDateSelected = (TextView) findViewById(R.id.dateSelected);     mTimeSelected = (TextView) findViewById(R.id.timeSelected);     mSelectTime = (Button) findViewById(R.id.selectTime);     mConfirmDateAndTime = (Button) findViewById(R.id.confirmDateAndTime);     mCalendarView = (CalendarView) findViewById(R.id.calendarView);      mCalendarView.setOnDateChangeListener(new CalendarView.OnDateChangeListener() {         @Override         public void onSelectedDayChange(CalendarView calendarView, int i, int i1, int i2) {             mDate = i + "/" + i1 + "/" + i2;             mDateSelected.setText(mDate);          }     });      mSelectTime.setOnClickListener(new View.OnClickListener() {         @Override         public void onClick(View view) {             DialogFragment timePicker = new TimePickerFragment();             timePicker.show(getSupportFragmentManager(), "time picker");          }     });       mConfirmDateAndTime.setOnClickListener(new View.OnClickListener() {         @Override         public void onClick(View view) {             Intent resultIntent = new Intent();             resultIntent.putExtra("date", mDate);             resultIntent.putExtra("time", mTime);              setResult(RESULT_OK, resultIntent);             finish();          }     });  }  @Override public void onTimeSet(TimePicker timePicker, int i, int i1) {     //pick a time     mTime = i + ":" + i1;     //set time     mTimeSelected.setText(mTime); } }   Cannot work out why this happens any help much appreciated.

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'm in the Physics community. I've already published an article on a journal where I've described a solution scheme that serves to solve a certain problem. Now, I've discovered that the same approach can be used to solve a different model. Of course the model, the comments the results, the plots, etc are different, but the technique is the same. So, is it ok to copy the section of my previous article where I describe the solution technique and paste it into the new one? Notice that the old and the new article feature the same identical authors and that the previous article would be, of course, properly cited.

I am currently a referee for a paper. One of the authors of the paper had written an earlier paper, which I will refer to as the "original paper," and the paper which I am now refereeing is an extension of the original paper, which I will refer to as the "extension paper."  I have found that large portions of the extension paper are copied from his original paper. In particular, a whole section of definitions is copied from his original paper; and some paragraphs in the introduction and literature review are copied wholesale or with slight modifications from the original paper.  Is it acceptable for an academic paper to copy paragraphs and even a section from an earlier paper by the same author?  My intuition suggests that it is acceptable to copy the definition section, with an acknowledgement that it came from the original paper, since definitions are standard. But it seems strange to me for the introduction and literature review to be too similar to the original paper.


How do this two gate able to give an output if in the first place they both doesn't have a second output... in which will be the input of the other...  Both cannot get a second input because they don't have a second input themselves to provide an input to the other...    Conversation:  Gate 1: Hey gate 2, I'll give you your second input... oh wait, I don't have my second input... I can't provide you your second input.. you don't have a second input as well that I need, now we're stuck.  Gate 2: I know right.

Full:    Cropped   :    In the second image (cropped) which is the same as the first (full) image... why the 1st Gate outputs "0"?


How do I write the word span like this?  UPD: it's not clear from the screenshot but the letters are thinner than the normal ones (letters not in math mode)

I'd like \span to be a math operator (for the  of a set of vectors), but apparently it's already a TeX command. What do you guys recommend I do instead? (I don't really want a strange capital \Span, or some other odd variant... but I'm guessing it's a bad idea to redefine \span?)


I'd like to center my header image to be in the center of the whole page - not the center of the browser window base on what size it is. Site is www.anathema.me  Here's the css.   #wrapper {  margin: 0 auto;    }   #header {  margin: 0 auto;  background: #FFFFFF;  text-align: center;   }     #header img {  max-width: 40%;  height: auto;   }

How can I horizontally center a
 within another
 using CSS?

Foo foo


I have a desktop PC with an NVIDIA GTX 980 and an inbuilt graphics driver as well (Matrox) in the Intel Motherboard. I tried installing Ubuntu 16.04, Kubuntu 16 and Ubuntu Server 16.04 but I'm having some problems associated with my graphics card. Various problems I faced while installing the NVIDIA drivers:   The display is blank The display flickers  Items on the screen do not display correctly or very slow moving The computer boots to low-graphics mode An error saying "Oh no! Something has gone wrong!"   Your specific issue may not be here, but try the solutions described in the answers anyway.  If my answer didn't work for you or if you have a better way, feel free to post another answer, describing your problem and how you fixed it.

I installed or upgraded to Ubuntu 16.04, but I'm having some problems with my graphics card.   The display is blank The display flickers Items on the screen do not display correctly Certain programs complain of graphics issues The computer boots to low-graphics mode Your specific issue may not be here, but try the solutions described in the answers anyway.   This question is very broad, but each one of these issues likely has one solution.    If you are experiencing a login loop, check the last part of my answer.    If you experience one of the listed issues and have your own solution (mine didn't work, or there's a faster way), feel free to post another POLITE answer, describing your problem and how you fixed it.    Those attempting to install Ubuntu, please refer to the section titled: If you are unable to enter a TTY or are trying to install Ubuntu.


This is a follow-up to this question: .  Facebook changed their notification options, so neither the accepted answer nor the screenshot in the aforementioned question apply any more.    I'd like to receive an e-mail message whenever someone sends me a Facebook message. What do I need to do? I checked the  configuration page, which contains the following categories:   Comments Tags Reminders More Activity About You Updates From Friends Friend Requests People You May Know Birthdays Groups Video Events Pages You Follow Marketplace Fundraisers and Community Support Other Notifications   I've read all their descriptions, and none of them mentions private messages. What did I miss?

I would like to receive an email when someone sends me a message on Facebook. This used to happen by default.  Is it still possible to set it up somehow?  Update (Dec/12):  Mehper C. Palavuzlar's solution stopped working for me (and apparently for at least some other users) AND I have stopped receiving email notifications AGAIN.  Are email notifications still available?   The screen now looks this way:


This is what I and my husband have received today.  Dear Customer, Your UK visa application has been issued. PLEASE DO NOT GO TO THE VISA APPLICATION CENTRE BEFORE THEY CONTACT YOU. You will be contacted by the Visa Application Centre when your documents are ready for collection, or have been dispatched via courier where this is relevant. You are reminded that you should avoid making travel plans until you have collected your passport, as the outcome of your visa application is not final until you receive your passport. Please ensure you check the details on your visa when collecting your passport.  Why is this email from RIYADH instead of ABUDHABI? What does it mean? How many days will it be until we get our passports back?

Your UK visa application has been issued.      PLEASE DO NOT GO TO THE VISA APPLICATION CENTRE BEFORE THEY CONTACT YOU.      You will be contacted by the Visa Application Centre when your documents are ready for collection, or have been dispatched via courier where this is relevant.       You are reminded that you should avoid making travel plans until you have collected your passport, as the outcome of your visa application is not final until you receive your passport.      Please ensure you check the details on your visa when collecting your passport. If you need to contact us you can do so via our International Enquiry Service at www.gov.uk/contact-ukvi-outside-uk      Kind regards,      UK Visas and Immigration   British Embassy Abu Dhabi     Your UK visa application has been issued.   I know words like processed, forwarded, received, refused but never heard anything like that, so I am confused.


I am still kind of new to programming, but willing to learn: I am struggling with a problem in following project: I am logging analog read-outs of an Arduino board. The Arduino board sends tab-separated values (as a string) via following command to the serial device on my machine.  loop { [...] Serial.println(stringOfTabSeparatedValues); Serial.flush(); }   The values are than retrieved from the serial device and appended (logged) in file.log on my computer through following command:  ttylog -f -b 9600 -d /dev/ttyACM0 >> /dir/to/file.log   The content of file.log looks as following:  value1a value2a value3a value...  value1b value2b value3b value...  value1c value2c value3c value...  ...   This seems to work so far. However, since I would like to link/load this file content to a spreadsheet which is updated in real time, I want to get rid of the empty lines inbetween. (Why does println() generate empty lines when read by ttylog in the first place?) I would like the lines to be logged to look like following:  value1a value2a value3a value... value1b value2b value3b value... value1c value2c value3c value... ...   I figured I could use a pipe to modify ttylog stdout before redirecting that modified output to the destination file. Here is what I have tried:  ttylog -f -b 9600 -d /dev/ttyACM0 | awk 'NF' >> /dir/to/file.log ttylog -f -b 9600 -d /dev/ttyACM0 | awk 'NF' | tee -a /dir/to/file.log ttylog -f -b 9600 -d /dev/ttyACM0 | sed -i '/^$/d' >> /dir/to/file.log ttylog -f -b 9600 -d /dev/ttyACM0 | sed -i '/^$/d' | tee -a /dir/to/file.log   Unfortunately, in those cases nothing at all was written to file.log. (Why?) I noticed though, that following commands at least give my the desired output printing it to the terminal:  ttylog -f -b 9600 -d /dev/ttyACM0 | awk 'NF' ttylog -f -b 9600 -d /dev/ttyACM0 | sed -i '/^$/d'   However I do not know how to redirect that output directly to a file.  I figure my problem has something to do with both, awk and sed, normally using stdin and not stdout as input? Conclusively, I tried redirecting from ttylog to awk/sed and then to the destination file:  ttylog -f -b 9600 -d /dev/ttyACM0 >> awk 'NF' >> /dir/to/file.log ttylog -f -b 9600 -d /dev/ttyACM0 >> sed -i '/^$/d' >> /dir/to/file.log   But here stdout was unmodified written to file.log. (Why?)  Is there a way to modify the output of ttylog (stdout) BEFORE redirecting that output to a file?  Cheers and thanks in advance.

the function awk '!seen[$0]++' print the new occurrences in an input pipe.  I am however unable to add a pipe after. E.g  my_function_with_ouput | awk '!seen[$0]++' | while read j do echo $j done   Doesn't produce any output.


To get a set of Ids from a list of Contacts for example, I could:   Query for the List of sObjects Create a map from my list using the constructor Use the map.KeySet() method to get my set.   Does anyone know of a more efficient design pattern?  I ultimately want a set to pass off to an @future method.

I have a bit of code where I've written a SOQL query that returns a list of SObject records, however I need a Set<Id> structure to pass to another method that I don't have control of (and thus can't change the method signature of).  How can I turn my returned List<SObject> into a Set<Id>? Is the best option just a for loop?


I need to connect to Checkpoint VPN (using login & pass authentication method). For Windows I'm able to connect, using their client, CheckPoint Endpoint Connect. But i was not able to find the above client for linux too (not available). Is there another way to connect to this VPN, rather than having to switch on Windows?

The official Checkpoint out command line tool from CheckPoint, for setting up a SSL Network Extender VPN is not longer working from the Linux command line. It is also no longer actively supported by CheckPoint.  However, there is a promising  project, that tries to replicate the Java applet for authentication, that talks with the snx command line utility, called snxconnect.   I was trying to put snxconnect text utility to work in Debian Buster, doing:  sudo pip install snxvpn   and  export PYTHONHTTPSVERIFY=0 snxconnect -H checkpoint.hostname -U USER    However, it was mostly dying either with an HTTP error of:   HTTP/1.1 301 Moved Permanently:   or:  Got HTTP response: HTTP/1.1 302 Found   or:  Unexpected response, try again.   What to do about it?  PS. The EndPoint Security VPN official client is working well both in a Mac High Sierra and Windows 10 Pro.


I just installed Ubuntu 14 on a separate hard drive from Windows 7.  But when grub2 boots up, I only see options to boot Ubuntu, Windows 7 is nowhere in sight.  I've had to manually boot the hard drive with windows 7 on it to get in.  Here's my disc info:   /dev/sda1 HPFS/NTFS (Windows 7 drive) /dev/sdb1 HPFS/NTFS (TB drive) /dev/sdc1 EFI System FAT (Ubuntu drive, grub is installed on this one)   If I run sudo update-grub I get:  Generating grub configuration file ... Found linux image: /boot/vmlinuz-3.13.0-24-generic Found initrd image: /boot/initrd.img-3.13.0-24-generic Adding boot menu entry for EFI firmware configuration done   Running sudo parted -l shows:  Model: ATA Crucial_CT240M50 (scsi) Disk /dev/sda: 240GB Sector size (logical/physical): 512B/4096B Partition Table: msdos  Number  Start   End    Size   Type     File system  Flags  1      1049kB  240GB  240GB  primary  ntfs         boot   Model: ATA WDC WD10EZRX-00A (scsi) Disk /dev/sdb: 1000GB Sector size (logical/physical): 512B/4096B Partition Table: msdos  Number  Start   End     Size    Type     File system  Flags  1      1049kB  1000GB  1000GB  primary  ntfs   Model: ATA WDC WD2500JS-00M (scsi) Disk /dev/sdc: 250GB Sector size (logical/physical): 512B/512B Partition Table: gpt  Number  Start   End    Size    File system     Name  Flags  1      1049kB  538MB  537MB   fat32                 boot  2      538MB   242GB  241GB   ext4  3      242GB   250GB  8471MB  linux-swap(v1)   Any ideas on how to get Windows 7 to appear?

I installed Windows on my computer, followed by an installation of Ubuntu. However, now I'm unable to boot into my Windows install.  What can I do to fix this?


I have a huge problem: I want to set a players HPLUranium score to 9 whenever he wears an anti-radiation suit - easy, I do this like that:  scoreboard players set @p HPLUranium 9 {Inventory:[{Slot:103b,id:minecraft:leather_helmet,tag:{display:{Name:Nuclear Helmet,color:10066328}}},{Slot:102b,id:minecraft:leather_chestplate,tag:{display:{Name:Nuclear Tunic,color:10066328}}},{Slot:101b,id:minecraft:leather_leggings,tag:{display:{Name:Nuclear Pants,color:10066328}}},{Slot:100b,id:minecraft:leather_boots,tag:{display:{Name:Nuclear Boots,color:10066328}}}]}   But the problem is... how do I make him LOSE this 9 whenever it's not true? Like Conditional command block but opposite, command block that only runs when the one behind him say "false".  I tried to make command block repeating setting HPLUranium to 0, and next to it Chain command block with command showed up there, but it was sometimes changing to 0 for... maybe a tick long when it should be 9, it may cause problems.  Any ideas how to run command if player IS NOT MATCHING DataTag?

I know that you can use exclamation marks in Minecraft commands to check for an entity that does not have a specific tag. For example, you can use /kill @e[type=!Player] to kill all entities except for the player. I have, however, encountered two problems with using exclamation marks that I can't find a solution for.  For my first problem, I've set up a series of command blocks to summon shootable fireballs above the player’s head when a certain item is being held;  /scoreboard players add @a Fireball 1 {SelectedItem:{tag:{display:{Name:"Summon Fireball"}}}} /execute @a[score_Fireball_min=1,score_Fireball=1] ~ ~ ~ /summon Fireball ~ ~2.5 ~ {direction:[0.0,0.0,0.0]} /scoreboard players set @a Fireball 0   I used a comparator and a redstone torch so that the last command would activate when the first command would deactivate, that is, when the player is not holding the item.  The problem is, that when I move far away from the setup, the redstone stops working, leaving me unable to summon any new fireballs. Instead, I'm trying to use a command block to check when anything except for item is being held;  /scoreboard players set @a Fireball 0 {SelectedItem:{tag:{display:{Name:!"Summon Fireball"}}}}   I’ve either put it at the wrong place, or you simply can’t use exclamation marks in NBT tags. Could someone tell me where I should put the exclamation mark, or in the latter case, how I can check for anything except for a specific item?  Further, I’ve tried using exclamation marks to set the score of all entities, including the ones with a blank score, but except for the ones with a score of 2 or higher, to 0;  /scoreboard players set @e[score_arrows_min!=2] Arrows 0 /scoreboard players set @a Arrows 1 {SelectedItem:{tag:{display:{Name:"Rain of Arrows"}}}} /scoreboard players set @e[type=Arrow] Arrows 2 {inGround:1b}   The code does change the scores of entities without scores to 0, but it doesn’t exclude the arrows with a score of 2. Could anyone tell me what I’m doing wrong here?


I cant seem to reduce my c:\ drive with more than 41gb. The partition has 650gb free space, and i am trying to turn 200gb into unallocated space for an ubuntu partition. I use the windows partition manager, and i have tried to do a defrag without any result

I have just bought an HP laptop with Windows 7 (64 bit). It has a 500 GB HDD with three partitions: a small hidden system partition, a 12 GiB HP recovery partition, and a 450 GiB C: boot partition.  I would like to split this large C: partition into two partitions, leaving only 100 GiB for the system, and giving the rest to a new data partition.  Although the Windows built-in Disk Management utility has an option to shrink the bootable partition, it only allows me to shrink it roughly by half, even though only 20 GiB on the partition is used. As far as I understand, system unmovable files lie in the middle of the partition, preventing Disk Management utility to do what I want.    And since new HP laptops don't come with OS installation disks (they only allow you to create recovery disks yourself), I can't just repartition HDD and then reinstall OS.  So, is there a way to shrink the C: bootable partition and preserve Windows 7 working?  P.S.: I have tried to use the third-party  utility, and after shrinking the partition, Windows 7 stopped booting, with a . System recovery didn't work, and I had to do factory recover. Since this is a long process, I would like to avoid doing it again :) So, please, suggest only proven solutions.


Can we find examples of sequences $a_n$ where $a_n$ is divergent and for any $\epsilon > 0$, there exists an $N \in \mathbf{N}$ such that $|a_{n+1} - a_n| < \epsilon$ for all $n \geq N$?  My initial guess is that we can construct some sequence that oscillates between two values whose difference can always be made to be less than $\epsilon$. Something like $a_n = \frac{n}{n + 2}$ for odd $n$, $a_n = \frac{n + 1}{n+2}$ for even $n$. Does this seem right?  If so, I think this is a pretty cool way to satisfy both conditions, but it would be even cooler if we could do it with a monotonic sequence. Is there some monotonic $a_n$ that satisfies both of these constraints? Thanks for your time!

If $a_n$ is a sequence such that   $$a_1 \leq a_2 \leq a_3 \leq \dotsb$$   and has the property that $a_{n+1}-a_n \to 0$, then can we conclude that $a_n$ is convergent?   I know that without the condition that the sequence is increasing, this is not true, as we could consider the sequence given in  to a similar question that does not require the sequence to be increasing.  $$0, 1, \frac12, 0, \frac13, \frac23, 1, \frac34, \frac12, \frac14, 0, \frac15, \frac25, \frac35, \frac45, 1, \dotsc$$  This oscillates between $0$ and $1$, while the difference of consecutive terms approaches $0$ since the difference is always of the form $\pm\frac1m$ and $m$ increases the further we go in this sequence.    So how can we use the condition that $a_n$ is increasing to show that $a_n$ must converge?  Or is this still not sufficient?


Following error output on  apt-get install -f:  E: Could not open lock file /var/lib/dpkg/lock - open (13: Permission denied) E: Unable to lock the administration directory (/var/lib/dpkg/), are you root?

I get this error whenever I try to install programs using the terminal:  home@ubuntu:~$ apt-get install myunity E: Could not open lock file /var/lib/dpkg/lock - open (13: Permission denied) E: Unable to lock the administration directory (/var/lib/dpkg/), are you root?   Also I'm unable to install updates using the terminal.


I use 'htop' to monitor my web server. It's recently quite loaded and the Load average is showing something like this:  Load average: 3.10 2.56 1.63  I searched the web about these numbers and I found an article about it:  In the article, it says if I have 2 CPUs, 2.0 means 100% CPU utilization. And my VPS has two CPUs, so what does 3.1 mean? How could it exceed 100% CPU utilization? And from these numbers, does it mean I should be wary about the loading now? But the performance seems totally fine, and this is a managed VPS, the hosting company has not notified me any warning about it. During day time, Load average always show these high numbers... here is another snapshot while writing.  Load average: 3.03 2.77 1.97 Load average: 0.41 1.29 1.60 <---- 5 more minutes later  So I am wondering how much room left for this site to grow in current configurations? What kind of proactive actions I should take in advance? I don't want to wait until the server bursts. Thanks.

We deployed our new Linux/Exim/Spamassassin mail server on Friday (always a good idea to deploy the day before a long weekend when no admins are around). The load has been hovering around 1.3 on the 15-minute average.  The machine is responsive, and mails are delivered in reasonable time. Can we assume that this is acceptable?  How is a certain amount of load deemed acceptable or not acceptable? What metrics are used?


I am working on a compact manifold $M$ of dimension $m$.  Moreover, I suppose that $M$ is oriented of fundamental class $ [M] \in H_m (M)$.  I want to show that I have an isomorphism  $H_\ast (M, \mathbb{Q}) \cong H_\ast (M) \otimes \mathbb{Q}$.  I figured I'd use the poincaré duality which tells me that $ H^i (M) \cong H_{m-i} (M)$ via the map $ - \cap [M]$ ?  Any help would be greatly appreciated!

What does $H_{i} (S^{n} , \mathbb{Q} )$ equal? Where this denotes singular homology with rational coefficients.


I have done one part. If $d$ divides $n$ then $n=dp$ for some $p$ in $\mathbb{Z}$. Then $x^n -1=x^{dp} -1$. Then $x^d -1$ is a factor of $x^n-1$. So $x^d -1$ divides $x^n -1$.  But how to show reverse part?

Consider the polynomial ring $F\left[x\right]$ over a field $F$. Let $d$ and $n$ be two nonnegative integers. Prove：$x^d-1 \mid x^n-1$ iff $d \mid n$.  my tries:  necessity, Let $n=d t+r$, $0\le r<d$ since $x^d-1 \mid x^n-1$, so, $x^n-1=\left(x^d-1\right)\left(x^{\text{dt}+r-d}+\dots+1\right)$... so,,, to prove $r=0$? I don't know, and I can't go on. How to do it.


How the body differentiate between a foreign and a native protein? Suppose there is a bacteria, it has lot's protein on its membrane, with specific structures. How does our body know it's the foreign protein? How does it know, the particular configuration is native or foreign?

How do the B-cells and T-cells recognize or distinguish a body cell from a foreign particle?  I suspect something to do with this causes Auto Immune Disorders.


$\DeclareMathOperator\E{\mathbb E} \DeclareMathOperator\Var{\mathrm{Var}} \newcommand\R{\mathbb R} \DeclareMathOperator\N{\mathcal N} \DeclareMathOperator\tr{\mathrm{tr}}$Suppose $X \sim \N(\mu, \Sigma)$, where $\mathrm{supp}(X) = \R^n$. We can assume $\Sigma$ to be nonsingular. What is $\E \lVert X \rVert$?  If $\Sigma = \sigma^2 I$, then $\lVert X \rVert / \sigma$ follows a , which has known mean (in terms of a ). That gives in this case $$ \E \lVert X \rVert = \sigma \sqrt{\frac{\pi}{2}} \; L_{{1/2}}^{{(n/2-1)}}\left({\frac {-\lVert \mu \rVert^{2}}{2 \sigma}}\right)\, ;$$ if we further assume $\mu = 0$ then it becomes a chi distribution and $$ \E \lVert X \rVert = \sigma \sqrt {2} \, \frac{\Gamma((n+1)/2)}{\Gamma(n/2)} .$$  In the general case, we have an easy upper bound via Jensen's inequality. Letting $C^T C = \Sigma$ and $Z \sim \N(0, I)$: \begin{align} \left( \E \lVert X \rVert \right)^2 &< \E \lVert X \rVert^2 \\&= \E \lVert \mu + C Z \rVert^2 \\&= \lVert \mu \rVert^2 + 2 \mu^T C \E Z + \E \tr( Z^T C^T C Z ) \\&= \lVert \mu \rVert^2 + \tr( C^T C \,\E Z Z^T ) \\&= \lVert \mu \rVert^2 + \tr( \Sigma ) ,\end{align} where the inequality is strict since we've assumed $\lVert X \rVert$ is not degenerate.  We also have a lower bound in the same way: since $\lVert \cdot \rVert$ is convex, $\E \lVert X \rVert \ge \lVert \E X \rVert = \lVert \mu \rVert$. (I previously had something more complicated here, based on  of the function $z \mapsto \lVert \mu + C z \rVert$, but it gave a worse bound.)  Can we tighten these bounds or, preferably, find an exact expression for $\E \lVert X \rVert$ in the general case? If not, what about the diagonal but non-spherical case, or $\mu = 0$, or other interesting subcases?    There's been some discussion on this site of the distribution of $Y = \lVert X \rVert^2$, particularly  and . If we have the full distribution of $Y = \lVert X \rVert^2$, we may be able to find $\E \sqrt{Y}$. That distribution is gross, though, and analytical answers seem difficult.

Assume you are given two objects whose exact locations are unknown, but are distributed according to normal distributions with known parameters (e.g. $a \sim N(m, s)$ and $b \sim N(v, t))$. We can assume these are both bivariate normals, such that the positions are described by a distribution over $(x,y)$ coordinates (i.e. $m$ and $v$ are vectors containing the expected $(x,y)$ coordinates for $a$ and $b$ respectively). We will also assume the objects are independent.  Does anyone know if the distribution of the squared Euclidean distance between these two objects is a known parametric distribution? Or how to derive the PDF / CDF for this function analytically?


On the  privilege page, we find     Any question, even a deleted question, can be protected and unprotected, subject to the following restrictions:         The question must be at least a day old   A user can unprotect any protected question      What does the latter statement mean? Can any user unprotect a question? Can any other 15k user or mod unprotect a question?  UPDATE: .

The wording on the  privilege page is confusing and would benefit from being clarified. See these questions on  and . Suggested wording from  is to replace this:  Which questions can be protected? Any question, even a deleted question, can be protected and unprotected, subject to the following restrictions:  The question must be at least a day old A user can unprotect any protected question   with the following:  Which questions can be protected? Any question at least a day old, even a deleted question, can be protected and unprotected. A user with the privilege can unprotect any protected question.


I am getting segmentation fault error in this code, but don't know why?  #include <stdio.h>  int main(void) {     char *ptr = "Linux";     *ptr = 'T';      printf("\n [%s] \n", ptr);      return 0; }

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


I'm currently debugging U.I. code and writing articles for an analytical website that I plan to launch by the end of 2016. My concerns in regards to promoting the site is that, if it gains traction, I'm worried about if I'll be able to afford to keep it online. So I personally would like to ask two things:   Can someone explain to me how the hosting costs are charged by Google for the App Engine Cloud Platform? Should I switch to dedicated website hosting for this site, should it gain some attention? I've been monitoring NameCheap, as I have done business with the brand in the past.

This is a "catch-all" question designed to serve as an answer for all questions about choosing web hosting.  Pro Webmasters no longer accepts new questions about how to choose hosting.  All future questions pertaining to finding web hosting should be closed as a duplicate of this question. For more information about this policy please see .    How to find web hosting that meets my requirements?  What we're looking for in answers to this question are the basics about web hosting:   What is web hosting? What is the difference between shared, VPS, and dedicated hosting? How does a content delivery network relate to web hosting? Anything else you feel is helpful in finding a web host.   What we do not want is:   Endorsements or recommendations for specific web hosts We do not want your experience or other subjective information (just the facts please)


I was looking at some questions in a Cambridge text and I reached this question however I am at it for 1 hr and can't seem to get the proof right. Any help ?

After reading , the most popular answer use the identity $$\sum_{t=0}^n \binom{t}{k} = \binom{n+1}{k+1}.$$  What's the name of this identity? Is it the identity of the  modified.  How can we prove it? I tried by induction, but without success. Can we also prove it algebraically?  Thanks for your help.    EDIT 01 : This identity is known as the  because, on Pascal's triangle, when the addends represented in the summation and the sum itself are highlighted, a hockey-stick shape is revealed.


Being born to James and Lily, how can Harry be called a half-blood?  It is said that admission in Hogwarts is given to children of Muggles when they show magical talents as a child, and Lily was no exception to this. This makes Lily a witch, so why is Harry half-blooded?

Harry is a half-blood and Ginny is a pure-blood, so what does that make his children? I've been told it means they are pure-bloods but I can't be sure. What do you think?


I have been trying to read the source code for linux. I started watching a Youtube video which mentioned that character and block devices are different. It didn't say much about why it matters because once something is on the filesystem its the same.

How are character special files and block special files different from regular files in a Unix-like system? Why are they called “character special” and “block special” respectively?


I'm trying to run this Python program with Visual Studio Code: # This Python program must be run with # Python 3 as it won't work with 2.7.  # ends the output with a <space> print("Welcome to" , end = ' ') print("GeeksforGeeks", end = ' ')  But while building I get following output and error messages in console: $ python /home/mrrobot/Documents/Python/loop_while.py   File "/home/mrrobot/Documents/Python/loop_while.py", line 5     print("Welcome to" , end = ' ')                              ^ SyntaxError: invalid syntax  What could be the problem here? How can I fix it?

I have written a Python 3 code, which is:  i = int(input("enter number: ")) print("enter",i)   I'm expecting an output as:  enter number: 5 enter 5   However, I'm getting this:  enter number: 5 ('enter', 5)   What could be the issue? How can I rectify this?


I'm trying to make the code will reverse the order of a list from 'Monday, Tuesday ,Wednesday ,Thursday, Friday' to 'Friday, Thursday, Wednesday, Tuesday, Monday'. Whenever I run the code all that appears is      'System.Collections.Generic.List'1[System.String]'   I think the problem may be that I have declared the elements in the list wrong.  class Program {     static void Main(string[] args)     {         List<string> list = new List<string> (new string[]{"Monday", "Tuesday", "Wednesday", "Thursday", "Friday"});         list.Reverse();         Console.WriteLine(list);         Console.ReadLine();     } }

I frequently find myself writing code like this:  List<int> list = new List<int> { 1, 3, 5 }; foreach (int i in list) {     Console.Write("{0}\t", i.ToString()); } Console.WriteLine();   Better would be something like this:  List<int> list = new List<int> { 1, 3, 5 }; Console.WriteLine("{0}\t", list);   I suspect there's some clever way of doing this, but I don't see it. Does anybody have a better solution than the first block?


can anyone explain why I cannot change the background of an appended element? Thank you so much. (I could not submit the question without writing more text so I am writing more text.)  <!DOCTYPE html>      <title>TEST</title>                      <button>add div</button>

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


I would like to register on other SE sites, without having the accounts publicly linked in my profile (different user names would be nice for that, too). Is this possible?  Potential use-case: Assuming I want to prove my skills to a future employer by showing that I have answered many questions in the related field, they don't need to see that I am spending all my spare time playing D&D.

to  reminded me of something I have been trying to work out how to do for a while.  At the moment I just have one SO/SX account with one OpenID and both work and personal accounts all linked together. This is easy and simple, but means that during the day I get Inbox notifications for things which I only want to deal with out of work hours. Similarly, at home I get notifications for things which I want to deal with at work.  So, I'm considering trying to separate my work and personal Stack Exchange worlds, but I'm not even sure if this is possible now the accounts are all linked, without creating all new SX accounts.  I suspect that at the very least I will have to create a new OpenID with a different OpenID provider, add this openID to all of my personal accounts, update my display names on all of those accounts and then remove the original OpenID from them, but what else might I have to do?  Will switching them to another OpenID be enough? Or will the accounts all still be linked together? Has anyone done this, and if so, are there any issues I need to consider?  Note, I'm aiming for the two sets of SX sites to be completely disjoint. No site in my professional account will also be in my personal account and vice-versa, so no problems with appearing to be a sock-puppet. Also, obviously, I don't want to have create entirely new accounts for the SX sites I consider personal and have to start acquiring rep on them from scratch.


I have a Sandbox solution webpart1 that receives a absolute URL in the webpart settings's section.  Due to native limitations of sandboxes solutions, I'm looking for a C# - code for encode an absolute URL without using HttpServerUtility and related/pre-built classes.  I already search and try the following  and also this , but I can't understand or get a more legible code or approach for create a more sutile for my specific situation.    1 I'm working on a sandboxed solution that I was developed a few months ago and change sandboxed solution to Apps/Add-ins is not valid in this case.

Is there any function that converts an escaped Url string to its unescaped form? System.Web.HttpUtility.UrlDecode() can do that job but I don't want to add a reference to System.Web.dll. Since my app is not a web application, I don't want to add a dependency for only using a function in an assembly.  UPDATE: Check  about the same issue.


Since 19.04 will only have support til January 2020, how would I upgrade to the next version (19.05 or whatever they label it)? Would I be able to run a terminal command or would I need to reinstall the whole OS from a bootable thumbdrive and save all my data to another storage device first?

What are the different ways I can use to upgrade Ubuntu from one release to another?


I am using the invisible option in my presentation, but I would like to also have a print version where the invisible option is activated. When I use the handout mode, only the first version of each slide is printed (that is, the items becoming visible later are not displayed). I don't want to manually remove all the invisible instances. Is there a method to deactivate all the invisible instances?  Thanks and here is a MWE.  \documentclass[handout, english]{beamer}  \begin{document}  \begin{frame}{Questions:}   \begin{itemize}       \invisible<1>{\item[A.] Question 1.}       \pause\invisible<-2>{\item[B.] Question 2.}        \pause\invisible<-3>{\item[B.] Question 3.}    \end{itemize} \end{frame}  \end{document}

I am preparing lecture slides for a class. I would like to hide some of the slides from the students. As an example, I would like to be able to compile students.pdf which has only student slides 1 and 2 (i.e., "teacher slide" is hidden); but teacher.pdf which has all three slides.  \documentclass{beamer}  \begin{document}  \begin{frame}{Student slide 1} blah blah blah \end{frame}  \begin{frame}{Teacher slide} secret stuff not to be shared with students \end{frame}  \begin{frame}{Student slide 2} blah blah blah \end{frame}  \end{document}   How would I do this in beamer? In a regular document, e.g., article, I would use the comment environment.  I feel that the approach in  is overkill for my needs.


Note that the difference between this question and a related question () is that the authors in my question are fully aware of our work, whereas, in the related question, the authors were not aware of OP's work.  A recent paper did not cite our very relevant work.   There are significant overlaps among the scopes of the papers, and one of the important figures and the related conclusion are almost identical.  The leading author of the paper in question has been informed about our work even before we submitted the paper. I've asked for a reason for not mentioning it, and the answer was that our paper was noticed during the revision of the paper, and the authors do not feel obliged to mention it.   Is it OK to not mention a paper because of ``seeing it too late?'' Regarding this: does the date of submission/acceptance play a role?  Our publication date is before their submission date.

Before I start my PhD I worked in a group that researched on the application of a particular area to a particular domain. No other research group published work in this area+domain. So I can safely say that my previous group is among the first if not the first to research in the application of that particular research area on that particular domain.   Now I find a paper published at an IEEE conference where a major part of its contribution is introducing a system that does something I did in a previously published paper, and it does it in the exact same way and even gives it the same name!   I know that some conferences could accept non-novel contributions. Also the paper talks about other aspects so I find it perfectly fine that this paper has been accepted and published. But what I find annoying is that they do not cite my relevant work which was published a year earlier and fairly visible online; A simple (unpersonalized) search on Google would show up at least three links to my work.   This is the second time I face this problem, but the first time this happened it was actually by the same group I worked with before; they published a related paper without citing the paper I co-authored with them.   I try to give the maximum possible exposure to my work by making it publicly available on my personal website, ResearchGate, making sure it appears on Google Scholar, etc..   I find it worrying that my work misses citations, I am keen on improving my h-index and citations count. So my questions are:   Is there anything I can do regarding that already-published paper?  Is there anything I can do to prevent this from happening in the future?


I want to know if there's a quick and easy way to copy and paste faces or geo in general like I could in modo. I literally would press control C, Control v and paste or copy to my hearts content quickly. Is that possible in blender?

Hi im new to Blender and i want to know when im in edit mode if i can copy or cut a selections of polygons faces and paste to another mesh.  Thanks in advance for any help


I apologize for this very basic question.      I've downloaded the current versions of  l3kernel.zip and l3packages.zip, but have no idea how to install them.      As far as I can tell, there is no information in the zip files about how to do this.    Could anybody advise please?

I need to install the xpatch package to make changes to my biblatex setup. The readme file in the install package simply says to run “latex xpatch.ins.” I've moved the xpatch folder (including xpatch.ins and xpatch.dtx files) to the /usr/local/texlive/2011/../texmf-local/ folder. When I run the command above, I get the output Generating file(s) ./xpatch.sty  ! Cannot find file xpatch.dtx. \readsource ...ot find file \uptospace #1 \qStop }                                                   \else \processedLines \z@ ... l.34 ...xpatch.sty} {\from{xpatch.dtx} {package}}}   I've checked, and the .dtx file is in the folder. Any ideas what the problem is?


Let $X$ and $Y$ be square integrable random variables s.t. $E[X|Y]=Y$ and $E[Y|X]=X$. Prove $P(X=Y)=1$.  Furthermore, when the condition changes to $X$ and $Y$ are integrable, show that the conclusion is still true.  So far, I only know $E[X]=E[Y]$, which means $E[X-Y]=0$. So, that means I need to show $var(X-Y)=0$, right? Any hints would be appreciated.

Assume that $X$ and $Y$ are two random variables such that $Y=E[X|Y]$ almost surely and $X= E[Y|X]$ almost surely. Prove that $X=Y$ almost surely.   The hint I was given is to evaluate: $$E[X-Y;X>a,Y\leq a] + E[X-Y;X\leq a,Y\leq a]$$  which I can write as: $$\int_A(X-Y)dP +\int_B(X-Y)dP$$ where $A=\{X>a, Y\leq a\}$ and $B=\{X\leq a,Y\leq a\}$.  But I need some more hints.


I know there must be something unmathematical in the following but I don't know where it is: \begin{align} \sqrt{-1} &= i \\\\\ \frac1{\sqrt{-1}} &= \frac1i \\\\  \frac{\sqrt1}{\sqrt{-1}} &= \frac1i \\\\  \sqrt{\frac1{-1}} &= \frac1i \\\\  \sqrt{\frac{-1}1} &= \frac1i \\\\  \sqrt{-1} &= \frac1i \\\\  i &= \frac1i \\\\  i^2 &= 1 \\\\  -1 &= 1 \quad !!? \end{align}


At the beginning the villain is lured to a meeting where an attempt is made on his life. Another character fired a projectile out of a cane which wounded him but he was able to magic up a shield or something to avoid death. There's also a bit later on where our protagonist (young male) has sex with a woman. There are elements of BDSM. She ties him up if I recall correctly. I think him and his companions are guests at her home.

I read the book several years ago (2005-ish?).  I don't think it was new at the time, but it is at least that old.    Here's what I remember:  There are two large empires, ruled by nearly-omnipotent wizards.  Between the two empires, the land is divided into many small countries.  There is a resistance movement against the wizards, but they know they need to take out both at exactly the same time so that the other one doesn't take over everything.  The main character (narrator?) has the ability to recall details perfectly (like photographic memory, but also for sounds, etc).  At one point, he's working with a group of traveling musicians.  He is a young-ish (late teen?) male.        There's one scene where one of the characters has faked his own death to try and attack one of the wizards.  During this scene, the main character (narrator?) is hiding in the attic, eavesdropping.  Eventually in this scene, the one person who knows he's there calls him down to share what he learned by listening.  In the big final battle, there are a bunch of lesser wizards that pretend to help the one wizard to force the other wizard into depleting himself in one giant attack.  They back out at the last minute and let the wizard they were helping get blasted.  There was some other story arch that followed a lady that was trying to work her way into the trust of one of the wizards.  She succeed, but ends up falling in love with him by the end.   Not part of the story, but in the notes from the author (preface?), he mentioned patterning the geopolitics of the world after Italy (during the Renascence or middle ages or something), where there were a bunch of smaller countries/kingdoms/lands that would align themselves with this or that larger power for short-term gain rather than uniting and throwing off all the foreign powers.


I am having a hard time solving this equation. A know the solution from WolframAlpha, but the setp-by-step solution is not available.  $$z^2+(1+i)\,\overline z+4i=0$$    How can I solve this?

Consider the following equation, where $z \in \mathbb{C}$, $i$ is the imaginary unit and $\overline{z}$ is the conjugate of $z$:  $$ z^2 + (1+i) \overline{z} + 4i = 0 $$  What is the method to deal with equations such as this?  I have tried various things: I tried substituting $z$ with $a+bi$, or $re^{i\theta}$, hoping I'd notice something. I thought I could somehow transform this into a quadratic equation, but I couldn't. Now I have no idea what to try. I'd appreciate ideas greatly.


These days, I'm reading "Humans of New York", and find some tricky...Grammar(?). This sentence below including conditional is one of them.  “I can’t stand moral absolutism. You know, there’s always that guy who wants to point out that Martin Luther King cheated on his wife– as if he obviously couldn’t have been a great person if he did something like that. Or someone will bring out an inspirational quote, and get you to agree, and then inform you that Hitler said it. As if a good thought couldn’t come from Hitler.  I'm confused what "as if” clause means. I've learnt that the tense of the "as if” clause depends on its main clause's tense. But it seems there is no main tense of the as if clause.  Should I think like: people thinks or point out as if he obviously couldn’t have been a great person if he did something like that ? which means "These days some people think like Martin Luther King cannot be a great person"  Or should I understand that like: some people think like "if he did something like that, he couldn't(past) be a great person.   it is quite tricky for me. I'll be looking forward to your replies. Thank you! full passage from

Is it grammatically correct to use an indicative verb after "as if", or "as though" for that matter?        I've heard someone say: "He walks as if he is drunk."  Would there have been any difference if he had said "He walks as if he were drunk."?   A second example might be:        It looks as if it is going to rain.   It looks as if it were going to rain.


Someone gave me more peppers than I can eat and I'd like to freeze them for at least a few months, a year at most. Am I wasting good peppers by doing that?

I have some  chilli peppers bought from the local supermarket.    Aren't they lovely?  :)  Well, unfortunately, my local supermarket (I think the only one in the UK that stocks them) doesn't always have them in stock, so when they do appear on the shelves, I quickly stock-up on them.  Storing them in the fridge, they'll last maybe a week or so before starting to deteriorate.  My question is, can these chili peppers be frozen and, if so, will freezing them have any "negative" effects ?  I buy these particular peppers for their heat (and also their great smoky flavour), so I'd hate for either the heat or the flavour to be negatively impacted if they were frozen.


When using Ubuntu Software Center and Apt-Get to install Youtube to MP3 I am receiveing these errors:   the following packages have unmet dependencies:  youtube-to-mp3: Depends: libc6 (>= 2.14) but 2.19-0ubuntu6.6 is to be installed                 Depends: libgcc1 (>= 1:4.1.1) but 1:4.9.1-0ubuntu1 is to be installed                 Depends: libqt4-declarative (>= 4:4.7.0~rc1) but 4:4.8.5+git192-g085f851+dfsg-2ubuntu4 is to be installed                 Depends: libqt4-network (>= 4:4.6.1) but 4:4.8.5+git192-g085f851+dfsg-2ubuntu4 is to be installed                 Depends: libqtcore4 (>= 4:4.8.0) but 4:4.8.5+git192-g085f851+dfsg-2ubuntu4 is to be installed                 Depends: libqtgui4 (>= 4:4.8.0) but 4:4.8.5+git192-g085f851+dfsg-2ubuntu4 is to be installed                 Depends: libstdc++6 (>= 4.6) but 4.8.2-19ubuntu1 is to be installed                 Depends: libav-tools (>= 4:0.8.6-0ubuntu0.12.04.1) but 6:9.16-0ubuntu0.14.04.1 is to be installed                 Depends: libavcodec-extra-53 (>= 4:0.8.6ubuntu0.12.04.1) but it is not going to be installed                 Depends: libmp3lame0 (>= 3.99.3+repack1-1) but 3.99.5+repack1-3ubuntu1 is to be installed

Occasionally, when I'm installing stuff, I get an error like the following:  Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation:  The following packages have unmet dependencies:  package1 : Depends: package2 (>= 1.8) but 1.7.5-1ubuntu1 is to be installed E: Unable to correct problems, you have held broken packages.   How can I resolve this?


Supposing we have a method that executes logic dynamically depending on the SObject type like the following one:  public class TestDescriber {      public static void callMeManyTimes(SObject record) {          String sObjectName = record.getSObjectType().getDescribe().getName();          ...     } }   Assuming this method would be called multiples times per transaction and many of those calls will involve the same SObject type, will the getDescribe() calls be expensive enough to justify having a static cache in the class to avoid calling the describer multiple times?  public class TestDescriber {      private static Map<SObjectType, String> namesPerSObjectType = new Map<SObjectType, String>();      public static void callMeManyTimes(SObject record) {          String sObjectName = getSObjectName(record.getSObjectType());          ...     }       private static void getSObjectName(SObjectType sType) {          if (!namesPerSObjectType.containsKey(sType)) {             namesPerSObjectType.put(sType, sType.getDescribe().getName());         }          return namesPerSObjectType.get(sType);     } }

Are there any governor limits, or considerations that I should be aware of when using Apex Describe methods?  So for example, the author of this blog post uses the structure below to get the record type instead of doing a soql query.     //Generate a map of tokens for the sObjects in your organization Map gd = Schema.getGlobalDescribe();  //Retrieve the describe result for the desired object DescribeSObjectResult result = gd.get('Account').getDescribe();  //Generate a map of tokens for all the Record Types for the desired object Map recordTypeInfo = result.getRecordTypeInfosByName(); system.debug('RECORD TYPES:' + recordTypeInfo);  //Retrieve the record type id by name String recordTypeId = recordTypeInfo.get('RECORDTYPE_NAME').getRecordTypeId();


My question related kind of to asking what the shape of the universe is. Say a hypothetical alien civilization built an faster-than-light spaceship. If they keep flying would they end up where they began? ie space itself is curved...or would they hit some invisible barrier?

What is the exact shape of the universe? I know of the balloon analogy, and the bread with raisins in it. These clarify some points, like how the universe can have no centre, and how it can expand equally everywhere in all directions. But they also raise some questions, like if you are on the surface of a balloon and travel in 1 direction, you will eventually return to your starting point, is it possible our universe have this feature?  If it has, or had, would this be a symmetry of sorts ($\psi(x)=\psi(x+R)$), and as such have a conserved quantity associated with it (by Noether)? Assuming "small curled up dimensions" wouldn't these dimensions have this type of symmetry, what are the associated conserved quantities? Is it known exactly what the geometrical shape of the universe is? (on a large scale) (I am not talking about only the observable universe). How does one define the "size" of a dimension, is this scale only applicable to curled up ones? Is it possible to describe to a layman the shape of the universe without resorting to inept analogies?


If an institution tells you, look here is an admission offer, and you should let’s know if you accept it or reject it by the day after tomorrow. Meanwhile, you are still waiting for a word from other places that you applied to.  So, what is the most diplomatic and tactful way to communicate “Hey, I can not  accept/reject the current offer right now. That's because i am waiting to hear back from other schools, and I need time to decide upon that”? At the same time, I do not want to sound like careless about the offer.

I have been offered a PhD position with full funding from my backup university, however they gave me a deadline of April 5th to either accept or decline their offer. I am still waiting for replies from other more prestigious universities. What should I do?


I'm not a native english speaker and I don't know the name of the  symbol surrounding G in the picture (to be far I don't know that in my mother tongue).     I need to use it in math mode in a TeX document. Does anyone know how?

I know what my symbol or character looks like, but I don't know what the command is or which math alphabet it came from. How do I go about finding this out?


we have a managed package and the function call_out is making a http request. In the package we can use this code to create a test for it:      Test.startTest();     Test.setMock(HttpCalloutMock.class, new Mock());     call_out(curid);     Test.stopTest();   however when we installed this package in another org, we want to use this function again, however in test, it fails.      Test.startTest();     Test.setMock(HttpCalloutMock.class, new package.Mock());     package.call_out(curid);     Test.stopTest();   it gives us this error: Methods defined as TestMethod do not support Web service callouts  what is wrong? and whether it is possible to test it in target org?  is going around it using Test.isRunningTest() the only possible way?

We have a managed package that has executes a HTTP callout from a trigger that calls a future method on the insertion of new records on a particular object.  We have a managed package extension that inserts records on the managed package object which invokes a callout through the managed package.  The problem is in test classes in the managed package extension.  The test classes are failing because it is inserting these records which cause a callout through the managed package.  Normally you would just implement Test.setMock(HttpCalloutMock.class,..) inside the Test.startTest() logic however it is not working.  From what I have read you must implement the Test.setMock method from within the managed package that is actually doing the callout.  Has anyone dealt with this before?  Is the solution as simple as building in logic in the managed package trigger to recognize that it is being executed from a managed package extension and to then invoke Test.setMock from the trigger prior to the attempted callout?  For example:  Option 1:   Managed Package Extension inserts new records  Managed Package Extension sets a global variable value inside of the Managed Package Managed Package trigger fires and looks at the global variable and implements Test.setMock since it was invoked from the managed package extension.   Option 2: Add logic in the trigger to always invoke Test.setMock when it is running in a test context (Test.isRunningTest()).  Thoughts?


I recently saw a few instances of the wrong site icon showing up to certain questions in the "hot network questions" feed. Here are a few of the more, er, interesting ones:        The Workplace SE seems to be disproportionately affected, and hovering over the site icon displays the correct site name (all of the above are actually on Worldbuilding).  I can't provide steps to reproduce, but my environment is Firefox 61.0.1 on Ubuntu 16.04.

I see the same problem has occurred in the past, the most-linked one being   Is this happening for anyone else?   I've marked the icons I could recognize as incorrect.  This exists on every page, is on both chrome and firefox (from Ubuntu 16.04), and persists after hard-refreshes in each.  Edit: The icons in Meta's Hot Network Questions tab appear to be consistently accurate. Every other page I checked (including Unix, Workplace, English Language & Usage, Money, and Sci-fi) have a handful of incorrect ones, even for some of the same questions that are displayed correctly in Meta.  Further note: if it matters, the icons are also incorrect in the drop down community-search feature on the right end of the header. Again, they appear correct on this Meta page, and incorrect on all other pages I've checked. Some of the ones that are consistently incorrect:   computational science constructed languages movies and TV raspberri pi rpg russian language science fiction and fantasy sitecore skeptics super user latex workplace   That distribution seems skewed, but I may just be disproportionately familiar with the sites at the end of the alphabet. Many others could be wrong, those are just the ones I could recognize.    Last edit: apparently my Google skills were lacking -  was asked an hour prior.


The title says it all really. I just want to find out whether I need to know web code to be a good graphic designer.

As a web developer, both front-end and back end architect, I work with many different designers and sometimes find it frustrating working with design comps where no thought was put into how to accomplish the design in basic CSS and HTML.  On the other hand as a developer I'm expected to be able to produce code from any design.  Do web designers need to know basic modern CSS and HTML techniques?  Why or why not is this important for a well rounded web designer?  Some general thoughts:   Front end web developers should be skilled enough to code up any design. Web designers should have an understanding of how users will actually interact with their design. Design shops would rather have designers design and leave all the coding up to the developers.


The Embassy of Finland gave me a visa valid from 10.10.2018 to 29.11.2018, but the  number of days is 50. When will I have to leave Finland?

I'm from Tunisia and I got a Schengen visa from the Austrian Embassy for  28 days, the “duration of stay”, and the number of entries is 1. But the validity of the visa is from 02/08/2015 to 13/09/2015.  Do I have to stay only 28 days, for example from 02/08/2015 to 29/08/2015 or can I stay there until 12/09/2015 ?  And if I have got to stay only 28 days, then can I choose the days of stay, that's mean can I stay in Austria for example from 09/08/2015 to 05/09/2015?


In trying to solve the problem stated below, I'm not sure how I can find the total number of combinations possible?  "Find the probability that 3 vowels and 2 consonants are chosen when five letters are chosen at random from the word CALCULATOR"  In general, how would I find the total number of combinations of choosing a group of n objects from a set of more than n objects where there are repeated objects in that set?

How many words can be formed, each of $2$ vowels and $3$ consonants from letters of the word "DAUGHTER"  What my textbook has done: it has first taken combinations of vowels and then consonants then multiplied them altogether. Now for each combination of words they can be shuffled in $5!$ ways, so multipliying by $5!$ we get the required answer.   My question is: why has the book  used combinations instead of permutations while selecting vowels and consonants?  Thanks.


For example, will a  kill a  that just came out?

When I cast a spell or activate an ability, or a triggered ability triggers, it goes on the stack, and then some time later, it resolves. Is it still on the stack while it is resolving? If not, is it some other zone or somewhere else entirely? If it's a spell, when does it go to the graveyard?


I already have Ubuntu installed and I wish to add Windows 10 in a dual boot environment.  All the guides I can find only give examples of how to add Ubuntu to an existing Windows 10 System. Any advice?

I have Ubuntu on my laptop. Now I want install Windows 7 in a dual-boot. How can I do this? I can't lose my Ubuntu files, and I'm afraid that I might break . Go  for UEFI only!


My Stack Overflow addiction is beginning to hurt productivity. Have you ever found yourself in this situation regarding some site? Any advice on how to deal with the problem?

The downside... It seems like the type of question that would be a duplicate - but I don't see any, so I'll ask anyway. I'm finding it difficult to not visit Stack Overflow for any significant amount of time. I wake up in the morning, and check Stack Overflow at 5:30 am. I check it before I close my laptop to head off to work. I check it when I connect at the office. I check it throughout the day. How do I break the combination? The upside... I have explored more methods of accomplishing tasks than ever before after having registered here and viewing some questions. I've been introduced to many new tools, practices, and theories about development that I can honestly say make me more confident as a developer.


Are these following exercises equivalent?   Let $\mathbb R$ be an extension of $\mathbb Q$.Find a polynomial p(x) in $\mathbb Q$[x]-{$0$} such that p($\sqrt2$+$\sqrt3$)=$0$.   and  2.Find the minimal polynomial of $\sqrt2$+$\sqrt3$ over$\mathbb Q$[x]

I have no idea how to do this.  To find the minimal polynomial of say $\sqrt2 + \sqrt3$, we need to find the monic polynomial $p \in \mathbb Q$ (correct if I am wrong but monic polynomial is when the coefficient of the highest degree term is $1$) of the smallest possible degree such that $\sqrt2 + \sqrt3$ is a root of $p$.  If we let $u=\sqrt2 + \sqrt3$ then $u ^2 = 5+ 2 \sqrt6 \iff u^2 - 5 = 2 \sqrt6 $, then $(u^2 - 5)^2=24 \iff u^4 -10u^2 +1=0$  All I did was keep squaring until all of the irrational terms go away. But what next? Am I doing this correctly and what do we do next if I am?


For a circle of radius $r$, if I draw a regular polygon with $n \geq 3$ sides (equilateral triangle, square, pentagon, etc.) contained inside the circle, such that each vertex intersects the circle... What is the area of the polygon? (both in terms of $r$, and as a ratio of the circle's area $\pi r^2$) I assume that ratio $\to 1$ as $n \to \infty$

Calculating the area of a polygon with equal sides inscribed in a circle with radius r.By dividing the polygon into congruent triangles with central angle, show that: $$A_{n} = \frac{1}{2}n r^2 \sin\left(\frac{2\pi}{n}\right),$$  How can I use Darboux sums to do so, could anyone give me a hint please?


I have a question about a sum when calculating moment generating function.  The question is : "Find the moment generating function for each of these two random variables. (i) $X$ = outcome a die toss, $p(x) = P[X= x] = \frac{1}{6}$ for $x = 1,2,3,4,5,6$. I don't understand how the sum in the answer $e^t \cdot \frac{1}{6} + e^{2t} \cdot \frac{1}{6} +...+ e^{6t}\cdot \frac{1}{6} = \frac{1}{6}e^t\frac{e^{6t}-1}{e^t-1}$.  Why doesn't it work to have this as the sum of a finite geometric series with the common ratio being $e^t$?

Possible Duplicate:          Proof to the formula  $$1+x+x^2+x^3+\cdots+x^n = \frac{x^{n+1}-1}{x-1}.$$


I don't understand this sentence:     All round him the long scar smashed into the jungle was a bath of heat.    What does it mean? Can a scar be a bath of heat?

A line from William Golding's The Lord of the Flies:     All round him the long scar smashed into the jungle was a bath of heat.   Is it just me or does the sentence seem grammatically off?


Is it reasonable to choose a regression model with a value of 0 for the intercept when this makes logical sense? For example, I am trying to model a physical geometric relationship, and I know that when x = 0, y = 0. Yet the consequences of choosing such a model are that the R^2 value becomes significantly higher (it changes from 0.67 to 0.95). When I examine the residuals for both models, I can see that they both have roughly the same distribution. The origin option is shown in Figure 1 and non-origin in Figure 2.      How should I decide which model is more appropriate?   I've read through some of the other  and answers on this topic but I haven't seen any discussion about physical limitations providing the basis for the choice.  My dependent variable here is an area calculation, and my independent variable is a measurement of one dimension of the shape. For example, if I had a set of rectangles of length l, width w and area A, I am trying to model the relationship between l and A. However, as these are not perfectly regular there is some variation in the relationship but it appears to be linear in several cases, and based on some of the comments,  not so much in this particular instance.

I am running linear regression models and wondering what the conditions are for removing the intercept term.   In comparing results from two different regressions where one has the intercept and the other does not, I notice that the $R^2$ of the function without the intercept is much higher. Are there certain conditions or assumptions I should be following to make sure the removal of the intercept term is valid?


Let $R$ be a ring, and let $C$={$x\in R: xy=yx$ for all y in $R$}  Prove that if $x^2-x \in C$ for all $x$ in $R$, then $R$ is commutative.  There's a hint given in the book that says "Show that $xy+yx \in C$ by considering $x + y$, and then show that $x^2 \in C$".  I manage to show $xy+yx \in C$, but don't really know how to show $x^2 \in C$.   Any help is appreciated, thanks!

Let $R$ be a ring such that for all $a,b$ in $R$, $(a^2-a)b=b(a^2-a)$. Then $R$ is commutative.   I am having difficulties making the connection. Any help would be appreciated.