Null pointer error -- using array as parameter in constructor

I am taking AP Comp Sci and working on the lab "elevens". All I'm trying to do is instantiate an object of the "Deck" class, and my constructor is throwing a NullPointerError. After doing a print check, I found that the first index is being found correctly, it's the second that's throwing the error. What do I need to change in either my Deck class or my main method to fix this issue?  public Card(String cardRank, String cardSuit, int cardPointValue)  {     suit = cardSuit;     rank = cardRank;     pointValue = cardPointValue; }  private ArrayList<Card> cards;  public Deck(String[] ranks, String[] suits, int[] values)  {     for(int i =0; i < suits.length; i++)     {                         cards.add(new Card(ranks[i], suits[i], values[i]));         size++;     } }  public static void main(String[] args)  {     String [] suits = new String [] {"Spades", "Hearts", "Diamonds"};     String [] ranks = new String [] {"Queen", "King", "Ace"};     int [] points = new int [] {10, 10, 11};     Deck deck = new Deck(ranks, suits, points); }


I only have 2 available points and I wish to forecast its value for the next year. I'm currently looking into exponential smoothing, and econometric input-output model. Which one would be more appropriate? This is about poverty.


Does the untarred folder overwrites or appends the contents of the original folder?

I have a x.tar.gz as a backup which has the following contents:   .htaccess a.html b.html c.html x.html   I have also a ./x directory, already existing, which has the following contents:   .htaccess a.html b.html c.html y.html   Now, if I tar xzf the tar file in the same location, what will be the contents of the ./x directory?


Tools and softwares need to learn to be a web and graphics designer

This is my first question here. I am in my academic level. I know html, and a bit of css. I want my career in graphics and web design. As a startup, other than Html and css how many tools and softwares do i need to learn? Is knowing Javascript is mandatory for this filed?


String to class mvc c# for use Job in Quartz

I want to make 1 job and 1 schedule using quartz, but every job is run based table in the database  foreach (var i in query) {  scheduler.ScheduleJob(JobBuilder.Create<i.classname>().Build(), TriggerBuilder.Create()                     .WithSimpleSchedule(x => x                         .WithIntervalInSeconds(40)                         .RepeatForever()                       )                     .Build()); }   i.classname is a string, how to make a class ?


Sales Tax: Rounded Then Totaled or Totaled Then Rounded?

E.g. There is a sale with 3 items, each costing $1.00. Sales tax is 12.4%. In calculating the tax for each item, do I round the tax amount first and then total everything up? Like this:  ITEM 1: $1.00 + $0.124 = $1.124 -> $1.12 ITEM 2: $1.00 + $0.124 = $1.124 -> $1.12 ITEM 3: $1.00 + $0.124 = $1.124 -> $1.12 TOTAL: $3.36   Or do I total everything up and then round? Like this:  ITEM 1: $1.00 + $0.124 = $1.124 ITEM 2: $1.00 + $0.124 = $1.124 ITEM 3: $1.00 + $0.124 = $1.124 TOTAL: $3.372 -> $3.37   Is one method correct? Might it depend on local laws?


Big O question about (Python) list iteration with skipping elements

I am having a dispute with a co-worker regarding a Big O question. For example, consider the following Python for-loop that prints every 100th element: n = 10000 for i, x in range(0, n, 100):     print(i)  I think the complexity is O(log n) as opposed to O(n), because it grows not quite linearly. O(n) is not wrong, I think, but isn't O(log n) more precise? Thanks!


Linear model with log-transformed response vs. generalized linear model with log link

In  titled "CHOOSING AMONG GENERALIZED LINEAR MODELS APPLIED TO MEDICAL DATA" the authors write:     In a generalized linear model, the mean is transformed, by the link   function, instead of transforming the response itself. The two methods   of transformation can lead to quite different results; for example,   the mean of log-transformed responses is not the same as the logarithm   of the mean response. In general, the former cannot easily be   transformed to a mean response. Thus, transforming the mean often   allows the results to be more easily interpreted, especially in that   mean parameters remain on the same scale as the measured responses.   It appears they advise the fitting of a generalized linear model (GLM) with log link instead of a linear model (LM) with log-transformed response. I do not grasp the advantages of this approach, and it seems quite unusual to me.  My response variable looks log-normally distributed. I get similar results in terms of the coefficients and their standard errors with either approach.  Still I wonder: If a variable has a log-normal distribution, isn't the mean of the log-transformed variable preferable over the log of the mean untransformed variable, as the mean is the natural summary of a normal distribution, and the log-transformed variable is normally distributed, whereas the variable itself is not?


Using BMCT to prove the sequence $a_{n+1} = \sqrt{2 + a_n}$ is bounded and increasing.

My solution:  Proof of (1)  $$< \sqrt{2 + 2} \text{ by I. H.}$$  $$= 2$$ As required. Therefore by PMI $\{a_n\}$ is bounded above by 2  Proof of (2)  $$(a_n - 2)(a_n + 1) < 0$$  Therefore $\{a_n \}$ is strictly increasing.   By BMCT it states that if a sequence is bounded above and strictly increasing, then it converges. Therefore this sequence by BMCT converges.   Is this correct? Is there anything else I should say or add?


Change user id and group id ownership of files within a tarball?

I have a tarball and the files it contains do not have the right user and group ownership. Files are owned jenkins:jenkins and I'd like them to be owned naftuli:othergroup.   Is there a way for me to edit the tarball in place so that the files it contains become owned by naftuli:othergroup?   The problem I'm facing is that at the time of the tarball creation, the jenkins user doesn't have permissions to chown things to different users and groups. At the time of extraction, I will have permissions to create those files as the users mentioned, so I need to edit the user ids and group ids within the tarball.


I am looking for climate rasters (temperature, precipitation) for European continent.   I know WorldClim (1km/pixel) but it is too coarse.   Do you know, where can I download finer data, for example 500m/pixel or more.


Why are some files in bold & others not?

I getting a permission denied when trying to copy my cisco image to the switch and I thought the bold text may indicate something I was unaware of.


How to draw a cylinder with height and radius with TikZ?

How to draw a cylinder with height and radius with TikZ. According to the figure:


How to compute integral $\int_{-\infty}^\infty e^{-\frac{1}{2}x^2}dx$? I try to change it to polar coordinates but I have only one variable.   Thanks in advance!


How to sort HashMap when HashMap does not maintain insertion order?

In an interview I was asked to sort HashMap by values. Even after I write such a program, it does not print the HashMap in sorted order. Can someone please explain?  public static void main(String[] args) {     // TODO Auto-generated method stub     HashMap<Integer,String> x= new HashMap<Integer,String>();     x.put(3, "arsfd");     x.put(5, "3453");     x.put(6, "sdfsaf");     x.put(8, "wetr");     x.put(11, "cbncvnbv");     List<String> mylist = new ArrayList<String>();     mylist.addAll(x.values());     Collections.sort(mylist);            HashMap<Integer,String> y= new HashMap<Integer,String>();     for(int p=0;p<x.size();p++) {         System.out.println(mylist.get(p));         y.put((Integer) getKey(x,mylist.get(p)), mylist.get(p));     }     System.out.println(y.toString()); } public static Integer getKey(HashMap<Integer,String> x,Object v) {     for(Entry<Integer, String> oo:x.entrySet()) {         if(oo.getValue()==v)             return (Integer)oo.getKey();     }     return null;}


A problem about typesetting Mathematica code

I want to typesetting the words as below:  My code: \documentclass[b5paper,UTF8]{article} \usepackage{graphicx}                 \usepackage{geometry}                \usepackage{fancyhdr} \usepackage{times}  \geometry{left=2cm,right=2cm,top=2.8cm,bottom=2.5cm}  \begin{document} \noindent \textsf{\textbf{4. Avoid inefficient patterns, construct efficient patterns}}  4.1. Rule-based programming can be both very fast and very slow, depending on how you build your structures and rules, but in practice it is easier to inadvertently make  it slow. It will be slow for rules which force the pattern-matcher to make many a  priory doomed matching attempts, for example by under-utilizing each run of the pattern- matcher through a long list (expression). Sorting elements is a good example:  list \/ \/ . \{ left\_\_\_ , x \_ , y \_ , right \_\_\_ \}\/ \; x $>$ y \:  $>$ \{ left, y, x, right \} - has a cubic complexity in the size of the list.  \end{document}  However, the main problem is  list \/ \/ . \{ left\_\_\_ , x \_ , y \_ , right \_\_\_ \}\/ \; x $>$ y \:  $>$ \{ left, y, x, right \} - has a cubic complexity in the size of the list.


Using .NET, how can you find the mime type of a file based on the file signature not the extension

I am looking for a simple way to get a mime type where the file extension is incorrect or not given, something similar to  only in .Net.


I tried compressed plain SVG (.svgz), the files are smaller and it looks the same than the regular .svg. Is there any downside? Can I use always .svgz?


Merging author affiliation footnotes in REVTeX

This issue has been previously raised e.g.  and  but it remains unanswered, so I would like to raise it again. The REVTeX package automatically merges some footnotes in the author list. For instance, consider the following. \documentclass[superscriptaddress]{revtex4-1}  \begin{document}  \author{Author A} \thanks{Footnote.} \affiliation{University A} \affiliation{University B}  \author{Author B} \thanks{Footnote.} \affiliation{University B}  \maketitle  \end{document}  Here, the repeated footnotes (affiliation B and the \thanks footnote) are merged:  However, adding email addresses messes things up. \documentclass[superscriptaddress]{revtex4-1}  \begin{document}  \author{Author A} \thanks{Footnote.} \email{a@a.edu} \affiliation{University A} \affiliation{University B}  \author{Author B} \thanks{Footnote.} \email{b@b.edu} \affiliation{University B}  \maketitle  \end{document}   I would like to merge the common \thanks footnote, but keep the email footnotes separate. Altogether, this would give 3 footnotes, with each author having two (in addition to affiliation). Is this possible with REVTeX? If not, is there an easy way to patch it to allow for this behavior?  A workaround which sometimes works is to put the \email after \affiliation, but this places the footnote mark in the affiliation and it only works when there is no ambiguity (no affiliation shared between different authors). To clarify why the answer in  is not applicable: the code provided there only works with one affiliation footnote (e.g. \thanks but no \email) and breaks down if one tries to use both, as I have shown above.


Why does the additive subgroup of $\mathbb{R}$ generated by $1$ and $\sqrt{2}$ contain arbitrary small elements?

Let $G\subset \mathbb{R}$ be the additive subgroup of $(\mathbb{R},+)$ defined by $G=\mathbb{Z}+\sqrt{2}\mathbb{Z}$. I want to prove that for every $\epsilon>0$ there exists an element $g_\epsilon\in G$ with $\epsilon>g_\epsilon>0$. Can anybody imagine a nice proof?  (I coundn't think of an appropriate tag for this question. Please feel free to add or remove one)


How do I configure a new Ubuntu installation to accept ssh connections?

I just installed Ubuntu. How do I set it up to allow me to ssh into it?  Right now I get "ssh: connect to host x.x.x.x port 22: Operation timed out".


I get the Y is for Canadian airports, but while YVR comes from Vancouver, YOW for Ottawa for example I don't see what UL can relate to. Is it just a meaningless acronym ?  Edit: I'm not asking why they start with Y, that seems a convention, but rather what does the UL relate to


I'm trying to make some bubbles and foam in liquid. Something like in the image below.     I'm thinking about particles, but I don't know how to make bubbles of different sizes. I also don't know how to make the bigger bubbles on the top and the smaller ones on the bottom.   Maybe some smart shader? Do you have any ideas?


I'm looking for an alternative to SketchUp for Ubuntu with no luck whatsoever. I'm a heavy user of Blender, but since I can't really script at all, it doesn't fullfill my needs completely. What I'm looking for specifically is an easy tool to design furniture, for example. The tools I need in the program, according to SketchUp, are: exact measurements, ability to draw an object simply by drawing edges in 3D space or at least in 2D, ability to scale, extrude and manipulate with verticies, edges and/or faces in real measurementunits, ability to create a segment in an existing object easily in specified location. For example if I know I want a window in wall, knowing it has to be 1 meter from the ground and 50 cm from the corner, I want an easy way to do that.   What I don't need is calculating anything, running anything. (I only want stacionary designs, no turning wheels, no kogwheels, and if, I don't need to see them move or calculate anything there)  Is there any alternative for SketchUp working this way for Ubuntu?


Commutative non Noetherian rings in which all maximal ideals are finitely generated

In commutative rings we have the following  Theorem. $R$ is Noetherian if and only if each prime ideal of $R$ is finitely generated.  From this Theorem I am looking for commutative rings $R$ in which every maximal ideal is finitely generated but $R$ is non Noetherian.  Question: Is there a straightforward example of a commutative ring $R$ so that each maximal ideal is finitely generated, but $R$ is non Noetherian?  Thank You


Differences between functools.partial and a similar lambda?

In Python, suppose I have a function f that I want to pass around with some secondary arguments (assume for simplicity that it's just the first argument that remains variable).  What are the differences between doing it these two ways (if any)?  # Assume secondary_args and secondary_kwargs have been defined  import functools  g1 = functools.partial(f, *secondary_args, **secondary_kwargs) g2 = lambda x: f(x, *secondary_args, **secondary_kwargs)   In the , for example, there is this quote:     partial objects defined in classes behave like static methods and do not transform into bound methods during instance attribute look-up.   Will the lambda-method suffer from this if used to make a class method from arguments supplied to the class (either in the constructor or through a function later on)?


Suppose $f$ is a holomorphic map on the unit disc. Let $d$ be the diameter of the image of $f$. If $ 2|f'(0)|=d $, please show that $f$ is a linear function.   I think maybe I can prove it by using Schwarz lemma, but I failed.


I have an internal microphone in my laptop. I think it uses Intel High Definition Audio. But I can't get it to work with Ubuntu. It doesn't work with either the Sound Recorder or Skype.  On the Input tab in 'Sound Preferences', I just see Internal Analog Input Device...


when found blank line change to new column

I have a data as: q    w    e    e    r    r t     23     21    1      Whenever we find blank line change it to new column. Output q,e,23     w,r,21 e,r,1 ,t,  I have tried but neither with sed nor I am able to change the row. Please let me know how can we achieve this.


Why was Dolores Umbridge not arrested after the end of Harry's fifth year?

Dolores Umbridge sent two Dementors to kiss Harry Potter illegally. She used a Blood Quill — a dark artifact — on at least two students — Harry and Lee Jordan. She was planning to use the Cruciatus — one of the Unforgivable Curses — on Harry to give up Dumbledore's location. She used what she thought was Veritaserum on Harry illegally.  So, why was she not arrested immediately? In fact, it seems that she wasn't even fired from the Ministry when Scrimgeour became Minister. Considering that Dumbledore had Sirius Black exonerated after his death , arresting and convicting Umbridge should have been quite simple. Yet, she was arrested only after his seventh year.


How do you prove $|y|<x \Leftrightarrow -x<y<x$ I tried using the fact that $|a|=\sqrt{a^{2}}$ but it got messy.how would I go about proving this


I'm seeing a severe drop off in Google impressions.  See attached screenshot from Google Analytics:    I haven't been able to attribute this to any changes on the site.  As you can see, this started happening on Oct 21st.  Does anyone know if this corresponds to a Google Search update?  Otherwise, does anyone have any suggests for tracking down the cause?  I'm pretty stumped.


What are the best settings to photograph a sunset ?


Can i use this to play hearthstone on my acer chromebook c720

I have an Acer chromebook c720 can I use this to play hearthstone on it? If so how do i go about that what should i install?


Has JK Rowling ever commented on whether logical inconsistencies in her world are deliberate allegories?

There are a number of questions on this site which query the internal logic of the Harry Potter world. Here's a couple of examples:       I could quote more, generally about economy, geography and employment in the wizarding world. I suspect most people who've read all the books have probably been struck by one or more such questions as they've gone through.   Of course, it's a testament to the skill of the author and the wonder of the world itself that these omissions don't really spoil most people's enjoyment of the story. The suspension of disbelief is extremely strong, partly precisely because Rowling has chosen to focus on the narrative over the consistency.   One of those linked questions, the one about Quidditch, is mine. I recently added another. After which I began to wonder: what if this isn't just the result of an author being more interested in story and characters than they are in consistency? What if Rowling intentionally made aspects of the wizarding world nonsensical in order to make points about modern society?  Take Quidditch. It leaves much to be desired as a sport (see answers to linked question above), yet many Wizards seem oblivious and remain fanatically devoted to it. Could this not be read as a wry commentary on the fanatical devotion shown by many sports fans to what are, after all, relatively inconsequential pursuits? And the "poor" nature of some Wizarding families in spite of the magic available to them. Again, perhaps a comment on how a rich western society still relegates some people to live in poverty, in spite of the wealth of the nation?  Other authors have form here. Kazuro Ishiguro is on record has saying he's not interested in whether his fantasy worlds make any sense, merely in whether they work to help examine his chosen themes.  A question about allegory is, to some extent, unanswerable. Unless the author has specifically commented on whether or not the allegory is intentional and/or accepted by them. So this is my question: has Rowling ever intimated that some or all of the logical inconsistency in her invented world should be read as allegory or metaphor?


I need to know how to get to Ubuntu directly without opening Windows 8.1 Then i have to go to Metro screen and press Power icon and holding Shift key and clicking on Restart Choose, I want to know how to get to page that make me choose between Operating Systems


Gosper's unusual formula connecting $e$ and $\pi$

quotes (see equation $(26)$)     Gosper gives the unusual equation connecting $\pi$ and $e$ $$\sum_{n = 1}^{\infty}\frac{1}{n^{2}}\cos\left(\frac{9}{n\pi + \sqrt{n^{2}\pi^{2} - 9}}\right) = -\frac{\pi^{2}}{12e^{3}}\tag{1}$$   I did not find any references to a paper in which Gosper proved the above formula. I am perplexed by this cosine term in the formula and it does not seem to resemble any familiar series. A direct proof of this formula would be greatly appreciated. Or if someone knows Gosper's paper where this formula is established then do provide a link to that paper.  Update: We can see that $$\frac{9}{n\pi + \sqrt{n^{2}\pi^{2} - 9}} = n\pi - \sqrt{n^{2}\pi^{2} - 9}\tag{2}$$ and noting that $\cos(n\pi - \alpha) = (-1)^{n}\cos \alpha$ we can see that the formula of Gosper can be written as $$\sum_{n = 1}^{\infty}\frac{(-1)^{n}}{n^{2}}\cos\sqrt{n^{2}\pi^{2} - 9} = -\frac{\pi^{2}}{12e^{3}}\tag{3}$$ I think that the formula given by Gosper is probably a special case of a more general formula for the sum $$\sum_{n = 1}^{\infty}\frac{(-1)^{n}}{n^{2}}\cos\sqrt{n^{2}\pi^{2} + a^{2}}\tag{4}$$ (the formula $(3)$ corresponds to $a = 3i$). Looks like Gosper is also fond of strange formulas like Ramanujan.


During installation of apt-fast the screen looped and after a while I closed the window.  How can I fix it?  sudo dpkg --configure -a Setting up apt-fast (1.7.2-1~precise1) ... debconf: DbDriver "config": /var/cache/debconf/config.dat is locked by another process: Resource temporarily unavailable dpkg: error processing apt-fast (--configure):  subprocess installed post-installation script returned error exit status 1 Errors were encountered while processing:  apt-fast


I am having trouble with bash. I am trying to put a command in an if statement and then compare it to a string.  This works perfectly.  echo $(ipcs | grep Shared | awk '{print $2}')   When I put it in an if statement I get some problems.  $ if [ "$(ipcs | grep Shared | awk '{print $2}')" -eq "Shared"]; then   echo expression evaluated as true; else   echo expression evaluated as false; fi bash: [: missing `]' expression evaluated as false  $ if [ "$(ipcs | grep Shared | awk '{print $2}')" = "Shared"]; then   echo expression evaluated as true; else   echo expression evaluated as false; fi bash: [: missing `]' expression evaluated as false  $ if [ "$(ipcs | grep Shared | awk '{print $2}')" == "Shared"]; then   echo expression evaluated as true; else   echo expression evaluated as false; fi bash: [: missing `]' expression evaluated as false   I tried ==, =, and -eq because I wasn't sure which one to use.


How, other than Hallow, can a place or object be consecrated or desecrated, so that it would be detected by Divine Sense or Detect Evil and Good?

The paladin's  feature allows the paladin to     ...detect the presence of any place or object that has been consecrated   or desecrated, as with the  spell.   Similarly, the spell  allows the caster to     ...know if there is a place or object within 30 feet of you that has   been magically consecrated or desecrated.   How, other than via the spell hallow, can a place or object be consecrated or desecrated, so that it would be detected by Divine Sense or detect evil and good?  Question inspired by , where we establish that Divine Sense cannot detect whether an object is cursed.


Z[x] is not isomorphic to Q[x] as a rings

The problem (from D&F) is to prove that the ring $\mathbb{Z}[x]$ is not isomorphic to the ring $\mathbb{Q}[x]$.I can't come up to any idea, so I'm asking for a hint.


Have any muggle used an enchanted tool or entered an enchanted place before?

In the Harry Potter books, I don't recall any mention of a muggle accessing an enchanted building or place or even using a magical object. If a wizard allows it, can muggles enter an enchanted building such as Hogwarts or leaky cauldron? I know squibs can, but they are descendants of wizards and they can also see dementors while muggles can't.


How to install Ubuntu 13.04 without a CD or USB?

Is it possible to install Ubuntu Raring Ringtail 13.04 without CD or USB?


"I had not noticed." but "I did not know."

Did you hear that the engine produced some sounds? No, I had not noticed.  And also other verbs:  I did not know. I did not see. I had not heard.  With some verbs it is common to use the perfect aspect (had not), with some not. For instance, had not known  at all. What's the reason?


Taylor series expansion for $f(x)=\sqrt{x}$ for $a=1$

I seem to be stuck defining an alternating sequence of terms in this series because $f^{(0)}(x)=f(x)$ is positive, as well as $f'(x)$, but then every other term starting with $f''(x)$ is negative. How can I define $f^{(n)}(x)$ given this?  \begin{array}{ll}     f(x)=x^{\frac{1}{2}} & f(1)=1 \\     f'(x)=\frac{1}{2}\cdot x^{-\frac{1}{2}} & f'(1)=\frac{1}{2} \\     f''(x)=(-1)^1\cdot\left(\frac{1}{2}\right)^{2}\cdot x^{-\frac{3}{2}} & f''(1)=(-1)^1\cdot\left(\frac{1}{2}\right)^{2} \\     f'''(x)=(-1)^2\cdot 3\cdot\left(\frac{1}{2}\right)^{3}\cdot x^{-\frac{5}{2}} & f'''(1)=(-1)^2\cdot3\cdot\left(\frac{1}{2}\right)^{3} \\     f^{(4)}(x)=(-1)^3\cdot3\cdot 5\cdot\left(\frac{1}{2}\right)^{4}\cdot x^{-\frac{7}{2}} & f^{(4)}(1)=(-1)^3\cdot3\cdot 5\cdot\left(\frac{1}{2}\right)^{4} \\     f^{(n)}(x)=(-1)^{n-1}\left(\frac{1}{2}\right)^{n}\cdot x^{\frac{1-2n}{2}} & f^{(n)}(1)=(-1)^{n-1}\left(\frac{1}{2}\right)^{n} \end{array}  I thought I had the right answer until I realized that I'd be defining $f(x)$ to be negative.


I have a problem with JBullet mesh collsion. Everything works fine when I create a mesh from my object without scaling, but the problem starts when I want to scale the object. I also tried scaling in Blender, but it has the same problem. Here is my code for creating a mesh from an object:      int numtriangles = mesh.vertices.length / 3;     int numverts = mesh.vertices.length;      ByteBuffer indexBuffer = BufferUtils.createByteBuffer(numverts * 3 * 4).order(ByteOrder.nativeOrder());     indexBuffer.clear();     for(int i=0;i<numtriangles;i++) {        indexBuffer.putInt(i);        indexBuffer.putInt(i);        indexBuffer.putInt(i);     }      ByteBuffer geometry = BufferUtils.createByteBuffer(numtriangles * 3 * 4).order(ByteOrder.nativeOrder());     geometry.clear();     for(int i=0;i<numtriangles;i++) {        geometry.putFloat(mesh.vertices[i].getPos().x);        geometry.putFloat(mesh.vertices[i].getPos().y);        geometry.putFloat(mesh.vertices[i].getPos().z);     }      geometry.rewind();     indexBuffer.rewind();      TriangleIndexVertexArray trimesh = new TriangleIndexVertexArray(numtriangles, indexBuffer, 3 * 4, numtriangles, geometry, 3 * 4);     BvhTriangleMeshShape shape = new BvhTriangleMeshShape(trimesh,true);     return shape;   My scaling was something like this:       for(int i = 0; i < vertices.length; i++) {         Vertex acc = vertices[i];          Vector3 pos = acc.getPos();         pos.x *= scale.x;         pos.y *= scale.y;         pos.z *= scale.z;         acc.setPos(pos);          Vector2 tex_coord = acc.getTexCords();         tex_coord.x *= scale.x;         tex_coord.y *= scale.z;         acc.setTexCords(tex_coord);          vertices[i] = acc;     }   The problem is when I scale the object, it no longer collides with other objects.


Why $0^0=I$?   I'd tried prove that considering $N^0$ where N is a Nilpotent matrix and then using the Cayley -Hamilton theorem  Thanks in advance.


Is there a way to create multiple objects with generic names per function in python 3.8.6

So for context: I'm trying to create a simple chess program in python with pygame (2.0.0). Since I don't want to create every single of the 64 tiles manually I am looking for a way to create them using a function. Since in chess tiles are named from a1 to h8 (files and ranks) I want the objects to have this kind of names (a1, a2,...). The tile-class is until now very simple: class tile:       def __init__(self):         self.piece = None  Then I made two lists: one for the files and one for the ranks. Then two for-loops (one in another) so that for every single combination it would create a tile-object: files = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h'] ranks = ['1', '2', '3', '4', '5', '6', '7', '8']  for f in files:     for r in ranks:         f + r = tile()  Now my problem: python doesn't allow this ;( I want to create 64 tile-objects with names from a1 to h8. Is there any way for this?


Expectation of momentum in the bound state

Is it logically correct to assert that the expectation of the momentum $$\langle \hat p \rangle=0$$ for any bound state because it is bound to some finite region? What is the physical interpretation of the fact that $$\langle \hat p \rangle=0$$ in an energy eigenstate $\psi_n(x,t)$  but $$\langle \hat p \rangle\neq0$$ in some superposition state $$\psi(x,t)=c_m\psi_m(x,t)+c_n\psi_n(x,t)~?$$ Here $\psi_n(x,t)$ the eigenstates of the Hamiltonian, for example, in the problem of particle in a box (say).


How to add a button to a column or subitem in a ListView in WinForms?

I am having a terrible time trying to figure out how to list a button with a value on a listview to go with each value.    I need to replace all of the add/edit string values with Buttons. The original assignment was for a listbox but I figured that the only way too accomplish this is through subitems from listview items. Thanks.   public partial class Form1 : Form {     public Form1()     {         InitializeComponent();         this.DefinedClassesLb.Columns.Add("Samples", 90);         this.DefinedClassesLb.Columns.Add("AddEdit", 60);         this.DefinedClassesLb.Columns.Add("Delete", 45);          ListViewItem item = new ListViewItem("1");         item.SubItems.Add("add/edit");         item.SubItems.Add("x");         this.DefinedClassesLb.Items.Add(item);          ListViewItem item2 = new ListViewItem("2");         item2.SubItems.Add("add/edit");         item2.SubItems.Add("x");         this.DefinedClassesLb.Items.Add(item2);          ListViewItem item3 = new ListViewItem("3");         item3.SubItems.Add("add/edit");         item3.SubItems.Add("x");         this.DefinedClassesLb.Items.Add(item3);          ListViewItem item4 = new ListViewItem("4");         item4.SubItems.Add("add/edit");         item4.SubItems.Add("x");         this.DefinedClassesLb.Items.Add(item4);          ListViewItem item5 = new ListViewItem("5");         item5.SubItems.Add("add/edit");         item5.SubItems.Add("x");         this.DefinedClassesLb.Items.Add(item5);          ListViewItem item6 = new ListViewItem("6");         item6.SubItems.Add("add/edit");         item6.SubItems.Add("x");         this.DefinedClassesLb.Items.Add(item6);          ListViewItem item7 = new ListViewItem("7");         item7.SubItems.Add("add/edit");         item7.SubItems.Add("x");         this.DefinedClassesLb.Items.Add(item7);          this.DefinedClassesLb.View = View.Details;         this.DefinedClassesLb.HeaderStyle = ColumnHeaderStyle.None;      } }


I have a 16000mAh power bank that I use to charge my phone and iPad. I was concerned of it size being a problem for Canadian-USA border security.  Is this actually a problem or will they not even care? I know this may seem like a dumb question.


For what values of $p$ is the series $\sum_n \frac{1}{n(\ln n)^{p}}$ convergent?

The series is: $\displaystyle\sum_{n=1}^\infty \dfrac1{n (\ln n)^p}$  I don't know what to do from here since $p$ is on $\ln$.   Would $p$ still have to be $> 1$ since $\ln$ is changing in terms of $n$?


One of my object changes color after animation rendering

This is what it looks like when I rendered an image of my final work   But after I rendered animation on it, the donut's changed color.   I'm new to Blender, I'm following the tutorial on Youtube for this project.   Can someone tell me the possible solution for this? I want it to look like the first image when it is rendered in animation.


Filenames with spaces breaking for loop, find command

I have a script which searches all files in multiple subfolders and archives to tar. My script is   for FILE in `find . -type f  -name '*.*'`   do if [[ ! -f archive.tar ]]; then    tar -cpf archive.tar $FILE else    tar -upf archive.tar $FILE  fi done   The find command gives me the following output  find . -type f  -iname '*.*' ./F1/F1-2013-03-19 160413.csv ./F1/F1-2013-03-19 164411.csv ./F1-FAILED/F2/F1-2013-03-19 154412.csv ./F1-FAILED/F3/F1-2011-10-02 212910.csv ./F1-ARCHIVE/F1-2012-06-30 004408.csv ./F1-ARCHIVE/F1-2012-05-08 190408.csv   But the FILE variable only stores first part of the path ./F1/F1-2013-03-19 and then the next part 160413.csv.  I tried using read with a while loop,   while read `find . -type f  -iname '*.*'`;   do ls $REPLY; done   but I get the following error  bash: read: `./F1/F1-2013-03-19': not a valid identifier   Can anyone suggest an alternative way?  Update  As suggested in the answers below I updated the scripts  #!/bin/bash  INPUT_DIR=/usr/local/F1 cd $INPUT_DIR for FILE in "$(find  . -type f -iname '*.*')" do archive=archive.tar          if [ -f $archive ]; then         tar uvf $archive "$FILE"         else         tar -cvf $archive "$FILE"         fi done   The output that i get is  ./test.sh tar: ./F1/F1-2013-03-19 160413.csv\n./F1/F1-2013-03-19 164411.csv\n./F1/F1-2013-03-19 153413.csv\n./F1/F1-2013-03-19 154412.csv\n./F1/F1-2012-09-10 113409.csv\n./F1/F1-2013-03-19 152411.csv\n./.tar\n./F1-FAILED/F3/F1-2013-03-19 154412.csv\n./F1-FAILED/F3/F1-2013-03-19 170411.csv\n./F1-FAILED/F3/F1-2012-09-10 113409.csv\n./F1-FAILED/F2/F1-2011-10-03 113911.csv\n./F1-FAILED/F2/F1-2011-10-02 165908.csv\n./F1-FAILED/F2/F1-2011-10-02 212910.csv\n./F1-ARCHIVE/F1-2012-06-30 004408.csv\n./F1-ARCHIVE/F1-2011-08-17 133905.csv\n./F1-ARCHIVE/F1-2012-10-21 154410.csv\n./F1-ARCHIVE/F1-2012-05-08 190408.csv: Cannot stat: No such file or directory tar: Exiting with failure status due to previous errors


i saw some threads about this topic, but no one helps :( I have the following problem, after my ajax i append some li's and img's. I put a class for all my images and after that, my image containers are not clickable. i saw on a thread here that some call to use the jquery live() function, but it doesnt work for me and i tried on() also.  Example:  $('.CLASS').live('click',function(){     alert("LETS ROCK"); });   Here my success Function (Ajax )  for( x in data.data)               {                    if( data.data[x].type == "image" )               {             $('.CLASS ul').append('

');                                            }                 }    thank you in advance


I'm using a high number of samples. Why is my render coming out in low quality?

Can someone help me determine why my render is coming out in such low quality? I have Cycles up to 500 Render Samples, but I have no idea why it looks like it's only using one.


Inequality $ \vert \sqrt{a}-\sqrt{b} \vert \leq \sqrt{ \vert a -b \vert } $

I have the following inequality on my class notes that I haven't been able to prove, I was even wondering if it is actually true:  $$ \forall a,b \in \mathbb{R}^{\ge0} \left( \left| \sqrt{a}-\sqrt{b} \right| \leq \sqrt{ \vert a -b \vert}\right)  $$  Thanks


how to prove $a+b-ab \le 1$ if $a,b \in [0,1]$?

Given:  $0 \le a \le 1$  $0 \le b \le 1$  Prove: $a + b - ab \le 1$


Get value after string slash from current url javascript

i have a current page url that looks like this:  http://localhost/admin/namespace_module/yeezy/index/test_id/5/key/23123asda/   the url can be dynamic but always contain /test_id/value/ , first i want to check if the /test_id/ is exist in my current url:  window.location.href   then i need to retrieve the value


Find all integers n, so that $n^2$ divide $2^n+1$

Bonjour à tous!  As the title suggest I want to find all the $n>1$ such that $n^2| 2^n+1$.  My attempt: Let $p$ an odd prime dividing $n$. We know that $2^p+1|2^n+1$ $\textit{ (Isn’t it the only divisor of $2^n+1$?)}$  and by Fermat $p|2^{p}-2$ therefore $p|3$ thus $p=3$. Since p is the only divisor of $n$, n must be a power of 3. Conversely $n=3^k$ verify the assert.  Is it correct?   By the way is there another proof, specially proof based on group theory.


I keep getting asked to do wedding photography - what is a fair price to ask?

This may sound like a silly post...but, I need some "outside" opinion from people who know what they are doing.  I took up amateur photography as a hobby a couple of years ago...most of it being portrait photography of my children.  As I have posted my pictures on facebook, a plethora of people have loved my "work" and have been contacting me about my "photography" business.  I have been very up-front and honest with every one of them about only being an amateur, and never professionally trained.  That being said, people still hound me to take their pictures.  I am comfortable with my ability to take portrait style pictures....and I have even started charging $60 for a two hour shoot with the rights to the cd of prints.  I do not do my own printing.    Now, I have done three weddings for family members just over this last summer....and only as a wedding gift to them (in other words, I have not charged.)  But now, I am having others, who are not family members, wanting to "hire" me for their weddings.  Again....I have tried to tell them I don't do professional photography, only to be met with all of them still wanting to hire me.    My question is...what is a fair price to ask of these people?  They obviously still want me to work for them, knowing that I have no credentials.....but I have no idea how or what to charge for.  Can anyone give me some ideas?


Showing the existence of an element $g \in G$, a finite abelian group, where $g$ has order $LCM\{|x|: x \in G\}$

So I, more or less, need help understanding this problem.   The first thing I have tried is to pick a specific group: $\mathbf{Z}_5$, under multiplication.  To demonstrate, say we pick element $2$ and $|2| = 4$, and then the only other possible orders are $\{1,4\}$.   Indeed, $4 = LCM(1,4)$.  Not really quite sure, how to generalize this, yet. Any hints? What shall I think about? Definitely prime factorization of each element, hmm... I think!


I am trying to install Android 4.0 on a tv box. I just need to know whether Android 4.0 will have the HDMI drivers.  Thanks


Is it possible to get a core dump of a running process and its symbol table?

Is it possible to get gdb or use some other tools to create a core dump of a running process and it's symbol table?  It would be great if there's a way to do this without terminating the process.    If this is possible, what commands would you use?  (I'm trying to do this on a Linux box)


Snape was once a Death Eater. After Voldemort killed Lily, Snape joined the team of Dumbledore. Fine. They also worked together for years. Fine Again. But, what made Dumbledore think that he could trust Snape after his death? Prior to Dumbledore's death, loyalty of Snape could be because of fear of Dumbledore or benefits of returns like protection against Voldemort or his job. But, what made Dumbledore think that an ex-evil guy would remain loyal to him after his death?


Not able to access protected method from other package

I have a class in a different package where i declared a protected member. as shown  package Pack1;  public class Box {      public Box()     {         System.out.println("Box Class Contructor");     }     protected int x = 1;      protected void Hello1()     {         System.out.println("Hello!!");     }   }   Now i am extending this class to another package to call its protected member as shown:  public class Main extends Pack1.Box {      public Main()     {         System.out.println("main constructor");     }      public static void main(String[] args) {         // TODO Auto-generated method stub          Main main = new Main();               main.Hello1(); // not giving me any error          Pack1.Box  b = new Pack1.Box();         b.Hello1();//Giving me an error     } }   I am not sure why b.Hello1() is giving me an error inspite of being inherited. But if i declare the Hello1() as protected static void it is not giving me an error.


i want to match only start tags in regex

i am making a regex expression in which i want to only match wrong tags like
 *some text here, some other tags may be here as well but no ending 'p' tag*

Affectionately Inscribed

TO

HENRY BULLAR,

(of the western circuit)
PREFACE
   like in the above same text i want to get the result as
(of the western circuit)
 and nothing else should be captured. im using this but its not working
[^\(
\)]*
   please help


I'm using HP Pavilion g6 running Windows 7, I would like to uninstall windows and replace it with Ubuntu. I know the installer has an option, there are virtually no mportant files on Windows 7, I just want to know if any risks will stop the PC booting.  EDIT: No, I cannot run alongside Windows 7 alongside, the only other option is "Inside" Windows 7. I don't want Windows 7.


onchange="javascript:updateModel()" What does the word 'javascript' do?

I often see html elements with an onchange attribute that specifies javascript as the language, e.g.:  onchange="javascript:updateModel()"   It still works if I remove javascript:  onchange="updateModel()"   Is it safe to remove it? Are there some browsers (maybe older versions) that need it?


I am using minion math font to change the operator as minion math.  I successfully changed display math operator like \sum, \int etc.,  But I am unable to change the Minion Math font "Math Delimiter" like   \big( \big), \Big( \Big), \bigg( \bigg), \Bigg( \Bigg) \big[ \big], \Big[ \Big], \bigg[ \bigg], \Bigg[ \Bigg] \left( \right) \left[ \right]   MWE:  \documentclass{book}  \usepackage{amsmath} \usepackage{amssymb}  \makeatletter \DeclareFontEncoding{MXP}{}{} \DeclareFontSubstitution{MXP}{minionmath}{m}{n} \DeclareSymbolFont{operators}{OT1}{minionmath}{m}{n} \DeclareSymbolFont{MMlargesymbols}{MXP}{minionmath}{d}{n} \let\sum\relax \let\intop\relax \DeclareMathSymbol{\sum}{\mathop}{MMlargesymbols}{"48} \DeclareMathSymbol{\intop}{\mathop}{MMlargesymbols}{"50}     \def\int{\intop\nolimits}  \DeclareMathDelimiter{\lgroup} % extensible ( with sharper tips      {\mathopen}{MMlargesymbols}{"3A}{largesymbols}{"3A} \DeclareMathDelimiter{\rgroup} % extensible ) with sharper tips      {\mathclose}{MMlargesymbols}{"3B}{largesymbols}{"3B} \makeatother  \begin{document}    I need to fix the minion math font below mentioned Math Delimiters  \begin{align*} &\big(\sum\frac{a}{b} \big), \Big(\int \frac{a}{b}\Big), \bigg(\frac{a}{b} \bigg), \Bigg(\frac{a}{b} \Bigg)\\ &\big[ \frac{a}{b}\big], \Big[\frac{a}{b} \Big], \bigg[\frac{a}{b} \bigg], \Bigg[\frac{a}{b} \Bigg]\\ &\left( \frac{a}{b}\right)\\ &\left[ \frac{a}{b}\right] \end{align*}   \end{document}   Current Output:  Now I change the \sum, \int symbols in my current output.  But I am unable to change the font "Math Delimiter". How to fix this issue  Please advise.


Is $H(k \operatorname\| H(k \operatorname\| m))$ with double length $k$ like NMAC?

I know that NMAC is mathematically proved with two different keys with length $L$.  But, if I choose to implement a MAC this way: $$H(k \operatorname\| H(k \operatorname\| msg))$$ with a key $k$ of length $2L$, am I vulnerable to some attacks?


I have this string that looks like this  string postData = "event_MemberGUID2=&event_EventID2=6888591&event_ItemID=10151249&event_ItemType=&event_ItemStatusDate=7%2F19%2F2017&event_ItemSemTopic=Test Seminar Topic&event_ItemSemType=100&event_ItemRegion=101A&event_ItemSemPointValue=0&event_ItemStartDate=06%2F05%2F2017&event_ItemEndDate=06%2F05%2F2017&event_ItemStatusID=3";   and I am trying to get the event_ItemID  this is how I am able to get it  List<string> lst = new List<string>(); List<string> lstB = new List<string>();  lst = postData.Split('&').ToList();  foreach(var a in lst) {     if (a.Contains("ItemID"))     {         lstB = a.Split('=').ToList();         Console.WriteLine(lstB[1]);                         }  }   But is there an easier and more elegant way to get the event_ItemID than how I am extracting it?


How to understand dynamic scoping using Python code?

I'm a programmer coming from Python background which typically uses lexical scoping and I want to understand dynamic scope. I've researched it on-line, still unclear to me. For example, I've read  which made things a lot easier to me, especially the code snippets:   #In Dynamic scoping:              const int b = 5;             int foo()                    {                               int a = b + 5;        return a;     }      int bar()     {        int b = 2;        return foo();     }      int main()     {        foo(); // returns 10        bar(); // returns 7        return 0;     }   #In lexical scoping:              const int b = 5;             int foo()                    {                               int a = b + 5;        return a;     }      int bar()     {        int b = 2;        return foo();     }      int main()     {        foo(); // returns 10        bar(); // returns 10        return 0;     }   As I understand and as you can see, in the dynamic scoping, bar function returns 7 not 10, which means foo called the b variable which is defined within bar, in other words, foo did not looked for the b variable that's defined in top of the code (the first b variable) but rather it used the b variables that's defined in bar.   Q1: Hence, In dynamic scoping, the function that's being called within another function in this case foo called in bar first looks for variables in the caller function in this case bar  and then it looks for top level variables ?   Q2: Could you explain dynamic scoping in Python code ?


Dimensional analysis with height and time

I'm very new to physic and I'm watching this physic lecture:   at the 22:05 he talks about dimensional analysis.  there is an apple and we drop it from height h and we measure how long it takes to hit the ground which we call it t  then he says that $$ t \propto h^\alpha m^\beta g^ \gamma $$ then he talks about dimension $$[T]^1 = [L]^\alpha [M]^\beta \frac{[L]^ \gamma}{[T]^ {2\gamma}}  $$ which if i understand correctly is the unit of the above statement. what i do not understand is that if my height is 3 meters then i square my height  $3^2$ = 6 meters for example the unit is the same so why the alpha in the first expression goes into the unit expression(the second expression)?  the first expression is kind of an equation of the time it takes for apple drop from height h to hit the ground at time t. for example if I square my height the function just return the $f(x^2)$ to me with the same unit(the unit will never change no matter what input I give to a function) the value that the function return will change not the unit.  I found a question about this story too  but this question do not ask the same question as I'm asking. Im asking about why you treat the unit statement as a function statement?  I mean in mathematic if you have a function f(x) and you square your x and put it into f(x) you get the same unit. The unit is not a function and the function is not a unit its a different story.  I feels like he transform a function into unit then calculate, then plug those units back into a function which seems invalid in mathematic.  Im very new to physic and I found physic world is so weird. can someone explain to me in very step by step and easy to understand with an example. Thank you.


Is there a logical fallacy in this argument?

General Parker orders a curfew citywide to reduce crime rate.  While curfew is on effect, General Parker's soldiers caught a violator and took him to detention center.  While in detention center, the other inmates ganged up on the violator and beat him, up. And he died.  Therefore, General parker's is to be blame, since the violator wouldn't have died if he didn't end up in a detention center because of the curfew


Speech recognition for voice control inside my application

I know there is a lot of thread on this but I'm still trying to figure out what is the best option now in 2018.   Is there a kind of built-in method to integration voice control inside my c# WPF application? What is the best solution (free or paid) ?   I just need something to start with and make sure I'm going to the right direction. (since many thread and infos are not recent)  Thanks.  Michel


I am writing to search function. My Db field as string (Nvarchar(MAX)) and this field have string and number   DB DATAS    EF ORDER          I want to a 1          a 1                a 1 a 20         a 12               a 2 a 2          a 2                a 12 a 12         a 20               a 20 a 25         a 25               a 25 b 1          b 1                b 1 b 5          b 5                b 5 ....         ...                ....


Is it possible that the DNA of an individual changes significantly over a period?

Is it possible that the DNA of an individual changes significantly over a period ?


How to add a directory to PATH in Linux ? I am using Windows Subsystem for Linux - Ubuntu

I am new at Linux and I am facing a problem. I am trying to add the bin directory to the PATH in the Linux executing the command below:  $ export PATH="/opt/gcc-arm/bin:$PATH"   However, when I try to execute a command it returns me it was not found  Command 'arm-none-eabi-gcc' not found, but can be installed with: sudo apt install gcc-arm-none-eabi   How could I add this directory to Linux PATH or there is a way to access the User variables from Windows using the Linux?  Edit1: I just run $PATH and I got this:  bash: /opt/gcc-arm/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/mnt/c/Program:   The Path to the file that I created is there (/opt/gcc-arm/bin), but I do not understand why the system cannot recognize it.   Edit2: I executed the command suggested by @steeldriver      what is the result of file /opt/gcc-arm/bin/arm-none-eabi-gcc run   The result is: /opt/gcc-arm/bin/arm-none-eabi-gcc: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/l, for GNU/Linux 2.6.24, BuildID[sha1]=7af6e16f1d030393cdf4a6e6007a0e554470f126, stripped. But I have no idea what it means.  Edit3: Now the things start to work, first I use the command sudo -s and then   $ export PATH="/opt/gcc-arm/bin:$PATH".   After doing that I was able to run the commands from that PATH, however, when I close the Linux env and open again, it can not recognize those commands, so I have to include the PATH  again.  Is there some solution to avoid entering the PATH every time when I reopen the Linux?  Edit4: I followed this tutorial from Youtube , now my PATH is permanent.  I hope this can help someone else that face this same problem


Unattended automatic security updates / upgrades

What is the best way to get Drupal to automatically perform security updates? And are people commonly employing such a method?   For motivation, consider this: Drupal just released a  about a recent  saying:      ...You should proceed under the assumption that every Drupal 7 website was compromised unless updated or patched before Oct 15th, 11pm UTC, that is 7 hours after the announcement.   Fortunately I caught this one and performed the update manually one hour after the announcement. But what if I hadn't? I'd like to have an automatic update process in place to give me some piece of mind.   And I'd like for this automatic upgrade system to only apply security updates. (It just doesn't seem worth the risk to bother with potentially breaking some functionality after an update, unless the update is critical.)


I am adding metadata to my document: \hypersetup{     pdftitle={ddd},     pdfsubject={aaa},     pdfauthor={xxx},     **pdfkeywords={666},**     pdfproducer={yyy!},  And there is a password string here, however the document does not ask for a password when opening it. How to password protect a document?


C - Change the position of the conditions in while loop leads to Segmentation fault in C?

I have a function to insert an element to a hash table like this in my program:  void insert(int key,int data) {     struct DataItem *newdata = (struct DataItem*) malloc(sizeof(struct DataItem));     int  hashIndex;      newdata->key = key;     newdata->data = data;      hashIndex = hashCode(key);      while(hashArray[hashIndex] != NULL && hashArray[hashIndex]->key != -1)     {         ++hashIndex;         hashIndex %= MAX_SIZE;     }         hashArray[hashIndex] = newdata; }   This works without any problem. However, when I change the position of the condition in while loop to this:  while(hashArray[hashIndex]->key != -1 && hashArray[hashIndex] != NULL )   There ís an "Segmentation Fault" error. And the program pointer stops at the while loop when I call the insert function.  I'm wondering what is the problem?


Is there a possibility to choose fairly from three items when every choice can only have 2 options

Me and my wife are often not knowing which DVD to watch. If we have two options we have a simple solution, I put one DVD in one hand behind my back and the other DVD in the other hand. She will randomly choose a hand and the DVD I have in that hand will be the one to watch.  This procedure is easy to expand to any power of 2. If we have 4 DVD's I hold 2 in one hand, 2 in the other. When a pair of DVD's is chosen, I split them out to two hands and she choses again.  The question is, what can we do when we have  3 DVD's. The assumptions we make are:   I am not impartial. If I can influence the result somehow I will try to do that My wife really choses randomly a side every-time, independent of what she chose earlier. I don't have any other place to hide the DVD's, so every DVD is either visible or in one of the two hands.   As requirement we have that it must be a procedure with a predetermined number of steps. Not more, not less. If this is not possible, a solution that guarantees to finish with an upperbound, this is a good second choice. Off course the DVD we choose must be really random!


I want to use my Minecraft Java Texture Pack on Windows 10, is this possible?

I've made my own texture pack/resource pack for Minecraft Java Is it possible to make it work for Minecraft windows 10, if so please help


What's the difference between at hand, on hand and in hand? At hand seems to me as if you have something in reach. On hand is if you have something in stock. And in hand can be used as if you have more time at your disposal.


SEO - Backlinks to main website url better or individual pages

I have been struggling to understand one basic concept of off-page SEO. Suppose i have a website example.com. Now when i researched for keywords i got the following good keywords  keyword one  keyword two  keyword three  Now what is the best way to do back linkings on good PR websites.  1 - Should i comment,bookmark, make a article, forum comment etc and mention my main website's url www.example.com   OR  2 - I should create individual pages in my website with the keywords i researched. for example. www.example.com/keyword-one , www.example.com/keyword-two, www.example.com/keyword-three  and then i comment,bookmark, make a article, forum comment etc and mention my keyword pages links there ?  What is the best approach towards this ?


How can I make Firefox download different file types to different locations?

98% of what I download is music, so I set the download location to my music folder. However, the other 2% has no place there, so every time I download .doc files or PDF files I have to remove them. Is there a way to make Firefox change the download folder based on file extension? I'll settle for all non-MP3 files getting saved to the desktop.  I know I can right click, choose Save Link As and pick the download location myself, but it seems like there should be a better way.


I wrote a script that is attached to a button in the addon. Works perfectly, up to the code line, where is bpy.ops.object.origin_set (type = 'ORIGIN_CENTER_OF_VOLUME'). The previous command works without problems, but here the transfer of origin to the center don't work, the object switches to edit mode. The previous command that moves the cursor to the center works without a problem. How to solve this problem ? I would be very grateful for your help.  class ImportSTL(bpy.types.Operator):     """Import STL"""     bl_idname = "object.import_stl"     bl_label = "Import STL"      def execute(self, context):         stl_path = bpy.path.abspath(bpy.context.scene.stl_path)         bpy.ops.import_mesh.stl(filepath=stl_path)         try:             ob_new = bpy.context.selected_objects[0]             for f in ob_new.data.polygons:                 f.use_smooth = True             for b in ob_new.data.polygons:                 bpy.ops.object.editmode_toggle()                    bpy.ops.mesh.select_all(action='TOGGLE')                                 bpy.ops.mesh.select_mode(use_extend=False, use_expand=False, type='FACE')                 bpy.ops.mesh.select_all(action='TOGGLE')                     bpy.ops.mesh.tris_convert_to_quads()                 bpy.ops.view3d.snap_cursor_to_selected()                 bpy.ops.object.origin_set(type='ORIGIN_CENTER_OF_VOLUME')   Greets


Permission denied in vhost document root

I'm having a problem setting up a vhost on Apache 2.4, using CentOS 6.3.  This question seems to have been answered several times on this forum, but none of the solutions work for me.  Basically, I set up a vhost with a particular document root. When I attempt to access the site, I get a permissions error. But I have no problem if I use a different root.  More specifically, if I set the root to be /volume1/web/xxx, I get a 503 because of a permission problem on index.html.  But if I set it to be /volume1/web, the index.html comes up without a problem.  The details:   I set the persmissions on volume1, web, and xxx to 755. I set the permissions on the index.html files to 777. I copy the index.html file to both /volume1/web and /volume1/web/xxx, so that they have identical index files with identical permissions.   In httpd.conf, I set the VirtualHost options so that I can easily switch the document root by changing 2 comment marks  I have the following lines in the conf file:  NameVirtualHost *:80  <VirtualHost *:80>     ServerName localhost     #DocumentRoot /volume1/web     DocumentRoot /volume1/web/xxx      #<Directory /volume1/web>     <Directory /volume1/web/xxx>       Options Indexes FollowSymLinks Includes ExecCGI       AllowOverride All       Order Allow,Deny       Allow from all     </Directory>      ErrorLog logs/localhost-error_log     CustomLog logs/localhost-access_log common </VirtualHost>   These lines contain all the suggestions that worked for other people with the same problem.  What I get when I enter localhost in my browser depends on the document root.   If the root is /volume1/web, the index.html page comes up. if the root is /volume1/web/xxx, then I get a 503 error, and the apache error log has this line:  [Thu Jul 19 17:17:52 2012] [error] [client ::1] (13)Permission denied: access to /index.html denied   I also tried adding an index.php file to the directory. I then got permission denied messages for both the php file and the html file.  I also tried setting the user : group to apache : apache on the directories and files. That didn't help.  I've done everything I can think of to fix the permissions, to no avail.  Does anyone have an idea about what's happening here?  Thanks.


could anybody tell me please if there is a rule which may indicate us when to use "BROAD" and when to use "WIDE? For example: I know it is correct to say "broad daylight" but is it wrong to say "wide daylight"? 2nd Example: "world wide" it is correct, but what about, "world broad" 3er example: "Wide-awake" which is correct, but "Broad-awake" is it correct? Diccionares are unable to explain this or if there is a rule. Can you help please?


Where is the render display mode setting in 2.8?

In 2.7x and earlier we have .  The setting can still be set via the python api (bpy.context.scene.render.display_mode), but I can't seem to find it in the gui anywhere. Is it still there? If so, where is it?


finding systemd unit 'owning' a running daemon process

To debug a JACK/Pulseaudio issue, I want to understand when and why the pulseaudio daemon is started by systemd (on Fedora).  Using:  $ ps -o'pid,ppid,args' `pgrep pulse`   I see that the pulseaudio daemon is being started by systemd (pid=1)   PID  PPID COMMAND 2738     1 /usr/bin/pulseaudio --start   However, I was unable to find any unit-file on my system containing pulseaudio or even just pulse.  My specific questions are:  A) Is there a way to determine the systemd unit that caused the creation of a specific process (in my example output, process 2738, the PA daemon)?  B) Are there alternative approaches to find out which unit-dependency chain or other settings of systemd resulted in the invocation of /usr/bin/pulseaudio --start?


Show that $\mathbb{Z}[i]/\langle 1+4i\rangle \simeq \mathbb{Z}_{17}$

I have to show that $\mathbb{Z}[i]/\langle 1+4i\rangle\simeq \mathbb{Z}_{17}$.  Attempt:I know that I have to use the isomorphism $\phi (a+bi)=[a]_{17}+4[b]_{17}$ but I don't know how to show that $\ker(\phi)\subseteq\langle 1+4i\rangle$.  Any ideas?


I am working on a road network for routing operations using postgis and QGIS.    I am new to both of these tools and need to calculate the slope for each edge (by retrieving the Z value for the start and end node for the edge from a raster). Any ideas of the best approach to this?   I know postgis can dump points and get the value from a raster, but can I get the slope attribute to the edge without breaking the network topology (with edges that have corresponding start/end nodes) using this method?   thanks


Best way to transfer files from Windows to Windows via Internet

I’m looking for the best way to transfer files from my computer to another person’s computer.  We both use Windows and I can use some external programs like TeamViewer for file transfers but I found the speed lacking. So I tried to find some other means of transferring the data. On Linux this is so simple since you have scp and ftp and all that. But on Windows, there’s no such support; at least not natively.  So I tried  (but slow speeds), then there’s  but we would need to set up a server of some sort (ssh daemon?).   doesn't work either, it just gives me the error:     local to local transfer not supported.   FTP needs an FTP server too.  What other options are there? What’s a preferred method of transferring files?  I guess I could use BitTorrent technology but I would need tracker addresses. Of course, these aren’t that hard to find but is there really an equivalent for the Linux way of transferring files using command line options or something that allows client to client transfer of data easily and fast?


Windows users unable to access samba share of an external drive

It doesn't seem that many others have had this problem so I thought I'd ask here.  Have a server running Ubuntu with 1 internal and 1 external drive. Have a folder shared with samba on the internal drive that can be accessed, however, when sharing the entire external or just a folder on it I get the "You do not have permission to access" error on the Windows clients.   When sharing on Ubuntu I go to properties, share and then tick share, allow others to write as well as guest access. Clicking create share then says it will have to set the permissions and I let it. It's not accessible. When trying to set permissions manually in the Permissions tab it doesn't let me choose anything, when choosing Read and Write for "other" users it reverts back to nothing as soon as it's chosen.  I've tried creating a symlink from the mount point to within the home directory and sharing that, even getting chmod to change the permissions so they're viewable in ls -la, but it still isn't accessible. Is there something really simple I'm missing here like externals not being easily shared? Thinking I might have to crack it open and stuff it inside the server. Oh and the external is NTFS, if that would make a difference.


The mean curvature $H$ of a surface $S$ is given by $$ H = \frac12(\kappa_1 + \kappa_2) $$ where $\kappa_i$ are the principal curvatures, which are the eigenvalues of the  $\text{S}$ over our surface.  My question is this: why divide by 2? As far as I can tell there is no reasonable explanation for why we define $H = \frac12(\kappa_1 + \kappa_2)$, and not simply $H = \kappa_1 + \kappa_2$.  At first I thought maybe it's the (arithmetic) "mean" of the principal curvatures, and the Gaussian curvature analogously is the geometric mean of the principal curvatures, but that's not correct because the Gaussin curvature $K = \kappa_1\kappa_2$, which isn't quite the geometric mean, so why should $H$ be the arithmetic mean?  Every formula I see involving $H$ just involves an unnecessary $2$. For example,    $$ H = \frac{EN - 2FM + GL}{2(EG - F^2)} $$ where $E, F, G$ are the coefficients of the first fundamental form, and $L, M, N$ are the coefficients of the second fundamental form. Why not just  $$ H = \frac{EN - 2FM + GL}{EG - F^2}? $$ Expressing it as the trace of the shape operator (or the Weingarten map) we see $$ H = \frac12\text{trace}(S) $$ why not just $H = \text{trace}(S)?$  In the equation relating the three fundamental forms, we see $$ \mathbf{III}-2H\mathbf{II}+K\mathbf{I} = 0 $$ why not just $$ \mathbf{III}-H\mathbf{II}+K\mathbf{I} = 0? $$ Changing $H$ to $\kappa_1 + \kappa_2$ doesn't affect the theory of minimal surfaces where $H = 0$.   The only compelling evidence for why this might be a reasonable definition is that, for hypersurfaces: $$ H = \frac1n\sum_{i=1}^n \kappa_i $$ according to Spivak, but I don't know much about hypersurfaces so I can't comment on how comparatively useful this definition is.  So what's the deal? Was $H = \kappa_1 + \kappa_2$ originally, but when hypersurfaces were studied the definition $H = \frac1n\sum\kappa_i$ was more natural, and later adopted for the $n = 2$ case as well?


figsize in matplotlib is not changing the figure size?

As you can see the code produces a barplot that is not as clear and I want to make the figure larger so the values can be seen better. This doesn't do it. What is the correct way? x is a dataframe and x['user'] is the x axis in the plot and x['number'] is the y.  import matplotlib.pyplot as plt %matplotlib inline   plt.bar(x['user'], x['number'], color="blue") plt.figure(figsize=(20,10))    The line with the plt.figure doesn't change the initial dimensions.


Why was the DeLorean in Back To The Future not always covered in ice after time travel, and why didn't it fly in 1885?

I have noticed some things that I can't understand in the Back To The Future films about the DeLorean.  In part I, when Einstein is sent 1 minute into the future the DeLorean comes back completely frozen. Why wasn't it cold in any of the other times when it was used for time travel?  In part III, the fuel line goes and this prevents it from going up to 88mph which they use a train to get up to 88mph instead. Since the DeLorean was turned into a flying car in part II, why didn't they just have it fly instead of using a train to get it to 88mph?


Receive notifications for someone's questions in iOS app

How can I receive notifications on iOS app for questions that I am interested in but which are asked by other people.


How can I use the fontawesome package with XeLaTeX?

I am trying to compile a document using fontawesome with XeLaTeX (see this template ). I have Texlive 2016 installed in Ubuntu (installed directly from Texlive's homepage - not Ubuntu repositories). Texlive's tlmgr claims fontawesome is installed. I seem to find evidence of it here:  $ kpsewhich fontawesome.map /usr/local/texlive/2016/texmf-dist/fonts/map/dvips/fontawesome/fontawesome.map   To debug the problem, I am trying to compile the following MWE (test.tex):  \documentclass{article} \usepackage{fontawesome} \begin{document} Test \end{document}   using the command xelatex test.tex. Where it seems to reach the critical point, the log says:  kpathsea: Running mktextfm FontAwesome /usr/local/texlive/2016/texmf-dist/web2c/mktexnam: Could not map source abbreviation F for FontAwesome. /usr/local/texlive/2016/texmf-dist/web2c/mktexnam: Need to update /usr/local/texlive/2016/texmf-dist/fonts/map/fontname/special.map? mktextfm: Running mf-nowin -progname=mf \mode:=ljfour; mag:=1; nonstopmode; input FontAwesome This is METAFONT, Version 2.7182818 (TeX Live 2016) (preloaded base=mf)   kpathsea: Running mktexmf FontAwesome ! I can't find file `FontAwesome'. <*> ...our; mag:=1; nonstopmode; input FontAwesome  Please type another input file name ! Emergency stop. <*> ...our; mag:=1; nonstopmode; input FontAwesome  Transcript written on mfput.log. grep: FontAwesome.log: Ingen sådan fil eller filkatalog mktextfm: `mf-nowin -progname=mf \mode:=ljfour; mag:=1; nonstopmode; input FontAwesome' failed to make FontAwesome.tfm. kpathsea: Appending font creation commands to missfont.log.   !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ! ! fontspec error: "font-not-found" !  ! The font "FontAwesome" cannot be found. !  ! See the fontspec documentation for further information. !  ! For immediate help type H <return>. !...............................................     I have run updmap-sys and mktexlsr, but that did not seem to help. updmap-sys said (among other things):  Files generated:   /usr/local/texlive/2016/texmf-var/fonts/map/dvips/updmap:        15796 2017-05-10 16:22:38 builtin35.map        21269 2017-05-10 16:22:38 download35.map      1688569 2017-05-10 16:22:39 psfonts_pk.map      1903381 2017-05-10 16:22:38 psfonts_t1.map      1903376 2017-05-10 16:22:38 ps2pk.map           14 2017-05-10 16:22:39 psfonts.map -> psfonts_t1.map   /usr/local/texlive/2016/texmf-var/fonts/map/pdftex/updmap:      1903383 2017-05-10 16:22:39 pdftex_dl14.map      1901718 2017-05-10 16:22:39 pdftex_ndl14.map           15 2017-05-10 16:22:39 pdftex.map -> pdftex_dl14.map   /usr/local/texlive/2016/texmf-var/fonts/map/dvipdfmx/updmap:          319 2017-05-10 16:22:38 kanjix.map   Should there have been a xelatex folder as well? What can I do to fix this?


Can I use a Verizon iPad 3rd Generation WiFi Only?

I am considering purchasing a used iPad 3rd generation 8.9 size.  This iPad is advertised as a used 64gb Verizon iPad.  I only want to use the iPad on wifi and do not want to connect to Verizon or AT&T.  Can I do this or do I have to go through Verizon to get it to work. I have never had an iPad and I am 67 years of age so I am not familiar with what I need to look for or be careful about in buying a used iPad.


C++ Virtual Function; Base class as function parameter

I am having some issues with virtual functions. I have the following two structures (simplified): struct Shape { public:    virtual std::vector<unsigned int> GetIndices()    {       // standard definition       return { 0, 1, 2 };    } };  struct Cube : public Shape { public:    std::vector<unsigned int> GetIndices()    {       return { 0, 1, 2, 2, 3, 0 };    } };  Then, there's a function that takes a Shape as the argument. It calls the GetIndices Function. It looks like this: void Add(Shape shape) {    // ...    std::vector<unsigned int> indices = shape.GetIndices(); }  When I call this function with a Cube as the Argument, somewhat like this: Cube cube1; Add(cube1);  shape.GetIndices(); in the Add() Function will return { 0, 1, 2 }, but I want it to return { 0, 1, 2, 2, 3, 0 }. What am I doing wrong?


Finding the limit of $\lim_{n\to\infty} \frac{n^{log(n)}}{(\log n)^n}$

I try to calculate the following limit:   $$\lim_{n\to\infty} \frac{n^{\log(n)}}{(\log n)^n}$$  I tried this:   $$ \lim_{n\to\infty} e^{(\log(n))^2 - n \log(\log(n))} $$   Is this useful? & what do now?


Duplicate post notice missing the duplicate

Just browsing and came across , but the post notice doesn't have a link to the duplicate:


Texmaker - ! LaTeX Error: File `l3backend-pdfmode.def' not found

I need to include animate package in my text. When I tried that, I got an error:     LaTeX Error: File `l3backend-pdfmode.def' not found.   So after that I also inserted package l3backend into my preamble, which is:  \documentclass{beamer} \usepackage{l3backend} \usepackage{amsmath}% \usepackage{amsfonts}% \usepackage{amssymb}% \usepackage{yfonts} \usepackage{mathtools} \usepackage{mdwlist} \usepackage{stackengine} \usepackage{pdfpages} \usepackage{graphicx} \usepackage{bibentry} \usepackage{booktabs} \usepackage{animate}   but it still does not work, I have the same error:     ! LaTeX Error: File `l3backend.sty' not found.   Please can anybody help me? I am working in Texmaker, using the most recent version 5.0.4.


Clipping out polygon into buffer layer so that buffer layer shows dominant feature from polygon layer?

What I am trying to do is clip out a land use layer for the city of Boulder, CO within the confines of a 500ft buffer that I have created for a bunch of road segments. Beyond that I'm trying to get each road segment buffer to only show the dominant land use type.   Here's an image to help visualize a bit:    I have the road segment buffer selected and you can see the land use polygon underneath. Obviously here the yellow land use type is dominant and, as such, I would like for the buffer to clip that out and apply it to the buffer entirely. Other road segments aren't as clear though so I need some way to compute and automate this.  Is this possible?  If not, I'm just trying to show the dominant land use type is per road segment in order to see how a road, and its users, are impacted by said land use as part of a larger study, but I'm at a loss for how to actually do this. This is what I thought would be best, but I'm open to another method entirely if you have an idea.


Today I noticed the support for my current Ubuntu version has expired (17.04). To upgrade, I tried apt-get update && apt-get dist-upgrade, but most of the  Zesty repositories don't work anymore. (does no longer have a Release file) My update manager and software manager don't give an indication for upgrading at all, refreshing does not work anymore.  Am I stuck with this version or could I still upgrade some way?


Solving equations of the form $ae^x + bx +c =0$

In a recent piece of homework I needed to solve an equation of the form $ae^x + bx +c = 0$ where $a,b$ and $c$ are constants. I could not do it; no matter how I tried I either went in circles or hit a brick wall. Can someone demonstrate a general method for solving equations of this form? Please show every step in your answers.


Do I need a virtual destructor if descendant classes have no non-static members or destructors?

I'm playing around with a class hierarchy for file descriptors, where the base class holds an int and calls close on it during destruction and child classes don't add any virtual methods or data members, just differ in their construction (e.g. the named_file_filedes takes a path and initializes the base with open in the ctor) or non-virtual member functions (e.g. you can only call kevent on a kqueue_filedes). Given this, does the base class need a virtual destructor? The size of the child classes is all the same and none of them have custom destruction logic. Tagged c++11 as that's the standard version I'm targeting.


Prove $\sum\limits_{i=2}^{n}\frac{1}{(i-1)i}$ = $\frac{(n-1)}{n}$ using induction.

I need to prove $\sum\limits_{i=2}^{n}\frac{1}{(i-1)i}$ = $\frac{(n-1)}{n}$ using induction. I am getting stuck midway through the inductive step.   Here is what I have:  $\forall n\geq 2$, where $n\in\mathbb{N}, P(n)$ is the statement "$\sum\limits_{i=2}^{n}\frac{1}{(i-1)i}$ = $\frac{(n-1)}{n}$".  Base case:  $\sum\limits_{i=2}^{2}\frac{1}{(i-1)i}$ = $\frac{1}{2}$ = $\frac{(2-1)}{2}$ so $P(2)$ is true.  Inductive assumption: Assume $P(n)$ is true. Need to show $\sum\limits_{i=2}^{n+1}\frac{1}{(i-1)i}$ = $\frac{((n+1)-1)}{(n+1)}$.  $\sum\limits_{i=2}^{n}\frac{1}{(i-1)i}$ + $\frac{1}{n^{2}}$ = $\frac{(n-1)}{n}$ + $\frac{1}{n^{2}}$  = $\frac{n(n-1) + 1}{n^{2}}$ = $\frac{n^{2}-n+1}{n^{2}}$  I got stuck here and tried working backward from $\frac{((n+1)-1)}{(n+1)}$, which gives me:  $\frac{((n+1)-1)}{(n+1)}$ = $\frac{n}{(n+1)}$   Any suggestions on what to do next or where I may be going wrong?


Website home page design when there are multiple audiences

I am in the process of creating a website which has two distinct audiences - in my case consumers and retailers.  When I first started the process just a few weeks ago I had followed the then model used by PayPal who too have to deal with distinct audiences.    However, having Googled around a bit for what the accepted wisdom is when dealing with website landing pages for segmented markets it appears to me that the current belief is that one just directs the visitor away from the landing page to other, segment focused, pages ASAP.  I have to admit that I am having trouble buying that philosophy.  To my mind it makes sense to provide at least some basic information - key benefits - for each segment on the landing page and then let viewers who linger long enough the opportunity to easily drill down to their own segment-focused page.  My own reasoning is that most first time visitors are liable to want to bounce away quickly and making them find and click on the segment page link is more likely to make them bounce than if they find enough to hold them on the landing page for a bit longer.  I'd like to have other views on this.  What are the pros and cons of the    Drive traffic to segment-focused page ASAP vs Provide some basic information - at least key benefits - for each segment on the landing page itself


In the iOS Mail app, there are 5 emails in the "All Inboxes" section. Those 4 emails are NOT in any other inboxes.  So I tried deleting them and ... they keep coming back!  Even stranger, the 4 emails ONLY appear in "All Inboxes", they don't appear in any of the sub-account inboxes.  So, I disabled "Mail" in my outlook account. They're still here! I no longer have a "outlook" sub-account, but those 4 emails are still in All Inboxes. I tried to quit the app a few times, restart the phone. Still here...  When I tap on one of those messages, I get a black screen (dark mode) Or gray empty screen, no errors.  I completely deleted the account in settings but they are still there!! Any tips?


I'm generating html tags with jQuery. Like this  jQuery:   $(document).ready(function() {     $('#example').DataTable();      var cas = ["1", "2", "3", "4", "5", "6"];     var text = "";     var i;      for (i = 1; i <= cas.length; i++) {       text += '

';     }            jQuery("#bitacorapagination").html(text);     jQuery('.active').click(function () {         suplementos(this);               jQuery(".active").removeClass("active").addClass("noactive");        jQuery(this).removeClass("active").addClass("noactive");         console.log("Event");           });    jQuery('.noactive').click(function () {        suplementos(this);         jQuery(".active").removeClass("active").addClass("noactive");        jQuery(this).removeClass("noactive").addClass("active");                console.log("Event");           });  });   html code:

   what I need is to remove and add some class to the
 element generated by jQuery , but the event doesn't activate on the event onclick()  Do you have any idea how to solve this?


Java - How to Load Classes your Main does'nt know the name from?

I would like to have a Method like:   loadAllClassesOfPackage("com.elementghost.projectname");  But my main will not be able to know the Classes that should be loaded. It will only know a package, and from this package, every classes constructor or static block (Both oportunities would be okay), should be loaded.  Is it possible to pass my Main a package, and then in every class in it, will be executed the constructor.


Ubuntu 17.10 doesn't show up in update-manager

I have a laptop with Ubuntu 17.04 desktop installed. And I noticed that Ubuntu has just announced their new version (17.10). However, when I'm trying to open update-manager, it just tells me that I have the newest version.  Also, when I type the sudo do-release-upgrade command on the terminal, it tells me the same thing (No new release found.)  Is there any reasons for that, and what can I do? or should I just wait for that version, to get to the server?


Let $R$ be a commutative ring and $I$ and $J$ be two ideals of it. We know that $I+J$ is a subset of $R$ and moreover, $I+J$ is an ideal of $R$. Question: When $I+J$ can be $R$?


How do I get rid of this:(-bash: cd: /Users/Dakota/Documents/School/Spring: No such file or directory) from my terminal?

Every time I open Terminal this is on there like 50 times.  -bash: cd: /Users/Dakota/Documents/School/Spring: No such file or directory -bash: cd: /Users/Dakota/Documents/School/Spring: No such file or directory -bash: cd: /Users/Dakota/Documents/School/Spring: No such file or directory -bash: cd: /Users/Dakota/Documents/School/Spring: No such file or directory -bash: cd: /Users/Dakota/Documents/School/Spring: No such file or directory -bash: cd: /Users/Dakota/Documents/School/Spring: No such file or directory   I have no idea what I'm doing, I was just trying to get my Terminal to start with a folder and I found this online:  echo "cd "`pwd` >> ~/.bash_profile    I used that when I was in the folder I wanted to start with on Terminal and it didn't work so being dumb I did it like 50 times so my Terminal always starts with a bunch of -bash: cd: /Users/Dakota/Documents/School/Spring: No such file or directory. It's ugly and I need it gone.


I've been reading around but can't seem to find a way to create per-process firewall rules. I know about iptables --uid-owner but that only works for outgoing traffic. I've considered scripting netstat and iptables but this seems terribly inefficient since if a process is only active for a small time-frame the script might miss it. Basically I want to enforce specific restrictions regarding port and dst on a process while leaving other processes unaffected. Any ideas?    For reference selinux can do exactly this and it works fairly well. Setup is a bit of a pain though.


I'll mostly be using the Physics Stack Exchange (PSE), but I may send occasional questions to the astronomy one (ASE).  My user name's Edouard on the former, and Edward Slattery on the latter. ASE recommended that I merge the accounts through a moderator. Please advise through my e-mail (which is  edslattery11@gmail.com) how I should accomplish that. The information at PSE is the most complete, and I'd like to keep it intact, through its substitution for similar details at ASE. Thanks.  (I should add, in this connection, that I may stop using both exchanges if a charge for their use is instituted. Thanks again.)


Do objects with different sizes or masses experience time differently when they are moving in a constant velocity in their own reference frame?

My question is actually not about curve spacetime. Just curious if different mass affects how the object experiences time. Hope that someone can give a detailed explanation on this. Thank you!


MySql - exporting data from different tables and columns to CSV file with new column names

I want to export the selected data from specific columns to the new columns in CSV file for my Magento website.  the current website is using different e-commerce system and I want to export the products data in (Magento compatible) CSV file so I can easily import all the data to Magento  for example:  Old tables / columns:  [old_table_1]  [old_col_pid] (primary), [old_col_1], pold_col_2] 1, abc, xyz   [old_table_2]  [old_col_pid] (primary), [old_col_fid] (foreign), [old_col_3], [old_col_4] 1, 1, 123, 456   New columns in CSV (for Magento):  new_col_1, new_col_2, new_col_3, new_col_4 abc, xyz, 123, 456   Is there any way if I can write a query to match the old columns name to new columns name first and then export the data to the CSV.


alternative directory for files if not exists

lets say i make a request to  so my picture.jpg is supposed to be in htdocs/files/picture.jpg  how do i configure if picture.jpg does not exist in htdocs/files then look it up inside htdocs/files/alt?  the filename varies, but the alternate directory name (alt) is fixed (which reside inside the original directory)  is this achievable using apache config?


Is it ok to have "fitted probabilities numerically 0 or 1 occurred" in the case of predicting disease?

I know this isn't directly related to statistics but I didn't know where else I should post this so please let me know and I will remove the question if this is the wrong forum.  My question is very simple. I have a logistic regression model that is predicting whether or not a patient has a certain type of disease. And I'm getting the warning "fitted probabilities numerically 0 or 1 occurred". Should I be worried or super happy about it?


After a long search to find a solution to my problem I decided that maybe you guys can help me out. The problem is as follows.  I own an Asus N550JV laptop, running Windows 8.1, it has an Intel I7-4700-HQ CPU and a Geforce 750M as dedicated GPU. But no matter what I try, I can't get the laptop to use my GPU. I've tried updating the Nvidia drivers and forcing the laptop to use the GPU in the Nvidia software. My laptop is plugged into the wall and the Windows energy profile is set to 'High Performance'. I've also tried to change settings in the BIOS but all I can change is the Integrated Graphics allocated Memory size.  In the pictures below you can see the options in the laptop's BIOS.      I Hope somebody here has a working solution.


Based on the , are they innately evil? The creature type listing for them does not list it, but its mentioned in the things that everyone knows about the undead. But does that mean that each one actually has an evil alignment or is that section just flavor text?


How to find maximum $x$ that $k^x$ divides $n!$

Given numbers $k$ and $n$ how can I find the maximum $x$ where: $n! \equiv\ 0 \pmod{k^x}$?  I tried to compute $n!$ and then make binary search over some range $[0,1000]$ for example  compute $k^{500}$ if $n!$ mod $k^{500}$ is greater than $0$ then I compute $k^{250}$ and so on but I have to compute every time value $n!$ (storing it in bigint and everytime manipulate with it is a little ridiculous) And time to compute $n!$ is $O(n)$, so very bad. Is there any faster, math solution to this problem? Math friends?:) Cheers Chris


What do I call a person who always seeks for the best price on particular item/product/service ?   Person who spends hours digging internet to find deals/discount codes/coupons in order to pay a minimum price ?   Same person may also bargain for hours with any service provider, like a car dealer, barber or street hot-dog seller, etc.  It can be in a form of addiction but also can be considered as good quality of person (he is smart enough never to overpay)


I have to admit I didn't really search in-depth for this feature, but is it possible to "Bookmark" or "Star" answers like in Gmail?


Monoid / semigroup with cancellation property $ ab=ac\Rightarrow b = c,$ $\ ba = ca\Rightarrow b = c$

An important group lemma is the left and right cancellation property:  $$ \forall a b c: a * b = a * c \implies b = c $$ $$ \forall a b c: b * a = c * a \implies b = c $$  This lemma does not only hold for groups, but also some monoids, for example the free monoid $\Sigma^*$ over an alphabet $\Sigma$.  It doesn't hold for all monoids, as monoids with absorbing elements are counterexamples:  $$ <\mathbb{Z}, \times> : 0 \times 1 = 0 \times 2 \nRightarrow 1 = 2 $$  What are Monoids with the cancellation property called?


Tricks for knowing when a cheesecake is correctly done

I have just made a cheesecake, (not my first), but will admit that for me it is a bit of a guessing game to know when it is perfectly done.    I know that the sign is when the middle still jiggles, but how big of a middle?  Dime size, nickel size,  quarter size, or salad plate size?  Fortunately, luck was on my side and it turned out perfect, but not without worrying about its doneness!  Other than the "jiggle", is there any concrete way of knowing when it is done?  Is it possible to use a thermometer for the middle and what would the temperature be?  Luckily, even if a cheesecake is under or over done, it's still delicious, but when serving it to company, it an added bonus if it turns out perfect!  Any tips?


How to extract data from HTML tag with specific attribute and value using regex in C#

I have been trying to extract a single value from some HTML data, but I haven't been able to focus on exactly the piece I am looking for: The line I am trying to read from is: 5  There are many other "span" tags with different classes, so I need to only accept "temp" class, and then get the value? I really have no experience with Regex, but have been trying to figure it out. Here are just some of the lines I have tried: //MatchCollection data = Regex.Matches(searchData, @"(.+?)<", RegexOptions.None);  //MatchCollection data = Regex.Matches(searchData, @"\s*(.+?)\s*", RegexOptions.Singleline);  //MatchCollection data = Regex.Matches(searchData, @" (.*?)  ", RegexOptions.Singleline);  //MatchCollection data = Regex.Matches(searchData, @"(([^<]|<[^\/]|<\/[^s]|<\/s[^p]|<\/sp[^a]|<\/spa[^n]|<\/span[^ \t >])*)", RegexOptions.Singleline);  //MatchCollection data = Regex.Matches(searchData, @"\s*([^<])\s*", RegexOptions.Singleline);  //MatchCollection data = Regex.Matches(searchData, @"\s*(<.*?>) * ([^<] *)\s*", RegexOptions.Singleline);  //MatchCollection data = Regex.Matches(searchData, @"(?<=<]*>\s*)[^<>]*", RegexOptions.Singleline);  //MatchCollection data = Regex.Matches(searchData, @"(?<=<]*>\s*)[^<>]*", RegexOptions.Singleline);  //MatchCollection data = Regex.Matches(searchData, @"(?<=\s*)*", RegexOptions.Singleline);  //MatchCollection data = Regex.Matches(searchData, @"] *> (.*?) ", RegexOptions.Singleline);  //MatchCollection data = Regex.Matches(searchData, @"", RegexOptions.Singleline);  //MatchCollection data = Regex.Matches(searchData, @"", RegexOptions.Singleline);   Thank you for any assistance you can provide! Doug


Is it ok to let my 3-month-old sleep through the night?

I have a 3-month-old child. My pediatrician told me that you shouldn't let a baby sleep through the night until she/he is at least 4 months old. Even if they are gaining weight.   But my little one from day one had a different opinion. I turn on my alarm clock to make sure I get up to feed him. But every once and a while I don't hear my alarm clock and I wake up feeling like the worst mother for letting him sleep 8 hours! He has been gaining weight perfectly, weighing about 13 lbs now. He takes just a few quick naps during the day and eats almost every hour-two during the day until his bedtime at 8-9pm. I feed him at 9pm and again at 1-2am and then at 5-6am. But last night I didn't wake at 2am but at 5:30, and this has happened a few times. I also have a 20-month-old who would sleep through the night from the first month.   Could it just be that my kids like to sleep during the night? And why can't we let them sleep that long? I grew up always hearing "Never wake a sleeping baby!" Did they just mean during their nap?


Preventing Illustrator CC vector objects distorting when scaled

I'm having some trouble resizing a group of vector objects in an illustration. These objects used to be lines until I expanded them into vector shapes, and before I scale them they look fine:    But as soon as I scale them the width of these "lines" completely distort:    These are the possible solutions I've already tried, but hasn't had any effect:   Checking align to pixel grid Scaling after grouping objects checking scale strokes & effects   If anyone has any idea what might be causing this, any help would be appreciated!  EDIT: Included a download link to my file if anyone's interested:


Do we have any guidelines or regulations that deals with using profile image

As user can add any image for his profile which can be offensive or disgusting by accepted standards of morality and decency like obscene, vulgar, immoral, dirty etc.  So Stack Exchange have any guidelines or regulations that deals with using profile image? Or user is free to use any kind of image for profile.


Using BibTeX/biblatex to make a list of references without having citations in the body of the document?

Is there any way to have BibTeX or biblatex insert a bibliography without having citations in the body of the document itself? Maybe a way to hide the in-text citations, so that BibTeX still sees them and includes them in the bibliography, but does not print them in the body?


Prove that $f(x,y)$ defines an inner product

Let $(E,\left\lVert . \right\rVert)$ be a normed vector space defined on $\mathbb{R}$ .  We suppose that the norm satisfies the Parallelogram law.  Prove that:  $$f(x,y)=(1/4)[(\left\lVert x+y \right\rVert)² - (\left\lVert x-y \right\rVert)^2]$$  defines an inner product.  I don't know how to prove the linearity of the function $f(x,y)$.  In other words, how to show:  $f(kx+my,z)=k f(x,y)+m f(x,z)$.


How to change the font size of the Reminders app?

Is there a way to increase the font size of the Reminders app? It was easy in Mavericks, by changing a text file inside the app package, but I can't find it anymore on yosemite.   The text is just too small, isn't it?


info@email for several people of one open another should saw it

We have an email address info@ourcompany.com which forward with alias to couple email addresses of our company to work. What we need: if one of them (working people) open a message other will see that message already was opened. How it make to reallity?  It email works on google and with alias now, those forward messages to three email such as abdulova@ourcompany.com... They need to know what massges already opened, because they make a contact with people via email that become to trouble like as recontact twice or more time with clients of out company.


List.Add seems to be duplicating entries. What's wrong?

I have a class like this:  public class myClass {   public List<myOtherClass> anewlist = new List<myOtherClass>;    public void addToList(myOtherClass tmp)   {     anewList.Add(tmp);   }  }   So I call "addToList" a hundred times, each adding a unique item to the list.  I've tested my items to show that before I run the "addToList" method, they are unique.  I even put a line in to test "tmp" to make sure it was what I was expecting.  However, when I do this (lets say myClass object is called tmpClass):  int i = tmpClass.anewList.Count(); for (int j = 0; j<i; j++) {    //write out each member of the list based on index j... }   I get the same exact item, and it's the last one that was written into my list.  It's as if when I add, I'm overwriting the entire list with the last item I've added.    Help?  This makes no sense. I've also tried List.Insert, where I'm always inserting at the end or at index 0.  Still no dice.  Yes, I'm doubly source my indexing is correct and when I do my test I'm indexing through each of the elements.  :)  UPDATE: Okay, I tried this and still had the same problem:  foreach(myOtherClass tmpC in tmpClass.anewList) {         Console.WriteLine(tmpC.theStringInMyClass.ToString()); }   and still for each of the 100 items, I got the same string output... I'm sure I'm doing something completely stupid, but I don't know what yet. I'm still 100% sure that the right string is getting passed in to begin with.  -Adeena    Okay, I tried this and still had the same problem:  foreach(myOtherClass tmpC in tmpClass.anewList) {     Console.WriteLine(tmpC.theStringInMyClass.ToString()); }   and still for each of the 100 items, I got the same string output...  I'm sure I'm doing something completely stupid, but I don't know what yet. I'm still 100% sure that the right string is getting passed in to begin with.  -Adeena


How to get validation to work properly on my input fields

I have managed to get my fields to calculate properly but now I am trying to add some validation to them which is proving difficult. What I aim to do is make sure that the fields have to contain numbers only and have to be filled in.  function audience_details() if(fields.length === 0) {      var aud1, aud2, total;      var aud1 = parseInt(document.getElementById("audience_1_field").value);      var aud2 = parseInt(document.getElementById("audience_2_field").value);      var reach = parseInt(document.getElementById("reach_field").value);      var total = (aud1 + aud2 - reach ) / aud1 * 100 ;      total_field.value =  parseFloat(total).toFixed(2) + '%';      estimate.value =  parseFloat(total).toFixed(2) + '%'; } else {      //alert fields must be complete / contain numbers only! }   any help would be lovely here is the form


Application of Lagrange Multipliers in action principle

In Goldstein's Classical Mechanics, he suggests the use of Lagrange Multipliers to introduce certain types of non-holonomic and holonomic contraints into our action. The method he suggests is to define a modified Lagrangian $$L^{'}(\dot{q},q;t) = L(\dot{q},q;t) + \sum^{m}_{i = 1}\lambda_{i} f_{i}(\dot{q},q;t),$$ where $f_{i}(\dot{q},q;t)$ are $m$ equations of constraint, and $L$ the original Lagrangian. He then proceeds to define the action $S^{'} = \int_{t_{1}}^{t_{2}}L^{'}\,dt$ and takes the variation of $S^{'}$ to be zero, thus applying Hamilton's principle. My confusion in this approach arises from the way in which the Lagrange Multipliers are introduced. I don't see why $\sum^{m}_{i = 1}\lambda_{i} f_{i}(\dot{q},q;t)$ should be introduced inside the integral. In multivariable calculus, the Lagrange multiplier system stems from the idea that if we want to extremize a function subject to certain constraints, then the gradient of the function will be proportional to a linear combination of the gradient of the constraint equations. Here, the function in question is the action, not the Lagrangian. So, I feel like the resolution should be that $$\delta S + \delta \sum^{m}_{i = 1}\lambda_{i} f_{i}(\dot{q},q;t) = 0;\, S = \int_{t_{1}}^{t_{2}}L\,dt$$ and not $$\delta S^{'} = 0; \, S = \int_{t_{1}}^{t_{2}}L^{'}\,dt.$$ To me, it isn't clear if this makes sense or if the two methods are equivalent.


Can I skip over releases when upgrading?

I am currently using Ubuntu 10.04. I know there is a 10.10 release, but can I upgrade directly to 11.04? Could you walk me through the steps please?


Show that $\phi(mn) = \phi(m)\phi(n)\frac{d}{\phi(d)}$

Possible Duplicate:             For positive integers $m$ and $n$ where $d=gcd(m,n)$, show that $$\phi(mn) = \phi(m)\phi(n)\frac{d}{\phi(d)}$$   This is just the generalization of the multiplicative property of phi function.I have tried to solve this in the same way as the proof of multiplicative property but couldn't get far.Please help.