body1
stringlengths
20
4.1k
body2
stringlengths
23
4.09k
I set up a Forge server, which works just fine. I know that you need the client to be able to play in it, and I know that my friends needs it too. But if I add mods to the server, do my friends have to download them as well? If so, where do they put them?
I'm wondering if I could play Minecraft with my friend. A modded Minecraft, only myself with mods and him without mods. Is it possible?
I need to call a method on a class in a JAR file at runtime, using reflection. My Code so far looks like this: package com; import java.io.File; import java.io.IOException; import java.lang.reflect.Constructor; import java.lang.reflect.Method; import java.net.URL; import java.net.URLClassLoader; public class MyJarImport { public static void main(String[] args) throws Exception{ // C:\\KnimeIntegrationProjekt\\Knime\\pmmlj // C:\\Users\\marcel.hoffmann\\JavaWorkspace\\HelloWorld\\bin\\Hello //C:\\Knime\\ClusterJar File file = new File("C:\\Knime\\ClusterJar"); try{ URL url = file.toURI().toURL(); URL[] urls = new URL[]{url}; URLClassLoader cl = new URLClassLoader(urls); //loading the jar file from directory Class<?> cls = cl.loadClass("MainModel"); Constructor<?> constructor = cls.getConstructor(); //instantiate the classfile Object MainModelObj = constructor.newInstance(); /* searching the methods in order to get an instance*/ Method mGetInput = cls.getMethod("getInputFields"); Method mNumInputs = cls.getMethod("getNumInputs"); int dim = (int) mNumInputs.invoke(MainModelObj); Method mMining = cls.getMethod("getMiningFunction"); String miningFunction = ""; /*returns either Classification, Regression or Clustering not used yet, but maybe later to figure out what miningfunction has been used that effects the content of evalOutputs[]*/ miningFunction = (String)mMining.invoke(MainModelObj); String[] inputFieldUnsorted = new String[dim]; inputFieldUnsorted = (String[]) mGetInput.invoke(MainModelObj); Object[] sortedInputs = new Object[dim]; int index = 0; /*sorting the inputs from getInputFields respecting the getInputFieldIndex returns*/ for(int i= 0; i<inputFieldUnsorted.length;i++){ Method mInputIndex = cls.getMethod("getInputFieldIndex",String.class); index = (int) mInputIndex.invoke(MainModelObj, inputFieldUnsorted[i]); sortedInputs[index] = inputFieldUnsorted[i]; } /* sortedInputs[] contains the column names of the iris.csv table invoking the evaluate method. concerning the documentation the method u need to call in order to use the model inside the jarfile*/ Method mEvaluate= cls.getMethod("evaluate", Object[].class); /* allocating an array for the outputs of the evaluate method*/ Object[] evalOutputs = new Object[dim]; evalOutputs = (Object[]) mEvaluate.invoke(MainModelObj, sortedInputs, inputFieldUnsorted); /* closing the opened classloader*/ cl.close(); } catch(IOException e) { System.out.println("File not found!"); e.printStackTrace(); } catch (ClassNotFoundException e) { e.printStackTrace(); System.out.println("Class not found!"); } } } This code throws an exception -- IllegalArgumentException:wrong number of arguments: Exception in thread "main" java.lang.IllegalArgumentException: wrong number of arguments at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at com.MyJarImport.main(MyJarImport.java:58) I referred to the documentation and it says that the method signature is something like: Object[] MainModel.evaluate(Object[] inputs); I debugged the code and I think everything works, in terms of the values of the variables. But this call seems to be the problem. I just read something about invocation, that says the VM tries to invoke the main method of the jar file and the main methods requires its String[] args parameter, but why would it do that, if I want to invoke an explicit method? I hope someone can help me with this little problem.
If I have two variables: Object obj; String methodName = "getName"; Without knowing the class of obj, how can I call the method identified by methodName on it? The method being called has no parameters, and a String return value. It's a getter for a Java bean.
You can think this of the following as a 3d QFT where we try to calculate the self-energy of two fields. $I$ is a this external self-energy and let us assume it does not depend on the loop momenta which I denote a $\vec{x}=(x,y)$. Consider the following propagator $$ P(\vec{r}) = \frac{x-ia}{2i^2[\,(x-ia)^2+(y-ib)^2+(z-ic)^2]\,} \,\, \gamma_i $$ Then we want to calculate $$ I(x) = \int \frac{\,dx \,dy\, dz}{(2\pi)^3} \text{Tr} \left( \frac{x-ia}{2i^2[\,(x-ia)^2+(y-ib)^2+(z-ic)^2]\,}\gamma_x \gamma_x \right) $$ Where Tr$(\gamma_i \gamma_j)=2\delta_{ij}$. Therefore I am trying to resolve the following integral where $x,y,z \in \mathbb{R}$ and $a,b,c$ are constants (internal self-energies if you wish) in $\mathbb{R}$. Then, after simplifying the propagator $P(x,y)$ we end up with the following expression for the $x$ component: $$ I = \frac{1}{2i^2} \int \frac{dxdy}{(2\pi)^2} (x-ia) \int \frac{dz}{2\pi} \frac{1}{[\,(x-ia)^2+(y-ib)^2+(z-ic)^2]\,} $$ but it can be shown that $$ \int \frac{dq}{(q+iv)^2+w^2} = \frac{\pi}{|w|}\theta(|w|-|v|). $$ [e.g. see here ] Thus we get that for $|(y-ib)^2+(x-ia)^2|>|a|$, $\theta=1$ (for this is what we are interested about) and then we are left with $$ I = \frac{1}{4i^2} \int \frac{dxdy}{(2\pi)^2} \frac{(x-ia)}{|(x-ia)^2+(y-ib)^2|} $$ The question is wether I can make the transformation $$ (x-ia) = q \cos \theta $$ $$ (y-ib) = q \sin \theta $$ in polar coordinates. Then $dx dy = qdqd\theta$ and the previous integral becomes, assuming $|q|>0$, $$ I = \int_0^{\infty} dq \int_0^{2\pi} d\theta \frac{q \cos \theta}{|q|} =0 $$ Is this correct? I am confused since one can find complex poles in the $I$. If not, what would the correct way to resolve this be? I have a suspicion that this integral should indeed give zero but how can we find this?
You can think this of the following as a 3d QFT where we try to calculate the self-energy of two fields. $I$ is a this external self-energy and let us assume it does not depend on the loop momenta which I denote a $\vec{x}=(x,y)$. Consider the following propagator $$ P(\vec{r}) = \frac{x-ia}{2i^2[\,(x-ia)^2+(y-ib)^2+(z-ic)^2]\,} \,\, \gamma_i. $$ Then we want to calculate $$ I(x) = \int \frac{\,dx \,dy\, dz}{(2\pi)^3} \text{Tr} \left( \frac{x-ia}{2i^2[\,(x-ia)^2+(y-ib)^2+(z-ic)^2]\,}\gamma_x \gamma_x \right), $$ where Tr$(\gamma_i \gamma_j)=2\delta_{ij}$. Therefore I am trying to resolve the following integral where $x,y,z \in \mathbb{R}$ and $a,b,c$ are constants (internal self-energies if you wish) in $\mathbb{R}$. Then, after simplifying the propagator $P(x,y)$ we end up with the following expression for the $x$ component: $$ I = \frac{1}{2i^2} \int \frac{dxdy}{(2\pi)^2} (x-ia) \int \frac{dz}{2\pi} \frac{1}{[\,(x-ia)^2+(y-ib)^2+(z-ic)^2]\,} $$ but it can be shown that $$ \int \frac{dq}{(q+iv)^2+w^2} = \frac{\pi}{|w|}\theta(|w|-|v|). $$ (e.g. see here ) Thus we get that for $|(y-ib)^2+(x-ia)^2|>|a|$, $\theta=1$ (for this is what we are interested about) and then we are left with $$ I = \frac{1}{4i^2} \int \frac{dxdy}{(2\pi)^2} \frac{(x-ia)}{|(x-ia)^2+(y-ib)^2|}. $$ The question is wether I can make the transformation $$ (x-ia) = q \cos \theta $$ $$ (y-ib) = q \sin \theta $$ in polar coordinates. Then $dx dy = qdqd\theta$ and the previous integral becomes, assuming $|q|>0$, $$ I = \int_0^{\infty} dq \int_0^{2\pi} d\theta \frac{q \cos \theta}{|q|} =0. $$ Is this correct? I am confused since one can find complex poles in the $I$. If not, what would the correct way to resolve this be? I have a suspicion that this integral should indeed give zero but how can we find this?
My son was flying from a Rochester NY to Washington Dulles on flight 4578. They were to land, pickup passengers, then continue to Raleigh. The flight from Rochester was delayed so late arriving in DC. While in the air, the same flight number left DC to Raleigh - obviously different plane. How does that happen?
There's a daily flight, let's call it AB 1234 which leaves at 11am with a flight duration of more than 13 hours. I noticed that every day, the same flight AB 1234 leaves at 11am. It seems physically impossible for the same plane to travel 13 hours and return in about a similar amount of time to still make the next day flight. Is it possible for two or more different planes to share the same flight number?
The Question is: "Prove that there are infinite values of natural $n$ for which $7n+3$ is prime. Edit: I have realised that this is a direct consequence of Dirichlet's Theorem, but the proof of this theorem is beyond me at the moment. Is there any simple/elementary way to prove this statement?
Is there a proof in the spirit of Euclid to prove Dirichlet's theorem on primes in arithmetic progression? (By the spirit of Euclid, I mean assuming finite number of primes we try to construct another number which has a prime factor which falls in the same equivalence class as the other primes but the number is not divisible by any of the primes we considered in the initial list.) I am aware of the proof using $L$ functions but I am curious to know if Euclid's "simple" idea can be extended to all other cases as well. I tried googling but am unable to find a proof other than the ones relying on $L$ functions. If it is not possible, to what cases can Euclid's idea be extended to? Any other proofs are welcome as well.
Is there a function $f:\mathbb N \to \mathbb N$ such that $\forall n \in \mathbb N, f(f(n))=n+2015$ ? Here's what I've done: Assuming such a function exists, $f(f(f(n)))=f(\color{red}{f(f(n))})=f(n+2015)=\color{red}{f(f(}f(n)\color{red}{))}=f(n)+2015$. Hence $\forall n, f(n+2015)=f(n)+2015$. A simple induction yields $\forall n,\forall k, f(n+2015k)=f(n)+2015k$. This means that $f(n) \operatorname{mod}2015$ only depends on $n \operatorname{mod}2015$. What then ? I can't reach a contradiction from here.
Show that there is no function $f: \mathbb{N} \to \mathbb{N}$ such that $$f(f(n))=n+1987, \ \forall n \in \mathbb{N}$$ This is problem 4 from IMO 1987 - see, for example, .
The following information may help to resolve the situation: The following packages have unmet dependencies: vlc : Depends: vlc-nox (= 2.2.1-2~ppa1) but it is not going to be installed Depends: libavcodec56 (>= 6:11~beta1) but it is not installable or libavcodec-extra-56 (>= 6:11.2) but it is not installable Depends: libavutil54 (>= 6:11~beta1) but it is not installable Depends: libqt5x11extras5 (>= 5.1.0) but it is not installable Depends: libsdl-image1.2 (>= 1.2.10) but it is not installable Depends: libva-drm1 (>= 1.1.0) but it is not installable Depends: libva-x11-1 (>= 1.0.3) but it is not installable Depends: libva1 (>= 1.2.0) but it is not installable Depends: libvlccore8 (>= 2.2.0~pre1) but it is not going to be installed Recommends: vlc-plugin-notify (= 2.2.1-2~ppa1) but it is not going to be installed Recommends: vlc-plugin-samba (= 2.2.1-2~ppa1) but it is not going to be installed E: Unable to correct problems, you have held broken packages.
After upgrading from 10.04 to 12.04 I am trying to install different packages. For instance ia32-libs and skype (4.0). When trying to install these, I am getting the 'Unable to correct problems, you have held broken packages' error message. Output of commands: sudo apt-get install -f Reading package lists... Done Building dependency tree Reading state information... Done 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. After running this: sudo dpkg --configure -a foo@foo:~$ sudo apt-get install -f Reading package lists... Done Building dependency tree Reading state information... Done 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
We see in Harry Potter and the Order of the Phoenix that McGonagall has her Transfiguration students practice the Vanishing Charm () on mice (and has previously had them do snails): “As I was saying, the Vanishing Spell becomes more difficult with the complexity of the animal to be vanished. The snail, as an invertebrate, does not present much of a challenge; the mouse, as a mammal, offers a much greater one. This is not, therefore, magic you can accomplish with your mind on your dinner. So — you know the incantation, let me see what you can do. . . .” Harry Potter and the Order of the Phoenix ...and Ron manages to vanish most of his mouse: “Well, it’s a start,” said Ron, holding up a long, wriggling mouse tail and dropping it back into the box Lavender was passing around. Harry Potter and the Order of the Phoenix This raises the question of is it possible to Vanish humans? We've seen that mammals (such as our friendly, little mouse) are not exempt from being Vanished. Does this hold true for humans?
Just thought about this: What will happen if you cast a Vanishing Charm to a human? Will they to end up in "nothingness"? If that is true, then why was it not an unforgivable curse?
I have some problem understanding lambda. My point is adding 1 to a variable in lambda until some point. Example; x = 0 t = lambda y: y+1 while True: print ("Hello") t(x) if x==5: break I thought it will stop after 5 times, but I realized that lambda is adding 1 only once. And this while loop is infinite. Why is that? Why lambda doesn't add 1 to that variable until while loop is finish like x += 1 ?
What exactly are the Python scoping rules? If I have some code: code1 class Foo: code2 def spam..... code3 for code4..: code5 x() Where is x found? Some possible choices include the list below: In the enclosing source file In the class namespace In the function definition In the for loop index variable Inside the for loop Also there is the context during execution, when the function spam is passed somewhere else. And maybe pass a bit differently? There must be a simple reference or algorithm somewhere. It's a confusing world for intermediate Python programmers.
I want to start using LaTeX to organize my proofs into a readable fashion. This motif is due to my professors preferring e-mail communication instead of reading a chicken-scratch proof. I know enough LaTeX such that I can post on math.SE and make my question readable, but I do not know how to include LaTeX in a document. How do I make my proof into a LaTeX document?
I'm not really a programmer but I'm quite interested in learning how to use LaTeX/TeX. I've looked it up on Wikipedia and scanned through it and the documents created through this way of editing is just beautiful. Formulas are also available within it too, so writing math thesis or physics papers would be amazing. Is this system just for programmers, or can normal people use it too? (I'm mainly a designer, so I usually edit it in Word or InDesign.)
I'm a Sri Lankan passport holder looking for advices to apply for Taiwan tourist visa in Shanghai. Since there is no Taiwan embassy in Sri Lanka, normally Sri Lankans go to India or Singapore to get Taiwan visas. I'm frequently flying to China, hence considering about applying it in Shanghai.
I am a Sri Lankan citizen currently living in Sri Lanka. I'm planning a short trip to Taiwan this October, and they require us to get visa in advance to enter the country. To make the matter worse, there is no Taiwan embassy in Sri Lanka. There is a Chinese embassy that issue Chinese visas. I have another 7 day visit planned on this September to China. I understand China and Taiwan require separate visas, and others visitors to Taiwan usually get their visa in India or Singapore Taiwanese embassies. Is there a Taiwanese embassy in China, that can issue visas to foreign nationals? Do you know how long it would take, and if there is an expedited service available (because I will be staying a few days in China). Both China and Taiwan visa would be visit visas. I searched many sites about embassies but there were very ambiguous to me.
I am using an API for the Plaxis2D program which is based in python. it appears that for one of the material models, they have a method defined as lambda In [60]: dir(g_i.MCC) Out[60]: [... 'emin', 'gammaPore', 'gammaSat', 'gammaUnsat', 'info', 'kappa', 'kappaModified', 'lambda', 'lambdaModified', 'materialcommand', 'multiply', ...] Naturally when I attempt to call this method I get an error In [61]: g_i.MCC.lambda File "<ipython-input-61-fc4a65285477>", line 1 g_i.MCC.lambda ^ SyntaxError: invalid syntax Other methods work fine: g_i.MCC.kappa Out[62]: <Object {AED3A25E-014A-4035-B114-0047EE1C748C}> Of course, it is stupid to have a method be given a name identical to an intrinsic Python function. However I am not sure the API they provide is really their main priority... which leads to situation like this... How can I circumvent such that I can access this method?
What is the best way to go about calling a function given a string with the function's name in a Python program. For example, let's say that I have a module foo, and I have a string whose content is "bar". What is the best way to call foo.bar()? I need to get the return value of the function, which is why I don't just use eval. I figured out how to do it by using eval to define a temp function that returns the result of that function call, but I'm hoping that there is a more elegant way to do this.
I'm no expert in any language, especially English, however.. In all questions lists, there're columns for votes, answers and views. The answers and views make sense, but a positive number in votes shows the sum of positive and negative votes for a question, not the number of votes that one might expect. At least this is what I am assuming since votes can be negative. How about renaming votes to score or something else that's less misleading?
When viewing questions in the normal, "Interesting Questions" tab, (or any other view for that matter), the question's score is displayed to its left, and is labeled "votes". But is it the correct word to use? Wouldn't "Score" be more appropriate (because a score of "1" doesn't necessarily mean "1 votes", it could mean "100 upvotes and 99 downvotes"). My suggestion, use "score" Your thoughts?
I have a problem understanding usage of articles before abstract nouns. There are a couple of rules I found: Use articles with uncountable abstract nouns to refer to a specific feeling: a deep distrust, an everlasting love, the love of music We only use an article before an abstract noun if we wish to talk about a specific type of the noun Could you please explain, why the following sentences are correct (they are from a textbook): 1) However, it ends with great optimism. - it seems to me like a specific feeling that requires an indefinite article 2) Would you like to experience the deep sense of satisfaction you get from creating your own original work - why do we use the article before deep sense, not an indefinite article a or no article? 3) She brought me up in relative peace and security - why don't we need any article before peace and security? 4) I was overwhelmed by the excitement of such an adventure - why do we need the here? Thank you for your help in advance!
"Mornings came and cast a blinding sunlight over everything, and he felt like nothing worthwhile could be accomplished." For some reason, I feel like "a blinding light" is ok, but if its sunlight, then I should drop the "a" and write "cast blinding sunlight", but I'm not sure why I feel this way. Can anyone offer some enlightenment? edit - alternate phrasing, closer to being a literal translation: "Mornings came without warning, flooding the day with a strong sun, and he felt like nothing worthwhile could be accomplished." I would still like an answer to the technical question of whether I should drop the "a", but would also appreciate knowing if anyone thinks option #2 is a better choice.
Let $\{x_n\}$ be a bounded sequence of distinct real numbers such that $|x_{n+1}-x_n|<|x_n-x_{n-1}|,\forall n\in \mathbb N$ , then is it true that $\{x_n\}$ converges ? The motivation for this comes from the fixed point theorem that if $X$ is compact metric space and $f:X\to X$ is a function such that $d(f(x),f(y))<d(x,y),\forall x,y \in X , x\ne y$ then $f$ has a fixed point.
What is an example of a sequence in $\mathbb R$ with this property that is not Cauchy? I know that Cauchy condition means that for each $\varepsilon>0$ there exists $N$ such that $d(x_p,x_q)<\varepsilon$ whenever $p,q>N$.
I have installed Ubuntu 16.04 on a free dos laptop. I have kept the free dos partition on the system. Now I want to uninstall ubuntu and install windows 7. Windows installer disk is unable to install on the partition of ubuntu. help me guys i need to install windows 7.
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.
I brought my road bike to Mumbai where the roads are pretty bad (lots of potholes, gravel...), I've been getting a puncture roughly every 2 weeks. The tires are about 6 months old. They are a bit worn out, but people I ask here say it's fine. What are my options to deal with this? Should I line the tire with old tubes?
I have been getting flats every 20-30 miles for the last 2 months. This has caused serious inconvenience to me, as bicycle is my preferred mode of transport to work and class. Details of the situation: Hybrid bicycle (Specialized Globe 2007 -- 5,000 miles ballpark on it) Only rear wheel is flatting Rear wheel is 622x19C rim Tire is 700x35, Kenda 700 35-42 inner tube I just replaced the whole rim and spokes, for $60 (I had a lot of broken spokes and the rim was out of alignment badly). However the flats keep coming. Tire pressure suggested on the rear wheel is 30-60 PSI I run the pressure between 50-60 PSI I weigh 212lbs. and I carry up to 30 extra pounds of load (backpack etc.) The holes in the inner tube are usually single tiny punctures. I never find anything in the tire like glass or anything The tire seems to have been worn very quickly (it seems kind of like a cheap tire). Is the tire a possible cause, or is it possible that some misalignment in the hub (Shimano attached to an 8 speed cassette) is just messing things up? This is driving me crazy... maybe I should buy a new tire and run the pressure much higher? Run the pressure lower? buy some specialized kind of inner tube? I would really do anything to avoid having to patch flats every other day! **** THANKS EVERYBODY, I BOUGHT AN ARMADILLO FROM SPECIALIZED... NO FLATS IN 2 WEEKS **** I think the pressure was way too low on the piece of crap tire i had before ... armadillo is solid!!
I want to modify \printindex to eliminate the \addcontentsline{toc}{chapter}{Index line so that an entry does not appear in the table of contents
I want the entries in the TOC for the indices to align with the Chapter entries. I can do this with \addcontents. \printindex also puts an entry in the TOC but it is aligned with the section entries. So I want to: change how printindex makes its entry into the TOC or to eliminate printindex entry. MWE: \documentclass{book} \usepackage{multind} % create the indices \makeindex{names} \makeindex{subject} \newcommand{\Ndx}[1] { \index{names}{#1} } % define the type of entry \newcommand{\Sdx}[1] { \index{subject}{#1} } % to the indices \usepackage[headings]{fullpage} % 8-1/2, 11 page with 1" margins \usepackage{fancyhdr} \pagestyle{fancy} \begin{document} \fancyhead{} \fancyfoot{} \renewcommand{\sectionmark}[1]{\markright{\thesection.\ #1}} \fancyhead[LE,RO]{\rightmark} \fancyhead[RE,LO]{\thepage} \tableofcontents % put table of contents here \chapter{\bf Logic, Plausibility, and Probability} \label{Ch:Logic} \section{Logical Arguments and Reasoning } It is obvious that logical arguments are essential to the judicial system. The logic must be able to treat syllogisms\Sdx{syllogism} that range from deductive\Sdx{syllogism!deductive} to abductive\Sdx{syllogism!abductive}, that is from strong to weak syllogisms \Sdx{syllogism!weak}\Sdx{syllogism!strong} as illustrated in the table taken from Author \Ndx{Author} \Ndx{Cohen} \Sdx{Cohen on probability} \clearpage \addcontentsline{toc}{chapter}{Subject Index} \printindex{subject}{Subject Index} \addcontentsline{toc}{chapter}{Name Index} \printindex{names}{Name Index} \end{document}
Is there ANY way to save this blurry photo? I have photoshop. PLEASE HELP.
How can I fix this picture? Somebody else took this picture and well he wasn't able to do it very well, and it's blurred. I have photoshop
Sorry for the stupid question, but is the following sentence correct: "The main strength of the paper is the results"? I am always confused by the form of the verb in such sentences, so should the verb "to be" here correspond to the "strength" or to the "results"?
My fish's native habitat is rice fields. My fish's native habitat are rice fields. Which one is correct? I'm pretty sure it's the first, since 'is' modifies 'habitat,' but it still sounds weird...
I have a string varaible str. This variable has a value "26". Can I convert it into hex that results 0x26 not 0x1A. Means str="26" int iConvert=**SomeConvertionFunction(str)** should result into iConvert=0x26
uint color; bool parsedhex = uint.TryParse(TextBox1.Text, out color); //where Text is of the form 0xFF0000 if(parsedhex) //... doesn't work. What am i doing wrong?
The 5e rules for multiclassing (PHB p. 164) state that your spells known and prepared are based on your class level for each class, but your spell slots are based on your combined levels, which may result in you having spell slots of higher level than any of the spells you know. They provide an example for Ranger 4 / Wizard 3. With respect to Wizard spells known it says: As a 3rd level wizard, you know three wizard cantrips, and your spellbook contains ten wizard spells, two of which (the two you gained when you reached 3rd level as a wizard) can be 2nd level spells. If your Intelligence is 16, you can prepare six wizard spells from your spellbook. This combination counts as a 5th level caster for determining spell slots: you have four 1st level slots, three 2nd level slots, and two 3rd level slots. However, you don't know any 3rd level spells....You can use the spell slots of those [higher levels than you have spells] slots to cast the spells you do know -- and potentially enhance their effects. Suppose this Ranger 4 / Wizard 3 character with Int 16 comes across a 3rd level wizard spell scroll, and has on hand sufficient material components and fine inks to copy the scroll into her spellbook. Is she allowed to copy the spell? Is she allowed to prepare and cast it? The rules for copying a spell into your spellbook (PHB P. 114 sidebar) require you to have spell slots of that level. When you find a wizard spell of 1st level or higher, you can add it to your spellbook if it is of a level for which you have spell slots and if you can spare the time to decipher and copy it. RAW then it appears that the character, who does have two 3rd level slots, would be permitted to copy it into her spellbook. And RAW (from the first quote) she can prepare six wizard spells from her spellbook which now happens to contain a 3rd level spell. There is no qualification on the level of the spells from her spellbook that she can prepare. It seems to me that RAI is probably that she can only copy/prepare spells of a level that she would normally have access to as a level 3 Wizard. Does my RAW reasoning have any flaw? And would you allow it in your game?
The "Your Spellbook" sidebar for the wizard includes the following line: Copying a Spell into the Book. When you find a wizard spell of 1st level or higher, you can add it to your spellbook if it is of a level for which you have spell slots and if you can spare the time to decipher and copy it. Does this mean that a Wizard 1/Cleric 19 can copy any wizard spell they find into their spellbook? Is there anything preventing them from casting these spells?
I am newbie to jQuery.I am trying to call the Blur function on each dynamically Added row and send the values of each row of both text box to PHP.For first row, it works but dynamically added rows, its not working. My Code is as follows: HTML and Jquery: <!doctype HTML> <html> <head> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script> </head> <script type="text/javascript"> var rowCount = 1; function addMoreRows(frm) { rowCount ++; var recRow = '<p id="rowCount'+rowCount+'"><tr><td><input name="" type="text" id="co_name" size="17%" maxlength="120" /></td><td><input name="" type="text" id="co_qty" maxlength="120" style="margin: 4px 5px 0 5px;"/></td></tr> <a href="javascript:void(0);" onclick="removeRow('+rowCount+');">Delete</a></p>'; jQuery('#addedRows').append(recRow); } function removeRow(removeNum) { jQuery('#rowCount'+removeNum).remove(); } </script> <body> <table rules="all" style="background:#fff;"> <tr> <td style="font-size:14px;" >Name</td> <td style="font-size:14px;" >Email</td> <td><span style="font:normal 12px agency, arial; color:blue; text-decoration:underline; cursor:pointer;" onclick="addMoreRows(this.form);"> Add More </span> </td> </tr> <tr id="rowId"> <td><input name="" type="text" id="co_name" value="" size="17%"/></td> <td><input name="" type="text" id="co_qty" value="" /></td> </table> <div id="addedRows"></div> </td> </tr> <script> $(document).ready(function(){ $('#co_qty').on('blur',function () { var username = $('#co_name').val(); var password = $('#co_qty').val(); $.ajax({ type: "POST", url: "blur.php", data: {'title':username ,'title1':password}, success: function(msg) { alert(msg) } }); }); }); </script> </body> </html><br> blur.php $var=$_POST['title']; $var1=$_POST['title1']; echo $var."Success!".$var1; I am not getting it. Please do suggest me.Thanks in advance.
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.
Prop.: Let T: E -> E be a linear mapping. If T is surjective, then T is injective. I try to prove using that: If Tx = 0 implies x = 0, then T is injective. But it not work... Any help?
Maybe I am not good at looking for the right questions but I haven't seen this task anywhere so I hope it is no duplicate. I have to prove the following statement: Let $V$ be a finite dimensional vector space and $f:V \rightarrow V$ a linear map. Show that $f$ is injective $\Longleftrightarrow$ $f$ is surjective. The following is already known: $(i)$ $\ker f$ and $\def\Im{\operatorname{Im}}\Im f$ are linear subspaces $(ii)$ There exists an isomorphism $V/\ker f\rightarrow \Im f$ $(iii)$ If $U\subset V$ is a linear subspace then $\dim V/U=\dim V-\dim U$ $(iv)$ $f$ is injective $\Longleftrightarrow$ $\ker f=\{0\}$ So my approach is the following: $"\Longrightarrow "$ Let $f:V\rightarrow V$ be injective. Then due to $(iv)$ $\dim\ker f=0$. Hence due to $(ii)$ and $(iii)$ $\dim V/\ker f=\dim V=\dim\Im f$. Since $\dim V=\dim\Im f$ it implies that $f$ is surjective. $"\Longleftarrow "$ Let $f$ be surjective. Then $\dim\Im f=\dim V$. Additionally, because of $(ii)$ it is $\dim\Im f=\dim V/\ker f$. Thus $\dim V=\dim V/\ker f=\dim V-\dim\ker f$. This means that $\dim\ker f=0$ and hence $\ker f=\{0\}$ and thus $f:V\rightarrow V$ is injective. For me it all makes sense but maybe I missed something. Thank you in advance.
Broadly speaking, how does LaTeX look for class and styles in a *nix based system? More specifically, export TEXMFHOME='~/.config/texmf' followed by texhash ~/.config/texmf is not referenced when I call one of my own classes or styles. Interestingly, even if TEXMFHOME remains as I have just described, LaTeX will still search ~/texmf/tex/latex/local/ for classes and styles. That leads me to believe that it will always look there but perhaps I am wrong. So, how does LaTeX search for classes / styles? Which folders does it look within, and how do you edit those settings? EDIT: Unlike other questions, I am also wondering how to edit these recursive settings, either by declaring variables or editing config files.
I know that I can check from where one particular package would be called, using kpsewhich <packagename>.sty and that if I want a custom package, I usually have to put it in the same folder as my document. I assume that similar to a $PATH, LaTeX checks a list of paths in an attempt to find my package. Which paths are those? In what order are they checked? If this is system-specific, how can I find out the configuration for my system? Related questions: , the answers to which contain some paths that LaTeX apparently checks. mentions > /usr/local/texlive/2009/texmf > /usr/local/texlive/2009/texmf-dist > /usr/local/texlive/texmf-local > > as well as other directories. (Neither of those lists is complete).
(Please tell me if this is the wrong place for such a question / comment and feel free to move this question somewhere else. I am also pretty sure similar things may have been discussed before.) The situation I love StackExchange because of the fast response and the high quality of answers you get. But: Over the past months either my questions have dropped significantly in quality (that could of course be an explanation), or it's a real trend that more and more people do not try to answer the question itself but start to fuss about why I would ask such a question. This then leads to long discussions in the comments about why it is wrong to ask such a question and where I possibly went wrong in the beginning. That is fine as long as it's helping and I appreciate if people try to understand the problem I am working on. However, I see more and more people embarking on discussions that are a pure matter of taste. As an example if I try to define a shortcut in LaTeX that makes it faster for me to write LaTeX documents, and I need help to do so, then I am happy that I get a quick answer. But I do not want to have to justify why I want this shortcut. Or to hear that it is misleading and not useful or whatever. Questions Is it just me or do others have that impression, too? Could it be a reaction to the increasing popularity of SE, with the potential consequence that indeed the average quality of questions decreases? How do I react to these comments? Just ignore them? Do I have to justify my question? Should I include a justification already in the question, anticipating such comments? (In fact I have the feeling, the more I try to justify, the more people feel encouraged to dispute the validity of the question.)
Sometimes I or others ask a question which causes the reader to think why would he want to do that?. There are reasons and the question is usually legitimate. I and others often seem to get a lot of comments (which I don’t mind), and comments posted as answers (which I do mind), which do not even attempt to address the question and instead question the approach and provide zero insight on the actual question. I am talking about the kind of question where the question is usually a few sentences, but a solid explanation of why the approach that leads to the question is chosen takes almost a full page of writing, and is irrelevant to the question itself. The issue seems to be well understood and there are various related questions on Meta, such as: My question is not why this happens. My question is how can I formulate a question in such a way that this happens less. To be clear, I am asking What can a question do to avoid getting answers that do not address the question?, in the context of well-meaning answerers who try to see an underlying cause. Two questions with different approaches which should show what I mean: (note that the question is off-topic but it still serves to illustrate the type of questions and answers I mean)
I'm a student at STEM School (10th grade), and I'm studying optics and light in Physics. I was studying the Fermat principle which say: The path taken between two points by a ray of light is the path that can be traversed in the least time. I asked myself, how light is supposed to know which path to take, in so less time (3*10^8 m/s), considering light hasn't mass and how their 'atoms and molecol' set to choose the less time? (Sorry for my english, but english isn't my 1st language)
We know from that light follows the fastest path. But how does light know which path is the fastest?
$$\frac{mv^2}{2}= Kinetic Energy$$ Can you explain me? What is purpose of $v^2$, $mv^2$, I am trying to understand the formula.
As says: [...] the kinetic energy of a non-rotating object of mass $m$ traveling at a speed $v$ is $\frac{1}{2}mv^2$. Why does this not increase linearly with speed? Why does it take so much more energy to go from $1\ \mathrm{m/s}$ to $2\ \mathrm{m/s}$ than it does to go from $0\ \mathrm{m/s}$ to $1\ \mathrm{m/s}$? My intuition is wrong here, please help it out!
PHB p.193: When you ready a spell, you cast it as normal but hold its energy, which you release with your reaction when the trigger occurs. the same page: When the trigger occurs, you can either take your reaction right after the trigger finishes or ignore the trigger. The spell is cast and is waiting to be released. If you ignore all possible triggers, what happens with the spell? Does it dissipate without a trace? handles the scenario of ignoring just one (or some number) of triggers, but I'm wondering what happens if you ignore all triggers.
The PHB is a bit unclear when it comes to readied spells in combat. If I lose my concentration do I lose the spell slot? What about if the trigger never occurs, do I get the spell slot back?
Ok, so i made a scientific calculator recently and one of my friends was using it when he said that if he types in (2.1 * 3) the answer should be 6.3 but he recieves something like: 6.30000001. Why does this happen? Is this some sort of bug in java? EDIT: Its not just a problem with my calc, i also made a small java file for multiplying 2 numbers and i face the same probelem even in cmd
Consider the following code: 0.1 + 0.2 == 0.3 -> false 0.1 + 0.2 -> 0.30000000000000004 Why do these inaccuracies happen?
I am looking for a formula of the distance from Origin after N equal steps in random directions in a 2 or 3 dimensional spaces. Can someone help me with a reference to a book, article or any publication dealing with this subject? Thanks!
I am looking for a formula that evaluates the mean distance from origin after $N$ equal steps of Random-Walk in a $d$-dimensional space. Such a formula was given by "Henry" to a question by "Diego" () $$\sqrt{\dfrac{2N}{d}} \dfrac{\Gamma(\frac{d+1}{2})}{\Gamma(\frac{d}{2})}$$ I will be very gratefull if you can give me reference to an article that show how this formula was derived. Thanks!
When editing a question or answer (on multiple websites, including Stack Overflow, Code Review, and Database Administrators), the Markdown editor uses proportional fonts. This is extremely annoying on sites that deal with lots of code blocks. When asking a new question, it uses monospace — the way it was until recently, and the way it should be.
When ing a post, the font in the edit box with source code for the post is proportional: This does not happen when or answers: Tested with the latest Firefox and Safari on macOS High Sierra.
I am creating a result source and in the query I want to add something so it removes all of the sites like DispForm, Editform, allitems. How can I do this in the query?
Is anyone having any idea on how to exclude List Forms from Search result. I tried lot many things suggested on google, but none of them seems to be working.
SL Snoke looks like he has been around for a while, I am wondering where he was when the Empire ruled the Galaxy? Did Darth Sidious and Darth Vader not sense his presence in the force?
In , DVK says: Snoke ... we still have no idea who he is but he predates Galactic Empire... Having seen the film twice, I can't remember how we would know that, I don't recall references to Snoke's age or past history. But is knowledgeable about Star Wars in general, is there something that tells us this? In the film, or the novelisation, or...?
I have an overfull \hbox in my list of figures, not because of long captions/page number over run, which is addressed in other postings(addressed in and , but because the figure number (left hand side of the listing) is too long. Below is a few lines from the .lof file. It is only the last three figures that generate an error. Figures 4.6.8 and 4.6.9 generate no overfull box but 4.6.10,4.6.11,4.6.12 all do. \contentsline {figure}{\numberline {4.6.8}{\ignorespaces Repeat: Model \& Data: Detail}}{164}{figure.4.6.8} \contentsline {figure}{\numberline {4.6.9}{\ignorespaces High School GPA: Model \& Data}}{165}{figure.4.6.9} \contentsline {figure}{\numberline {4.6.10}{\ignorespaces Math SAT Score: Model \& Data}}{166}{figure.4.6.10} \contentsline {figure}{\numberline {4.6.11}{\ignorespaces Timing: Model \& Data}}{167}{figure.4.6.11} \contentsline {figure}{\numberline {4.6.12}{\ignorespaces sequencing of Physics 7A Effect by Course}}{168}{figure.4.6.12} Harish Kumar provided a solution. Much thanks
This is a follow up question of . The formatting problem has nothing to do with cleanthesis.sty. The problem is that if I use the charter font, page numbers greater than 99 are not formatted correctly in the table of content. \documentclass[draft=on]{scrbook} \usepackage{blindtext} \usepackage{charter} \listfiles \begin{document} \tableofcontents \section{Section 1} \blindtext[100] \section{Section 2} \blindtext[500] \section{Section 3} \end{document}
I'm tracking a box in a video by tracking dots on each side, and at certain points in the animation a side of the box disappears, and then later on that side is visible again. As a result, the dots that are on that side (which I am tracking) disappear, and then reappear. What do I do with that time in the middle, where those dots are invisible? Do I just stop tracking? How? How do I get Blender to know that the time in the middle is irrelevant? Can I get those trackers to stop tracking and restart when those tracker dots are visible again? I'm afraid that Blender takes that time in the middle into account, thus causing the tracking of the object to totally fail. I hope this make sense.
I am motion tracking a video in which the camera turns away from one scene and then shortly returns to it. However, the segments that went off-screen lose their track and do not continue tracking once the camera returns. I am wondering if there is a manual way to tell a segment where and when to continue looking for it's tracking target. Is this possible to do?
For example Noise is an interface and Animal is a class that implements Noise. Why can I write under main: Noise n = new Animal(); And what is the meaning of it?
I have seen this mentioned a few times and I am not clear on what it means. When and why would you do this? I know what interfaces do, but the fact I am not clear on this makes me think I am missing out on using them correctly. Is it just so if you were to do: IInterface classRef = new ObjectWhatever() You could use any class that implements IInterface? When would you need to do that? The only thing I can think of is if you have a method and you are unsure of what object will be passed except for it implementing IInterface. I cannot think how often you would need to do that. Also, how could you write a method that takes in an object that implements an interface? Is that possible?
How do I prove that $3$ does not divide $n^2+1$, for all $n\in\mathbb{Z}$, thought of in separate cases, but did not get, induction also was unable to ....
Problem: Is it true that $3$ never divides $n^2+1$ for every positive integer $n$? Explain. Explanation: If $n$ is odd, then $n^2+1$ is even. Hence $3$ never divides $n^2+1$, when $n$ is odd. If $n$ is even, then $n^2+1$ is odd. So $3$ could divide $n^2+1$. And that is where I am stuck. I try to plug in numbers for $n$ but I want a more general form of showing that $3$ can't divide $n^2+1$ when $n$ is even.
I have noticed that now the answers to questions are not sorted by votes anymore. Is this a new feature? For example, (though you may need to refresh... random, you know..) I assume it is related to some meta question, but I didn't find such.
Possible Duplicate: In a question, I see that each time I refresh the page, the answers were placed in a different order. The question has 3 answers each with zero votes. The users' reputation was something like 6, 1200, and 7300 but these numbers didn't affect the order. What is the criteria of the sort order of the answers?
You are going to be the death of me. The above is a correct usage. Is it also correct if there's a phrase between you and are? You wearing black dresses are going to be the death of me? Or is the correct form in the modified sentence is: You wearing black dresses is going to be the death of me?
The sentence Women driving cars is, of course, such a foreign sight to a society like Saudi Arabia The subject is not "women" (otherwise, the verb would have been 'are'); the subject, as I mean to use it, is the rarity of seeing women driving cars. The subject, in other words, is "women driving cars" as a thing. Does this give me licence to use 'is' here? Thank you.
StrManagers = string.Empty; foreach (Manager manager in Managers) { StrManagers = manager.Name + "</br>"; } How can I achieve this using Linq?
What is the most efficient way to write the old-school: StringBuilder sb = new StringBuilder(); if (strings.Count > 0) { foreach (string s in strings) { sb.Append(s + ", "); } sb.Remove(sb.Length - 2, 2); } return sb.ToString(); ...in LINQ?
For example: words, foods, goods, etc. And if without the 's', how would the 'd' in those words be pronounced? Would it be pronounced like voiced /d/ or unvoiced /d/?
I'm wondering how to pronounce these kind of words: words birds I've tried to pronounce both /d/ and /z/ sound but it's really hard for me. I noticed some of samples in dictionaries and it seems like they almost omit the /d/ sound.
I remember that I was able to make Excel highlight cells containing formulas with a different color, making easier to distinguish between calculated cells and cells where I manually entered data. I recently switched to Mac and now I'm not able to find the same option on Excel 2011.
Is it possible to conditionally format a cell if the cell contains formula (to alert myself and other users when updating the cell)?
Although I haven't witnessed any instances of this textually or phonetically, can 'I am' be interchanged for 'I'm' when it used in the examples provided below? (1) [Person A]: Are you X? [Person B] : I'm (2) [Person A]: What are you? [Person B] : A cat, I'm From some of the dictionary entries for "I'm" that I've seen (, ) they don't appear to limit its definition in a way such that it can't be used 'alone', so I'm wondering if it actually can be used 'alone' and the sentence that it's apart of still be deemed grammatically valid? Can "I am" be interchanged for "I'm" in all contexts, or are there some (possibly evidenced by the example above) where it cannot?
I currently can't think of a good reason grammatically; but there are plenty in terms of clear communication.
When a particle and antiparticle pair is produced their charge sum is zero,momentum sum is zero but the mass sum isn't.Does that mean that possibly for the mass there is no need of starting equilibrium and so the virtual particles have mass at their own?I am not stating there should be negative mass but only curious how mass can pop up out without any conservation law.
Do all virtual particle travel at light speed in a vacuum? else wouldn't that imply they should have rest mass however tiny? When they pop back out of existence do their mass disappear instantly? BTW what is the heaviest virtual particle ever found?
I cannot understand that why the name of some universities starts with "The University of....", in some cases we see "University of...", and finally we see ".... University"!!!! Some examples are as follows: University of Oxford McGill University The University of Manchester QUESTION: Is there any general rule on using the above three options? Or it has been chosen by chance? At first, it seems to me that when we are talking about a university bearing the name of a city or province, we should use "The". But this is not the case in general. For example we have "University of Alberta", without "The". What is going on here?
In some scientific papers, we see that some professors write "University of Bla" on their papers, while others write "Bla University". What is the difference between "University of Bla" and "Bla University"? Are there any differences at all?
I am working on a file explorer. If I want to open another dir and it is empthy, so no files can be listed, it returns a NullPointerException. How can I can rid of this? File F = new File(path); File L[] = F.listFiles(); txtPath.setText(path); txtFiles.setText(""); for(int i=0; i<L.length; i++){ if(L[i].isDirectory()&&!L[i].isHidden()){ txtFiles.append(L[i].getName().replace(".txt", "")+'\n'); } } The error appears at the L.length line. In theory, the lenght should be just 0 right? But it just gives me the error. I tried: if(L.lenght>0){ //do stuff } and (the basically same actually): if(F.list().length>0){ //do stuff } How can I test in advance, if it is empthy? Or am I wrong and it returns the error for another reason? Thanks for any help!
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?
If I want to test whether a page is odd/even (i.e. modulo 2) then I can use the following: \ifthenelse{\isodd{\thepage}}{}{} What can I do if I want to test whether a page is modulo 4? A minimal example: \documentclass{article} \usepackage{ifthen} \newcommand{\ismodfour}{???} \begin{document} Page 1: \ifthenelse{\ismodfour{\thepage}}{mod 4}{not mod 4} \newpage Page 2: \ifthenelse{\ismodfour{\thepage}}{mod 4}{not mod 4} \newpage Page 3: \ifthenelse{\ismodfour{\thepage}}{mod 4}{not mod 4} \newpage Page 4: \ifthenelse{\ismodfour{\thepage}}{mod 4}{not mod 4} \newpage Page 5: \ifthenelse{\ismodfour{\thepage}}{mod 4}{not mod 4} \newpage \end{document}
I don't want to display the modulo symbol, I want to programmatically calculate n modulo 3 and display the result.
I use -x for debug info while executing the shell script. How can I redirect debug info only to a file? Example script: #!/bin/bash echo OK echo NO i will get the below result when i run in debug mode + echo OK OK + echo NO NO I would like to redirect only the debug info to a file. + echo OK + echo NO And runtime output should print on the screen. OK NO
I have a bash script and I want to capture a portion of the script with a set -x and redirect that output to a file. I can see what the ENVFILE is setting but its going to std out. Is there a way I can capture the output of the set -x into a file instead of std out ? #!/bin/sh ...a bunch of stuff.... if [ -e ${ENVFILE} ]; then set -x . ${ENVFILE} set +x fi # ! -e PROJOB ... a bunch of stuff ....
I have a lot of travel photos I was hoping to sell as downloadable prints on Etsy but do not know how the whole dpi thing works. When I click on the properties of my picture on my computer it says 4608 X 3456/72 dpi. Now other prints for sale on Etsy say 300 dpi. Does that mean mine are not of high enough resolution. I have enlarged one of the photos and it looked really good. Do I need to put it into a photo editing software program to change the dpi if I want to sell it. Is there a converter somewhere to figure how big I can enlarge a photo to where it will still look good? Sorry so many questions.
I have two cameras, a 6mpix Panasonic FZ8, and 14mpix Canon A2200. When I compare shots from two cameras, one of differences I notice is dpi number that camera reports in JPG info: FZ8 reports dpi=72 A2200 reports dpi=180 What physical meaning can these numbers have? I am at loss for guesses. I am fairly familiar with notion of dpi in scanning and printing. I can calculate density of pixels on the sensor of the camera. But then, the linear density of pixels on the sensor will be hundreds times larger than number above. So what, if anything, does it mean?
I want to change the web address (URL) for document library. Is there a way to achieve this? How?
I created a Document Library called Resource Documents. Would it be possible for us to set a friendly URL on this library so that files may be read with the following URL pattern... http://site/my-resource-documents/... rather than http://site//Resource%20Documents/...
I remember reading a story online years ago, but I can't find it anymore. The idea behind this story (pretty sure it was a short story, not even a novella) was some kind of many-worlds thing: there are an infinite number of universes, and all manner of coincidences happen somewhere, and you never observe the universes in which you happened to die. So, your subjective experience is that through a series of increasingly unlikely coincidences, you somehow manage to stay alive. In the end, the protagonist outlives everyone he knows, and eventually all other life on Earth; I remember the story ending when some aliens discover Earth and start investigating him, but I could be wrong about that bit.
Please help me identify a short story I read about a guy who believed that the multiverse was true, but the one that we experienced was the one in which we lived the longest. He was also contemplating suicide, and every time he sat staring at the pills he was going to use to overdose, parallel universes (where he chose suicide) collapsed and the one he was in got weirder. Eventually an asteroid hit the Earth, and then he was resurrected somehow in the deep future. I'm not sure where I read it, but it likely appeared in Dozois's The Year's Best Science Fiction or in a back issue of Analog (my dad had like a decade's worth in the den).
Is there a way to kill all mobs other than /kill @e? For some reason, it kills me too. Someone told me to do something like /kill @e{type=Zombie} but every time I put it in, nothing happens.
I have a Redstone Power loop that connects to a Command Block that is set to kill all entities except for myself (/kill @e[type=!Player]), because I'm building a creative map, but don't want slimes all over the place. Problem is if I want to place an Item Frame than the Command Block kills it. So, is there anyway to exclude items from getting deleted, or make it so it will only target mobs?
I'm looking for a tool that will allow me to create Windows shortcuts on a Unix (BSD) machine. Can anyone point me to one? Thanks in advance.
I'm running a SAMBA file store for our Windows users, and I'd like to automatically generate windows LNK files linking to other network shares that the user needs access to. I've done quite a bit of googling and I can't find a way of creating windows links on Linux, or through Perl. I did find a perl module that looked promising in CPAN, but it will only run on Windows unfortunately. If it's not possible to create .LNK files, perhaps there is an alternative solution people can suggest to allow the users to click on a file in one SAMBA store to be linked to a different SAMBA share? Thanks, Bart.
I'm using pmatrix from amsmath package and would like the output to align all entries in the same column to be align on the right hand side, as shown here in the code: \[ \begin{pmatrix} -1 & 1 & -2\\ 0 & -1 & 4\\ 0 & 0 & 1 \end{pmatrix} \] by default, pmatrix will center. Any way to do this?
I'd like to left align the -1 entry in the following matrix so that the 1s line up. Is there a way to get matrices to ignore signs in that way? \begin{matrix} 1 & 1 \\ 1 & -1 \\ \end{matrix} Using \flushright{-1} doesn't seem to work.
I'm new to JS and i want to call a function with parameters i don't know why this code does not work document.querySelector(".left-menu").addEventListener("mouseover", scall(true)); document.querySelector(".left-menu").addEventListener("mouseout", scall(false)); function scall(smith) { if(smith) { console.log("do"); } else { console.log("not to"); } //document.querySelector(".left-menu").style.width = "220px"; }
The situation is somewhat like- var someVar = some_other_function(); someObj.addEventListener("click", function(){ some_function(someVar); }, false); The problem is that the value of someVar is not visible inside the listener function of the addEventListener, where it is probably being treated as a new variable.
I can not understand what is the problem for my Ubuntu 16.04 LTS and how to fix it . Also while trying to upgrade to Ubuntu 18.04 , it shows no enough space . Why this happens to me ? Please help.
I'm using Ubuntu 11.04 and I want to free up some space in my root directory, which is overloaded. I especially want to change the path used for installing applications (they are getting installed directly to the root drive). Another consideration is that I'm working on a MySQL database server. The server is installed in the root directory itself, so I don't want to risk losing any data. Please give me some tips to help sort out this problem.
When using the mobile site, clicking the username of the OP redirects to the edit history of the post while it should redirect to the profile page of the user (as it normaly does in the full site). Is this bydesign?
On community wiki posts both the revision history link & community wiki links lead to the same page. Shouldn't the username in the community wiki post point to the user profile page? Revision link Community wiki link
Prove that for every $n\in\mathbb N$, the function $f_n$ define by $$f_n(x)=\begin{cases} 1, & \text{ if } x=p/q\in\mathbb Q;\ \gcd(p,q)=1;\ q\leq n; \\ 0 & \text{ other case } \end{cases}.$$ is Riemann integrable in $[0,1]$. What I have in mind is that this function is quite similar to the Dirichlet function, which is not integrable in the $ [0,1] $ interval, and I have already tried this before. But I don't know how true what I'm saying is.
Consider the function $f: [0,1] \to \mathbb{R}$ where f(x)= \begin{cases} \frac 1q & \text{if } x\in \mathbb{Q} \text{ and } x=\frac pq \text{ in lowest terms}\\ 0 & \text{otherwise} \end{cases} Determine whether or not $g$ is in $\mathscr{R}$ on $[0,1]$ and prove your assertion. For this problem you may consider $0= 0/1$ to be in lowest terms. Here's an attempt. I may have abused a bit of notation here, but the ideas are there. Proof: Let $M_i = \sup \limits_{x \in [x_{i-1},x_i]} f(x)$. Notice first that the lower Riemann sums are always $0$, since every interval contains an irrational number. Thus, to prove $f \in \mathscr{R}$, it suffices to prove that, given any $\epsilon >0$, $\sum \limits_{i \in P} M_i \Delta x_i < \epsilon$ for some partition. Let $\epsilon > 0 $ and $M > \frac{2}{\epsilon}$. We first show that there exists $\eta(x,\frac{1}{M})$ so that $|f(x) - f(y)| < \frac{1}{M}$ if $|x-y| < \eta$. Fix $x \in (\mathbb{R} \setminus \mathbb{Q}) \cap [0,1]$. Now, consider the set $$R_{M} := \{ r \in \mathbb{Q} : r = \frac{p}{n}, n \leq M, p \leq n, p \in \mathbb{N} \}.$$ Clearly this set is finite, enumerate it as $\{q_1,\ldots, q_m\}$. So, let $$\eta(x,\frac{1}{M}) = \min_{i=1,\ldots, m} |x- q_i|.$$ We see then, $|f(x) - f(y)| < \frac{1}{M}$ on this $\eta$-neighborhood. After we choose that $\eta$ so that $x \in (\mathbb{R} \setminus \mathbb{Q}) \cap [0,1]$, is continuous in a $\eta$-neighborhood, we see $$ A:= [0,1] \setminus R_M \subset \left( \bigcup_{ x \in ( \mathbb{R} \setminus \mathbb{Q}) \cap [0,1]} B_{\eta(x)} (x) \right) \cap [0,1].$$ Since $A$ is compact, we may take finite sub-covering, and let $\delta = \min \limits_{i=1,\ldots,n} \{\eta(x_i)\}$. Take a partition $P_1$ of $A$ so that $\Delta x_i < \delta$. Since $R_M$ is non-empty, we can take a partition $P_2$ of $R_M$ so that $\Delta x_i < \frac{\epsilon}{2m}.$ Moreover, we see that, on $[0,1]$, $f$ is at most $1$. Let $P = P_1 \cup P_2$. Thus, \begin{eqnarray*} \sum_{i \in P} M_i \Delta x_i &=& \sum_{i \in P_1} M_i \Delta x_i + \sum_{i \in P_2} M_i \Delta x_i \\ &\leq& \frac{1}{M} \sum_{i \in P_1} \Delta x_i + \sum_{i \in P_2} \Delta x_i \\ &<& \frac{\epsilon}{2} + \frac{\epsilon}{2} = \epsilon \end{eqnarray*} Comments? EDITED I think I resolved the issue.
For the past 30 minutes I've tried to solve this identity but with no luck. I've tried with math induction,perturbation method and to write the sum and find some simetry but non of them worked. Could someone please help me? Thank you. $\sum_{k=1}^{n}(-1)^{k+1}\frac{1}{k}\binom{n}{k} = 1+\frac{1}{2} + \frac{1}{3} + ... + \frac{1}{n}$
I've been trying to prove $$\sum_{k=1}^{n}{(-1)^{k+1} {{n}\choose{k}}\frac{1}{k}=H_n}$$ I've tried perturbation and inversion but still nothing. I've even tried expanding the sum to try and find some pattern that could relate this to the harmonic series but this just seems surreal. I can't find any logical reasoning behind this identity. I don't understand . Is there any proof that doesn't require the integral transform?
I have a stack of things I used to do when my wireless was spazzing out (which it seems to do from time to time), including running sudo /etc/init.d/networking restart but lately I'm getting this when I run it: *Running /etc/init.d/networking restart is deprecated because it may not enable again some interfaces` So ... what am I supposed to do instead?
I tried to use sudo service networking restart and sudo /etc/init.d/network restart but they both crash the window manager and I can no longer use my keyboard for input into X. when I use the /etc/init.d/ method it complains saying that I should use the service utility e.g. service networking restart but it crashes just the same. Is there a GUI method of restarting networking?
I am trying to categorize many similar threads here. For example, I find this GIF animation freaking cool in this answer . How can I do this kind of animations? How can I make sure it does not consume too much CPU with less CPU-intensive computers? How can I do professional screencast?
I've seen animated GIF images of screen casts (like the one below) promoted a few times on this site as a way to improve answers. What toolchain is being used to create these? Is there a program that does this automagically, or are people taking screencasts, converting them into a series of static frames, and then creating the GIF images?
I shell scripts I see compares always written this way: if [ "$?" -eq 0 ] then ... What the purpose of the double-quotes around the variable? If I remove the quotes then it doesn't seem to have an effect. Is it for preventing something?
Are the following two boolean expressions the same? if [ -n $1 ] ; then if [ -n "$1" ] ; then If not - When should you put a variable in quotes?
I am confused about the usage of the present simple in the future tense. Doesn't it refer only to schedules? The following example deviates from this rule. We’re on holiday in Paris next week. (Taken from English File Pre-Intermediate SB) Shouldn't it be: We will be/are going to be in Paris next week? Thanks in advance for your contribution :)
I asked this question but I haven't gotten a useful answer. Could you tell me the difference in meaning between these sentences? Do you think you will visit them next week? Will you visit them next week? Are you going to visit them next week? Are you visiting them next week? Are you going to be visiting them next week? Are you planning to be visiting them next week? Do you plan to visit them next week? Will there be any difference in the answers? I think I will visit them next week. I will visit them next week. I am going to visit them next week. I am visiting them next week. I am going to be visiting them next week. I am planning to be visiting them next week. I plan to visit them next week. Can I use "planning to" instead of "going to"? (E.g. "Are you planning to visit them next week? — Yes, I am planning to visit them next week.") Which of these sentences show that the subject of conversation has already been discussed? For example, I talked with a friend of mine about my plans to visit somebody. So my friend is aware of my plans. And my last question. Which of these seven sentences express that the action will certainly take place?
I have error "expected primary-expression before 'int'" and "expected ';' before 'int'" in this code, does anyone know why? struct cpu { template<class T> static void fce() {} }; template<class _cpu> struct S { void fce() { _cpu::fce<int>(); //error: expected primary-expression before 'int' //error: expected ';' before 'int' } }; int main() { S<cpu> s; s.fce(); }
In templates, where and why do I have to put typename and template on dependent names? What exactly are dependent names anyway? I have the following code: template <typename T, typename Tail> // Tail will be a UnionNode too. struct UnionNode : public Tail { // ... template<typename U> struct inUnion { // Q: where to add typename/template here? typedef Tail::inUnion<U> dummy; }; template< > struct inUnion<T> { }; }; template <typename T> // For the last node Tn. struct UnionNode<T, void> { // ... template<typename U> struct inUnion { char fail[ -2 + (sizeof(U)%2) ]; // Cannot be instantiated for any U }; template< > struct inUnion<T> { }; }; The problem I have is in the typedef Tail::inUnion<U> dummy line. I'm fairly certain that inUnion is a dependent name, and VC++ is quite right in choking on it. I also know that I should be able to add template somewhere to tell the compiler that inUnion is a template-id. But where exactly? And should it then assume that inUnion is a class template, i.e. inUnion<U> names a type and not a function?
When writing code like \documentclass{article} \directlua{dofile("myLuaFunctions.lua")} \newcommand*{\myFunction}[3]{% \directlua{tex.print(myFunction(#1, #2, #3))}% } \begin{document} \myFunction{3}{5}{7} \end{document} I'd like to see : what Lua receives from LaTex what (La)TeX receives back from Lua Regarding 1. I have read in that it is enough to place this code at the beginning of the TeX file to see what Lua receives : \newrite\luadebug \immediate\openout\luadebug luadebug.lua \AtEndDocument{\immediate\closeout\luadebug} \newcommand\directluadebug{\immediate\write\luadebug} but just placing it at the beginning of my TeX file gives me a compilation error. \newrite is not recognized. I have a message like unrecognized sequence ... Regarding 2. Is there a way to get the Lua written in the TeX document to see if it writes the expected string ? Any other debugging tip is welcome, my understanding of the process being really limited.
When using Lua code inside Latex file, where Lua code sends to Tex Latex code to insert into the document at the location the lua code is made, it will be useful to look at the content of Latex file (internal) after the expansion is made but right before the file is compiled to pdf. This can help in debugging and in many other cases. Is there an option to do this? A small example will help explain what I mean. Given this latex file \documentclass{article} \usepackage{luacode} \begin{document} The following is my table \begin{luacode} i=6 j=8 tex.print("\\begin{tabular}{|l|l|}\\hline") tex.print(i.."&"..j) tex.print("\\\\ \\hline") tex.print("\\end{tabular}") \end{luacode} \end{document} Compiling this gives the pdf file: What I'd like to now see is the Latex file that would resulted after the Lua code expansion, which should be something as follows \documentclass{article} \usepackage{luacode} \begin{document} The following is my table \begin{tabular}{|l|l|}\hline 6 & 8 \\\hline \end{tabular} \end{document} I could not find an option to do this so far. TL 2015 Update Another example to make clear what is being asked here. I'd like to see not only the latex code that was generated from the lua bits of code, but the full Latex document that would result after all the expansion of all lua code in the original Latex. But this has to be done without modifying the original Latex document itself. Assuming there is this virtual pipeline: Latex file -> Lua code expand -> Updated Latex (internal)-> lualatex ->pdf I'd like to get a copy of the full latex code/file just after all the lua code expanded. Here is another example. Given this Latex file input: \documentclass{article} \usepackage{luacode} \begin{document} The following is my table \begin{luacode*} i=6 j=8 tex.print("\\begin{tabular}{|l|l|}\\hline") tex.print(i.."&"..j) tex.print("\\\\ \\hline") tex.print("\\end{tabular}") \end{luacode*} Our annual budget for the company is \luaexec{tex.print(200*15^3)} dollars as shown in this list of items \begin{luacode*} tex.print("\\begin{itemize}") for i=1,5 do tex.print("\\item "..i^2) end tex.print("\\end{itemize}") \end{luacode*} And so on. \end{document} The PDF is I'd like to get a copy of the following latex file, which has all the Lua code expanded and gone and only the Latex code is left in its place. This file can go to a temporary file, or anywhere, as long as it is the complete Latex file as shown and not bits and pieces. This would be very useful in debugging when there is lots of Lua code in different places in the original Latex file. \documentclass{article} \usepackage{luacode} \begin{document} The following is my table \begin{tabular}{|l|l|}\hline 6 & 8 \\\hline \end{tabular} Our annual budget for the company is 675000 dollars as shown in this list of items \begin{itemize} \item 1 \item 4 \item 9 \item 16 \item 25 \end{itemize} and so on \end{document} I hope now the question is even more clear :)
There is a way to get Custom Label statically in APEX as documented System.Label.Label_Name Can I get this label without hardcoding Label_Name? What I've tried so far (and did not work) System.Label.get('Label_Name'); System.Label['elfBCLabel_VAT'];
In apex you can reference a custom label with system.Label.labelName, but is there a more dynamic way to get a custom label for example system.Label.get(labelName)? I can't find anything like this in the documentation but was hoping it was possible. I'm trying to have custom labels for fields to support multiple languages. The list of fields I'm showing is built in the controller and displayed inside an apex:repeat tag so I can't hardcode the labels. Is there a way to accomplish this? Thanks!
I would like to ask what are some general requirements, level of know-how, etc. that students must fulfil/have to get accepted in the top universities? I'm particularly interested in the fields. While I understand this varies per position, I would assume that this can be answered with either statistical information or experience. For example, assume that a student has good grades, a publication or two, 1-2 letters of recommendation. Any chances?
"Luck favors the prepared mind" ( ) During the MS degree program or PhD program, it's advisable for a good student to get used to take a look on scientific activities of research groups he want to join, after graduation. So, if the student decides somehow that he wants to try to join X, Y, Z groups, how should he prepare himself the best for the admission procedure? What should he do before actually applying for that position in that group? What should he do before the (formal centralized or informal) admission procedure starts? Some of my own answers: Task #0: he must read all the recent papers of the group he would like to join, and know very well those related to his research field. Task #1: prepare all the admission material Task #2...#N... what else? What would you suggest to anyone to prepare himself to an admission procedure? Thanks a lot
Anyone knows how to solve this? The problem is that the number is very close to the title when the number reaches 10. I will add an image to reference this. Thanks in advance! These are all the packages (and the type of document) I used: \documentclass[12pt]{article} \usepackage{amsmath} \usepackage{graphicx} \usepackage[margin=1in]{geometry} \usepackage{cite} \usepackage{float} \usepackage[final]{hyperref} \usepackage{amsmath} \usepackage{xcolor} \usepackage[spanish]{babel} \usepackage[bottom]{footmisc} \usepackage{titlesec} \usepackage{hyperref} \usepackage{soul} \usepackage{comment} \usepackage{subfiles}
Following minimal document: \documentclass{report} \begin{document} \renewcommand*\thechapter{\Roman{chapter}} \tableofcontents \setcounter{chapter}{6} % Problem starts at chapter 7 \chapter{Seven} \chapter{Eight} \section{Eight-one} \section{Eight-two} \end{document} yields this output (cut to size for your convenience): Clearly, the chapter (and section) headings hang into the chapter (section) numbers. For the previous chapter numbers, this isn’t a problem since all chapter titles are aligned to the same column and the numbers I–VI are sufficiently narrow. (The same happens regardless of document type, I’m actually using scrreprt with the same result.) How can I prevent this?
Consider set $\mathbb{Z}[\sqrt{-5}] = \{a+b\sqrt{5}i : a,b \in \mathbb{Z} \}$. My task is to show some features listed below: Show that $\mathbb{Z}[\sqrt{-5}]$ is a ring. I would like to show that $\mathbb{Z}[\sqrt{-5}]$ is a subring of $\mathbb{C}$. Let $z,w \in \mathbb{Z}[\sqrt{-5}]$ and $z = a + b\sqrt{5}i, w = c+d\sqrt{5}i$, where $a,b,c,d \in \mathbb{Z}$. It is sufficient to show that $z+w, -z, zw \in \mathbb{Z}[\sqrt{-5}]$ $z+w = a+b\sqrt{5}i + c+d\sqrt{5}i = (a+c) + (b+d)\sqrt{5}i \in \mathbb{Z}[\sqrt{-5}]$ $-z = -(a+b\sqrt{5}i) = (-a) + (-b)\sqrt{5}i \in \mathbb{Z}[\sqrt{-5}]$ $zw = (a+b\sqrt{5}i)(c+d\sqrt{5}i) = (ac - 5bd) + (ad+bd)\sqrt{5}i \in \mathbb{Z}[\sqrt{-5}]$ Hence $\mathbb{Z}[\sqrt{-5}]$ as a subring of ring $\mathbb{C}$ then it is also a ring. Let $z = 2+\sqrt{5}i$. Show that $z$ is irreducible. I know the definition of being irreducible, it has to be non invertible and the following has to be true: $\forall x,y \in \mathbb{Z}[\sqrt{-5}]$ if $ z = xy \Rightarrow x$ or $y$ has to be invertible. Hint is to use that fact that norm $\lvert z\rvert = 3$. Hence all divisiors of $z$ have norm lower or equal than $3$. I do not know how to use this hint. Show that $z \lvert 3\cdot 3$ and $z$ does not divide $3$. For the first one I was thinking about $3 \cdot 3 = 9 = (2+\sqrt{5}i)(2-\sqrt{5}i) \Rightarrow z \lvert 3\cdot 3$ For the second one I was thinking about dividing $3$ by $z$ in $\mathbb{C}$. Then $$\frac{3}{z} = \frac{3}{2+\sqrt{5}i} = \frac{2}{3} + (\frac{-1}{3})\sqrt{5}i$$ which is not an element of $\mathbb{Z}[\sqrt{-5}]$. Is this point correct? Show that $z$ is irreducible element, but not a prime element. This can be obtained from points 2. and 3. Since $z\lvert 3\cdot 3$, but $z$ does not divide $3$.
How can I prove that $2+\sqrt{-5}$ is irreducible in $\mathbb{Z}[\sqrt{-5}]$? I tried to show by $2+\sqrt{-5}=(a+b\sqrt{-5})(c+d\sqrt{-5})$ but I could not get a contradiction.
I have a problem with DIV vertical align in Firefox The HTML code is: <div class="mess"><div class="rpl"><img src="img/16.png" width="16" height="16" border="0"></div><div class="pic"><img src="img/1.png" width="100" height="100" border="0"></div></div> The CSS looks like: .mess{ float:left; width:658px; border-top:1px solid #CCC;padding-top:5px; } .rpl{ position: relative;width:19px; float:left;top: 20%;display: table-cell; vertical- align: middle; padding-top:20px; } .pic{width:100px; float:left; padding-bottom:5px;margin-right:10px; } I'm trying to put "rpl" DIV at the vertical middle of the "mess" DIV. In IE it looks fine but I can't get it right in Firefox (always at the top of the "mess" div) I tried with display: inline,display: table-cell for "rpl" DIV but with no effect in FF. Is there any solution for vertical align for DIV in FF?
how could i vertically center a <div> within a <div> ? my code so far: <div style="height:322px;overflow:auto;"> <div style="border: Solid 1px #999999;padding:5px;"> </div> </div> i have tried "top:50%;" and "vertical-align:middle;" without success EDIT: okay so it's been discussed a lot. and i've maybe started another mini flame war. but for argument sake, how would i do it with a table then? i've used css for everything else so far so it's not like i'm not trying to employ "good practices". EDIT: the inner div does not have a fixed height
Let $R$ be a Dedekind domain, and let $\mathfrak{m}$ be a maximal ideal in $R[x]$ is of the form $\mathfrak{m} = (\mathfrak{p},f(x))$ where $\mathfrak{p}$ is a maximal ideal in $R$, and $f$ is a polynomial in $R[x]$ which is irreducible in $(R/\mathfrak{p})[x]$. Let $g(x) \in \mathfrak{m}$. I am know that exist a ideal $\mathfrak{a}$ in $R$ such that $(\mathfrak{p},\mathfrak{a}) = 1 $, i.e $\mathfrak{p} + \mathfrak{a} = R$ and $\mathfrak{p}\mathfrak{a} = \mathfrak{p}\cap \mathfrak{a} = (p)$. (chapter 16, corollary 19, page 768, Abstract Algebra, Dummit Foote...) Easily, since $g(x)\in \mathfrak{m}$, we have $ g(x) = l(x) + f(x).k(x)$ where $l(x) \in \mathfrak{p}[x]$. The question is: Can we make a "strong" form as show that there exists an ideal $\mathfrak{a}$ in $R$ such that $g$ can be show as the form $$ag(x) = p h(x) + a f(x) k(x)$$ where $p\in \mathfrak{p}$ such that $(p) = \mathfrak{p} \mathfrak{a}$, $(\mathfrak{p},\mathfrak{a}) = 1$ and $a\in \mathfrak{a} - \mathfrak{a}\mathfrak{p}$.
Let $R$ be a Dedekind domain, $\mathfrak{m}$ be a maximal ideal in $R[x]$ is of the form $\mathfrak{m} = (\mathfrak{p},f(x))$ where $\mathfrak{p}$ is a maximal ideal in $R$, and $f$ is a polynomial in $R[x]$ which is irreducible in $(R/\mathfrak{p})[x]$. Let $g(x) \in \mathfrak{m}$. I am know that exist a ideal $\mathfrak{a}$ in $R$ such that $(\mathfrak{p},\mathfrak{a}) = 1 $, i.e $\mathfrak{p} + \mathfrak{a} = R$ and $\mathfrak{p}\mathfrak{a} = \mathfrak{p}\cap \mathfrak{a} = (p)$. (chapter 16, corollary 19, page 768, Abstract Algebra, Dummit Foote...) Easily, since $g(x)\in \mathfrak{m}$, we have $ g(x) = l(x) + f(x).k(x)$ where $l(x) \in \mathfrak{p}[x]$. The questions is: Can we make a "strong" form as to show that there exists an ideal $\mathfrak{a}$ in $R$ such that $g$ can be show as the form $$ag(x) = p h(x) + a f(x) k(x)$$ where $p\in \mathfrak{p}$ such that $(p) = \mathfrak{p} \mathfrak{a}$, $(\mathfrak{p},\mathfrak{a}) = 1$ and $a\in \mathfrak{a} - \mathfrak{a}\mathfrak{p}$.
Let $(a_n)_{n\in\mathbb{N}}\in[0,\infty[^{\mathbb{N}}$ be a monotonically decreasing sequence, so that $\sum_{k=0}^{\infty}2^ka_{2^k}$ converges. Show that $\sum_{n=1}^{\infty}a_n$ converges and test $\sum_{n=1}^{\infty}\frac{1}{n\sqrt{n}}$ for convergence. Can anybody…explain to me what this exercise even asks of me? I have trouble understanding it in the first place. Is $a_n=2^ka_{2^k}$ here or something else? If so am I simply supposed to show that $\sum_{n=1}^{\infty}2^{n}a_{2^{n}}$ converges? Seems unlikely. I don't get it.
I have to prove the by tomorrow and I am really unconfident about what I did: $$\sum_{n=1}^\infty a_n\text{ converges } \iff \sum_{n=1}^\infty 2^n a_{2^n}\text{ converges}$$ I did the following: Let $(b_n)$ be a sequence as follow: $b_{2^k+m}:=a_{2^k}$ with $k\in\mathbb N_0$ and $0\leq m<2^k$. It's $a_{n+1}\leq a_n$ and so $0\leq a_{n+p}\leq a_n$ for all $n,p\in\mathbb N$. So $\sum\limits_{n=1}^\infty b_n$ converges by the majorizing series $\sum\limits_{n=1}^\infty a_n$. And it's $\sum\limits_{n=0}^\infty b_n=\sum\limits_{n=0}^\infty\sum\limits_{m=0}^{2^n-1}a_{2^{n+1}}=\sum\limits_{n=1}^\infty 2^{n-1}a_{2^n}$ so $\Rightarrow$ is done. For $\Leftarrow$ consider $c_{2^k+m}:=a_{2^k}$ with $k\in\mathbb N_0$ and $0\leq m<2^k$. It's $|a_n|\leq c_n$ and $\sum\limits_{n=0}^\infty c_n=\sum\limits_{n=0}^\infty\sum\limits_{m=0}^{2^n-1}a_{2^{n}}=\sum\limits_{n=1}^\infty 2^{n}a_{2^n}$ and so $\sum\limits_{n=1}^\infty a_n$ converges by the majorizing series $\sum\limits_{n=0}^\infty c_n$. Is this in form and content correct?
I like to customize each of the 16 colors in my windows command prompt, but setting them up manually is a slow and painful process (due to some bugs in the colors tab of Console Windows Properties). I'd like a way to import these settings quickly when I am setting up a new machine. My question is - where are these settings actually stored? In the registry somewhere? In a config file?
Where are the default settings saved for the Command Prompt defaults? Are they stored in the registry somewhere, or in a file? I would love to make a .reg file to set my default preferences when logging into a machine for the first time. I'm talking about the default application settings: QuickEdit mode, buffer size, text color, etc.
I'm using Blender and UE4, and I've got a problem: For most materials I use several textures (Color, Roughness, Metalic, etc.) I recently discovered painting with Blender and I love it, but I would like to know how can I paint several layers at once. For example, I might have a mesh with a Color and a Roughness layer, and when I add rust to it, I want the Roughness layer to also be affected. Any ideas?
Is there any way to paint onto a bump map and diffuse map at the same time, so that the strokes match up? Like a multi-layer brush that uses a greyscale texture for the bump layer and a color texture for the diffuse color? Here's a rough sculpt to demonstrate what I'm imagining: The GIF above shows how such a brush could be made. The black and white height map would be the displacement brush, transferring its greyscale data to the bump map texture and the green one would transfer its color data to the diffuse map texture. The resulting brush images: Making the brush is one thing, but is it possible to use such a brush?
file_name = file_path.split('\') Gives me an error because \' is to represent a single quote in python. I want to split a file name using single backslash.
I have a string that contains both double-quotes and backslashes that I want to set to a variable in Python. However, whenever I try to set it, the quotes or slashes are either removed or escaped. Here's an example: >>> foo = 'baz "\"' >>> foo 'baz ""' So instead of baz "\" like I want I'm getting baz "". If I then try to escape the backslash, it doesn't help either: >>> foo = 'baz "\\"' >>> foo 'baz "\\"' Which now matches what I put in but wasn't what I originally wanted. How do you get around this problem?
Does anybody know of any? (I'd be using a php page to call the terms) THANKS!
Lot of googling did not help me! Are there any good dictionary web based available? I am looking for a site which can send me the meaning of words if we pass the word through query string!
Here is the fix-wordpress-permissions.sh file and it's location is home/htdocs/wordpressTest. #!/bin/bash # # This script configures WordPress file permissions based on recommendations # from http://codex.wordpress.org/Hardening_WordPress#File_permissions # # Author: Michael Conigliaro <mike [at] conigliaro [dot] org> # WP_OWNER=www-data # <-- wordpress owner WP_GROUP=www-data # <-- wordpress group WP_ROOT=$1 # <-- wordpress root directory WS_GROUP=www-data # <-- webserver group # reset to safe defaults find ${WP_ROOT} -exec chown ${WP_OWNER}:${WP_GROUP} {} \; find ${WP_ROOT} -type d -exec chmod 755 {} \; find ${WP_ROOT} -type f -exec chmod 644 {} \; # allow wordpress to manage wp-config.php (but prevent world access) chgrp ${WS_GROUP} ${WP_ROOT}/wp-config.php chmod 660 ${WP_ROOT}/wp-config.php # allow wordpress to manage wp-content find ${WP_ROOT}/wp-content -exec chgrp ${WS_GROUP} {} \; find ${WP_ROOT}/wp-content -type d -exec chmod 775 {} \; find ${WP_ROOT}/wp-content -type f -exec chmod 664 {} \; when i type sudo ./fix-wordpress-permissions.sh / inside the home/htdocs/wordpressTest folder my massive file permission change. How can i revert?
I accidently ran sudo chmod 755 -R / instead of sudo chmod 755 -R ./ I stopped it after few seconds, but now there is some problems such as sudo: must be setuid root How can I revert permissions back?
The aspect ratio of the map frame doesn't match the contents, leaving a lot of white space inside the frame, even after I've scaled the contents to fill one dimension. When I drag one edge of the frame to change the aspect ratio, the scale of the content changes. I know I can zoom with the mouse wheel, but the jumps are too big. Is there a way to set the sensitivity of the zoom? Alternatively is there a better way to change the map's aspect ratio so that the scale doesn't change? qgis 2.01 64 bit windows 7
Is it possible to lock the scale in the QGIS 2.0.1 print composer? Every time I resize the map, the scale is adjusted. This makes trying out different map layouts really annoying.
In as well as in Landau's textbook on classical field theory, there is a proof of the conservation of spacetime interval in which authors deduce, that the differentials of the interval in two different inertial reference frames are infinitesimals of the same order and therefore must be proportional. What does it mean and how can you prove it without refering to the properties of Lorentz transform, which is to be derived from conservation of spacetime interval.
I've started today the book of Landau and Lifshitz Vol.2: The Classical Theory of Fields $\S 2$. They start from the invariance of the speed of light, express it as the fact that $$c^2(\Delta t)^2-(\Delta x)^2-(\Delta y)^2-(\Delta z)^2=0$$ is preserved when we change inertial frame, so they consider $$ds^2=c^2dt^2-dx^2-dy^2-dz^2,$$ and say We have observed that if $ds=0$ in one frame then $ds'=0$ in another frame. But $ds$ and $ds'$ are infinitesimal of the same order. So it follows that $ds^2$ and $ds'^2$ have to be proportional that is $ds^2=ads'^2$... and he goes on to prove that $a=1$. How to translate this argument in a rigorous one? I'm really interested in this, both to understand this deduction and also to be able in future to make similar ones.
I want to make an overline via " $\overline{O}$VERLINE " above a letter but this letter then appears in an italic shape. How do I avoid this?
If I want to draw an overline over some text, not an equation, how can I do it? \overline seems to only work in math mode, and when used outside of math mode, it automatically says "Missing $ inserted".
I grew up with him playing football I searched for it but coundn't get the answer I want. what is this usage called and how to use it correctly? like situations where it is used?
People often see him play basketball on the playground at the weekend. Can I use playing instead?
So if I were to make a , , (all archetypes), would I treat each archetype as a separate class in which to invest level or do they act as though they were all one class simply trading out abilities for the ones each archetype modifies or removes.
In the APG it states; A paladin could, however, be both an undead scourge and a warrior of the holy light, since none of their new class features replace the same core class feature. So does that basically mean that this PC would be a multiclass Undead Scourge/Warrior of the Holy Light? Does the leveling/skill/feat acquisition work just like any multiclass character?
I am away from home using my notebook. I have installed Microsoft VS Community 2015 and Microsoft VS 2013 Express. I get the same error on both IDEs. I have tried both qualifying "++GlobalLineCount::glCount" and unqualifying "++glCount". I have retyped the text in case of some unseen character. I am not using precompiled headers. I have tried glCount both as pubic and private. This is pure C++. This code fails as is. It is an extraction of a larger program that also fails with the same error. The larger program does compile and link on my home PC using Microsoft VS Community 2015. Because the larger program behaves correctly on my home PC but not on this notebook I am suspicious of the IDE installed or configuration. Currently, I am 1500 miles from my home PC so doing anything with it is not possible. Thanks in advance. My error: TestGlobalLineCount.obj : error LNK2001: unresolved external symbol "public: static unsigned __int64 GlobalLineCount::glCount" (?glCount@GlobalLineCount@@2_KA) My code: #include <stdint.h> #include <stdio.h> #define MODULE_WHO_AM_I "TGLC" class GlobalLineCount { public: static uint64_t getNextGLC(void) { return ++GlobalLineCount::glCount; } static uint64_t glCount; }; int main() { printf("%-5s %4d %6llu - Test Start\n", MODULE_WHO_AM_I, __LINE__, GlobalLineCount::getNextGLC()); return 0; }
Can anyone explain why following code won't compile? At least on g++ 4.2.4. And more interesting, why it will compile when I cast MEMBER to int? #include <vector> class Foo { public: static const int MEMBER = 1; }; int main(){ vector<int> v; v.push_back( Foo::MEMBER ); // undefined reference to `Foo::MEMBER' v.push_back( (int) Foo::MEMBER ); // OK return 0; }
prove that this sequence is converging and find its limit $x_1 = \frac32$ $x_{n+1} = \frac3{4-x_n}$ i believe that the solution entails proving the sequence is monotone descending and its infimum is 1, but i don't know to to show that. i also tried messing with triangle inequality, but with no success so far any help into solving this will be very appreciated
I'm given: $$\begin{align*} x_1&=\frac32\\\\ x_{n+1}&=\frac3{4-x_n} \end{align*}$$ How do I go about to formally prove the sequence converges and show it? Thanks in advance.
I have a web-to-lead html form (generated form standard Salesforce functionality) and a duplicate rule. I want to display a success and error message that whether lead is created or not after clicking on submit.
I am using web to lead form to enter data on a form externally. Whenever the form i submitted, leads are created in salesforce. Now, i want to have a check for duplicates based on some fields, say first name and last name. When the form is submitted with duplicate first name and last name, i want to show error message on the form saying that the lead exists in system. Can you please guide me on how we can achieve this? Can we show real time error messages on web to lead form? Thank you.
When I'm trying to update ubuntu 14.04 LTS, I got this error message: E: Malformed line 1 in source list /etc/apt/sources.list.d/virtualbox.list (dist) E: The list of sources could not be read. Contents of /etc/apt/sources.list.d/virtualbox.list: deb download.virtualbox.org/virtualbox/debian trusty contrib non-free
I have unistalled and reinstalled the Ubuntu Software Center as per info I found in a similar thread and I got the same response about line 91 or something like that. I just tried to upload a screen shot but since I'm new it won't allow me to. I also can not figure out how to cut and paste anything so I have to hand type what the error screen says, both when I attempt to open the software center and nothing happens, when I try to enter commands into the terminal to uninstall, reinstall, whatever I get the same following: COULD NOT INTITIALIZE THE PACKAGE INFORMATION An unresolvable problem occured while initializing the package information Please report t:his bug against the 'update-manager' package and include the following error message: 'E: Malformed line 91 in source list/etc/apt/sources.list (dist parse) E: The list of sources could not be read., E: The package list of status file could not be parsed or opened. How do I report bugs? What can be done about this. I have searched and everything everyone says to do leads me back to the same line error message. So, I don't know how to get to line 91 in the source list; to tell you what it says. Sorry, I'm really new to this. That is what I need is to find out how to get there and fix what it says. I would really like to NOT have to re partition my hard drive and start from scratch, so I'm really looking forward to getting this problem solved. I need to be able to install new software.
I want to know how newFunc(); works. Is it a function or not? const first = () => { const greet = 'Hi'; const second = () => { alert(greet); } return second; } const newFunc = first(); newFunc();
I asked a question about Currying and closures were mentioned. What is a closure? How does it relate to currying?
Okay, I'm level 5, I have Pokemon that aren't currently defending a gym that are stronger than one of the Pokemon in a gym, but not another, do I have to defeat both for my Pokemon to be eligible to defend the gym? The gym is owned by my team.
So I defeated a Team Valor gym earlier today using my highest cp Pidgeot. It turned grey, so I went to claim it with that Pidgeot, except it wouldn't let me. What determines which pokemon you are allowed to place at a gym? Is it just those who have participated in a battle can't? Is there a time period for it? What about training at a friendly gym? Does this impact anything?
is there a way to show a Outlook calendar in a SharePoint calendar. I know, that you can overlay a Exchange calendar, but will this calender sync by itself ? Or is there another way to display the personal Outlook calendar in SharePoint 2013?
Is it possible to view outlook calendar in SharePoint 2013? Head of the department wants to view everyone's Outlook Calendar in the SharePoint 2013. Is this possible? He can view other's outlook calendar in his outlook a/c but he wants to view other's outlook calendar in SharePoint 2013.
I'm not familiar with regular expressions and am not sure what I'm doing wrong. reg=re.compile('[a-zA-z]+?') #regular expression checks for at least one alphabetic character print(bool(reg.match('*ab*'))) I would like this to result in True. It doesn't matter where the alphabetic character occurs in the string.
What is the difference between the search() and match() functions in the ? I've read the (), but I never seem to remember it. I keep having to look it up and re-learn it. I'm hoping that someone will answer it clearly with examples so that (perhaps) it will stick in my head. Or at least I'll have a better place to return with my question and it will take less time to re-learn it.
I'm trying to get LaTeX working on Anki. I am the only admin on my system but when I try and run the terminal command "tlmgr update --self && tlmgr install dvipng" I get an error saying I need to run the program as an admin. I am the admin! How do I run this program? Note: Due to lack of reputation, I am unable to vote or bump any existing material, so I am asking a new question. The comment to the top answer is identical to my query, hence the identical text.
Originally I was going to ask a question about how to get working in , but as I was writing the question, I was trying to solve the problem myself. I thought others may benefit from my findings, so I decided to post them here. If you notice that any of my steps are wrong, please let me know. And I was still unable to get it to work, so if you scroll down to the end, you can see where I'm stuck and still need help. The current issue is: How can I install libgd? I'm trying to make work with . The only information I could find about how to do this is from : [...] to use LaTeX, you have to install it separately - it is not bundled with Anki [...] on OSX use MacTex Dvipng must also be installed. On OSX, if you use MacPorts or similar to install LaTeX, make sure latex and dvipng are linked in /usr/bin. The standard installation of takes up 3GB, far more than I believe is necessary, since I am not going to use its GUI application. I just need the LaTeX library, if I understand it correctly, which should be way less than 3GB. Therefore, I'm installing the version instead, which only takes up about 100MB. I'm not sure if I already have installed or not, so I'm restarting Anki to see if it works or not. I got the following error: Error executing dvipng. [...] Output written on tmp.dvi [...] So I probably need to install dvipng... The Install readme has the following information: Installing dvipng should be simple: merely ./configure',make', and `make install'. Prerequisites: The GD Graphics Draw library, libgd The path-searching library kpathsea libpng and libz Again, I'm not sure which, if any, of these prerequisites I already have installed, so I'm just going ahead with the installation in hopes of error messages guiding me to the right path. After executing ./config, it gives the error: configure: error: cannot find/use libpng ... which I think is weird since the readme states: To be able to compress and write PNG files to disk, dvipng (or really libgd) uses libpng which in turn uses libz. These should be available on any modern system, if not, download them and install them. I went to the , and tried finding a "current binary" that works with my OS (10.6/i386), but it seems that none of the latest 3 versions have a binary that is available to download. So I went to the "old binaries" section, which took me to , which has libpng v1.4.5. I installed the "Individual Installer package" for libpng. Now that it's installed, I tried installing Dvipng again, and it now gives the following error: cannot find/use libgd This drawing library can be downloaded at When I go to , I see it says that the page moved and that it is currently down. There is only a link to the source files and no binary distribution. I'm not sure where I should go from here... should I download the source and compile it somehow? Once it's complied what do I do with it? Do I run some file it generates? Would I move files it generates to specific folders? How would Dvipng know how to access it? I'm unfamiliar with how to do something like this, so any help would be appreciated. Here's a summary (so far) of the dependency hierarchy which must be installed in order to get LaTeX to work with Anki: : Installed (got the BasicTeX version to save a lot of disk space). : Not installed (can't install without libgd). : Installed (got the Individual Installer package). libgd: Not installed (not sure how to install this). ??? Other questions: Is there a better, reliable method to know if any of these dependencies are installed rather than running an installer which depends on them and hoping for a meaningful error message?
have downloaded and then unzipped ubuntu 14.04.1 LTS on 8/22/14 to my windows 7 desktop. I get lots of folders and files after unzipping, but can not figure out how to create the iso image. My goal is to do so on a USB stick, but haven't been able to get to that step, wah!
I would like to see a full how-to guide on how to install Ubuntu.
I've been working on implementing a 2D radar for a 3D game lately, it's working fine in a very basic version. This is what is looks like: It works by transforming the 3D coordinates of the enemies nearby to the local player space and then drawing those coordinates with the center-offset of the radar circle. Transforming the enemy positions (and adding them to a vector): if (LocalPlayer) { Vec3 diff; double distance; position.clear(); for (auto i = commonInfected.begin(); i != commonInfected.end(); ++i) { diff = (*i)->GetPosition() - Global::camera->GetPosition(true); distance = diff.xz().Length(); if (diff < 100) { position.push_back(diff); } } } Drawing the enemies: for (int i = 0; i < position.size(); ++i) { pos.x = position[i].x; pos.y = position[i].z; pos += {80, 80}; // center of the circle context->DrawText("x", pos.x, pos.y); } However, the problem I have is that the plotted enemies do not rotate with the player and that plotted enemies can "go out" of the circle shape of the radar. How do I approach this kind of problem? I have seen and carefully read through this question but couldn't understand it.
I'm trying to build a radar system like the one in the original X-Wing games. The way it works is that there are two circular radar systems, one for behind the ship, and one for infront. So, I've written a class to represent the radar, it has a vector representing the direction the radar is facing, and a 3D position of where the radar is. Both of these things will change in realtime as the ship moves and so the radar will need updating each frame. Now I'm trying to figure out how to transform the position of another ship onto the radar. What I need is a final 2D X/Y coordinate between -1,-1 and 1, 1 for plotting on the 2D radar screen. Given two vectors (the direction of the ship - which the radar is facing - and the direction to the ship we are plotting), how can I calculate a 2D X-Y position on the radar? Obviously I also have access to the up and right vectors of the ship too. My instinct says that this should be relatively straightforward, but my math skills suck.
Are there differentiable functions $F:(a,b)\rightarrow \mathbb{R}$, where the set of points at which the derivative of $F$ is discontinuous, is dense in $(a,b)$? So far I've only found functions where derivatives are discontinuous only at a finite number of points.
Could someone give an example of a ‘very’ discontinuous derivative? I myself can only come up with examples where the derivative is discontinuous at only one point. I am assuming the function is real-valued and defined on a bounded interval.
I've been battling the castle guards for ages and I have been getting no where! just losing a bunch of candies from all the health potion making. What is the quickest way to beat all the guards?
I already have the pink and red leather gloves, the armor, the crown, and the monkey's staff (and they're all enchanted). Regardless of how many health potions I use, I always die. Help!
Currently i have 2 screens and i've activated the workspaces feature. When I switch to another workspace, the 2 screens switch the workspace and this isn't the behavior I want. I want a Mac like workspace support where only the screen I focus switch the workspace. How can I do this ?
I connected my laptop to my LCD. Using the laptop display hotkey I can switch between different modes - only laptop monitor on, only LCD monitor on, both on and display the same view, both on and the desktop is stretched (divided). But, I'm looking for something else - I would like to have two workspaces, one visible on the laptop monitor and the other on the LCD. Is that possible?
I am trying to populate a dynamically allocated 2D array. Specifically, I am trying to input random numbers into an array. Code below: #include <stdio.h> #include <stdlib.h> #include <time.h> int main(void) { int i, j, num_students = 10, num_grades = 4; int **array; srand(time(NULL)); array = malloc(sizeof(int *) * num_students); for (i = 0; i < num_students; ++i) array[i] = malloc(sizeof(int) * num_grades); for (i = 0; i < num_students; ++i) { printf("Student %d has grades: ", i); for (j = 0; j < num_grades; ++j) array[i][j] = rand() % 101; printf("%d ", array[i][j]); printf("\n"); free(array[i]); } free(array); return 0; } The output: Student 0 has grades: 0 Student 1 has grades: 0 Student 2 has grades: 0 Student 3 has grades: 0 Student 4 has grades: 0 Student 5 has grades: 0 Student 6 has grades: 0 Student 7 has grades: 0 Student 8 has grades: 0 Student 9 has grades: 0 I do not know why it is printing 0 instead of the random numbers.
Why does everyone tell me writing code like this is a bad practice? if (foo) Bar(); //or for(int i = 0 i < count; i++) Bar(i); My biggest argument for omitting the curly braces is that it can sometimes be twice as many lines with them. For example, here is some code to paint a glow effect for a label in C#. using (Brush br = new SolidBrush(Color.FromArgb(15, GlowColor))) { for (int x = 0; x <= GlowAmount; x++) { for (int y = 0; y <= GlowAmount; y++) { g.DrawString(Text, this.Font, br, new Point(IconOffset + x, y)); } } } //versus using (Brush br = new SolidBrush(Color.FromArgb(15, GlowColor))) for (int x = 0; x <= GlowAmount; x++) for (int y = 0; y <= GlowAmount; y++) g.DrawString(Text, this.Font, br, new Point(IconOffset + x, y)); You can also get the added benefit of chaining usings together without having to indent a million times. using (Graphics g = Graphics.FromImage(bmp)) { using (Brush brush = new SolidBrush(backgroundColor)) { using (Pen pen = new Pen(Color.FromArgb(penColor))) { //do lots of work } } } //versus using (Graphics g = Graphics.FromImage(bmp)) using (Brush brush = new SolidBrush(backgroundColor)) using (Pen pen = new Pen(Color.FromArgb(penColor))) { //do lots of work } The most common argument for curly braces revolves around maintance programming, and the problems that would ensue by inserting code between the original if statement and its intended result: if (foo) Bar(); Biz(); Questions: Is it wrong to want to use the more compact syntax which the language offers? The people that design these languages are smart, I can't imagine they would put a feature which is always bad to use. Should we or Shouldn't we write code so the lowest common denominator can understand and have no problems working with it? Is there another argument that I'm missing?
Bought it a the groceries store, and forgot it in the groceries bag. So it was left at room temperature, in the original sealed container for around 12 hours. Given that cheese should usually be refrigerated, is this product still safe to eat?
If I left food out of the refrigerator for some period of time, is it still safe? If I left it out too long, can I salvage it by cooking it more?
I have a mathematical theorem written in pencil on paper. I am using a handheld device to use the internet. On this webpage - - are the high requirements of the modern world for the publication of a math paper. I have hundreds of handwritten pages of mathematical work, but what I need to publish should be only ten pages or so. Proving Legendre's conjecture took a lot of work. Verifying the proof took a lot of work. Putting the proof into text will be a lot of work, for my handwritten papers have more numbers than words, and the drawings have to be explained. Publishing the proof of Legendre's conjecture in a refereed mathematics publication of worldwide repute would allow other mathematicians to read it at their convenience and verify it for themselves and, most importantly, make use of the other results which follow from the proof technique. From the start, through the process, to the finish is the way to go. I need assistance getting started.
Which book (free or otherwise) was the most useful to you when you started learning LaTeX? I am frequently asked this question by friends who want to learn LaTeX, and I recommend the book which got me started, , but I feel that there might be better options around. Also see .