I am having a lot of problems in understanding my professor's notes on Set Theory. The main problem is: they are basically a collection of proven results, and do not provide context/ motivation/intuition about what is going on. Some proofs are also elliptic, but it is not quite the problem. The fact is I am getting to hate this subject that should be so profound and foundational. Mainly, it seems to me a collection of very technical results. Our course includes: axiomatics of set theory (ZF and MK mainly), ordinals and cardinals, recursive constructions and the Von Neumann hierarchy, cardinal arithmetic (also in a choiceless environment) cardinal exponentiation, cofinality, regular and singular cardinals, stationary and club sets. I am quite ok up to Von Neumann hierarchy, then I really get lost. I repeat, technical results and profound ones really get mixed, and the impression is to be learning a list of unintuitive facts rather than understading: I mean, the reasoning appers highly destructured. This is the main fault.  If someone could suggest me some coincise notes or textbook I would be eternally thankfull. I am not criticizing no one, but I am a beginner and I am not getting any meaning here.

I am looking to expand my knowledge on set theory (which is pretty poor right now -- basic understanding of sets, power sets, and different (infinite) cardinalities). Are there any books that come to your mind that would be useful for an undergrad math student who hasn't taken a set theory course yet?   Thanks a lot for your suggestions!


Could anyone help with proving the following lemma, please?  Let: $n\in \mathbb{N}$, $Z_{n}^{*}:=\{k\in\mathbb{N}: k\in\{1,\dots,n\}  \wedge \space   GCD(k,n)=1\}$. Then: $\forall n\in \mathbb{N} \space \forall  p \in \mathbb{P}: |Z_{p^{n}}^{*}|=p^{n}-p^{n-1}$  I tried to prove this by induction with respect to $n$, but I stuck at general case. I know how induction works, but I can't see how to do main point...

Are there any short, elegant proofs known for the identity $\varphi(p^{k})=p^{k}-p^{k-1}$ ? (Here $\varphi$ is Euler's totient function and $p$ is a prime.)  The standard combinatorial proof goes like this:      In the set $\left\{ 1,2\ldots,p^{k}\right\} $ there in total $p^{k}$   number. Split this set into $p$ subsets $\left\{ 1,\ldots,p\right\} $,   $\left\{ p+1,\ldots,2p\right\} \ldots$ Then in each of these sets   there is only one number -- namely the one of the form $m\cdot p$ for   some suitable $m$, that divides $p^{k}$. There are in total   $\frac{p^{k}}{p}=p^{k-1}$ such sets, so in total $p^{k-1}$-many number from   $\left\{ 1,2\ldots,p^{k}\right\} $ divide $p^{k}$. Thus   $(p^{k}-p^{k-1})$-many numbers are coprime to $p^k$, which proves the identity. $\square$   (A different proof that is often encountered assumes that we know that  $\varphi(n)=n\prod_{p\mid n}(1-\frac{1}{p})$, from which our identity  follows immediately.  But this is actually a longer proof, since proving the auxiliary identity is longer.)  Surprisingly, I would have imagined that there are tons of wildly different proofs of such a basic fact out there, but a preliminary internet seach as well as book skimming returned only (minor variations of) these two proofs.  EDIT The present proofs are more or less reformulations (very polished with details hidden as good as possible - but still reformulations) of my first proofs. What I'm looking for are more radically different approaches (if these exist).


Will light naturally tend to align itself to magnetic flux lines?

I'm struck with two competing ideas on the question in the title.  :   How far can a magnetic field bend light?   A: Unfortunately, the path light takes is not affected by the presence of a magnetic field. Light itself is composed of an oscillating electric and magnetic field, and one very important property of electric and magnetic fields is what we call linearity. That is, if you have two sources of electric and/or magnetic fields, you can predict what the combined field is just by adding the two source fields together. The two fields don’t change each other at all.   (Answer #1)    Does electric charge affect the space time fabric? If so, why?    A: [See link. Rather, see both links if you must.]  I'm more inclined to consider the latter question and answer as the correct interpretation. Anyway, if anyone could help me out with this conceptualization that would be great, thanks.


I am looking for a word to describe the products or solutions to problems that are made at a very low cost, often home-made or by a very small organization. The products or solutions perform their function very well, but lack the aesthetics found in major brands or finished products at retail stores designed just for that purpose.  Examples include:   hand bags that are reasonably strong and functional, only a lot less attractive compared to expensive ones a home-made camera mount built by a few pieces of wood, glues and rubber bands blocking sunlight from the window with aluminum sheets   EDIT: There have been a few suggestions with "hack" and "improvise". However I do not wish to convey the meaning that the solution is temporary or rushed under time pressure. The key point is low cost and sacrificing elegance, decorations which are unnecessary to make it functional. The goal is cost-effective. I think "utilitarian" comes pretty close.

I'm writing a technical document, and I need to convey the fact that we had to find a non-optimal, non-orthodox solution that was adopted as the best available alternative (a hack) to solve an otherwise problematic issue.  Please note that I refer to the positive meaning of "hack", and not at the negative one, as clarified in .  To me, "escamotage" doesn't sound really appropriate in a technical document, and "hack" seems a bit informal and not very "technical".  Is there a construction that can help?


I'm really excited by an opportunity to watch Leonard Susskind's course "The Theoretical Minimum". However, I couldn't find any physics problems on , and I'm a little bit wary of just watching videos. I want to think on some problems during that.  Maybe there's a good collection of Physics problems on related themes, so I could try them between the videos?

Need to brush up on my late-undergrad and early-grad physics and was wondering if anyone can recommend books or lecture notes (hard copy, or on-line) that also have solutions.   Two that I have come across are:  Princeton Problems in Physics with Solutions - Nathan Newbury  University of Chicago Graduate Problems in Physics with Solutions - Jeremiah A. Cronin  Spacetime Physics - Taylor & Wheeler (favorite book on special relativity; has a lot of problems with solutions at the back; a lot of the problems really enforce the material and discuss paradoxes)  If possible, please also provide a reason why you like the books as opposed to just listing them.


I have a large spreadsheet with possible duplicate rows. However I only care about matching some of the columns as highlighted in yellow below.    So my question is: How can I search for duplicates in only particular columns from a row and when I find a match, highlight them?

Example, this is the data in Excel:  1 2 2 2 3 4 3 4 3 3 2 2 2 2 1 2  The rows which have consecutive duplicate column-pair values (in bold font) should be highlighted:  1 2 2 2 3 4 3 4 3 3 2 2 2 2 1 2


Fifteen lines are drawn in a plane such that four of them are parallel.What is the maximum number of region in which the plane is divided?......Tried to solve but did not get any idea

$15$ lines are drawn in a plane such that $4$ of them are parallel.  What is the maximum number of regions into which the plane is divided?  How many of the regions have finite area (bounded)?    My Attempt  The total number of regions that $n$ lines divides the plane into, is given by $\dfrac{n(n+1)}{2} +1$. So I got $\dfrac{15\cdot16}{2} + 1 = 121$. But $4$ lines are parallel. So instead of getting $\dfrac{4\cdot5}{2} + 1 = 11$ regions, we only get $4 + 1 = 5$ regions. So the actual number of regions are $121 - 11 + 5 = 115$  A single line divides the plane in $2$ infinite (unbounded) regions. So $15$ lines can give $30$ infinite regions. But $4$ of them are parallel. So we get only $5$ infinite regions instead of $8$. So the actual number of infinite regions are $30 - 8 + 5 = 27$. Hence, the total finite (bounded) regions are $115-27 = 88$.   While i got the answer to the second question as $88$ the original answer is $85$. Can someone please tell me where I am going wrong? Also if there is any better approach please let me know.


gcc   -c  hello.c   doesn't work, there is no .o file generated. And nothing warnings. My system is ubuntu 16.04, this happened after system upgrade. and gcc -v show forllow messeage:  Using built-in specs. COLLECT_GCC=gcc COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/5/lto-wrapper Target: x86_64-linux-gnu Configured with: ../src/configure -v --with-pkgversion='Ubuntu 5.4.1-2ubuntu1~16.04' --with-bugurl=file:///usr/share/doc/gcc-5/README.Bugs --enable-languages=c,ada,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-5 --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-libmpx --enable-plugin --with-system-zlib --disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-5-amd64/jre --enable-java-home --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-5-amd64 --with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-5-amd64 --with-arch-directory=amd64 --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --enable-objc-gc --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu Thread model: posix gcc version 5.4.1 20160904 (Ubuntu 5.4.1-2ubuntu1~16.04)    hello.c is forllowing:  #include <stdio.h>  int main() {     printf("Hello, world!\n");     return 0; }

I've been having a problem with compiling.   I used the following test C code below and saved it as test.c in Home folder.  #include <stdio.h> int main() {   printf("Bruh!");   return 0; }   When I run in terminal the code   gcc test.c -o test   I get  nothing.  Thank you


I want to get permutations for two numbers upto n repetitions in python code.  Example:  a = 10, b = 100 and given n = 3  Now I want output like:  (10, 10, 10), (10, 10, 100), (10, 100, 10), (10, 100, 100), (100, 10, 10), (100, 10, 100), (100, 100, 10), (100, 100, 100)   I tried itertools permutations but wont helpful. Anyone please give me a solution.

How do you generate all the permutations of a list in Python, independently of the type of elements in that list?  For example:  permutations([]) []  permutations([1]) [1]  permutations([1, 2]) [1, 2] [2, 1]  permutations([1, 2, 3]) [1, 2, 3] [1, 3, 2] [2, 1, 3] [2, 3, 1] [3, 1, 2] [3, 2, 1]


I have a set of 4000 records,I am only allowed to retrieve 300 records.  I am doing pagination on the resultset, but since we are limiting the result to 300 i am getting different results for each DB hit.  So is there any option to get the ordered first 300 of the 4000 records, without getting the entire result of 4000 records.  Below is the query:  select id from table where name='ronaldo' and rownum <= 300 order by id asc;

Is there a way to make an Oracle query behave like it contains a MySQL limit clause? In MySQL, I can do this: select *  from sometable order by name limit 20,10  to get the 21st to the 30th rows (skip the first 20, give the next 10). The rows are selected after the order by, so it really starts on the 20th name alphabetically. In Oracle, the only thing people mention is the rownum pseudo-column, but it is evaluated before order by, which means this: select *  from sometable where rownum <= 10 order by name  will return a random set of ten rows ordered by name, which is not usually what I want. It also doesn't allow for specifying an offset.


Just downloaded ubuntu 17.04. Instructions suggest verifying iso before burning. Only verification link is for 16.??.

I just downloaded the ubuntu-10.10-desktop-i386.iso, and am having a hard time burning it, so I'd like to check that the file is intact, but I cannot find the md5sum of the file.    Is there a URL or official FTP mirror which includes the md5sum of the Ubuntu disk images?


Traditionally when deriving Friedmann–Lemaitre–Robertson–Walker metric, homogeneity and isotropy assumption is made. This assumption, however, holds only for large scales. To take into account some small-scale irregularities, cosmological perturbations are introduced. But as far as my knowledge goes, these do not explain how does the universe evolve inside those perturbations (e.g. galaxies). So my question is: what does the expansion of universe mean for regions where matter is concentrated - is there slower(or faster?) expansion, or no expansion at all? What would it look like for universe without cosmological constant (i.e. without dark energy)?

Some scenarios describing the fate of the matter vs  tug of war on the universe involve the acceleration of the universe increasing to the point that it ends up ripping apart even atoms. This is called the .  This makes no sense to me. It looks like all of these   (GR) models of the universe assume it has a uniform isotropic distribution of matter and energy. This works great at long scales, but it is also clearly wrong even at the length scale of the separation of galaxies.  The density of atomic nuclei remains the same even though the universe is expanding even as we speak. I don't think the "scale" in the  can be interpreted so literally. Or maybe said better, it's got to break down when the cosmological horizon distance gets to the scale where the isotropic assumption breaks down, right?  How can scientists be claiming that runaway expansion will rip apart atoms?


Here is a question from Indian Statistical Institute (ISI) Entrance Exam CSA-2020, Question 11: $\binom n0, \binom n1,..., \binom nn$ denote the binomial coefficients in the expansion of $(1 + x)^n \ \text{where} \   p > 0$ is a real number and $q = 1 − p$ then $$  \sum\limits_{r=0}^n r^2 \binom nr p^{n-r}q^r  $$ is equal to $ (A)\ np^2q^2 \ (B)\ n^2p^2q^2 \ (C)\ npq + n^2p^2 \ (D)\ npq + n^2q^2 $  My Thoughts: (1) If I put the formula for $\binom nr$ in the given sum. I am getting $$  \sum\limits_{r=0}^n r^2 \frac{n!}{r!(n-r)!} p^{n-r}q^r  $$ How do I proceed after this?  Edit: Taking help from  and the comments below I wrote the following, although I am stuck in the last step, please help me out. $$ (1+x)^n=\sum\limits_{r=0}^n \binom nr x^r $$ Taking derivative on both sides we have: $$ n(1+x)^{n-1}=\sum\limits_{r=1}^n r\binom nr x^{r-1} $$ Multiplying both sides by $x$ we get: $$ nx(1+x)^{n-1}=\sum\limits_{r=1}^n r \binom nr x^r $$ Taking derivative another time: $$ n(1+x)^{n-1}+nx(n-1)(1+x)^{n-2}=\sum\limits_{r=1}^n r^2 \binom nr x^{r-1} $$ Multiplying both sides by $x$ we get: $$ nx(1+x)^{n-1}+nx^2(n-1)(1+x)^{n-2}=\sum\limits_{r=1}^n r^2 \binom nr x^r $$ Given that $p>0$ and $q=1-p$ . So let $x=\frac qp$ then we have: $$ n\frac qp\left(1+\frac qp\right)^{n-1}+ n\left(\frac qp\right)^2(n-1)\left(1+\frac qp\right)^{n-2} = \sum\limits_{r=1}^n r^2 \binom nr \left(\frac qp \right)^r $$ $$ \implies  n\frac qp\left(\frac{p+q}{p}\right)^{n-1}+ n\left(\frac qp\right)^2(n-1)\left(\frac{p+q}{p}\right)^{n-2} = \sum\limits_{r=1}^n r^2 \binom nr \left(\frac qp \right)^r $$ $$ \implies  n\frac qp \left(\frac{1}{p}\right)^{n-1}+ n\left(\frac qp\right)^2(n-1)\left(\frac{1}{p}\right)^{n-2} = \sum\limits_{r=1}^n r^2 \binom nr \left(\frac qp \right)^r \ \ \ \ \  [\text{Since}\ p+q=1] $$ $$ \implies  n\frac{q}{p^n}+ n(n-1)\frac{q^2}{p^n} = \sum\limits_{r=1}^n r^2 \binom nr \left(\frac qp \right)^r $$ $$ \implies  nq+ n(n-1)q^2 = p^n\sum\limits_{r=1}^n r^2 \binom nr \left(\frac qp \right)^r $$ $$ \implies  nq+ n(n-1)q^2 = \sum\limits_{r=1}^n r^2 \binom nr p^{n-r}q^r $$ $$ \implies  n(q-q^2)+ n^2q^2 = \sum\limits_{r=1}^n r^2 \binom nr p^{n-r}q^r $$ $$ \implies  n\{(1-p)-(1-p)^2\}+ n^2q^2 = \sum\limits_{r=1}^n r^2 \binom nr p^{n-r}q^r $$ $$ \implies  n\{(1-p)-(1+p^2-2p)\}+ n^2q^2 = \sum\limits_{r=1}^n r^2 \binom nr p^{n-r}q^r $$ $$ \implies  np(1-p)+ n^2q^2 = \sum\limits_{r=1}^n r^2 \binom nr p^{n-r}q^r $$ $$ \implies  npq+ n^2q^2 = \sum\limits_{r=1}^n r^2 \binom nr p^{n-r}q^r $$ Hence option (D) is correct.  This question is almost similar to  but is slightly different. So I have added this question.

Can this identity be derived from the binomial theorem?  $$n(n+1)2^{n-2} = \sum_{i=1}^{n}  i^2 \binom{n}{i}$$    I tried starting from $2^n = \displaystyle\sum_{i=0}^{n} \binom{n}{i}$ and dividing it by $4$ in order to get $2^{n-2}$.


I tried grid search for hyperparameter tuning in XGBoost classifier but the best accuracy is less than the accuracy without any tuning   // this is the code before the grid search xg_cl = xgb.XGBClassifier(objective='binary:logistic', seed = 22) xg_cl.fit(x_train, y_train) y_pred = xg_cl.predict(x_test) print(metrics.confusion_matrix(y_test, y_pred)) print(metrics.accuracy_score(y_test, y_pred)) [[11  1] [ 1 26]] 0.9487179487179487   also, worth mentioning that the dataset shape is (195, 11) after PCA, and i am trying to classify whether a patient has a parkinsons disease or not.   // this is the grid search code clf_xgb = xgb.XGBClassifier(objective = 'binary:logistic') params__grid = {     'n_estimators' : range(50,150,10),     'max_depth': range(2, 12),     'colsample_bytree': np.arange(0.5,1,0.1),     'reg_alpha' : np.arange(0,0.6,0.1),     'reg_lambda' : np.arange(0,0.8,0.1)   } search = GridSearchCV(estimator=clf_xgb, param_grid=params__grid, scoring = 'accuracy',                             cv = 4 ) search.fit(x_train,y_train)  print('best score:/n',search.best_score_) print('bestparams:/n' ,search.best_params_)  best score: 0.9038461538461539  best params: {'colsample_bytree': 0.5,      'max_depth': 7,      'n_estimators': 50,      'reg_alpha': 0.2,      'reg_lambda': 0.1}   then I used these parameters to build and train a new classifier  clf_xgb_1 = xgb.XGBClassifier(objective = 'binary:logistic', max_depth = 7, n_estimators = 50, reg_alpha = 0.2 ,                               reg_lambda = 0.1, colsample_bytree = 0.5 ) clf_xgb_1.fit(x_train,y_train) y_pred_2 = clf_xgb_1.predict(x_test) print('accuracy:/n', metrics.accuracy_score(y_test,y_pred_2)) print('confusion matrix:/n', metrics.confusion_matrix(y_test,y_pred_2))  accuracy: 0.8974358974358975  confusion matrix: array([[ 9,  3],        [ 1, 26]], dtype=int64)   How come my results are worse? I would expect that GridSearch would improve on the results.

I am trying recently to optimize models but for some reason, whenever I try to run the optimization the model score in the end is worse than before, so I believe I do something wrong. in order to optimize my model I define param grid and than fit with the train data and then according to the results run again with nre parameters, e.g- #ROUND 1 param_grid={     'max_depth': [3,4,5],     'learning_rate':[0.1,0.01,0.05],     'gamma': [0,0.25,1.0],     'reg_lambda':[0,1.0,10.0],     'scale_pos_weight':[1,3,5] }  grid_search = GridSearchCV(estimator = clf_xgb, param_grid = param_grid,                            cv = 3, n_jobs = -1, verbose = 2) grid_search.fit(X_train,y_train) grid_search.best_params_  >>>.....   (and now based on the result changing the params...) after this step I choose the best hyperparameters and run the model; clf_xgb=xgb.XGBClassifier(seed=42,                          objective='binary:logistic',                          gamma=0,                          learn_rate=0.7,                          max_depth=6,                          reg_lambda=0.8,                          scale_pos_weight=1,                          subsample=0.9,                          cilsample_bytree=0.5)  clf_xgb.fit(X_train,            y_train,            verbose=True,            early_stopping_rounds=10,            eval_metric='aucpr',            eval_set=[(X_test,y_test)])  The problem is that when I check the model score clf_xgb.score(X_test,y_test)  I always get lower score than what I got before the optimization which makes me suspect that I'm missing something in the way doing it/basic principle in this process. Is it possible that after running the optimization my score won't get better (and even worse?) ? Where is my mistake? Are there other parameters that could influence or improve my model?


The law of conservation of momentum states that the total momentum in a closed system is conserved.   When a car crashes into a barrier, the barrier and the car may crumple but the car will come to a stop. How exactly is the initial momentum of the car conserved?

Suppose we have object A , which has momentum mv. Then it elastically collides with a wall, so it's momentum now -mv, So how is momentum conserved here ?


I know that you can't just take averages and state that it is the average effect of the big regressor (Simpson's paradox). But I would be interested in knowing wether you could state that a positive or negative effect should at some significance level exist for a subgroup of the big regressor.  Two examples: 1: A negative effect of crime numbers (in neighbourhood A) on the amount of tourists visiting amsterdam was found in one studie and the same effect was found for neighbourhood B in another study but no significant effect was found for neighbourhood C in a third study. Could you sample size weight these and claim that with (p = the overall p value or smaller) that this effect exists for crime numbers somewhere in the entire city?  2: A positive effect on agression was found for the activity of one brain area (area A) in one study and a positive effect was found for the adjacent area (B) in two other studies. Could you sample size weight these together to say that the effect exists with (p = overall p-value or smaller) at least some where in the area A+B?  I have not yet found any literature describing just this and any referrences or general thoughts would be much appreciated!

This is my question: I have to perform a mini-meta-analysis on two studies(independent, balanced sample) with a Repeated measures design and with two within factors. I have the F statistic and the p value of two significant interactions in study 1 and study 2. I want to present a unique p value, so I have to combine the p values. Is it correct to transform the p value in z score and after do I have to average the z scores and find the correspondent p value? Can you suggest a paper with a similar procedure?


Are high powered special attacks with a smaller number of large blue energy bars better than low powered special attacks with a higher number of small energy bars?  For example, is having a special attack with 70 damage and 1 blue bar better than having a special attack with 15 damage and 5 blue bars?

I was flipping through my Pokemon list to see which kind of attacks they had, and I notice there was a small different between the attacks. Some attacks contained a dashed blue bar where as others contained a solid blue bar.   What is the difference and significance between the two?


While searching a Thomson indexed journal to submit to, I found this one :  And they are showing different impact factors :  Impact Factor: 0.971 [UIF, Germany] Global Impact Factor 0.533 [ Australia] Scientific Journal Impact Factor: 2.59 [ Canada] Scientific Indexing Services Impact Factor: 0.982 [USA] NAAS Rating : 4.95  My question is : what are the differences between all of them, and How can I evaluate the quality of a journal beside its impact factor. Thanks!

A colleague and I recently submitted a paper to a journal with an impressive-sounding name, the "International Journal of Artificial Intelligence and Computational Research". According to ,      IJAICR is a referred [sic] journal in the field of computer science, artificial intelligence and soft computing methods.   It was accepted two days after we submitted it. That's too fast. We were suspicious. Although the journal said that all papers are peer-reviewed, we could not see how that was done in two days. Plus, we received no comments from the reviewers. Also, the submission guidelines didn't ask for a "blind" copy (without our names or any references to who we were).   But wait, there's more.  The acceptance letter asked us to send them US$300 to publish it. We did not. We've withdrawn our submission and will submit a new version of the paper to a more reputable journal in the coming months.  How might we make a better choice of respectable journals before we submit next time?


I try to remove "In" word from the bibliography with APA-style. I found some comments suggest me to use the renewbibmacro, but it still appears in the bibliography. This is my sample code \documentclass{article} \usepackage[utf8]{inputenc}  \title{TExtTemp} \author{mynameisbee } \date{November 2020}    \usepackage[ backend=biber, bibencoding=utf8, style=apa6, citestyle=numeric, firstinits=true, isbn=false, doi=false, url=false, sorting=none, clearlang=true, natbib=true, intitle=true, date=year, uniquelist=false, maxbibnames=6, maxcitenames=1, defernumbers=true ]{biblatex}  %% for a list number index \makeatletter \RequireBibliographyStyle{numeric} \makeatother    \DeclareFieldFormat[inproceedings]{title}{\textbf{#1}} \DeclareFieldFormat[inproceedings]{booktitle}{#1} \DeclareFieldFormat[article]{title}{#1} \DeclareFieldFormat[article]{journaltitle}{\textbf{#1}} \DeclareFieldFormat[article,unpublished,misc]{volume}{\textbf{#1}}  %% remove comma in Author name %\DeclareNameAlias{default}{last-first} \renewcommand*{\revsdnamepunct}{} %remove "in" out from proceeding \renewbibmacro*{in:}{}    \begin{filecontents}{jobname.bib} @article{Ellen,   title={Pathogen-Host Interactions: Antigenic Variation V. Somatic Adaptations},   journaltitle = {Journal of Signal Processing Systems},   author={Hsu, Ellen and Du Pasquier, Louis},   volume={57},   year={2015},   publisher={Springer} }  @inproceedings{Pisit,    title = {Latent Cognizance: {{What}} Machine Really Learns},   booktitle = {{{ACM}} International Conference Proceeding Series},   author = {Nakjai, Pisit and Ponsawat, Jiradej and Katanyukul, Tatpong},   date = {2019},   pages = {164--170} } \end{filecontents}  \addbibresource{jobname.bib}  \begin{document}  \cite{Ellen} is a chapter in \cite{Pisit}.  \printbibliography[title=REFERENCES] \end{document}  This is my result. In the red block, "In" word is still appear. Another question, I want to remove the bracket (green block). How can I remove it? Thank you for all suggestions. I am sorry for my language.

How do I suppress the "In: " before the journaltitle? Like so:     In: Journal of Applied Physics


I'm 16, from India and I really want to be a web/graphic designer.I'm good with coding, Illustrator, Photoshop etc. Problem is, I only KNOW how to do stuff, like, I see a design and I can confidently say, I can recreate that. But how do I think of something new, something beautiful? I see posters and ads everywhere like 'we can create your website for Rs.50' or 'Making a website just became easy' and it really upsets me. I think how am I better from them? Who will want to work with me when they can easily work with people like them?  Moreover I participated in a few contests in 99designs and i got eliminated in the first round 12 times  People always comment not good enough, not what we are looking for etc etc.  Should I just quit because I can't think anything, I can just copy things. Should I just go back into trying to be a lame engineer as my parents want?  I'm even embarrassed in asking a question like this in a place where people talk about some serious design work. Please Help.

I've been a programmer my whole life, and now I've found that I really need to start designing my own stuff. I know how to use Photoshop in and out, but I just can't create anything nice. I often visit  and try to get some inspiration, but I get overwhelmed by their creativity. How do they come up with this stuff?   Besides learning the fundamentals to design such as color theory etc, what are the best ways to coming up with some original and nice looking designs? Should I draw on pencil and paper my designs before designing in Photoshop? I'm referring to interface designs mostly. Lately I've just been finding random Dribbble interface designs, and trying to replicate them from scratch. I'm often successful, but I know I couldn't have come up with that on my own.   Another question is how do the creatives do it?   Do they imagine a design in their mind first, then draw it out on paper, then Photoshop?   Or do they just go on Photoshop and just play around until something nice comes out? Or what?


I am following  on Lubuntu 18.04  I was wondering why I get the following problems. Thanks.  $ sudo apt-get install system-config-lvm Reading package lists... Done Building dependency tree        Reading state information... Done E: Unable to locate package system-config-lvm  $ sudo service lvm2 start Failed to start lvm2.service: Unit lvm2.service is masked.   I still can't get it right.  $ sudo systemctl mask lvm2  Created symlink /etc/systemd/system/lvm2.service → /dev/null.  $ sudo systemctl enable lvm2  Synchronizing state of lvm2.service with SysV service script with /lib/systemd/systemd-sysv-install. Executing: /lib/systemd/systemd-sysv-install enable lvm2 Failed to enable unit: Unit file /etc/systemd/system/lvm2.service is masked.  $ sudo systemctl unmask lvm2  Removed /etc/systemd/system/lvm2.service.  $ sudo systemctl enable lvm2  Synchronizing state of lvm2.service with SysV service script with /lib/systemd/systemd-sysv-install. Executing: /lib/systemd/systemd-sysv-install enable lvm2 Failed to enable unit: Unit file /lib/systemd/system/lvm2.service is masked.  $ sudo service lvm2 start Failed to start lvm2.service: Unit lvm2.service is masked.

I am trying to install my first Linux system and I am stuck setting up the hard drives. Given my lack of experience I decided to use the guided setup from the hard drive setup screen figuring I would go back after the completed Debian installation and simply resize my drives as needed.  However when trying  to run sudo service lvm2 start I get a message "unit lvm2.service is masked".  Any ideas as to why this is happening? all I could find was a note that LVM as not compatible with grub /boot and should be outside the storage disk managed by LVM.  If so is it truly referring to the entire disk on which /boot is loaded or can it be simply a separate logical partition on that disk?


I have an unordered list with 2 li, I must add more li element with jquery also with a delete button, but now I need to remove this li with the button.  The function works with the old li but not with the new created li...         <!DOCTYPE html>                   <meta charset="UTF-8">         <meta name="viewport" content="width=device-width, initial-scale=1.0">         <meta http-equiv="X-UA-Compatible" content="ie=edge">         <title>Prueba front</title>
             Car:              <input id="name" type="text"><button type="button" class="add">Add</button>

                     Ford <button type="button">Remove</button>

                     Nissan <button type="button">Remove</button>

                        I need to remove the new li created with jquery.  How can I achieve this?

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 had some problems installing an Epson WF-7610 on a new computer running 16.04 I have downloaded the driver from the website above. When I go to the list of printers in 'add printer' I get WF-7525 (recommended). This doesn't work! I have another laptop which uses the same printer and this works fine. Any ideas?

I am having trouble to set up my Epson printer on Ubuntu 16.04. How can I install the drivers?


From the part titled Introducing Latent Variables under subsection 2.2 in this :  Introducing Latent Variables. Suppose we want to model an $m$-dimensional unknown probability distribution $q$ (e.g., each component of a sample corresponds to one of m pixels of an image). Typically, not all variables $\mathbf{X} = (X_v)_{v \in V}$ in an MRF need to correspond to some observed component, and the number of nodes is larger than $m$. We split $\mathbf{X}$ into visible (or observed) variables $\mathbf{V} = (V_1,...,V_m)$ corresponding to the components of the observations and latent (or hidden) variables $\mathbf{H} = (H_1,...,H_n)$ given by the remaining $n = |\mathbf{V}| − m$ variables. Using latent variables allows to describe complex distributions over the visible variables by means of simple (conditional) distributions. In this case the Gibbs distribution of an MRF describes the joint probability distribution of $(\mathbf{V},\mathbf{H})$ and one is usually interested in the marginal distribution of $\mathbf{V}$ which is given by: $$p(\mathbf{v}) = \sum_{\mathbf{h}} p(\mathbf{v},\mathbf{h}) = \frac{1}{Z} \sum_{\mathbf{h}} e^{-E(\mathbf{v},\mathbf{h})}$$ where $Z = \sum_{\mathbf{v},\mathbf{h}} e^{-E(\mathbf{v},\mathbf{h})}$. While the visible variables correspond to the components of an observation, the latent variables introduce dependencies between the visible variables (e.g., between pixels of an input image).  I have a question about this part:  While the visible variables correspond to the components of an observation, the latent variables introduce dependencies between the visible variables (e.g., between pixels of an input image).  Given a set of nodes $\mathbf{X}$ in a Markov Random Field $G$, the joint distribution of all the nodes is given by: $$p(\mathbf{X}) = \frac{1}{Z} \prod_{c \in C} \phi(c)$$ Where $Z$ is the partition function and $C$ is the set of cliques in $G$. To ensure that the joint distribution is positive, the following factors can be used: $$\phi(c) = e^{-E(c)}$$ Such that: $$p(\mathbf{X}) = \frac{1}{Z} e^{-\sum_{c \in C} E(c)}$$ Where $E$ is the energy function. I am not sure why there is a need to introduce hidden variables and express $p(\mathbf{v})$ as a marginalization of $p(\mathbf{v},\mathbf{h})$ over $\mathbf{h}$. Why can't $p(\mathbf{v})$ be expressed as: $$p(\mathbf{v}) = \frac{1}{Z} e^{-\sum_{v \in \mathbf{v}} E(v)}$$ directly? I think it may be because the factors only encode dependencies between variables in cliques, and so may not be able to encode dependencies between variables that are in two separate cliques. The purpose of the hidden variables are then to encode these "long-range" dependencies between visible variables not in cliques. However, I am not sure about this reasoning. Any help would be greatly appreciated.

I have a model $p(x)$. How can adding latent variables $z$ help me? What are the main benefits of modelling $p(x, z)=p(x|z) p(z) $ instead of $p(x) $ alone? What would be some examples where modelling the latter would make my model better?


I used the idea that if $13$ divides $n^3$ then $13$ divides $n$.   I begin with assuming that there is a rational number x such that $x^3$ = $13$. Since $x$ is rational, we rewrite as $m/n$ where gcd(m,n)=1.  $x^3$ = $13$  $m^3$/ $n^3$ = 13.  Then $m^3$ = 13 $n^3$.   Using the fact that if 13 divides $n^3$, then 13 divides $n$. What would the next step be?

The question is: if $P$ is prime, is $P^{1/3}$ rational?   I have been able to prove that if $P$ is prime then the square root of $P$ isn't rational (by contradiction) how would I go about the cube root?


I am using infocus m2. I want to transfer some videos from my mobile to my PC.   I am using Ubuntu on my PC. When I connect my mobile to my PC via the USB port the the mobile storage is not shown by Ubuntu.

I have installed gMTP and tried to follow this tutorial to solve this problem:   But neither worked. I tried to connect both my phone (Nexus 4) and my dad's phone (Galaxy Note 2), and neither is being detected by Ubuntu. They don't show up on my files and on gMTP.  Is there another fix? or something more specific for Android 4.3 and Ubuntu 14.04


I want to make an infinite lava source,like with the water. If one puts 2 blocks of water,they will fill another block completely. Lava does not do exactly the same. If this is not possible,lava is limited,not like water. Is there a way to do this?

You can create an infinite well using two buckets of water and a hole that is one block deep and two blocks by two blocks wide.  I'm wondering if it's possible to do a similar thing with lava, now that obsidian is so valuable for making portals.  I have an idea for making it easier for creating portals, but it's dependent on having an effectively infinite source of lava very close to where I want to create the portal.  So is this possible?  If so, how?


I tried to get advice in the Snapcraft forums but no one answered so far:      I'm using 18.04 and the Characters snap worked fine until it was updated a few weeks ago. I'm also using the Communitheme snap which seems to be involved in triggering the bug. Window decorations and sidebar of the app are not visible except some white text/glyphs.            Plain text:  (org.gnome.Characters:17824): Gtk-WARNING **: 20:59:46.674: Theme parsing error: gtk.css:1:0: Failed to import: Error opening file /snap/communitheme/current/share/themes/Communitheme/gtk-3.20/gtk.css: Permission denied Gjs-Message: 20:59:46.676: JS LOG: Zeichen-Anwendung gestartet  (org.gnome.Characters:17824): GnomeDesktop-WARNING **: 20:59:47.985: Failed to load XKB rules file /usr/share/X11/xkb/rules/evdev.xml: Failed to open file “/usr/share/X11/xkb/rules/evdev.xml”: No such file or directory       I'm not sure where to report this, it's said to be an officially supported snap by Canonical but it has no bug tracking on launchpad (, ) as far as i can see, not on GitHub, not contact in snap info as other packages have or on the respective snapcraft page. And I also doubt that the Gnome bugtracker is the right place when another snap is involved.      Can someone please give me directions?

I don't seem to find any information where to report issues with snaps, i.e. applications which are installed through snap install instead of the system package manager apt-get.  Since most bug reports on launchpad.net are simply ignored, but still make sense to be filed, I'd like to make sure that I'm not doing something even more hopeless when filing bugs with ubuntu-bug or manually on launchpad.net.  The fact that apport says that a package isn't installed shouldn't say too much because it usually takes years until this tool is upgraded to reflect changes in the requirements.


#include<stdio.h>  int main() {     int i=0;     while(i<4,5)     {         printf("loop");         i++;     }     return 0; }   The answer is an infinite loop. I can't understand how two expressions work in while loop without any logical operators.


I'm trying to determine whether $\mathbb Q$ under addition has a basis. My naive idea, based on what I have covered so far, would be to try and show that if we assume $\mathbb Q$ has a basis then it would be finitely generated which I believe would then lead to a contradiction. But I don't think this is a valid approach and I'm not sure what other approaches I could take. I'd appreciate some ideas/approaches about determining whether $\mathbb Q$ has a basis or not :)

I am really confused from the definition.  How do we know that $\mathbb Q$ is not a free $\mathbb Z$-module?  In class people use it as a trivial fact, but I don't seem to understand.


I have a sample text file as shown below. I want to read the file and print each line on the terminal. I wrote a sample shell script test_sample.sh.  The directory containing the shell script and text file contain others files too. When I run the shell script. It works fine, but the command output is mixed with output of the files residing in the directory.  % ./test_sample.sh sample.txt == abc == abc.txt readme.txt sample.txt test_sample.sh I have a car. abc.txt readme.txt sample.txt test_sample.sh My car is clean.   Question is how do I get to print just the lines of the text file?  test_sample.sh  #!/bin/bash fname=$1 while read p; do     echo $p done < $fname   sample.txt  == abc ==  * I have a car. * My car is clean.

For example:  me$ FOO="BAR * BAR" me$ echo $FOO BAR file1 file2 file3 file4 BAR   and using the \ escape character:  me$ FOO="BAR \* BAR" me$ echo $FOO BAR \* BAR   I'm obviously doing something stupid.  How do I get the output BAR * BAR?


Suppose $X$ is infinite. I think we can show that $|X\times\mathbb{N}| = |X|$. How do we construct an injective function $f:X\times\mathbb{N} \to X$?

Here the problem 1.4.26 from Sohrab, Basic Real Analysis  Duplicate  This are not duplicate of this question:    the answer gives no proof  despite the title is not really connected  only finite set   Problem  Show that, if $A$ is an infinite set, then $|A\times\mathbb{N}|=|A|$. Hint: Let $\mathcal{F}$ denote the set of all bijective maps $f:S\times\mathbb{N}\to S$, where $S\subset A$. Since $|\mathbb{N}\times\mathbb{N}|=|\mathbb{N}|$, we have $\mathcal{F}\neq \varnothing$ (Why?) Show that Zorn's Lemma can be applied in $\mathcal{F}$ to produce a maximal bijection $h:B\times\mathbb{N}\to B$, with $B\subset A$, and that we must have $B=A$, by examining the cases where $S\setminus B$ is finite or infinite.  Proof  Let $\mathcal{F}$ denote the set of all bijective maps $f:S\times\mathbb{N}\to S$, where $S\subset A$. Since $|\mathbb{N}\times\mathbb{N}|=|\mathbb{N}|$ (see exercise 1.4.10(i)), we have $\mathcal{F}\neq \varnothing$ (From Exercise 1.4.22(d) we know that for a infinite set $A$, we have $|A|\geq\aleph_0$, and $|\mathbb{N}|=\aleph_0$, thus there is an injection from $g:\mathbb{N}\to A$, and, by defining $S:=g(\mathbb{N})\subset A$, we get a bijective map (composition of two bijective maps) $S\times\mathbb{N}\to\mathbb{N}\times\mathbb{N}\to\mathbb{N}\in\mathcal{F}$).  If we consider the inclusion as partial order, then every chain $S_i\subset A$, $i\in I$, has $A$ as upper bound and applying Zorn's Lemma, we get the existence of a maximal $\bar{S}$ and hence a bijection $h:\bar{S}\times\mathbb{N}\to\bar{S}$, with $\bar{S}\subset A$.  Now we prove that $\bar{S}=A$. $R:=A\setminus \bar{S}$. $\bar{S}$ is infinite, since the example of element of $\mathcal{F}$, that we gave above is bijective to $\mathbb{N}$. We have to do this. The second is trying to follow the hint and is incomplete:   Consider that $A\neq\bar{S}$, then there is $r\in R:=A\setminus\bar{S}$. We chose an element $s\in\bar{S}$ and define the bijection $h':\bar{S}\cup\{r\}\times\mathbb{N}\to \bar{S}\cup\{r\}$ as follow  $h'(a,n)=\begin{cases}h(s,2n-1)&\text{for }a=s\\ r&\text{for }a=r,n=1\\ h(s,2n-2)&\text{for }a=r,n\neq 1\\ h(a,n)&\text{otherwise}\end{cases} $  Since $\bar{S}\subsetneq \bar{S}\cup\{r\}$ we get a contradiction to the maximality of $\bar{S}$. Now either $R$ is finite or infinite. 1) $R$ finite, let say $R=\{r_1,\cdots,r_n\}$. Then chose $n$ elements $s_1,\cdots,s_n\in\bar{S}$ and we define the bijection $h':A\times\mathbb{N}\to A$ as follow $h'(a,n)=\begin{cases}h(a,2n-1)&\text{for }a\in\{s_1,\cdots,s_n\}\\ a&\text{for }n=1,a\in\{r_1,\cdots,r_n\}\\ h(s_i,2n-2)&\text{for }a=r_i\\ h(a,n)&\text{otherwise}\end{cases}$  In case $n>0$ we get a contradiction with $\bar{S}$ being the maximal element.   Thus we have only to exclude the case 2) $R$ infinite. HOW TO DO THAT?   Question  Above I tried two proofs. The first part is the same. The two second parts are given by the two bullets.  The second proof tries to follow the hint.  My questions are:   - Is my proof correct?   - In which direction should go the proof from the hint?


What is the another hope which yoda said in the Empire strikes back  at Dagobah ?  İs it Darth Vader or Leia or someone else ?

In the original trilogy Yoda refers to another hope:     Obi-Wan: "That boy is our last hope."   Yoda: "No...there is another..."   The assumption being after seeing Return of the Jedi (Episode VI) that the other was Leia.  If, however, you consider the prequel trilogy canon, then this assumption depends greatly on your point of view*. Obi Wan knows about Leia (and for unknown reasons has discounted her as a hope), so Yoda must be referring to someone or something else.  Is there any canonical source as to what Yoda meant, or was uncle George setting us up for Episode VII?  *as a wise man once said      you will find that many of the truths we cling to depend greatly on   our own point of view.   Just to add a bit of clarity: I was thinking about who Yoda was referring to when he was talking to Obi-Wan. When talking to Luke, it is obvious that Leia is the other (as he talks about a 'Skywalker'). It is not so obvious (after watching the prequel trilogy) that he means it when talking to Obi-Wan.


I am trying to create a quiz type thing for Math 30-1. I just started and have already run into an issue that I have never had before, (or can't remember how to fix it). Below is a piece of the code where the error is happening, however I also have a GitHub repository with the entire file of code, and the specific lines of code that have the error are in the README.txt file.  public static void askQuestion(int question_number) {     getQuestion(question_number);     getReply();     if(input == answer.get(question_number)) {         print("Yay, that is the correct answer!");     } else {         print("Sorry, the correct answer is: " + answer.get(question_number));         print("You put: " + input);      } }   GitHub Link:

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?


Please refer attached image for clarity.  1)How can I increase the number of columns in the show application? I want to Increase it to 7 or 8. I l This works but is there some extension to available to do this?   2) Also, I don't really like the animation with which the icons load up after I click on show applications button is there any way to change it and make it cleaner probably the animation used in windows 8 for start button.

I would like to be able to show more columns since a lot of lateral space is lost. Any ideas on how to do this?


I have nothing against Ubuntu. Completely satisfied with its performance. But after some while now, I don't have much hard disk space for my own files. So I'm planning to keep Windows 7 and uninstall Ubuntu.   Currently I get dual boot options when I turn on my PC. I got to know that uninstalling Ubuntu would result in some repair work to be done for Windows 7. Please fill me in with details on this, and on how to uninstall Ubuntu, because I have an uninstall file in Windows 7 in the location where I have installed Ubuntu.

I have absolutely no experience with Linux, and I desperately need to get my computer back up and running again with Windows.  How do I remove Ubuntu and reinstall Windows?    Editor's note: many of the answers are about removing Ubuntu from dual-boot but keeping Windows (which is a bit complicated), while other answers are about removing Ubuntu from single-boot (which is easy: basically just format the disk while installing Windows). The question as written is ambiguous between dual-boot or single-boot.


What are the steps to access each DLC content in Hollow Knight?

In these two official announcements from Team Cherry, it's said:       Grimm’s quest, and all other new features can be accessed at any point   in your Hollow Knight journey.        Hollow Knight: Hidden Dreams content is accessible at any point in the   game, whether starting fresh or scouring for completion.   I still haven't find any way to start the quests from the menus or during beginning of the game. Some sources say the content can only be accessed late in the game from specific locations.  So, is Team Cherry simply lying in our faces?


How can I install additional drivers in kubuntu like in gnome and this screenshot?

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


I am writing a PHP plugin, which builds a multidimensional array, in the format below, so that it can be passed back to the template system and parsed as tags.  I am fetching the information from a database:  $SQL = SELECT `id`, `name`, `description` FROM (`events`) WHERE `event_category_id` = '1' AND `active` = 1 ORDER BY `name` asc   This is the array structure required:     Array (  [A] => Array (      [0] => Array(         [event_id] => 1         [event_name] => A - this event name starts with the letter A          [event_description] => Example Description)      [1] => Array(         [event_id] => 6         [event_name] => AB - this event ALSO starts with the letter A          [event_description] => Example Description)         )  [B] => Array (      [0] => Array(         [event_id] => 3         [event_name] => BA - Event name starts with letter B         [event_description] => Example Description)      [1] => Array(         [event_id] => 5         [event_name] => BB - Event name starts with letter B         [event_description] => Example Description)         ) )   Could someone point me in the right direction, so that from the returned data, it splits the events into the appropriate keys (alphabetical key), sored alpha by the event_name.  The end result is to have this  A  - Ambulance Training  - Apple Bobbing B  - Badminton  - Bowling

I have CSV data loaded into a multidimensional array. In this way each "row" is a record and each "column" contains the same type of data.  I am using the function below to load my CSV file.  function f_parse_csv($file, $longest, $delimiter) {   $mdarray = array();   $file    = fopen($file, "r");   while ($line = fgetcsv($file, $longest, $delimiter))   {     array_push($mdarray, $line);   }   fclose($file);   return $mdarray; }   I need to be able to specify a column to sort so that it rearranges the rows.  One of the columns contains date information in the format of Y-m-d H:i:s and I would like to be able to sort with the most recent date being the first row.


I have tried to prove it by induction but i couldn't make it.

How many proofs of the Cauchy-Schwarz inequality are there? Is there some kind of reference that lists all of these proofs?


I seems there are two entries of Inkscape in Ubuntu Software.  What is the difference? Which one should I install?  (Using Ubuntu 18.04)

When I search for Chromium in Ubuntu Software on Ubuntu 16.04, There are 2 options.    Which one should I select?    The same can be observed with , ,  etc.


I am working now on some really exiting project and I am using about six terminals at the same time. Normally I use Ubuntu's default terminal which is currently the GNOME Terminal 3.20.2  Sometimes I get confused between my opened terminals, because their content is looking so similar.  So I ask is there a way to add a title or some coloring to the Terminal window?

I have several instances of terminals running in my working environment, what I would like is to set a specific title for each one, in order to have a clear idea what purpose the specific terminal serves i.e. Apache, editing_ini, postgres etc...  Of course from the command line.


Specifically, if I have a machine spec'd for 1.5V and I install 1.3V RAM modules, what side effects can occur?

The general question is: When installing low voltage RAM in a board that outputs a higher voltage to the memory module, will this fry the RAM or will it be like overclocking it?  My specific case is: I have the Alienware m17xR3 laptop with a 2630QM Sandy Bridge board. Currently, I have the stock 1.5 V modules and when I check the overclocking options in my bios, the RAM voltage option ranges from 1.5 - 1.65 V. Is this simply because the bios recognizes that these are the values which my current RAM support and thus they will change when I install 1.35 V RAM or will I have to run the 1.35 V sticks at minimum 1.5 V?  If the case is the latter, would I fry my 1.35 V sticks? Or would they become automatically overclocked and get tighter timings with a higher voltage? Or both? Or neither? I'm a bit lost :p


This is a screenshot from Polchinski String Theory Vol 1. Can anyone please explain how to derive these identities ?

I have a question in deriving Eqs. (3.6.15b) and (3.6.15c) in Polchinski's string theory vol I p. 105.   Given      $$\Delta (\sigma,\sigma') = \frac{ \alpha'}{2} \ln d^2 (\sigma, \sigma') \tag{3.6.6}$$   where $d(\sigma,\sigma')$ is the geodesic distance between points $\sigma$ and $\sigma'$.   It is said for the Weyl variation $\delta_W$,     $$\partial_a \delta_W \Delta(\sigma,\sigma')|_{\sigma'=\sigma}= \frac{ 1}{2} \alpha' \partial_a \delta \omega(\sigma) \tag{3.6.15a} $$   $$ \partial_a \partial_b' \delta_W \Delta(\sigma,\sigma')|_{\sigma'=\sigma}= \frac{ 1+ \gamma}{2} \alpha' \nabla_a \partial_b \delta \omega(\sigma) \tag{3.6.15b} $$   $$ \nabla_a \partial_b \delta_W \Delta(\sigma,\sigma')|_{\sigma'=\sigma}= - \frac{  \gamma}{2} \alpha' \nabla_a \partial_b \delta \omega(\sigma) \tag{3.6.15c} $$   Here $\gamma=-\frac{2}{3}$.   I know the reason for the factor of $1/2$ in the RHS of Eq. (3.6.15a) and I can derive it. But, putting $\nabla$ on LHS and RHS of Eq. (3.6.15a) will not lead to (3.6.15c). I guess it is because there is some higher-order terms in the geodesic distance where the treatment of (3.6.9)-(3.6.11) omitted. But I don't know how to get it. I tried $ds^2= g_{ab} dx^a dx^b= (\eta_{ab} + h_{ab})dx^a dx^b $ to separate the deviation of Minkowski metric, but I cannot get the factor $\gamma$   My question is, how to derive Eqs. (3.6.15b) and (3.6.15c) (especially there is a prime, $'$, namely $\partial'_b$ in the LHS of (3.6.15b) but not in the RHS)


My house is wired for ethernet.  So far, I've got everything taken care of with gigabit switches in most rooms to handle XBoxes, PCs, etc.  Until today.  My Amazon Firestick arrived and only connects with WiFi.  I have a  from AmpedWireless, but it's just a wireless repeater and the signal isn't strong enough to reach the back of the house.  What kind of gadget do I need (and/or what's the right term to search for) for something that will plug into the ethernet in the back room and re-broadcast Wifi?  The searches on SU and others often refer to keeping the same SSID as my router... I don't care about that.  I just want it to work with minimal fuss.  This  from last year was the closest one I could find, but didn't really have an answer.  Brands, technology, jargon, and experience are appreciated.  Thanks.

Here's my current setup.   Bonded "Zone" DSL modem/router on main level serving laptop #1 via Ethernet and laptop #2 via WIFI.  WIFI does not serve basement level well, so I have Ethernet running to basement where it is divided by a switch with one Ethernet going to laptop #3 and another Ethernet going to entertainment system, which houses a Sony Playstation 3. The PS3 has gone on the fritz and is now only good for playing discs, so I recently added a Google Chromecast to the TV. The Chromecast, of course is WIFI only, and is only receiving a weak signal. Plus I need to have a decent WIFI signal to my phone, which is the interface device for the Chromecast. So what I would like to do is to use the Ethernet that was serving the PS3 and broadcast WIFI from it. What device can I plug the Ethernet into that will do this for me? And if you have a recommendation, are there any special setup instructions?


I've got the following code: std::string str = "abc def,ghi"; std::stringstream ss(str);  string token;  while (ss >> token) {     printf("%s\n", token.c_str()); }  The output is:  abc def,ghi  So the stringstream::>> operator can separate strings by space but not by comma. Is there anyway to modify the above code so that I can get the following result?  input: "abc,def,ghi" output: abc def ghi

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


It seems that users who have auto-generated identicons as profile images are showing different images on their profile vs on posts. The images shown on posts and in chat are the regular images that have always been, but on profile pages, and reputation leagues, I am seeing different new images. Also seems that the network profile shows the original image but per-site profiles are showing the new image.  Weirdly, other people don't seem to be seeing this (after asking in chat), but I do even when I'm not logged in and on different network connections. I've only looked at a handful of accounts but all the ones I have checked are showing the same inconsistency.        Some affected profiles:

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


I was gifted an iPad from a restaurant owner. This iPad was provided to the restaurant and used to relay orders from a third party service who would deliver their food outside their normal delivery range.  The third-party company that provided the iPad is now defunct, and the iCloud email address has been out of use for long enough to bounce emails back to me immediately.  I am aware of the concept of circumventing iCloud activation lock and that is not what I am looking for. I am looking to have Apple verify that the current account is defunct and to legitimately remove the account from the iPad.  What steps do I take to have Apple review and potentially remove an iCloud account from my iDevice?

I bought a used iPhone 4.  The previous owner re-set the phone, but did not remove the device from their iCloud.  It is asking me for their iCloud information when I try to set-up the phone.  I don't have contact with the previous owner anymore.  Is there a way to remove the device from their iCloud so I can use a new one?


I need two renders and for the second one I do not need the gloss for multiple objects on the floor. It would be difficult to deselect the gloss property for every object for 50 different objects. Is there a way to apply cycle property change from one active object to all selected?  Also is there an easier way to extract just the reflections from a glossy surface, currently I am using different renders and the difference matte in the compositor.  I'm new to blender.

I have been using the Copy Attributes add-on to copy some properties from active object to selected objects. This add-on is not enabled by default and must be explicitly enabled. But its a very useful workflow enhancing tool.    There is a limitation though. Not all properties can be copied and even those that can be copied are copied in groups (Its hard-coded in to the add-on).  My question is if there is a built-in feature or any another other way to copy any property from the active object to the selected objects?


Tl;dr: Why does C++ see a difference between x/y*y and x/(y*y)?  I was doing some tasks at CodeWars and had to calculate variable and assign the result (whole exercise at the bottom):      bmi = weight / height ^ 2      if bmi <= 30.0 return "Overweight"      test values: weight = 86.7, height = 1.7   The formula that I used is  double bmi = weight / (height*height)   and for if-statement later it is  else if (bmi > 25 && bmi <= 30)      return "Overweight";  else     return "Obese";  and test value calculated with formula is equal to 30. But when I run the code, my return was Obese. I wrote line to print out the result of calculation, it showed 30. But when I changed formula to double bmi = weight / height / height, the correct value is returned. Therefore, the problem is in the formula, but why is C++ see a difference between x/y/y and x/(y*y), even though it prints out the same result?  Given exercise:     Write function bmi that calculates body mass index (bmi = weight / height ^ 2).      if bmi <= 18.5 return "Underweight"      if bmi <= 25.0 return "Normal"      if bmi <= 30.0 return "Overweight"      if bmi > 30 return "Obese   My code:  #include <iostream> #include <string>  // I created two functions to use two formulas for BMI std::string bmi(double, double); std::string bmi2(double, double);     int main() {   std::cout << bmi(86.7, 1.7) << std::endl << std::endl;  // Calling the function   std::cout << bmi2(86.7, 1.7);  }  std::string bmi(double w, double h)  {   double bmi = w/(h*h); // Formula for BMI     std::cout <<"Calculated with w/(h*h): "<< bmi << std::endl;    if (bmi <= 18.5)     return "Underweight";   else if(bmi>18.5 && bmi <= 25.0)     return "Normal";   else if (bmi>25 && bmi <= 30)     return "Overweight";    // It should return this   else      return "Obese";         // But goes with that }  std::string bmi2(double w, double h)  {   double bmi = w/h/h;   // Formula for BMI   std::cout <<"Calculated with w/h/h: "<< bmi << std::endl;    if (bmi <= 18.5)     return "Underweight";   else if(bmi>18.5 && bmi <= 25.0)     return "Normal";   else if (bmi > 25 && bmi <= 30)     return "Overweight";   else     return "Obese"; }

Consider the following code:   0.1 + 0.2 == 0.3  ->  false   0.1 + 0.2         ->  0.30000000000000004   Why do these inaccuracies happen?


Very new to this, but I have an image that is 9.7" × 14.5" and I want to resize it to 9" x 12", I know this will need cropping, but I would love to print it, so wouldn't want to loose any quality.   What is the best way of getting this done in photoshop? or is there an online website that has an online re-sizer?  I am very new to this, so if you could please maybe write down a small step by step process of how this could be done in photoshop, I would be very grateful.  Thank You in advance.

Hi my client has given me a load of images for the site I'm building for him, they are going in a Javascript Image Nivo Slider Banner at the top, the size of the banner is 720px x 200px but the images aren't.  I can crop the images, but I wonder if there is a way to resize them and change the proportion without destroying the quality, or due to the nature of how pixels work is this not possible?  I would like to be able to turn them into wide angle images and work from there.  I have Photoshop CS6 Ext.


As the title says, I need to know which app establishes a connection to a host on a specific port (in my case within LAN).  In case the answer depends on the platform: The device is a Moto G (xt1045) with the stock Android 5.1 which is not rooted (and not rootable).  I think the question is meaningful as is, so it should not be necessary to read the following to answer it. As it will probably be asked anyway and should help establish context, here is my broader problem: I have a homeserver that also acts as home entertainment system using Kodi. Kodi starts when any packet is received on port 8080, which is the case when remote apps like Kore or Yatse are used on android. With my old phone (older android version) it worked fine. With my new phone Kodi starts whenever my phone is in the LAN. Logging on the homeserver confirms the received signals originate on my phone. However I have removed the remote app from the "app switcher view" and it is not listed under running apps. So I want to know which app actually establishes this connection (the remote app shouldn't be running and other apps shouldn't connect to that specific port, so I can't figure it out in any other way).

Usually they do it behind the scenes. So I'd love to know where apps are actually sending data and from whom they are actually getting responses.


I just checked if contents of directory on my cygwin/Win7 development system, and test embedded platform running Linux+Busybox are the same. Simple, cat * | md5sum on both (RXVT/Bash on Cygwin, serial console on Busybox/Bash), compare. And... mismatch. So I went manually file-by-file, doing md5sum * and...  Cygwin:    c69a7926998066fcb79aad3e2fc0c33f *blankpack   5866f29a5bc74f741bcc1074c883abaa *cleanup.sh   d4923d7df2540e279664b0633784f1c4 *clean-www.sh   c44ab61b62af040ee55a3e4ddc271299 *d   Linux:    c69a7926998066fcb79aad3e2fc0c33f *blankpack   d4923d7df2540e279664b0633784f1c4 *clean-www.sh   5866f29a5bc74f741bcc1074c883abaa *cleanup.sh   c44ab61b62af040ee55a3e4ddc271299 *d   Somehow the two cleanup scripts switched places. The same happens with ls, echo * etc.  Is this some bug? Some dependency on the underlying OS? Which of the two orders is the "correct one"(if any)?

Consider the following input to sort:  cat > foo <<EOM D,,5014978 DD,,25 D,I,1972765530 D,Y,4223624 -,Y,71285059 YA,I,2 EOM   Now try running sort foo  The output is not sorted when trying this on any of my linux boxes (gnu coreutils versions 6.9-7.4).  The output is sorted when run under cygwin (gnu coretuils 8.5).  Comments?


I am trying to create a Generic class to handle float and doubles. I need to perform computation according to the type of the variable (float or double), but I am not sure whether the following implementation is the right way to do it. Need some suggestions on it.  // computeFloat is a method of some other class which actually computes and returns a float value float computeFloat() {    float a;    ....     return a;  }  // setFloat is a method of some other class which actually sets a float value void setFloat(float val) {   ..... }  TestClass<T> : IDisposable {  public void getValue(ref T val) {    if(val is float)    {       object retVal = computeFloat();       val = (float)retVal;    }    else    {         throw new Exception(" Not implemented");    } }  public void setValue(T val) {    if(val is float)    {       object obj = val as object;       float retVal = (float)obj;         setFloat(retVal);    }    else    {         throw new Exception(" Not implemented");    }  }     }

Can anyone tell me if there is a way with generics to limit a generic type argument T to only:   Int16 Int32 Int64 UInt16 UInt32 UInt64   I'm aware of the where keyword, but can't find an interface for only these types,  Something like:  static bool IntegerFunction<T>(T value) where T : INumeric


Morning everyone, I have a German driver's license and am planning to do a trip to Miami for 2 weeks, I was looking online for car to rent and I've found this:  General Rental Information Driver's License Requirements Driver's license printed with non Roman Alphabet (Arabic, Chinese, Japanese, Cyrillic etc) must be complemented by an international driver's license. For driver's licenses from countries not part of the international driver's license treaty, an official translation of the license must be presented with the original license.  so, is my German license valid to rent a car in Miami?? thanks  according to this:   Visiting from another country? Visitors to Florida who wish to drive while here are required to have in their immediate possession a valid driver license issued in his or her name from their country of residence. If renting a car while visiting Florida, we suggest you check with the rental car company prior to your visit to see what they require. However, it’s our understanding that rental car companies have not changed their procedures or requirements for having a valid driver license from any state, U.S. territory or foreign country.

My wife and I are German citizens. I am 60 and my wife is 55. We will be staying in Florida for 1 month and we would like to know if our German driving licence would be good enough to rent a car for 1 month or do we also need an International Driving Permit (IDP)? Are there any maximum age restrictions to rent a car in the USA?


On many monitor or chargers, there is a bold part:    First of all, what is it called?  Then, what does it do?  Does a cable without this part have any advantages as we see nowadays many chargers don't have this part anymore?

I want to fix my laptop charger cord, I used a multimeter to check the voltage and it gives me less than one volt. It feels very flexible near the plug, but I don't know if I can cut before or after the part marked in red. What is this part used for? Can I remove the red part?


In topology we defined a continuous map to be a map between 2 spaces $f: X \mapsto Y$ such that if $U\subset Y$ is open then $f^{-1}(U)$ is open.  Why did we use the preimage; why not say 'a continuous map always maps open sets to open sets'?

Continuity of function $f:X\to Y$ from topological space $X$ to $Y$ is defined by saying that for any open set $U_Y$, $f^{-1}(U_Y)$ is also an open set.  Intuitively, I find this weird. If we interpret “open set” informally as “a set whose elements are nearby each other” (indeed it is a set which is a neighbourhood of all its elements), then it makes intuitive sense to say that a continuous function $f$ is a function that does not “rip elements away from its neighbours”, i.e. if you input an open set $U_X$ (a set whose elements are “nearby each other”), then this should not produce a set where some elements are “not nearby each other”, i.e. it should produce an open set.  So is there an intuitive explanation at this level of abstraction (i.e. without reference to metric spaces for example) of why we don’t define continuity as “for any open set $U_X$, $f(U_X)$ is an open set”?


If I have two perfectly smooth planar surfaces of two solid objects made of the same element and make them touch, why do they not stick and form a single bigger object? By 'touch' I mean bring the pieces so close together that the two most outer layers of atoms of the two object are as close as the second most outer layers of each object to its most outer layer. How do the atoms know to which object they belong? Is it imperfection and dirt or is my intuition wrong?

It is my understanding that metals are a crystal lattice of ions, held together by delocalized electrons, which move freely through the lattice (and conduct electricity, heat, etc.).   If two pieces of the same metal are touched together, why don't they bond?   It seems to me the delocalized electrons would move from one metal to the other, and extend the bond, holding the two pieces together. If the electrons don't move freely from one piece to the other, why would this not happen when a current is applied (through the two pieces)?


I'm trying to insert a new textfield on a page each time user presses enter.  My code      $(":text").on("keypress", function(e) { if (e.keyCode == '13') {     e.preventDefault()     $(this).after("
<input type='text' class='textfield' maxlength='10' value=''/>
") }      });   A new text field appears when I press enter on orginal text field, but the new one does not react any presses. I assume on-function is similar to live, which should be a fix to this kind of problems. What's wrong?

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.


As a new member of this Ubuntu forum, I say greetings to you all! I cannot consider myself much of an advanced Linux guy, but I do prefer it over Windows in my work desktop PC. Which is very sad for me to find out that Ubuntu won't install or even run from live USB. Here's a few screenshots of my PC spec and BIOS settings:          What I've tried:   Creating bootable USB from mac with unetbootin, which makes the USB bootable only through UEFI. GRUB shows up upon booting, but choosing install Ubuntu or try live session ends up with blank screen. Creating bootable USB from Windows with rufus, the USB is now bootable through Legacy. Upon booting, an Ubuntu/Gnome splashscreen shows up about 2-3 seconds, then an empty terminal about another 3 seconds before going blank again. Tried with fast boot on and off. Same results. Tried with secure boot on and off. Same results. Tried with 4GB and 8GB flashdisk. Same results. Tried Ubuntu Gnome 14.04 and 16.10. Same results.   At this point, I ran out of solution to make it work. I notice the official  implying that Linux won't work with my motherboard, but I have had successes installing on my other PCs with similar warning. As of now, I have to live with Windows, which I hope will not be for long as I am optimistic about the prospect that Linux users like you guys will always make things work.  Thank you and good day to you all.

I am trying to boot Ubuntu on my computer.  When I boot Ubuntu, it boots to a black screen.  How can I fix this? Table of Contents:


I have a basic question about the probability density function of the standard normal distribution $X\sim N(0,1)$. I understand that the cumulative distribution function for x is $P(X\le x)$ (in R language it can be obtained by pnorm(x,mean =0, sd =1)). However, I don't understand what $f(x)$ represents (in R:  dnorm(x,mean =0, sd =1)) ? $$ f(x)   =   \frac{1} {  \sqrt{2\pi } }   e^{  -x^2/  2} $$  Note that for a discrete random variable, like the binomial distribution, it is equivalent to $P(Y=x)$.

On the , there is this line:      $p(\mathrm{height}|\mathrm{male}) = 1.5789$ (A probability distribution over 1 is OK. It is the area under the bell curve that is equal to 1.)    How can a value $>1$ be OK? I thought all probability values were expressed in the range $0 \leq p \leq 1$. Furthermore, given that it is possible to have such a value, how is that value obtained in the example shown on the page?


Q: Find the volume cut off from the cylinder $x^2+y^2=ax$ by the planes $z=0 $ and $z=x$ Given Answer:$\frac{128a^3}{15}$ My answer:$\frac{\pi a^3}{4}$ Working: So, first off, we can decipher from the question that $z$ will vary from $0$ to $x$. $y$ will vary from $-\sqrt{ax-x^2}$ to $\sqrt{ax-x^2}$. $x$ will vary from $0$ to $a$ So, the integral to be evaluated will be: $$\int_{0}^a\int_{-\sqrt{ax-x^2}}^{\sqrt{ax-x^2}}\int_{0}^x 1\cdot dzdydx$$ $$=\int_{0}^a2x\sqrt{ax-x^2}dx$$ $$=a\int_{0}^a\sqrt{ax-x^2}dx - \int_{0}^a(a-2x)\sqrt{ax-x^2}dx$$ The second integral turns out to be $0$, so we're left with only the first integral $$=a\int_{0}^a\sqrt{ax-x^2}dx$$ $$=a\int_{0}^a\sqrt{\left(\frac{a}{2}\right)^2-\left(x-\frac{a}{2}\right)^2}dx$$ $$=a\left[\frac{x-\frac{a}{2}}{2}\sqrt{ax-x^2}+\frac{a^2}{4}\sin^{-1}\left(\frac{x-\frac{a}{2}}{\frac{a}{2}}\right)\right]_0^a=\frac{\pi a^3}{4}$$ The calculation looks to be fine, so I think I might be messing up with the limit calculation. If someone could verify, it'd be of great help. Thank you!!

Find the volume cut off from the sphere $x^2+y^2+z^2=a^2$ by the cylinder $x^2+y^2=ax$   Attempt: The projection of the Cylinder ( denoted $D$) on the $xy$ plane is a circle which has the equation: $x^2+y^2=ax ~~~\equiv~~~(x-a/2)^2+y^2=(a/2)^2 ~~~\equiv~~~~r=a \cos \theta$ ( In Polar Coordinates)   The circle has centre $(a/2,0)$ and radius $a/2$. Hence, the $y$ axis is a tangent to it.  Hence, the required volume $V = \int \int \int dv $  $= \int \int_D \int_{-\sqrt {a^2-x^2-y^2}} ^{\sqrt {a^2-x^2-y^2}}dz~~dx~dy$  $=2\int \int_D \sqrt {a^2-x^2-y^2}~~ dx dy$  Switching to Polar Coordinates :   $V=2\int_{-\pi/2}^{\pi/2} \int_{0}^{a \cos \theta} \sqrt {a^2-r^2}~~ r~dr~ d\theta=\dfrac {2}{3}a^3 \pi$  Although, the limits of $\theta$ look conceptually fine to me, my textbook uses the limits $0$ to $\pi$ and gives  the result $= \dfrac {2}{3}a^3 (\pi-\dfrac{4}{3})$.   Could someone please clarify why $-\pi/2$ to $\pi/2$ usage in my expression might be incorrect?  Thanks a lot for your help!


The following is an old competition problem from :     The product $$1!\times 2!\times\cdots 2011!\times 2012!$$ is written  on the blackboard. Which factor, in term of a factorial of an integer, should be erased so that the product of the remaining factors is the square of an integer?   The answer is  $1006!$. But I am curious how one can derive the answer.

Let $ S = 1! ~2!~\dotsm ~100! $. Prove that there exists a unique positive integer $k$ such that $S/k!$ is a perfect square.   I thought this was a cute, fun problem and I did solve it, but any alternative methods that you guys would use?


I have two directories with subdirectories and files inside. How can I find the difference of lines in these directories using the command-line?

I have two directories that should contain the same files and have the same directory structure.  I think that something is missing in one of these directories.  Using the bash shell, is there a way to compare my directories and see if one of them is missing files that are present in the other?


There is a user that needs to be deleted but I need to keep his content. I want to know if there's a way to transfer the ownership of all of his content (nodes, userpoints, etc.) to another user? I tried , but there is no option there.  I know that I can delete the user and keep the content and give it to the Drupal anonymous user, but it´s possible to set up an specific user?

Is it possible to Delete the user and keep its content as created by the one who deleted the user.  Suppose, abc is a user as content creator/editor only and have created 2 contents.    abc got fired as editor and his boss xyz wants to delete his user account.   xyz not only wants to delete abc but while deleting abc transfer all the content created by abc to his name, so that it'd be like created by xyz.  Drupal has only 4 options while deleting user account which doesn't satisfy this need.  If it is possible then how? please elaborate how to achieve that....


I came across a little issue with JS in my project.  Basically I use this type of for loop for most arrays:  for (var item in array) {     // Do something with each "item" }   Now that is working fine and dandy for the most part, but when I use it like this:  for (var element in someDOMelements) {     element.AddEventListener(...); }   It is going to throw me an error, saying AddEventListener is not working However if I adjust the code to something like:  for (var i = 0; i < someDOMelements.length; i++) {     someDOMelements[i].AddEventListener(...); }   It's working as it should. And just to rule it out I logged the array that the DOM elements are in before the loop and it correclty gave me a list (HTML Collection) of all the objects..  Is there anything specific going on here, that prevents me from manipulating DOM elements with these kind of for loops?  Cheers!

I've been told not to use for...in with arrays in JavaScript. Why not?


I can't do sudo apt-get update; when I try it gives me loads of failed to fetch everything. I have no idea what could be wrong. I searched for what the sources.list file should look like and it looks the same to me.  Err http://nl.archive.ubuntu.com vivid InRelease Err http://nl.archive.ubuntu.com vivid-updates InRelease Err http://nl.archive.ubuntu.com vivid-backports InRelease Err http://nl.security.ubuntu.com vivid InRelease Err http://security.ubuntu.com vivid-security InRelease Err http://archive.canonical.com vivid InRelease Err http://nl.security.ubuntu.com vivid Release.gpg   Temporary failure resolving 'nl.security.ubuntu.com' Err http://security.ubuntu.com vivid-security Release.gpg   Temporary failure resolving 'security.ubuntu.com' Err http://archive.canonical.com vivid Release.gpg   Temporary failure resolving 'archive.canonical.com' Err http://nl.archive.ubuntu.com vivid Release.gpg   Temporary failure resolving 'nl.archive.ubuntu.com' Err http://nl.archive.ubuntu.com vivid-updates Release.gpg   Temporary failure resolving 'nl.archive.ubuntu.com' Err http://nl.archive.ubuntu.com vivid-backports Release.gpg   Temporary failure resolving 'nl.archive.ubuntu.com' Reading package lists... Done W: Failed to fetch http://nl.archive.ubuntu.com/ubuntu/dists/dists/vivid/InRelease W: Failed to fetch http://nl.security.ubuntu.com/ubuntu/dists/dists/vivid/InRelease W: Failed to fetch http://nl.archive.ubuntu.com/ubuntu/dists/dists/vivid-updates/InRelease W: Failed to fetch http://nl.archive.ubuntu.com/ubuntu/dists/vivid-backports/InRelease W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/vivid-security/InRelease W: Failed to fetch http://archive.canonical.com/ubuntu/dists/vivid/InRelease W: Failed to fetch http://nl.archive.ubuntu.com/ubuntu/dists/dists/vivid/Release.gpg  Temporary failure resolving 'nl.archive.ubuntu.com' W: Failed to fetch http://nl.archive.ubuntu.com/ubuntu/dists/dists/vivid-updates/Release.gpg Temporary failure resolving 'nl.archive.ubuntu.com' W: Failed to fetch http://nl.archive.ubuntu.com/ubuntu/dists/vivid-backports/Release.gpg  Temporary failure resolving 'nl.archive.ubuntu.com' W: Failed to fetch http://nl.security.ubuntu.com/ubuntu/dists/dists/vivid/Release.gpg  Temporary failure resolving 'nl.security.ubuntu.com' W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/vivid-security/Release.gpg  Temporary failure resolving 'security.ubuntu.com' W: Failed to fetch http://archive.canonical.com/ubuntu/dists/vivid/Release.gpg  Temporary failure resolving 'archive.canonical.com' W: Some index files failed to download. They have been ignored, or old ones used instead..

Err http://archive.canonical.com natty InRelease     Err http://security.ubuntu.com oneiric-security InRelease                Err http://extras.ubuntu.com natty InRelease                             Err http://security.ubuntu.com oneiric-security Release.gpg   Temporary failure resolving ‘security.ubuntu.com’ Err http://archive.canonical.com natty Release.gpg   Temporary failure resolving ‘archive.canonical.com’ Err http://extras.ubuntu.com natty Release.gpg   Temporary failure resolving ‘extras.ubuntu.com’ Err http://gb.archive.ubuntu.com oneiric InRelease Err http://gb.archive.ubuntu.com oneiric-updates InRelease Err http://gb.archive.ubuntu.com natty-backports InRelease Err http://gb.archive.ubuntu.com oneiric Release.gpg   Temporary failure resolving ‘gb.archive.ubuntu.com’ Err http://gb.archive.ubuntu.com oneiric-updates Release.gpg   Temporary failure resolving ‘gb.archive.ubuntu.com’ Err http://gb.archive.ubuntu.com natty-backports Release.gpg   Temporary failure resolving ‘gb.archive.ubuntu.com’  Reading package lists... Done W: Failed to fetch http://gb.archive.ubuntu.com/ubuntu/dists/oneiric/InRelease       W: Failed to fetch http://gb.archive.ubuntu.com/ubuntu/dists/oneiric-updates/InRelease   W: Failed to fetch http://gb.archive.ubuntu.com/ubuntu/dists/natty-backports/InRelease   W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/oneiric-security/InRelease   W: Failed to fetch http://archive.canonical.com/ubuntu/dists/natty/InRelease   W: Failed to fetch http://extras.ubuntu.com/ubuntu/dists/natty/InRelease   W: Failed to fetch http://archive.canonical.com/ubuntu/dists/natty/Release.gpg  Temporary failure resolving ‘archive.canonical.com’ W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/oneiric-security/Release.gpg  Temporary failure resolving ‘security.ubuntu.com’ W: Failed to fetch http://extras.ubuntu.com/ubuntu/dists/natty/Release.gpg  Temporary failure resolving ‘extras.ubuntu.com’ W: Failed to fetch http://gb.archive.ubuntu.com/ubuntu/dists/oneiric/Release.gpg  Temporary failure resolving ‘gb.archive.ubuntu.com’ W: Failed to fetch http://gb.archive.ubuntu.com/ubuntu/dists/oneiric-updates/Release.gpg  Temporary failure resolving ‘gb.archive.ubuntu.com’ W: Failed to fetch http://gb.archive.ubuntu.com/ubuntu/dists/natty-backports/Release.gpg  Temporary failure resolving ‘gb.archive.ubuntu.com’ W: Some index files failed to download. They have been ignored, or old ones used instead.   This is what I'm seeing when I try to run sudo apt-get update. I did an update on my instance yesterday and am now experiencing this.


phpMyAdmin insists on forcing my utf-8 characters into latin1.  Server Info:  Server: Localhost via UNIX socket Server type: MySQL Server version: 5.0.27 - Source distribution Protocol version: 10 Server charset: UTF-8 Unicode (utf8)   phpMyAdmin Version information: 4.0.10 PHP Version 5.2.11  The server version and PHP version is not under my control, and phpMyAdmin is the latest version that will run under PHP 5.2  Neither Import or straight SQL will work. My own internal PHP tools handle utf8 just fine, and update the database correctly.  DROP TABLE IF EXISTS `tempchar`; SET character_set_client = utf8; CREATE TABLE `tempchar` (   `id` int(11) NOT NULL DEFAULT '0',   `name` varchar(100) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT '',   `active` int(1) NOT NULL DEFAULT '0',   `type` int(1) NOT NULL DEFAULT '0',   PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8;  INSERT INTO `tempchar` VALUES (382,'Vicenté Marcos de Cervantés',2,0);   The end result (viewed as utf8) is:  382 : Vicent� Marcos de Cervant�s   Same result when switched to 'Western' (latin1 etc)  382 : Vicenté Marcos de Cervantés   Code that produces the above output:  $result=mysql_query("select * from tempchar where active=2 order by name"); while($row=mysql_fetch_array($result)) {   echo "$row[id] : $row[name]<br>\n"; }   It is clearly phpMyAdmin stepping in and doing something unnecessary. Has anyone got any clues as to how to get it to behave?

I'm setting up a new server and want to support UTF-8 fully in my web application. I have tried this in the past on existing servers and always seem to end up having to fall back to ISO-8859-1.  Where exactly do I need to set the encoding/charsets? I'm aware that I need to configure Apache, MySQL, and PHP to do this — is there some standard checklist I can follow, or perhaps troubleshoot where the mismatches occur?  This is for a new Linux server, running MySQL 5, PHP, 5 and Apache 2.


My wife is Indian citizen with us permanent residence. She would be travelling from Delhi-Frankfurt_London-Chicago with small layovers at London and Frankfurt. As Germany is Schengen and London is non-Schengen, would she still need transit/visitor visa? I know for Indian citizens with US residency, transit visa is not required if there is a single layover in Europe. Also visa is required if there is more tahn one Schengen lay over. What about this one Schengen and one non-Schengen layover?   If I need a transit/visitor visa, do I need for Germany or UK or both?

I'm an Indian passport holder traveling from US to India with transit stops in Heathrow and Frankfurt (my flight is ORD–LHR–FRA–BLR). I have a valid US H1 visa, and my transits in both London and Frankfurt are less than 3 hours in duration.  Based on the above description, do you know if I would need a transit visa in either London or Frankfurt?


Elves in Tolkien's legendarium are a very, very long-lived race, essentially immortal. But, yet, they don't seem to have a lot of offspring. When looking at the family trees of some of the well known Elven characters, the numbers of their offspring seem to range in what compares to humans in the here and now: i.e. low single digits. When actually, it would be easy for a 3000 year old Elf to have dozens if not hundreds of sons and daughters...   Why would Elves who live for millennia not have more offspring?   Are they not interested in raising more children after the first couple? Can they control their fertility somehow?

Is there a particular reason the elves die off so fast? After the first war against Sauron, I recall the elves being decimated, to the point that they're almost useless army-wise in the trilogy. But I'm guessing men suffered equal or greater losses as well.  Anyways, other races just seem much more capable of repopulating, while is seems like there are incredibly few (if any?) elven children. Considering the fact that elves are immortal, wouldn't their population be the fastest to grow? Also the seem to be perpetually 40 years old, so aren't they eternally fertile as well? Why don't they have more kids and build bigger societies?


I have a web application running on an Raspberry Pi Server (Debian).  The application send a simple echo over the commandline to a serialport.  I think the serialport is configured correctly.  The Echo:  echo "G0030af13403b1610097ee8" > /dev/ttyUSB0  When i send the command nothing happend.  But when i open a cat session in a other terminal everything works fine !  cat /dev/ttyUSB0  I think the serialport does not open with the echo  alone ...  Is there a way to open the port and send the echo in one commandline ?

On Linux, I want to send a command string (i.e. some data) to a serial port (containing control characters), and listen to the response (which also usually might contain control characters).   How can I do this as simplest as possible on Linux? An example is appreciated!


I have a question about scala regex  The thing I need to do is given a string, I need to find a sub-string up to a specific word given. For example, my regular expression looks like following  val x= "(?s)^(.*)(?=(foo|bar)".r   Then given a string, I need to find the longest sub-string until before foo or bar. This works perfectly but I would like to get the whole string if the string does not contain foo or bar at all.  Right now if I do  x.findAllIn("hello nice to meet you").toArray   it gives me an empty string but I would like to get "hello nice to meet you" when I do that.  Does anyone have an idea how to implement that?

I have this gigantic ugly string: J0000000: Transaction A0001401 started on 8/22/2008 9:49:29 AM J0000010: Project name: E:\foo.pf J0000011: Job name: MBiek Direct Mail Test J0000020: Document 1 - Completed successfully  I'm trying to extract pieces from it using regex. In this case, I want to grab everything after Project Name up to the part where it says J0000011: (the 11 is going to be a different number every time). Here's the regex I've been playing with: Project name:\s+(.*)\s+J[0-9]{7}:  The problem is that it doesn't stop until it hits the J0000020: at the end. How do I make the regex stop at the first occurrence of J[0-9]{7}?


This problem came up in a practice test:  create a new string array, initialize it to null, then initializing the first element and printing it.  Why does this result in a null pointer exception?  Why doesn't it print "one"?   Is it something to do with string immutability?     public static void main(String args[]) {         try {             String arr[] = new String[10];             arr = null;             arr[0] = "one";             System.out.print(arr[0]);         } catch(NullPointerException nex) {              System.out.print("null pointer exception");          } catch(Exception ex) {             System.out.print("exception");         }     }   Thanks!

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 need to check the middle part of path appear two times. example:      images hotels AND csv fares   I used bellow regex string to check It. but I couldn't find the way. please help me to continue with this?  ((images|csv|files)([A-Za-z0-9\-]+).*){2}

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


I've read some post about why to take the std. deviation and its benefits, here's one of them: , and another by itsols (if my memory is right), it's talking about why to square rather keep the absolute value. Standard deviation is defined as $\sigma = \sqrt{\frac{1}{N} \sum_{i=1}^N (x_i - \mu)^2}, {\rm \ \ where\ \ } \mu = \frac{1}{N} \sum_{i=1}^N x_i$.  That is, it squared all the variances, so why not use take the fourth order or even higher. so the new deviation is defined:    $$\sigma = \sqrt[4]{\frac{1}{N} \sum_{i=1}^N (x_i - \mu)^4}$$    It would still emphasize relatively larger deviations, and would also be differentiable at any point for a continuous function. Do you have any other evidence that shows the standard deviation definition is better than any other?

In the definition of standard deviation, why do we have to square the difference from the mean to get the mean (E) and take the square root back at the end? Can't we just simply take the absolute value of the difference instead and get the expected value (mean) of those, and wouldn't that also show the variation of the data? The number is going to be different from square method (the absolute-value method will be smaller), but it should still show the spread of data. Anybody know why we take this square approach as a standard?  The definition of standard deviation:  $\sigma = \sqrt{E\left[\left(X - \mu\right)^2\right]}.$   Can't we just take the absolute value instead and still be a good measurement?  $\sigma = E\left[|X - \mu|\right]$


Why does the printer ask for all colours to be in CMYK, cant you sometimes send them as RGB like when you might print them from an office printer?

I'm a photographer, who dabbles in graphic design from time to time as well. What are the differences between the various color spaces?


I can compute and use a determinate, but I have no idea what it actually is. What does it express geometrically, algebraically, or in some other way?

In my linear algebra class, we just talked about determinants. So far I’ve been understanding the material okay, but now I’m very confused. I get that when the determinant is zero, the matrix doesn’t have an inverse. I can find the determinant of a $2\times 2$ matrix by the formula. Our teacher showed us how to compute the determinant of an $n \times n$ matrix by breaking it up into the determinants of smaller matrices. Apparently there is a way by summing over a bunch of permutations. But the notation is really hard for me and I don’t really know what’s going on with them anymore. Can someone help me figure out what a determinant is, intuitively, and how all those definitions of it are related?


I have a glassfish service running as a non system user. Glassfish needs to access a shared drive. How do I mount the shared drive for the glassfish service. Also, I would like this to remount at restarting the server.   I've found some things online, but everything is a few years old and/or geared towards system services, so I'm hoping there's newer information out there:  This is what I started with, it's perfect, but it's geared toward system services. The drive isn't viewable to non system users:   This is the question that has the most answers, but most of them are for system users, though the OP seems to not be using the System User. His chosen solution involves wrapping the service, but there's the implication that it needs to be run manually at each start up.   This person has the same issue including non system users, but everyone says it's impossible(or an extremely bad idea) except for the last comment which doesn't really give instructions:

Suppose some Windows service uses code that wants mapped network drives and no UNC paths. How can I make the drive mapping available to the service's session when the service is started? Logging in as the service user and creating a persistent mapping will not establish the mapping in the context of the actual service.