I'm searching all over for a way to paint my UVMap in external tool, in my case photoshop, and them load it back to the mesh in render.  The problem is I want to use that blender export feature that creates a basic surface in the uvmap so it would be easy to identify the parts and paint in photoshop.  that this feature just exists in blender render as far as I searched.  any idea how to do that in cycles render?  I hope I was clear, thanks

I have a 3D truck model already textured and properly imported into Blender. This is a game model and I need to "re-paint" with design from other transport companies. The problem is that I don't have a UV layout (skin template) to serve as a guide for future paintings.  Is there a way to "extract" an UV Layout to .JPG or .PNG to serve as guide for .DDS texture editing?  Please note that I don't want to remap the model. I still want to use the actual UV Mapping and just need to edit the actual textures.


This is what I have so far and I tried to use the while (yorn=="yes") to cancel but it keeps going regardless and I am also trying to find a way to make it so the outputs go in one group together rather than being seperated. import java.util.Scanner; class Main {   public static void main(String[] args) {      Scanner scan = new Scanner(System.in);     String no = "no";     String yes = "yes";     String yorn="yes";      CollegeStudent Student1 = new CollegeStudent();      while (yorn=="yes") {       System.out.println("continue? yes/no:");       yorn=scan.next();       Student1.setname();       Student1.setcourseTitle();       Student1.setcredits();       Student1.setcourseCode();       System.out.println(Student1.toString());     }   } }

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


So, I just tried using Pythagoras theorem to prove: $\frac{d}{dx}\sin x= \cos x$ but it got me nowhere. Here is my work. $$\sin x= p/h.$$; where p and h are lengths of perpendicular and hypotenuse in a right angled triangle. Differentiating w.r.t $x$, we get $$\frac{d}{dx}\sin x= \frac{1}{h^2} \left( h\frac{dp}{dx}-p\frac{dh}{dx}\right)\tag{i}$$ We know $h^2=p^2+b^2$. (Where b is the length of the base of the right angled triangle.) Differentiating w.r.t $x$, $$h\frac{dh}{dx}=p\frac{dp}{dx}$$ (If we put $b$ constant). Substituting in $(i)$, \begin{align} \frac{d}{dx} \sin x&= \frac{1}{h^2} \left(h\frac{dp}{dx}-\frac{p^2}{h}\frac{ dp}{dx}\right)\\        & = \frac{1}{ph^2} \left(b^2\frac{dp}{dx}\right) \tag{ii} \end{align} Now, I lost track here because I didn't know how is that equal to $\cos x$. Can anyone help me continue from here? (Note: I know how to derive this from first principle. I just wanted to try using Pythagoras theorem and trigonometric identities. I kept the base length constant because it appeared to me that if I changed the x, base length won't be effected. But as I can see in the answer, the hypotenuse remains constant. However, can we keep the base constant and end up getting the same result? Maybe not visualising a circle of radius h but just a right angled triangle whose base remains constant w.r.t the reference angle?  Ps: The called duplicate one is out of my understanding. I request a simpler version.

One of the first things ever taught in a differential calculus class:   The derivative of $\sin x$ is $\cos x$. The derivative of $\cos x$ is $-\sin x$.   This leads to a rather neat (and convenient?) chain of derivatives:   sin(x) cos(x) -sin(x) -cos(x) sin(x) ...   An analysis of the shape of their graphs confirms some points; for example, when $\sin x$ is at a maximum, $\cos x$ is zero and moving downwards; when $\cos x$  is at a maximum, $\sin x$ is zero and moving upwards.  But these "matching points" only work for multiples of $\pi/4$.  Let us move back towards the original definition(s) of sine and cosine:  At the most basic level, $\sin x$ is defined as -- for a right triangle with internal angle $x$ -- the length of the side opposite of the angle divided by the hypotenuse of the triangle.  To generalize this to the domain of all real numbers, $\sin x$ was then defined as the Y-coordinate of a point on the unit circle that is an angle $x$ from the positive X-axis.  The definition of $\cos x$ was then made the same way, but with adj/hyp and the X-coordinate, as we all know.  Is there anything about this basic definition that allows someone to look at these definitions, alone, and think, "Hey, the derivative of the sine function with respect to angle is the cosine function!"  That is, from the unit circle definition alone.  Or, even more amazingly, the right triangle definition alone.  Ignoring graphical analysis of their plot.  In essence, I am asking, essentially, "Intuitively why is the derivative of the sine the cosine?"


How do you install sauerbraten on Ubuntu 14.04?

How can I install applications like Google Chrome on Ubuntu?  Are there any commands to install an application?    Index of answers:


I'm trying to work with Enammelled copper wire such as below, used for winding transformers due to its insulation. How on earth do you work with this type of wire?  When cutting the wire, the internal exposed copper surface is so small it makes a very weak connection. Am I supposed to blast the Enamel with heat and melt it away? Are there any common practices when working with this type of wire?

I want to repair my computer mouse cable which has become disconnected from the PCB. The wire is insulated with enamel and I have to remove it before soldering it back onto the board.  How should I remove the enamel?


I'm currently working on this book called "Topology Without Tears". One of the exercises on the chapter of non-homeomorphic spaces. I'm asked to prove that $S^1{\setminus\{(1,0)\}}$ is homeomorphic to $]0,1[$, but I couldn't find any homeomorphism.  Plus I was told that I should use the stereographic projection On $\mathbb{R}$, but I don't know what that is.

Be $S^1$ the unit circle in the plane, that is, $S^1=  \lbrace (x,y)  : x^2+y^2=1 \rbrace$ with the subspace topology. Show that $S^1 - \lbrace (1,0)\rbrace$ is homeomorphic to the open interval $(0,1)$.  I have an idea. Using this theorem:  Let $f:(X, \tau_1) \rightarrow (Y, \tau_2)$ be a homeomorphism. Let $a \in X$, so that $X - \lbrace a \rbrace$ is a subspace of $X$ and has induced topology $\tau_3$. Also, $Y-\lbrace f(a)\rbrace$ is subspace of $Y$ and has induced topology $\tau_4$. Then $(X - \lbrace a \rbrace, \tau_3)$ is homeomorphic to $(Y-\lbrace f(a)\rbrace, \tau_4)$. (Morris, "Topology without tears", remark 4.3.6)  My idea is to make $X=S^1$ and $Y=(0,1) \cup ?$ so, with the respective topologies using the theorem, $S^1-\lbrace (1,0)\rbrace$ is homeomorphic to $(0,1)$.  But I'm stuck in the part of defining $Y$ and find the homeomorphism $f$ between $X$ and $Y$.  PD. Sorry about my English, but it is not my native language.


I'm reviewing group theory for a comprehensive exam and this question came up.    Suppose I have two groups $G$ and $K$ and $\varphi$, a surjective homomorphism from $G$ to $K$.  How can I prove that if $N$ is normal in $K$, then $\varphi^{-1}(N)$ is normal in $G$?  Here's my sketch: suppose that $N$ is a normal subgroup of $K$, then for each $k = \varphi(g) \in K$, we have the following:   $N = kNk^{-1}$  $\varphi^{-1}(N) = \varphi^{-1}(kNk^{-1}) = \varphi^{-1}(k)\varphi^{-1}(N)\varphi^{-1}(k^{-1})) = g\varphi^{-1}(N)g^{-1}$   Which, hopefully, shows that $\varphi^{-1}(N)$ is normal in $G$.  I just want to make sure I'm not missing anything major in my proof.    Thank you for your insight.

Question:  Suppose that $\alpha: G \to H$ is a surjective homomorphism of groups. Let $U$ be a subgroup of $H$ and prove the following:  If $U$ is normal in $H$, the pre-image of $U$ is normal in $G$.  My answer:  Define $Y = \{g \in G | g^{\alpha} \in U\}$.  $U$ is normal in $H$ so $h^{-1}uh \in U$ for $h \in H, u \in U$.  Now $h = g^\alpha$ and $u = y^\alpha$ for $g \in G, y \in Y$.  So we have $(g^\alpha)^{-1}(y^\alpha)(g^\alpha) \in U$  $\implies (g^{-1}yg)^\alpha \in U$  $\implies g^{-1}yg \in Y$  So $Y$ is normal in $G$.  Is that correct?


Find the number of positive integers $x$ for which $x^4+x^3+x^2+x+1$ is a perfect square.   My attempts:  Let $x^4+x^3+x^2+x+1=k^2\implies (x+1)^2(x^2-x+1)=(k-x)(k+x)$  I analysed this a bit found $x=0$ as one which satisfy all condition, how do I find other, please help, try to continue this further, if any other elegant method then add that too.

I want to solve ${y^2}=x^4+x^3+x^2+x+1$ in $\mathbb{Z}$.    I can find four solutions. Is there another solution? I know that there are six solutions. $$(-1, \pm 1)\;,\;(0, \pm 1).$$  My try: \begin{align}   & x^4+x^3+x^2+x+1=0\quad \Rightarrow \underbrace{\left( x+\frac{1}{x} \right)^2}_{t^2}+\underbrace{\left( x+\frac{1}{x} \right)}_{t}-1=0\,\Rightarrow t\notin \mathbb{Z} \\   & x^4+x^3+x^2+x+1={\pm 1}^2\quad\Rightarrow \,x=-1\,\,,\,x=0.\\  \end{align}   Thanks.


I am working on this asteroid game inside of greenfoot and my code keeps spiting out a       java.lang.NullPointerException.    The code is below. Error occurs on line 50:      count = world.numberOfObjects();.    I know there are several posts about this error but the research I've done about this error shows it occurs when you try to use a reference that points to null. However, I have initialized my variable so i'm not sure why this is happening. I'm still fairly new to programming so I'm probably just not understanding this correctly. Any help would be great. Thanks!      public class Rocket extends SmoothMover   { private static final int gunReloadTime = 5;         // The minimum delay between firing the gun. private static final int protonReloadTime = 500;    // The minimum delay between proton wave bursts.  private int reloadDelayCount;               // How long ago we fired the gun the last time. private int protonDelayCount;               // How long ago we fired the proton wave the last time.  private int count = 0; //count the number of asteroids    private GreenfootImage rocket = new GreenfootImage("rocket.png");     private GreenfootImage rocketWithThrust = new GreenfootImage("rocketWithThrust.png");  /**  * Initialise this rocket.  */ public Rocket() {     reloadDelayCount = 5;     protonDelayCount = 500;     addToVelocity(new Vector(13, 0.7));    // initially slowly drifting }  /**  * Do what a rocket's gotta do. (Which is: mostly flying about, and turning,  * accelerating and shooting when the right keys are pressed.)  */ public void act() {     move();     checkKeys();     checkCollision();     reloadDelayCount++;     protonDelayCount++;      Space space = (Space)getWorld(); //call space objects     World world = getWorld(); //call world objects      count = world.numberOfObjects(); //ERROR IS HERE       /**      * Add an asteroid when the starting ones are cleared      */     if(count <=2)     {         space.add();     } }  /**  * Check whether there are any key pressed and react to them.  */ private void checkKeys()  {     ignite(Greenfoot.isKeyDown("up"));      if (Greenfoot.isKeyDown("left"))      {         turn(-5);     }     if (Greenfoot.isKeyDown("right"))      {         turn(5);     }     if (Greenfoot.isKeyDown("space"))      {         fire();     }     if (Greenfoot.isKeyDown("z"))      {         startProtonWave();     } }  /**  * Check whether we are colliding with an asteroid.  */ private void checkCollision()  {     Asteroid a = (Asteroid) getOneIntersectingObject(Asteroid.class);     if (a != null)      {         Space space = (Space) getWorld();         space.addObject(new Explosion(), getX(), getY());         space.removeObject(this);         space.gameOver();     } }  /**  * Should the rocket be ignited?  */ private void ignite(boolean boosterOn)  {     if (boosterOn)      {         setImage(rocketWithThrust);         addToVelocity(new Vector(getRotation(), 0.3));     }     else      {         setImage(rocket);             } }  /**  * Fire a bullet if the gun is ready.  */ private void fire()  {     if (reloadDelayCount >= gunReloadTime)      {         Bullet bullet = new Bullet (getVelocity(), getRotation());         getWorld().addObject (bullet, getX(), getY());         bullet.move ();         reloadDelayCount = 0;     } }  /**  * Release a proton wave (if it is loaded).  */ private void startProtonWave()  {     if (protonDelayCount >= protonReloadTime)      {         ProtonWave wave = new ProtonWave();         getWorld().addObject (wave, getX(), getY());         protonDelayCount = 0;     } }  }

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


What is the most appropriate way to test if a variable is undefined in JavaScript? I've seen several possible ways: if (window.myVariable)  Or if (typeof(myVariable) != "undefined")  Or if (myVariable) // This throws an error if undefined. Should this be in Try/Catch?

What's the best way of checking if an object property in JavaScript is undefined?


In D8 core you can either set permission for anonymous users to view all or non publish content, but not set permission different by content type.  I've found this that looked promising, but the functionalities doesn't work for this:    Any others suggestions for how to solve this?

Is there a way to avoid anonymous users can see nodes of a content type, like a block or a view?  I can control the access with a view, but if I know the link for a node, I can  see it without first logging in.


I have an ArcGIS standard license and I want to convert polygon vertexes to points in a script.  Since I don't have a good enough ArcGIS license I've been using ET Geowizards to get the points.  The problem is you can't run ET Geowizards in python without having the full license.  So I was curious if any other open source geo tools can do this in python, specifically GDAL.  Is it worth looking into this for a solution?

I'm having a little trouble with the Python OGR API.  What I am trying to do is get all the coordinates of each vertex of the outer ring of a polygon.   This is what I have so far:  import osgeo.ogr import glob  path = "/home/woo/maps/" out = path + 'output.txt'  file = open(out,'w') for filename in glob.glob(path + "*.shp"):     ds = osgeo.ogr.Open(filename)     layer1 = ds.GetLayer(0)     print layer1.GetExtent()         for feat in layer1:         geom = feat.GetGeometryRef()         ring = geom.GetGeometryRef(0)         points = ring.GetPointCount()         #Not sure what to do here   file.close()   I have heard that you can just for over the region but that only returns the rings in the polygon, not the nodes.  Anyone able to help.


I had the understanding that the constant \textwidth is the width of text from the left margin to the right margin. I have been using the same as width specifier in my tables with paragraph. However, even if the widths all add up to \textwidth, the width of the table is quite a bit more than the text above and below it. Could you please explain the bahaviour?  Here's the MWE  \documentclass[a4paper, 11pt]{article}  \usepackage[a4paper, top=1in, bottom=1in,, left=1in, right=1.5in, showframe]{geometry} \usepackage{lipsum}  \begin{document}  \lipsum[1] \noindent\begin{tabular}[]{|p{0.05\textwidth}|p{0.6\textwidth}|p{0.35\textwidth}|}         \hline         \textbf {Sr. No.} & \textbf {Item} & \textbf {Projected Budget} \\ \hline         1. & Test 123 column 2 & 123456789 \\ \hline         2. & test456 Column 2 & 987654321 \\ \hline     \end{tabular}    \end{document}

I wish to be able to have a table (using tabular) that fills the page horizontally with each column using a fraction of that space, for now assume that they are equally sized.  I wish to be able to use enumerations inside of the tabular, so I am using parabox's to achieve this.  Currently I have got:  \begin{tabular}{ | p{0.25\linewidth} |                    p{0.25\linewidth} |                    p{0.25\linewidth} |                    p{0.25\linewidth} | }  %content here after   except this uses all the space from the first margain to the end of the page. Which looks awful. I really want to avoid hard coding in any dimensions because I will want to play around with margins and orientation later.   If I could get it so that I can use a proportion of the text width for each column that would be great.


I am writing an article in BE and I try to remain formal. I have a difficulty with that and which: (meaningless sentences)     We move from our old car to the truck that is his new means of transportation   or     We move from our old car to the truck which is his new means of transportation   Also,     This being said, we remark that the datum that is θ evidently corresponds to the complement   or      This being said, we remark that the datum which is θ evidently corresponds to the `complement   I think which must be used because it is for a subject like truck and datum here.

When is it appropriate to use that as opposed to which with relative clauses?


After reading , I thought up a scenario that I wasn't sure if it was answered inside there. If you have a normal use of the  spell filling up a 20-foot cube, could you leave a space the size of a 10-foot cube on the ground in the middle to be unaffected by the spell? A reason you might want to do this is if you have a creature captured and bound, and you want to be alerted if he leaves his space. You would cast the Alarm spell on the area around him (within the 20-foot cube), leaving the square the he occupies out, otherwise you would be constantly alerted, as the spell states (emphasis mine):     Until the spell ends, an alarm alerts you whenever a Tiny or larger creature touches or enters the warded area.   Is this hollowing out of the Alarm spell possible?

In follow up to my question , I would like to find out whether this portion implies shapability and what restrictions are placed on shapeability.  And can the same logic be applied to a possibly game breaking point?     Choose a door, a window, or an area within range that is no larger than a 20 foot cube   It seems that this language implies shapability because the wording is "an area". But does no larger than a 20 foot cube mean no measurement can be larger than 20 feet? Or does it mean the area or volume cannot exceed that of a 20 foot cube? We already know the size can be round or rectangular (windows can be either).


I want to make a simmilarity matrix but I don´t know what simmilarity index should I use. I have relative abundance data (as ratios) of five species (the same five species in all the plots). The data looks something like this:     id sp1 sp2 sp3 sp4 sp5     One 0.1 0.9 0.0 0.0 0.0   Two 0.2 0.1 0.1 0.5 0.1     Should I use Bray-Curtis simmilarity index? Should I use Spearman rank correlation? What index do you recommend?

I have data on the relative abundance (0 to 1 ratio) of 5 land covers for different landscapes (analogous to species composition). These landscapes are grouped into three geographic areas and I want to test for differences in the composition of the landscapes between those three areas and between two years (I have the compostion of land covers for 2000 and 2010). For this I thought to make a permanova with a year nested in the geographic region. However, I don't know what distance of dis(similarity) I should use to test for differences between groups. Is it okay to use Bray-Curtis simmilarity index or will Spearman-rank correlation be better? Do you recommend any other index?


I have a shell script i use frequently to manually clear the dentries, inodes and page cache in my RAM: ramflush.sh  #!/bin/bash echo " ██▀███   ▄▄▄       ███▄ ▄███▓   " echo "▓██ ▒ ██▒▒████▄    ▓██▒▀█▀ ██▒  _____ " echo "▓██ ░▄█ ▒▒██  ▀█▄  ▓██    ▓██░   |   | F" echo "▒██▀▀█▄  ░██▄▄▄▄██ ▒██    ▒██    |   |  L " echo "░██▓ ▒██▒ ▓█   ▓██▒▒██▒   ░██▒   |   |   U" echo "░ ▒▓ ░▒▓░ ▒▒   ▓▒█░░ ▒░   ░  ░   \___|    S       _" echo "  ░▒ ░ ▒░  ▒   ▒▒ ░░  ░      ░     ||  ____H__  -( (-" echo "  ░░   ░   ░   ▒   ░      ░        |_'(-------)  '-'" echo "   ░           ░  ░       ░           |       /" echo "___________VERSION 1.0______________,-\__..__|_____" echo " " read -p "[*] Do you have a need to flush?:    " yn case $yn in    [Yy]* ) ;;    [Nn]* ) echo "[X] Understood."; exit;;        * ) echo "[X] No input detected. Exiting."; exit;;  esac  echo " " echo " <=== OPTIONS ===>" echo " " echo "1. Clear RAM Page Cache." echo "2. Clear Dentries and Inodes." echo "3. Clear Page Cache, Dentries and Inodes." echo " " read -p "[*] Choose what to flush:    " ans  case $ans in    [1]* ) echo 1 > /proc/sys/vm/drop_caches; echo "[*] Cache Cleared.";;    [2]* ) echo 2 > /proc/sys/vm/drop_caches; printf "[*]Dentries Cleared.\n[*]Inodes Cleared.\n";;    [3]* ) echo 3 > /proc/sys/vm/drop_caches; printf "[*]Page Cache Cleared\n[*]Dentries Cleared.\n[*]Inodes Cleared.\n";;       * ) echo "[X] No input detected. Exiting."; exit;;  esac   However it gets tiresome constantly changing back to my home directory, then going in to a folder and calling the script. I also refuse to just do the commands manually because it defies the point to me having made the script.  Is there a way I can add this to my bash shell in order to be able to run the script from any directory simply by typing ramflush in order to call and run this script, similar to nmap or ping?  Would I have to add it to the package manager and how do I go about doing this?

I'd like to know if there is a way to run  program/shell script without typing full path:  /opt/idea/bin/idea.sh


I got a 100 rep association bonus for every one of my Stack Exchange accounts when I passed 200 rep on Stack Overflow. But I was a little surprised when I saw that I got 100 rep for my Stack Overflow account as well. It was the account which caused the bonus to happen on all other sites.   I didn't understand the logic behind this, to give the bonus for the parent account as well. I'm happy to get it, and if it's a bug please don't take it away again. But is it?

Not sure if it is a bug or not, but it feels like a bug to me. When I got to 200 rep on SO the other day I got +100 rep to all my accounts including SO. So my rep jumped up to 300 on SO.  Considering there are others on SO with rep between 200 and 300 I think it is possible that the +100 was supposed to apply only to the linked accounts, not to the account with 200+.


How can I remove a directory of many files fast?  For example, I backup my hard drive on an external drive, and when I need to release the space occupied by some very old backup on the external drive, I want to release the space as soon as possible. rm -r /very/old/backup takes very long to finish running.  Thanks.

One program created lots of nested sub-folders. I tried to use command  rm -fr * to remove them all. But it's very slow. I'm wondering is there any faster way to delete them all?


I was wondering how I would go about recreating this look on a photo using Photoshop?

I would like to use the overlay effect used on the screenshot(s) below.    I've tried experimenting with several Blending modes but keep missing the mark. I'm sure this has a very easy answer but I'm having trouble recreating the effect on my own.  Here are a few more images for further context:        Thanks in advance for your help.


I'm using SQL Server 2008 R2 Enterprise 64 bit.  My question is:  I have two tables t1 and t2 one has an Id column the other a name column  I can query them so that I get the following result:  ID     Name 1      bob 1      ted 2      bill 3      frank   What I want is the result to look like this:  ID     name 1      bob ted 2      bill 3      frank   The name column can have 1 to n names  What I really need to do is pivot the second column. I have used the cast for xml and stuff functions but these dont really work for what I need.  I tried to write a pivot function but I get an error message.  SELECT ID, name As name    FROM  (SELECT   ID, name   FROM dbo.t1 AS t1               INNER JOIN              dbo.t2 AS t2 ON t1.ID = t2.ID                                       WHERE  (some filter) AS s PIVOT (   max(name)   FOR   [name]   IN ( [name] )) AS p   Thanks in advance :)

Consider a database table holding names, with three rows:  Peter Paul Mary   Is there an easy way to turn this into a single string of Peter, Paul, Mary?


I want to list all the tables of a sqlite3 database, but it doesn’t work. Let’s imagine that in ma database I have the following tables : foo1, foo2, foo3, … Then, with this code :  cur.execute("SELECT name FROM sqlite_master") for table in cur:      print("The table is", table[0])   I have this output : The table is foo1, whereas I’d like have this one :  The table is foo1 The table is foo2 The table is foo3 …   But if I modify the code to have :  cur.execute("SELECT name FROM sqlite_master") print(cur.fetchone()) for table in cur:      print("The table is", table[0]   Then the output is :  (foo1,) The table is foo2   So what’s wrong in my code ?

What SQL can be used to list the tables, and the rows within those tables in an SQLite database file - once I have attached it with the ATTACH command on the SQLite 3 command line tool?


Most probably a trivial question for you: I have a counter \thetotalnoexercices that I compute while compiling my book, but I want to refer to it in the introduction ("This book contains ... exercises"). I should write it to the .aux file but the mechanism seems unclear to me (according to my trials!). Many thanks in advance! Best, O.

At the beginning of my document, I have created a counter using \newcounter. Over the course of the document, this counter is increases using \stepcounter. How can I display the final value of the counter in a place prior to the the final occurrence of \stepcounter, such as at the beginning of the document?


My touch pad is not functioning well , it make wrong moves even if i connect a usb mouse   is there a tip to disable it and just use the usb mouse ?

I want my touchpad to be disabled when I use my mouse. How can I do that? touchpad-indicator has stopped working on 11.10. It used to work on 11.04. Gnome3 is not a solution as I don't like it and find it buggy.


I am confused between the following sentences:  I have a pen. and I have got a pen.  What is the difference between them?

I don't know what is the difference between using "I have got" and "I have" For example:      He's got broad shoulders.    Is it possible to say:      He has broad shoulders.    If yes, so what is the difference?


Before i write my own asp.net app, i wanted to see if there is an existing service already. What i am looking for is send # of zombies the player killed at the end of game to the service. The service than shows sum of all zombies killed that day in the world by other players.  It will also show top 3 players by their summed score today, not their best score in one game. Is there such service available or do i have to roll out my own? thanks  Moderator marked this as duplicate of  but the service mentioned in the topic is no longer in service.

I'm looking for ready to use thirdparty leaderboard service where player's achivementes and scores can be placed. I'd intagrate it into my game to allow players push scores and locate themselves in the tables of tops. It would be nice whether anybody experienced share some points with me.


I have a class that I'm trying to create objects for with a given variable     adjusted by a loop. I'm struggling to explain so perhaps an example will help. The actual class is more complicated than the below, but the general idea is the same. The below method works, but feels very wrong.  #!/usr/bin/python  class Cuboid:   # default values for new instances   width = 123   height = 456   depth = 789    def __init__(self, var, val):     exec("self." + var + " = val") # This feels un-pythony   def area(self):     return self.width*self.height*self.depth  param_list=[ ['width',[5,10,15,20]], ['height',[5,10,15,20]] ]  for param_i in range(0,len(param_list)):   for val_i in range(0,len(param_list[param_i][1])):       thisCuboid = Cuboid(param_list[param_i][0],param_list[param_i][1][val_i])       print(str(thisCuboid.area()))   This gives the expected output:  1798920 3597840 5396760 7195680 485235 970470 1455705 1940940   Apologies if the question is poorly worded, I'm quite new to python. Please feel free to suggest better wording/ask for clarification!  Note that the actual number of parameters that need changing is much more (something like a 20 dimensional cuboid to extend the analogy and the "area" depends on all 20 values), so the simple approach (create a list for each parameter and loop through the lists in turn, setting the named parameter accordingly) gets messy quickly (I need to add a loop for each of the parameters I want to change)

Suppose I have a python object x and a string s, how do I set the attribute s on x? So:  >>> x = SomeObject() >>> attr = 'myAttr' >>> # magic goes here >>> x.myAttr 'magic'   What's the magic? The goal of this, incidentally, is to cache calls to x.__getattr__().


How many ways to place chess figures of one color (2 rooks, 2 knights, 2 bishops, 1 king and 1 queen) on one line of chess board such that 2 bishops are located on the cells with different color and the king is located between 2 rooks?   Number of ways to place bishops on the cells with different color is 12. I made some by-hand calculations to get the number of ways to place the king between 2 rooks on 6 remaining cells and guess it equals 60. So overall number is 720.  Am I right?  Thanks!

I came across a question yesterday about combinations, and I wanted to know what the correct answer was. The question states as follows:  There are 8 spaces that are alternately black and white. There is one king, one queen, two identical rooks, two identical bishops, and two identical knights. The king needs to be surrounded by the two rooks. Then, the two bishops can be put on any of the remaining spaces as long as one is on a black space and the other is on a white space. Finally, the queen and the knights can be placed anywhere in the remaining spaces in relation to the other pieces. How many possible arrangements are there considering these conditions?


I want to add a new line every four lines of a document.  For example:  abc def ghi jkl mno pqr stu vw xyz   should become:  abc def ghi jkl  mno  pqr stu vw  xyz

How can I use text-processing tools to insert a new line after every N lines?  Example for N=2:  INPUT:   sadf asdf yxcv cxv eqrt asdf   OUTPUT:   sadf asdf  yxcv cxv  eqrt asdf


I just started learning python, and for exercise I made a sort of text-game.  In one part there's an if-statement, wherein I define a variable and then it sends you further. I want to use the same variable later on again, but then it says that it's not defined. How can I solve this?  I use python 3.7.3. I've tried different brackets to see if maybe I was using the wrong ones, but that didn't work.  answer_A = ["a"] answer_B = ["b"]   def begin():      print("type a or b")     choice = input(">>> ")     if choice in answer_A:        yes = ("a")        option_a()     else:        yes = ("b")        option_b()  def option_a():     print("This is", yes)  def option_b():     print("This is", yes)  begin()   I wanted that if, for example, you type 'a' as input, you get answer_A and it registers 'yes' as "a". So that it goes to option_a() and prints: "This is a".  Instead, the response that I get is that it takes your answer, then goes to the option_a, but then I get an error that 'yes' is not defined.  (NameError: name 'yes' is not defined)

How can I create or use a global variable in a function?  If I create a global variable in one function, how can I use that global variable in another function? Do I need to store the global variable in a local variable of the function which needs its access?


I just installed winshell for windows and I am trying to include an eps file with the directive \includegraphics{./new} where new is an eps file, however everytime I run pdflatex, it says the file not found. So I tested it by replacing it with jpg and it works. Could anyone tell me what I am doing wrong? Does it have something to do with eps files? I was using latex without GUI on my linux os and I faced no such problems. Any suggestions for a windows system?

The images in my paper are in EPS format. If I execute pdflatex to get a PDF version of my paper, the figures won't appear. I have to typeset using the latex command, and then convert the DVI file to PDF using dvipdf.   Why doesn't pdflatex support EPS figures?


How can I references equations that are on the same line? Here is an example:      \begin{align}      & a_{11} = b_{11}, & a_{12} = b_{12}, \label{eq1}      \\      & a_{21} = b_{21}, & a_{22} = b_{22}, \label{eq2}     \end{align}   If I have understood correctly, I can only reference the first or second line for this case. But I want to be able to reference each equation using \eqref.  Is this possible?

Having different horizontally  distributed equations inside an align environment, only lines are numbered, but not individual equations.    How can the left equations be numbered using subequations? See also the question   \documentclass{article} \usepackage{amsmath} \begin{document}   \begin{subequations}     \begin{align}        %\label{a}         a &= a ,&       \label{b}         b &= b ,\\       %\label{c}         c &= c ,&       \label{d}       d &= d .     \end{align}   \end{subequations} \end{document}     The solution should be able to either:    attach a label to the left equations, or modify the labels on the right to read (1a,b) and (1c,d)    I couldn't find anything in the documentation of amsmath or other packages.


Show that the number of solutions in nonneg. int. of the ineq. $$x_1+x_2+\cdots +x_n\leq M,$$ where $M$ is a nonneg. int., is $C(M+n,n)$.

Show that the number of solutions in nonnegative integers of the inequality $$x_1+x_2+\cdots+x_n\leq M,$$ where $M$ is a nonnegative integer, is $C(M+n, n)$.


I just started typing some numbers in my calculator and accidentally realized that $\frac{123456789}{987654321}=1/8$ and vice versa $\frac{987654321}{123456789}=8.000000072900001$, so very close to $8$.   Is this just a coincidence or is there a pattern behind this or another explanation? I tried it with smaller subsets of the numbers but I never got any similar pattern.

Many years ago,  I noticed that $987654321/123456789 = 8.0000000729\ldots$.  I sent it in to Martin Gardner at Scientific American and he published it in his column!!!  My life has gone downhill since then:)  My questions are:   Why is this so? What happens beyond the "$729$"? What happens in bases other than $10$?


I want to disable networking from a bash script while not giving it administrative privileges. It's possible from GUI. Is there a way to do it from CLI?

The connect automatically option is allowed for my wired Wired connection 1. Disconnecting the connection works when I do it from the panel's Network > Disconnect menu. But when I do that with command:  nmcli con down id "Wired connection 1"   no sooner than it disconnects, the connection is back on.  How does Network > Disconnect work? Could we do the same with nmcli without disabling the automatic connection?  Note:   nmcli con down id "Wired connection 1" works as with automatic connection disabled (but again that's not an option), I don't want to use sudo (wouldn't be good to implement in a script!).


so I got a javascipt virus in my Laptop:  effects:   *can't open regedit.exe and resource monitor, they just show for maybe 0.5     seconds and exit(they just blink), the same thing happens when I try to     install Anti-Virus Programs, I tried to download AVAST and AVG but they just     blink, and about malwarebytes, when I try to open it it doesn't show anything     but sometimes a window appears and gives me two options either to look online     for solution(which doesn't help me at all) and to exit the program.    please take a look at the pics. Here, in the first picture is the task manager, the one with the "Microsoft Windows Based Script Host" are the javascript executables(in the next picture):    in the PIC2 is the file location of the said virus I suspect in the task manager(with a hidden attribute of course):    and I tried to right click>>edit on the "gcfaucx.js" file on pic2 and I think I met the source code but unfortunately it's too many words and I don't know if it's legit to post it here, and if you have any question please do ask, I'll need it,

What should I do if my Windows computer seems to be infected with a virus or malware?  What are the symptoms of an infection? What should I do after noticing an infection? What can I do to get rid of it? how to prevent from infection by malware?   This question comes up frequently, and the suggested solutions are usually the same. This community wiki is an attempt to serve as the definitive, most comprehensive answer possible. Feel free to add your contributions via edits.


The definition I'm working with: Let $R$ be a ring and $P$ be an ideal. Then for any $a,b\in R$, $ab\in P\implies a\in P$ or $b\in P$. We call $P$ a prime ideal. I'm guess that the "or" here is exclusive because if it was inclusive, then there would be a contradiction in the case of $R=\mathbb{Z}$. I'm wondering is there a more abstract example of a prime ideal that uses the inclusive "or"? Edit: the contradiction is that assume $(6)$ is a prime ideal. But $2,3 \notin (6)$ so $(6)$ is not prime.

Ok, so an ideal is prime if for every $ ab \in I $, $ a \in I $ or $ b \in I $.  Now the two questions:  1: Is that an inclusive or exclusive or? Can both $a$ and $b$ be in I?  2: Can $ab$ be equal to either $a$ or $b$?


The sites and webpages i have read are old and there is a question already but the final warning in the answer is to upgrade before 18.04 release? I am just trying to go up one version to first back up the entire server using Veeam before trying any other upgrades/updates. This is the company git server and losing anything would probably not be good for me.

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?


I wonder, the block on the right that says 'recent tags' with tags and counter next to them, how recent?  I mean the tag/counter data, I can see it does not reflect the absolute count of tags on this site, so then what do these counts reflect? Number of tags in the last 24 hours, last month?  Please explain.  thanks

How are these calculated? I see them going up and down all the time, and there are obviously way more than 48 questions about C# so how are these calculated?


How can I prove that:  $$\sin(x)+\sin(2x)+\cdots+\sin(nx)=\frac{\sin\left(\frac{x(n+1)}{2}\right)\sin\left(\frac{nx}{2}\right)}{\sin\left(\frac{x}{2}\right)}?$$

How can we sum up $\sin$ and $\cos$ series when the angles are in arithmetic progression? For example here is the sum of $\cos$ series:  $$\sum_{k=0}^{n-1}\cos (a+k \cdot d) =\frac{\sin(n \times \frac{d}{2})}{\sin ( \frac{d}{2} )} \times \cos \biggl( \frac{ 2 a + (n-1)\cdot d}{2}\biggr)$$  There is a slight difference in case of $\sin$, which is: $$\sum_{k=0}^{n-1}\sin (a+k \cdot d) =\frac{\sin(n \times \frac{d}{2})}{\sin ( \frac{d}{2} )} \times \sin\biggl( \frac{2  a + (n-1)\cdot d}{2}\biggr)$$   How do we prove the above two identities?


I have installed Java 11 on my pc, but one app doesn't work with that version.   Is there any way to install an additional version of Java?

While installing Android Studio on Ubuntu 14.04 I get the message that my Java version (javac 1.7.0_79) is causing problems. I found a  of how to install a newer Oracle version of Java:  sudo apt-add-repository ppa:webupd8team/java sudo apt-get update sudo apt-get install oracle-java8-installer   However I'm afraid that this might overwrite my existing open-jdk version of Java. Since I don't know which of my programs depend on Java, I fear that this could crash these other programs.  Is there a way to make sure apt-get doesn't overwrite my previous Java? I would basically like to have installed both and be able to switch between them manually, depending on what version I need.


Let $E$ be a Banach space and $\Omega$ be an open set of $\mathbb{R} \times E$ and a function $f:\Omega \to E$ Let say that for all $(t_0,x_0) \in \Omega$, the Cauchy problem $x'(t)=f(t,x(t))$ ; $x(t_0)=x_0$, has two solutions, is that mean that it has infinitely many solutions? is there a way to generate more solutions ? In other word, does the differential equation either have a unique, infinitely many or no solutions?

Consider the following initial value problem (IVP) to the first order ODE:   $$\tag{1} \dot x = f(t, x), \ \ \ x(t_0) = x_0.$$  The  describes when one has exactly one solutions. This is true (e.g.) when $f$ is continuously differentiable.   There are examples where uniqueness  and existence fails ( or ):   In all of the examples where I am aware of, whenever one has more than one solutions, one actually has infinitely many. Hence my question:   Can an IVP has more than one solutions, but only finitely many solutions?


I am unable to install testdisk in Ubuntu 13.10 from Live Disk. I am using USB drive to run ubuntu 13.10. I want to recover some data from Windows partition.  I am unable to install testdisk. It is a tar.bz2 file. I have extracted it in a directory.  Can someone help me with the steps to install the application.

I have a Toshiba satellite A-200 laptop with a Vista OS on it with 4 NTFS partitions  (C:) Vista  (D:) Entertainment  (E:) Work  (F:) Sources   and I wanted to start using Ubuntu instead. So I tried it first from the live CD and everything was OK and all the partitions were shown and working and so I decided to install Ubuntu to replace Vista on the (C:) drive. After I did that I can no longer find my folders and files on the (D:), (E:), (F:) partitions and the only file system that is shown is one 198 GB although my HDD is 320 GB.  I can't access the lost data on the remaining 120 GB which I hope is still there and not totally lost  I am now working from the live CD but I am unable to install testdisk. Can I recover the Vista partitions by the product recovery CD to get my laptop back to the factory settings? Can I recover the NTFS partitions using a recovery program for Windows or will that make the problem worse?   I need these data badly as I don't have a backup for them.


Scanner scan = new Scanner(System.in);         System.out.println("Enter the names of each song in the DJ's playlist: ");         System.out.println("When finished, enter done.");         ArrayList <String> NamesOfSongs = new ArrayList<>();         boolean loop = true;         while(loop)         {             String input = scan.nextLine();             if (input.equals("done"))             {                 break;             }             else             {                  NamesOfSongs.add(scan.nextLine());             }         }         System.out.println(NamesOfSongs);         }   Input strings need to be added to the ArrayList until user enters "done" and the method is finished.  Results in:  (after I enter 3 strings and done TWICE)  Enter the names of each song in the DJ's playlist: When finished, enter done. jjjj kkkkk iiii done done [kkkkk, done]

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


I am very new to Ubuntu.  But I have a problem with my files/folders in my wordpress VPS (Nginx, Ubuntu).   I check the permission of file. The permission of folders is 755 => That's good. The permission of Files is 644 = That's good. But the owner ID is 0 => I must change it to 113. And Group ID is 0 => I must change it to 117.   I can change one by one. But there are thousands of files and folders.  Is there anyway to do this in batch mode, using terminal, command line or something...???  Please help me!  Image:

How can I use the chown command to change the ownership of all a folder's subfolders and files?


I am producing a LaTeX template for our corporate branding.  This requires the university logo on the top right of every page, and the address on the bottom right of every page except the title page.  I want to minimise the need for new packages to be installed on the fragmented systems we use.  As such I want to avoid answers that have been given on similar questions - I want to avoid eso-pic and fancyhdr.  Is there anyway to do this without loading any new packages(tikz is allowed)?

I need to insert a logo on pdflatex supported format on the bottom right of each page.  Do you think it's possible?


I can't upgrade to 17.10 as it's not supported, I can't update to 17.04 and I can't install packages. I added old-releases etc. It's not worked for all apps.  Why does Canonical not provide tool/instructions?

Recently I have installed an older version of Ubuntu on my old machine. Whenever I try to install any software, I get an error saying it couldn't be found:  $ sudo apt-get install vlc Reading package lists... Done                Building dependency tree        Reading state information... Done     E: Couldn't find package vlc


When you want to say something occurred only one time, it's "once". Two is twice, three is thrice. What's for four?

Is there a word for 'four times as much', analogous to once, twice, and thrice?


we just moved our domain ( daytonaparts.com ) to a new service provider ( ait.net ) and since we went live we have had our emails rejected by AT&T and Microsoft ( Hotmail, MSN, Live.com ) with an Error 500 based on our IP. We are not sending spam or newsletters, these are just responses to customer emails. We have tried to contact the 2 behemoths but have gotten nowhere. Does anyone have any Ideas how to get removed from these lists

This is a  about avoiding outgoing mail being classified as spam.   Also related:                    I'm wondering how to prevent my emails from my site being marked as spam? I'm using sendmail.  I'm trying to send emails through my ruby-on-rails application. The mails are all written in swedish (if that does make a difference?). I don't know why they keep getting marked as spam.  Are there any things that I can do to minimize the risk?


I have lost or forgotten the root password.  is there a way to recover it or reset it?

My Father died last year and I inherited his Mac Mini. My wife has retired and we are trying to set up the mini for her use but the changes we want to make require admin access and we do not have the information my father used to set up the machine.  Is it possible to reset the admin information without having the old information? If so, how would I go about it?   I am not a Mac user usually so any guidance will have to be pretty simple!


I've created a custom template for a field to display in my view. Based on the view theming information, I've named the file views-view-field--at-a-glance-test--page--field-track-icon.tpl.php (the view is called at-a-glance-test, the display is a page, and the field is field_track_icon.  The sample code given for a views-view-field template has the following comments:  /** * Variables available:   * - $view: The view object   * - $field: The field handler object that can process the input   * - $row: The raw SQL result that can be used   * - $output: The processed output that will normally be used. **/   I want to know what all is coming through in the view object, so I tried to do print_r($view). All I get is a completely blank page - there's not even a single line displayed in the rendered source. Usually this happens if there's a PHP error somewhere - am I doing something wrong? How can I print out the full contents of the view object?  EDIT  I just looked at our php error log and saw this:     PHP Fatal error:  Allowed memory size of 268435456 bytes exhausted   (tried to allocate 117789481 bytes) in   /home/www/expo/includes/theme.inc on line 1414   So obviously the view object is enormous... how else can I see what is coming through, since I have no control over our server's memory limits?  EDIT AGAIN  Per @Clive's comment below, I tried using dvm() instead of print_r, and did get some (a ridiculous amount) of output. Given that this is a template to override the display of a single field, I really want to see just the data for that particular field. So I tried dvm($field), and ended up with literally thousands of lines of nested arrays and objects. It's not pulling in just the data for this particular field, it's displaying data for the entire view, even though I passed in the field variable.  So then I tried dvm($row->field_track_icon), and got about 100 errors (Notice: Undefined property: stdClass::$field_track_icon in include() (line 28 of /home/www/expo/sites/all/themes/bluemasters/views-view-field--at-a-glance-test--page--field-track-icon.tpl.php).) The template comments state to use $data = $row->{$field->field_alias} as the format; first, what's the difference between field and field alias? I've attached a screenshot of the taxonomy term that the field I need is attached to. The field is called field_track_icon. What is the alias? Second, do I need the curly braces?  What do I need to do to get just the data for one specific field?

I have a issue with my Drupal installation, for example:   when I enable or disable the modules, It redirects me to a blank page, when I create a new content type and save it, redirects me to a blank page, when I add a new view and save it, it redirects me to a blank page, when I try to clear the cache, it redirects me back to a blank page, or in similar cases.   Basically all the confirmation pages redirect me to a white screen. When I refresh it again, it shows me the page. I tried to increase the PHP memory value but it doesn't help.  Are there any other solutions for this?  The error which I'm having:      Fatal error: Allowed memory size of 100663296 bytes exhausted (tried to allocate 8192 bytes) in sites/all/modules/views/plugins/views_plugin_localization_none.inc on line 1


I often read that every tensor of order $2$ can be represented as a matrix (I do understand that). But not every matrix is the representation of some second order tensor. I am not sure, if I understand that correctly. Is it just that any matrix that represents a second order tensor has to be quadratic, i.e. a $n\times n$ matrix?

Tensors are mathematical objects that are needed in physics to define certain quantities. I have a couple of questions regarding them that need to be clarified:   Are matrices and second rank tensors the same thing? If the answer to 1 is yes, then can we think of a 3rd rank tensor as an ordered set of numbers in 3D lattice (just in the same way as we can think of a matrix as an ordered set of numbers in 2D lattice)?


How to generate all permutations of the flattened list of lists in Python, ... such that the order in the lists is maintained?  Example;  input;  [[1,2], [3]]   output;  [1,2,3] [1,3,2] [3,1,2]   1 is always before 2 in the permutations.

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


I have seen this a few times, when helping new users of SO, and the comments can sometimes drag on longer than SO usually allows for.  After ~6 comments, SO prompts to 'Automatically move discussion to chat', but if the user has less than 20 reputation, you are unable to do this.  Can the feature be disabled if the user is unable to enter chat?

Simple request, really.  Can we add a detection for the     Please avoid extended discussions in   comments. Would you like to   automatically move this discussion to   chat?   prompt, so that if one of the users in the "extended discussion" has under 20 rep it doesn't appear?  I think a lot of the users this apply to will have low rep and it may take some back and forth to get good info out of them.  New suggestion: how about if a sufficiently high-rep user is clicking on the link, the low-rep user gets a field promotion sufficient to chat? Low-rep users are particularly prone to post questions to lead in this direction of needing to move to chat.


Is there any way to add links to firefox history like bookmarks? I want Firefox remember those as visited links without opening them

, but how can I add or edit a URL (or URI) in the history?


A cleric casts  on 3 orcs.  Two make their saving throw.  RAW, the cleric does not know which orc was affected.   The fighter rushes over and kills the orc that was affected by the bane, but the other two are still alive.    Does the cleric realize that concentration is no longer relevant because there are no more creature being affected?

Does a spellcaster know when concentration ends on one of their spells?  For example, when a wizard casts invisibility, that target is invisible until they attack or after one hour. So if the character attacks and the spell ends is the wizard aware that their spell that they are concentrating on ended earlier than expected?


I am reading some lecture notes on Harnack inequalities and the Ricci flow and at one point the author remarks that it is important that the definitions for gradient steady, expanding and shrinking solitons hold for non-compact gradient solitons because the only compact steady and expanding gradient solitons are Einstein manifolds.  Could someone clarify for me why that is?  I appreciate that it might seem obvious.

As picture below ,I want to prove the expanding Ricci soliton is Einstein metric. I can get $R+\Delta f-n\lambda=0$. Besides ,I want to prove $R+|\nabla f|^2= C$ for some constant $C$. But fail. I just get $R+|\nabla f|^2-2\lambda f=C'$. So, how to do it ? Just give a little hint is enough . Thanks. Picture below is from the 176 page of . And, the definition of expanding Ricci soliton can be found in .


Even though I have parameterized this INSERT on SQL Server, it fails to reuse the plan if the length of one of the VARCHAR fields changes. Do I have any recourse short of padding the data? The query is simple and fully parameterized: INSERT INTO USER_LOG_DATA (POSTDT, SESSION_ID, USERID, SUBJECT, APP, ACTION_NAME, ARGS, SUMMARY, DETAIL) VALUES (@timestamp, @session, @user, @subject, @app, @action, @argsString, @summary, @detail) However if the length of one of the strings changes, the plan is not re-used.  So if the value of the @userid changes from 10 to 8, a new plan is created.

I have some queries that are parameterized, but they are still creating a new execution plan each time. I am using SQL Server 2016.  Queries are like:  (@P1 varchar(1043),@P2 varchar(6)) UPDATE table  SET FILEDATA=@P1  WHERE FILEID=@P2   This query is not using the already generated execution plan from the cache, rather it is creating a new plan each time.


Make a structure and give it three members like this,   struct student{                  int rollno;                  char name[10];                  int arr[];                 }stud1, stud2;   now give 4 records of marks to stud1, and 5 records of marks to stud2. I told the interviewer that we have to give array some size otherwise it is not going to be assigned any space , or it would give compiler error. He said according to new standards of C , it is possible. Finally i couldn't understand how to do it.Do anyone have suggestions ? I tried to do a realloc but i was not sure myself if it would work.

I am working on refactoring some old code and have found few structs containing zero length arrays (below). Warnings depressed by pragma, of course, but I've failed to create by "new" structures containing such structures (error 2233). Array 'byData' used as pointer, but why not to use pointer instead? or array of length 1? And of course, no comments were added to make me enjoy the process...  Any causes to use such thing? Any advice in refactoring those?  struct someData {    int nData;    BYTE byData[0]; }   NB It's C++, Windows XP, VS 2003


I would like to know if in the following examples punctuation is primarily opinion-based or whether there are rules or standards.     Milcot defines power as a dynamic process.       1) By dynamic, Milcot means ... (without single quotation marks)      2) By 'dynamic,' Milcot means ... (with single quotation marks)   And does it make any difference if the defition is a quotation?     Milcot defines power as "a dynamic process."   Thanks again!

If I want to mention the word "furlong", for example, should I use furlong, "furlong", or 'furlong'? Also, am I correct in putting the punctuation outside the quotes?


Is it possible to use QGIS to convert a vector that contains points/polygons into a csv file and, if yes, in which way?

I am trying to export polygon coordinates from a shapefile to a CSV file, but so far all my attempts have failed. I have found numerous questions and answers about this, but none have solved my problem.   I have downloaded the file   www.naturalearthdata.com/http//www.naturalearthdata.com/download/10m/cultural/ne_10m_admin_0_countries.zip  which is a shapefile containing a basic world map. I have imported the shapefile into QGIS by adding a vector layer, and then I try to export the polygons with coordinates for each country. The tips that I have found suggest either saving the layer by right-clicking it and then selecting Save as or opening the attribute table and copying it into Excel. If I try these I only get master information with one row for each country in the map.   Does anyone know how I can retrieve detail information for each country containing the polygons with coordinates?


I accidentally deleted iMove from my MacBook Air. How can I get it back?

I have just bought a new MacBook Air 13" (2013).  It comes pre-installed with GarageBand and iMovie. I don't really need these applications and I want to save my disk space, so I was thinking about removing them.  However, if I do remove them, is it possible to restore them if I want them later?


In Order of the Phoenix, there were multiple examples that show that Umbridge's fireplace was connected to the Floo Network.  Later on, we know the trio and some DA members wanted to get to the Ministry of Magic to try to rescue Sirius. The only option that came to mind was using Thestrals.  Was using Umbridge's fireplace also an option? If so, was it not considered only because it didn't come to mind?

Seems to me that the only reason they didn't do it in the first place was because they were caught by Umbridge when she failed to fall for Nevile's ploy.   But once she was dragged away by the Centaurs after Harry and Hermione's encounter with Grawp in the forest, they seem to forget their initial plan altogether. Instead they opt to fly on comparatively slow Thestrals and waste hours flying to London, when the only obstacle that stood in their way of using the floo network is now in the middle of the forest having tea with the Centaurs.  They could have saved hours of time, and the whole catastrophe of the Ministry could have been avoided.


I know that the battery stops working when it gets too cold and I'd need to warm it up again, but other than that, is there anything else that I'd need to know if I want to shoot in -10C or -20C or even -30C? Do I need some sort of protection for the camera? And how can I protect it against condensation when walking inside, the temperature difference apparently can be 40C! I suppose I'd need to buy some kinda backpack or something and put it inside, but I doubt that that would help.  As for rain, is there some sort of protection? I've seen people mostly shooting with bare cameras in the rain, and I think once or twice I've seen people with a plastic bag wrapped around the camera (including the lens). It looked goofy and extremely uncomfortable to use from the looks of it, so I presume that's the protection from rain... But is there some sort of a different protection? Maybe I could seal up the camera with some plaster or something like that?  And what about snow? Would I still need the protection when it's snowing? After all, snow would only be 'wet' if it melted.  Any other tips would be useful... This is my first DSLR.  Note: I'm talking about walk-and-shoot kind of photography, where you stop for a few seconds to set the right settings and take the shot, then keep walking, not a tripod. The tips I've found so far seemed for a tripod and such, offering a hood-like cover.

I've been trying to photograph lightning lately, as we have had some great storms in Colorado. I've had some difficulty getting a good vantage point, however, as almost all of these storms include rain as well. To keep my camera from getting drenched (I have weather-sealed lenses, but my camera body, a Canon 450D, is not weather sealed as far as I can tell), I've had to shoot under the eve of a building or under a thick canopy of trees, however that has greatly limited my ability to adapt to the changing weather and get get a vantage point on the best lightning.  Is there any equipment, something I can purchase or something home-made that has easy-to-find parts, that can help me protect my lens from the rain while still being able to shoot? Additionally, I've been getting rain on a UV filter I have on the front of my lenses, simply to prevent rain from getting on the front lens element itself. However, once a storm really gets going, so does the rain. Is there a simple solution to keep rain off the front of the lens?


I have a bash script that performs a list of commands that modify a file on the filesystem. I want to have a background process run while these commands run so that my bash script cannot be invoked while another instance is already running.  Almost something like the following:  #!/bin/bash if pgrep mystery_background_cmd; then     echo 'The file is being modified right now. Exiting.' fi <script commands here> bg_pid="$( mystery_background_cmd & echo "${!}" )" <do other commands here> kill "${bg_pid}"   So, in practice:  $ ./script.sh & Modifying files... $ ./script.sh & The file is being modified right now. Exiting.   Or, better yet, something like:  $ ./script.sh & Modifying files... # 1st instance $ ./script.sh &  The file is being modified right now. Seconds until re-check: {5..1} # 2nd instance The file is being modified right now. Seconds until re-check: {5..1} # 2nd instance Finished modifying! # 1st instance Modifying files... # 2nd instance   I am using bash 3.2.57(1)-release and macOS High Sierra 10.13.6.

What's a quick-and-dirty way to make sure that only one instance of a shell script is running at a given time?


I'm struggling with coming up with an elegant solution to generating random events in the game that I'm working on.  Say there are 4 classes of events that can happen, with varying events in those classes that may occur.  So something along the lines of   main_events = {"common event", "not so common event", "somewhat rare event", "rare event"} sub_events[0] = {"common event 1", "common event 2",..} ...   I have a somewhat kludgey solution in place that first just has a random number generated between 0 and 100, and if the number falls within a given range then a main event will be triggered.  Then I'll do another random roll to see which sub event occurs.  Is there a better solution than something along these lines?  Like I mention, it doesn't feel very elegant, and I'd like to make it easily expandable for the addition of future events.

I have a loot box that I want to fill with a random item.  But I want each item to have a different chance of being picked.  For example:   5% chance of 10 gold 20% chance of sword 45% chance of shield 20% chance of armor 10% chance of potion   How can I make it so that I select exactly one of the items above, where those percentages are the respective chances of getting the loot?


I had to upgrade to python 3.5.2 to meet the requirements for another application. After I did I started having trouble with urllib results. The below code is returning "b'0'" but the 2.7 version returned just "0". How do I go back to just getting "0"?  Here is my code:  with urllib.request.urlopen('https://blockexplorer.com/api/addr/19hMEAaRMbEhfSkeU4GT8mgSuyR4t4M6TH/balance') as req:                 balance = req.read() print(balance)

I'm using this code to get standard output from an external program:  >>> from subprocess import * >>> command_stdout = Popen(['ls', '-l'], stdout=PIPE).communicate()[0]   The communicate() method returns an array of bytes:  >>> command_stdout b'total 0\n-rw-rw-r-- 1 thomas thomas 0 Mar  3 07:03 file1\n-rw-rw-r-- 1 thomas thomas 0 Mar  3 07:03 file2\n'   However, I'd like to work with the output as a normal Python string. So that I could print it like this:  >>> print(command_stdout) -rw-rw-r-- 1 thomas thomas 0 Mar  3 07:03 file1 -rw-rw-r-- 1 thomas thomas 0 Mar  3 07:03 file2   I thought that's what the  method is for, but when I tried it, I got the same byte array again:  >>> binascii.b2a_qp(command_stdout) b'total 0\n-rw-rw-r-- 1 thomas thomas 0 Mar  3 07:03 file1\n-rw-rw-r-- 1 thomas thomas 0 Mar  3 07:03 file2\n'   How do I convert the bytes value back to string? I mean, using the "batteries" instead of doing it manually. And I'd like it to be OK with Python 3.


I'm stuck on a question:  Let $\sigma > 0$; $a_1 > 0$; and $a_{n+1} = 1/2*[a_{n}+(σ/a_{n})]$, where $n = 1,2,\ldots$  How do we prove that the limit n → ∞ a{n} exists and how do we find it?  I mean, there's no solid number given in the question, so how does one tackle this type of question?  I have a hunch on the use of mathematical induction to prove that a{n} is monotonic, followed by the application of the monotone convergence theorem, however I'm stuck because of the variable σ which I don't exactly know how to deal with. Am i going in the right direction? Any help on this would be appreciated

a) Let $a>0$ and the sequence $x_n$ fulfills $x_1>0$ and $x_{n+1}=\frac{1}{2}(x_n + \frac{a}{x_n})$ for $n \in \mathbb N$. Show that $x_n \rightarrow \sqrt a$ when $n\rightarrow \infty$. I have done it in two ways, but I guess I'm not allowed to use the first one and the second one is incomplete. Can someone please help me?  We already know $x_n \rightarrow \sqrt a$, so we do another step of the iteration and see that $x_{n+1} = \sqrt a$.  Using limit, $x_n \rightarrow x, x_{n+1} \rightarrow x$ (this is the part I think it's incomplete, don't I have to show $x_{n+1} \rightarrow x$, how?), we have that   $$x = \frac x 2 (1 + \frac a {x^2}) \Rightarrow 1 = a/x^2 \Rightarrow x = \sqrt a$$ b) Let the sequence $x_n$ be defined as $x_{n+1}= 1 + \frac 1 {x_n} (n \in \mathbb N), x_1=1$. Show that it converges and calculate its limit. "Tip: Show that sequences $x_{2n}$ and $x_{2n+1}$ monotone convergent to the limit." I didn't understand the tip, how can this help me? Does it make a difference if the number is odd or even? Thanks in advance!


It was revealed in Original Sin #7 that after Nick Fury whispers something in Thor's ear, he loses the ability to wield Mjolnir. After this, some stuff happens and girl Thor enters the scene and boy Thor dons the name Odinson and picks up Jarnbjorn.  There has been lots of speculation on  and as far as I know, we still don't have an explanation. So my question is this:  Is there any in-universe or out-of-universe as to why Odinson does not attempt to become worthy of Mjolnir's might again? (other than Marvel wanted to attract female readers with a female Thor)  *Note: I did not include spoiler tags for this question because it has been around for over a year now. If the community, thinks it need some, feel free to add them when applicable.

In Original Sin #7, Nick Fury whispers something to Thor.  As you can see in , what Fury said was obscured, but it had a significant effect.      It causes Thor to become unworthy of his hammer, Mjonir.   Has it been revealed anywhere what Fury said to Thor?


I have a console application that does basic output and calculations.  I am trying to create the application and have just a .EXE file that you can open and use the application. I have tried publishing it in visual studio and just get a lot of dll files with a exe that has to be in the same folder?  Any help?

Is it possible to embed a pre-existing DLL into a compiled C# executable (so that you only have one file to distribute)? If it is possible, how would one go about doing it?  Normally, I'm cool with just leaving the DLLs outside and having the setup program handle everything, but there have been a couple of people at work who have asked me this and I honestly don't know.


I know that symmetric matrices can be positive or negative definite. But are only symmetric matrices definite?

Do positive semidefinite matrices have to be symmetric? Can you have a non-symmetric matrix that is positive definite? I can't seem to figure out why you wouldn't be able to have such a matrix, but all my notes specify positive definite matrices as "symmetric $n \times n$ matrices."  Can anyone help me with an example of a non-symmetric positive definite matrix, or some insight into a proof for why it would need to be symmetric should that be the case? Thanks!


I have run a poisson regression with two categorical predictors (treatment and disease severity) and their interaction, controlling for a number of relevant covariates.  Treatment has two levels (control = 0, intervention = 1) and disease severity has three levels (none = 0, mild = 1, moderate = 2).   My output shows a significant interaction between treatment and moderate disease severity in predicting my outcome (exp(-0.63) = IRR 0.53.  My question is: Can I interpret the 0.53 directly?  Is this meaningful?  In other words, is it the case that those with moderate disease severity who received the intervention had 0.53 the incident rate of those with moderate disease severity in the control group?  Or do I need to look at the difference between the IRR of the main effect of disease severity and the interaction term in order to draw this conclusion?

I'm confused about the interpretation of interaction terms in poisson regressions. Here's a hypothetical dataset  Id  Group  Condition   Error rate 1   A      X           1 1   A      Y           2 2   B      X           3 2   B      Y           6   Imagine that individuals 1 and 2 are duplicated a number times (with random noise) to make two groups. If we analyse this data using a poisson regression (as it's count data) there will be no Group by Condition interaction (in both groups, error rates increase by 100% in condition Y, i.e. an Incidence Rate Ratio of 2). If we analyse this data using an ANOVA (and don't transform data) it is likely to yield a significant Group by Condition interaction (I've simulated this). While the poisson regression looks at proportional differences across conditions, the ANOVA is more sensitive to absolute differences.  It seems to me that because the poisson regression uses a multiplicative scale (via log transformation), an additive effect under the poisson regression will become multiplicative when the same data is analysed using OLS (or ANOVA).  So which interaction term is more "truthful"? Is it just a matter of interpretation? Or are there any a priori reasons for choosing one over the other. For example, could you argue that because count data exhibits ratio properties we should be analysing ratios and not intervals (according to Stevens)?  Thanks and hope this makes sense.


What is the difference between these two sentences?  I like being a Doctor.  I like to be a Doctor.  For instance I am a a Doctor by profession. And if someone asks me if I like my profession? Then what should my answer be? 1 or 2.   I searched the internet for the answer and found out  that there are some verbs after which both  progressive forms and to infinitives can be used and Like was listed under such verbs.   So am I right? And   Do both sentences mean the same?  Thanks in advance to anyone who will solve my query.

What is the difference between the following?  A) She likes to be looked at. B) She likes being looked at.  Could you please elaborate your explanations? The more detail, the better.


I use legend style={legend columns=*} to create columns in my pgfplots legends. However, this options only changes the way legend entries are displayed. What I often need is to display various data for each plot, like in a table. Here is an example of the (ugly) work-around I use so far:  \documentclass{standalone} \usepackage{pgfplots} \begin{document} \begin{tikzpicture} \begin{axis}[ title={$y=a \cdot x + b$}, xlabel=$x$, ylabel=$y$, legend pos=south east, legend style={legend columns=2}, ]  \addlegendimage{empty legend} \addlegendimage{empty legend} \addlegendentry{$\quad a \quad$} % \quad are just here to make columns wider... I suppose there's a better way \addlegendentry{$\quad b \quad$}  \addplot+[domain=-1:2, samples=10] {3*x+1}; \addlegendimage{empty legend} \addplot+[domain=-1:2, samples=10] {2*x+2}; \addlegendimage{empty legend} \addplot+[domain=-1:2, samples=10] {1*x+3}; \addlegendimage{empty legend}  \addlegendentry{3}  % first data for the first graph \addlegendentry{1}  % second data for the first graph \addlegendentry{2}  % first data for the second graph \addlegendentry{2}  % you've got it... \addlegendentry{1} \addlegendentry{3}  \end{axis}  \end{tikzpicture} \end{document}     I'd be grateful for any ideas to make the syntax cleaner and, above all, robust!

I am trying to design a legend like picture. it has two column and each column has head text. Also, how I can control which item in first column and which one in second column?        \documentclass{standalone} \usepackage{pgfplots} \pgfplotsset{compat=1.6}  \begin{document}  \begin{tikzpicture}     \begin{axis}[         legend columns=2,          legend style={                     % the /tikz/ prefix is necessary here...                     % otherwise, it might end-up with `/pgfplots/column 2`                     % which is not what we want. compare pgfmanual.pdf             /tikz/column 2/.style={                 column sep=5pt,             },         },     ]         \addplot {x};         \addlegendentry{ }         \addplot {x+4};         \addlegendentry{$x$+4}                    \addplot {2*x};         \addlegendentry{ }         \addplot {2*x+4};         \addlegendentry{$2x$+4}                            \addplot {4*x};         \addlegendentry{ }         \addplot {4*x+4};         \addlegendentry{$4x$+4}     \end{axis} \end{tikzpicture}  \end{document}


I would like using ssh tunneling options. For that purpose I use command:  ssh -L 1234:localhost:5678 host   however this logs me into the shell on remote host. Next I tried -f as:   ssh -f -L 8999:localhost:6006 host   but I get error Cannot fork into background without a command to execute.  How can I get only ssh tunneling capabilities and running it in background without unnecessary clutter. My ssh version is OpenSSH_7.2p2, OpenSSL 1.0.2h  3 May 2016

Related question:   Answer from there helped me a lot, this command does what I need:  ssh -R 2225:localhost:22 loginOfServerWithPublicIP@publicIP   So I wrote the script to reconnect all the time:   #!/bin/bash   while true; do     echo "try to connect..."     ssh -o ServerAliveInterval=240 -R 2225:localhost:22 user@host     echo "restarting in 5 seconds.."     sleep 5  done   And added it to the /etc/crontab. But I found out that works if only I execute it "by hand" from shell, but if it is called by cron, ssh connects and immediately finishes. (so, the script above reconnects all the time)  From man ssh, I found that for background connections I should call it with -n key, but it didn't help. Then, I just looked around for similar scripts and I found that it works if I call tail -f something, i.e. some "neverending" command, so I just created empty file /tmp/dummy_file and now my ssh command looks like this:  ssh -o ServerAliveInterval=240 -R 2225:localhost:22 -n user@host tail -f /tmp/dummy_file   It works now! But, this solution seems a bit ugly, plus I don't really understand actual reasons of that behavior. Just by chance, I tried to call bash instead of tail -f (bash seems to me "neverending" command, too), but it doesn't work.  So, could anyone please explain this behavior, and what is the correct way to create background ssh connection to keep reverse ssh tunnel up?


I am applying for student resident card for a university in Finland.    Before reaching Finland for my studies, I first plan to visit Germany.    Is it okay to first travel to Germany and then proceed for Finland on the same student resident permit?

In case, if I get a multiple-entry Schengen visa in one of the embassies in Ukraine, Kyiv - should my first trip be to the country which issued the visa?  Any there any requirements of this sort? Does this condition vary depending on embassy which issued the visa?  What are the possible consequences on not visiting that country first? Does it somehow depend on country where the embassy is (i.e. non-Schengen and not EU members)?


I am stuck with this question:  Show that $\vert \vert a\vert - \vert b\vert\vert \le \vert a-b\vert$  I had tried proving this using the following method below:  $\vert a\vert+\vert b\vert \ge \vert a-b\vert$  $-\vert a\vert-\vert b\vert \le -\vert a-b\vert$  Since $ -\vert a-b\vert = \vert b-a\vert=\vert a-b\vert$, then $-\vert a\vert-\vert b\vert \le \vert a-b\vert$  $\vert -a\vert-\vert b\vert=\vert a\vert -\vert b \vert \le \vert a-b\vert$  $\vert\vert a\vert-\vert b\vert\vert \le \vert a-b\vert$ since $\vert\vert a-b\vert\vert=\vert a-b\vert$ QED  Am I doing this correctly? Something really feels wrong here but I can't seem to find it, any help is appreciated, thank you!

I've seen the full proof of the Triangle Inequality  \begin{equation*} |x+y|\le|x|+|y|.  \end{equation*} However, I haven't seen the proof of the reverse triangle inequality:  \begin{equation*} ||x|-|y||\le|x-y|. \end{equation*} Would you please prove this using only the Triangle Inequality above?  Thank you very much.


In a C# Application  Convert.ToInt32(22.5) = 22 Convert.ToInt32(23.5) = 24   Odd and Even Numbers Converting Differently! Why?

According to the documentation, the  method uses a round-to-even algorithm which is not common for most applications. So I always end up writing a custom function to do the more natural round-half-up algorithm:  public static decimal RoundHalfUp(this decimal d, int decimals) {     if (decimals < 0)     {         throw new ArgumentException("The decimals must be non-negative",              "decimals");     }      decimal multiplier = (decimal)Math.Pow(10, decimals);     decimal number = d * multiplier;      if (decimal.Truncate(number) < number)     {         number += 0.5m;     }     return decimal.Round(number) / multiplier; }   Does anybody know the reason behind this framework design decision?  Is there any built-in implementation of the round-half-up algorithm into the framework? Or maybe some unmanaged Windows API?  It could be misleading for beginners that simply write decimal.Round(2.5m, 0) expecting 3 as a result but getting 2 instead.


So the title cuts my question a bit short.  If a moving point charge produces a magnetic field, does the magnetic field it produces affect it?  And let's suppose a moving charge is moving in a region with an externally provided magnetic field, how does the magnetic field produced by the charge's movement interact with/affect/cancel the other magnetic field?

Suppose a moving proton traverses a uniform magnetic field with constant velocity. Note that because the proton is moving, it is generating its own magnetic field.   Is the magnetic force experienced by the proton completely explained by the Lorentz force law, i.e., F = q (v x B)?   Or, is the proton also experiencing an additional magnetic force arising from the interaction of its own magnetic field with the external field? If that is incorrect, is the Lorentz force law actually just describing the result of proton field-external field interactions, such that any and all magnetic force on the proton is explained by the Lorentz force?


I have a laptop running windows 10 Pro, The system drive has been encrypted with VeraCrypt.  I am unable to get the update 'Windows 10 Pro, version 1511, 10586' to install.  Each attempt at installing follows this path.   Prompted To Update Give the OK to reboot Presented with VeraCrypt Boot loader, Enter my decryption key Booted into some sort of Windows Diagnostic mode, asking me for my keyboard language Select English and I am presented with the option to boot back into Windows Back to VeraCrypt Boot Loader, enter decryption key Enter back into windows, update not applied.   Here is the error in the event viewer each time.     Log Name: System Source: Windows UpdateClient EventID: 20 Installation   Failure: Windows failed to install the following update with error   0x8024200D: Upgrade to Windows 10 Pro, version 1511, 10586.   I found this link,  and performed the highest rated answer, as well as the accepted answer.  The end result was the same.  The update attempted to install, I went through the reboot, and I ended up without the update installed.

I am running Windows 10 with DiskCryptor whole disk encryption on the system drive.  The latest Windows 10 update fails to install.  When I restart the system to install the update, I get the following sequence of events:   I enter my DiskCryptor password which unlocks the disk Windows Update asks for the keyboard layout Windows Update then fails shortly after   If I push through the process far enough I get to a message that indicates it cannot continue because a file (or files) is locked.  My colleague also uses DiskCryptor on his system drive and has had an identical experience.  So:   Is this a known issue with whole disk encryption generally? Is this an issue with DiskCryptor specifically? If so, is it a bug MS will be fixing or will it require a workaround?


I created a layer in order to draw points with the azimut and distance plugin. IT didnt work at all. There was not even 1 point created. I followed the tutorial here:   I entered the gps data in decimal format as suggested in the tutorial. There is no draw button. No points are drawn. The layer is in active mode.   Are there any other options to draw a few points using their coordinates?

How do I create point features with exact (manually entered) coordinates in QGIS? I get precise GPS coordinates from a survey team which I need to add to a point layer. What I want: add point, type in the coordinates and when pressing enter the point is created where it is supposed to be.


I was checking this website  and wondering why don't we have $(\mathbb Z/5 \mathbb Z)^\times$ in the list of groups with 4 elements for example ? $(\mathbb Z/5 \mathbb Z)^\times$ has 4 elements and is not in the list of groups with 4 elements and I do not know why ? Does it have to be isomorphic to $\mathbb Z/4 \mathbb Z$ ? Same thing for $(\mathbb Z/7 \mathbb Z)^\times$, $(\mathbb Z/9 \mathbb Z)^\times$ and $(\mathbb Z/14 \mathbb Z)^\times$ in the groups of 6 elements.

I think its silly question but I have nt this in my mind at this time.   Any one can help  How we can see $U(10) \overset{def}= \{1,3,7,9\}$, $\mathbb Z/4\mathbb Z \overset{def}= \{0,1,2,3\}$, $U(5) \overset{def}= \{1,2,3,4\}$ are isomorphic groups where $U(10)$ and $U(5)$ are groups under multiplication?


why do we use normalization coefficient in the central limit theorem?   For CLT we use $\sqrt{n}$ as the normalization factor, but why do we need it?

In several different contexts we invoke the  to justify whatever statistical method we want to adopt (e.g., approximate the binomial distribution by a normal distribution). I understand the technical details as to why the theorem is true but it just now occurred to me that I do not really understand the intuition behind the central limit theorem.  So, what is the intuition behind the central limit theorem?   Layman explanations would be ideal. If some technical detail is needed please assume that I understand the concepts of a pdf, cdf, random variable etc but have no knowledge of convergence concepts, characteristic functions or anything to do with measure theory.


How do you derive the result for the lagrangian density of a free electromagnetic field

So I know that for an electromagnetic field in a vacuum the Lagrangian is $$\mathcal L=-\frac 1 4 F^{\mu\nu} F_{\mu\nu},$$ the standard model tells me this. What I want to know is if there is an elementary argument (based on symmetry perhaps) as to why it has this form. I have done some searching/reading on this, but have only ever found authors jumping straight to the expression and sometimes saying something to the effect that it is the "simplest possible".


Recently I found this  that has a lot of interesting statistics and among them I noticed something that astonished me : the paper to gold ratio. I am really surprised that there is such a huge ratio between traded gold and physical gold. Here is the value and the definition they give for the paper to gold ratio :  From what I understand that means that if 86 people hold each one 1 ounce of paper gold ETF, only one of them can have access to the physical ounce and the 85 others are left with nothing ? It looks like this system is possible as long as not all paper gold ETFs holder try to access physical gold at the same time. I am not a finance guru so probably I am not getting the whole picture regarding paper gold ETFs but from what I see it is not really reassuring. So here is my question : Are paper gold ETFs a scam ? The same question can be extended to paper silver ETFs, that has an even higher paper ratio of 171.

There are various blogs and videos that indicate that the gold that GLD holds (via HSBC) and the silver that SLV holds (via JP Morgan) is leveraged 50 to 1 or 100 to 1.  For me there are some advantages to using these ETFs vs. one like CEF, and so I was wondering if this leverage is "fact or fiction".  Do you have any concrete knowledge or concrete references on this subject?  Or have you been able to wrap your head around this whole issue?


shows me how I can handle an arbitrary number of arguments. I have adapted it a bit to my purpose:  \usepackage{pgffor} \newcommand*{\twolinematrix}[1]{%     \foreach \firstrowelement/\secondrowelement in {#1} {%         <something should happen here!}%     }  }   The above macro should take input like this as an example: \autotwolinematrix{1/6, 2/7, 3/8, 4/9, 5/10}.  I have become stuck because, normally, if you want to create a matrix (assuming you have amsmath loaded), you would so something like:  \newcommand{\manualtwolinematrix}[10]{%     \begin{matrix}          #1 & #2 & #3 & #4 & #5 \\         #6 & #7 & #8 & #9 & #10     \end{matrix}% }   So, this suggests that you'd need to have logic that knows when you are about to be done with the element pairs, because you have to put the \\. I think if we are programmatically generating the matrix, it would be better to think of it like this:  \newcommand{\manualtwolinematrix}[10]{%     \begin{matrix}          #1 & #2 & #3 & #4 & #5 \\ #6 & #7 & #8 & #9 & #10     \end{matrix}% }   where #1 & #2 & #3 & #4 & #5 \\ #6 & #7 & #8 & #9 & #10 is the string that has to be auto-generated within the body of our macro. Our macro gets input pairwise, so we have to generate this string given pairs. Okay, then in the body of our macro, we should have two variables: call it \firstrow and \secondrow.  The \firstrow and \secondrow should be built up sequentially, given each pair of elements, and then finally a variable called \matrixbody should be generated like so:  \matrixbody = \firstrow \\ \secondrow  Can you help me put these thoughts together?

I have a mathematical transformation that takes 16 parameters (grouped into 3+8+5) and would like to make a latex command for it, so that I can easily change the notation for it if the need arises.  As far as I know, both \def and \newcommand take a maximum of 9 arguments, is there any (recommended) way to extend this?


I am using vi as a note-taking and outlining tool and therefore I thought that this stackexchange site would be appropriate to ask this question. I am constructing the "tags" file by myself. What I would like to do is that when I open my notes or outline file, vi reads the tags present in this file, highlights them and also displays the tag labels in a vertical preview window. I have no experience in vim scripting so I would appreciate some help.  Currently I am using a bash script to generate a tag labels file taglabels in $PWD using cut and loading it in a separate vertical window  My script looks like this  #! /bin/bash  cut -f1 $PWD/tags > $PWD/taglabels vi -c ":30vsp $PWD/taglabels" $1   As is obvious, the script does not highlight the tags present in the file nor does it show only the tags present in the file. On the contrary it shows all the tags present in $PWD/tags.  I looked into ctags and the taglist plugin but they seem to be more suited for code than for free-form text.  If anyone has any suggestions on how to improve on this scenario I would be grateful.  Thanks.

I am using Vim as a note-taking and outlining tool. I am constructing the "tags" file by myself. What I would like to do is that when I open my notes or outline file, Vim reads the tags present in this file, highlights them and also displays the tag labels in a vertical preview window. I have no experience in Vim scripting so I would appreciate some help. Currently I am using a bash script to generate a tag labels file "taglabels" in $PWD using cut and loading it in a separate vertical window. My script looks like this #! /bin/bash  cut -f1 $PWD/tags > $PWD/taglabels vi -c ":30vsp $PWD/taglabels" $1  As is obvious, the script does not highlight the tags present in the file nor does it it show only the tags present in the file. On the contrary it shows all the tags present in $PWD/tags. I looked into ctags and the taglist plugin but they seem to be more suited for code than for free form text.


The following quotes all seem to contain agreement errors between their subjects and predicates:     A total of five youths were arrested in both incidents.   Shouldn't it be "A total . . . was"? The sense is plural overall, but the subject is the singular "total." The object of the preposition is "five youths." Nonetheless, the verb should be the singular "was," agreed?      Early returns from rural areas indicated that support from the Communists remain strong.   Shouldn't it be ". . . support . . . remains strong"?     A group of neighborhood volunteers are identifying these houses and forcing owners to fix them up or tear them down.   Shouldn't it be "A group . . . is"?     The council's actions, concluding more than six hours of testimony on the matter, effectively nullifies a city hearings officer's decision.   Shouldn't it be "The council's actions . . . nullify"?

A total of 10 payments were made.   OR     A total of 10 payments was made.   Which is correct? Or can both be correct?


Can anyone suggest me that how to trigger the commands like cd,ls by using java with code.

It is quite simple to run a Unix command from Java.   Runtime.getRuntime().exec(myCommand);   But is it possible to run a Unix shell script from Java code? If yes, would it be a good practice to run a shell script from within Java code?


I want to make a partition of my current disk as shown in the picture. I tried GParted but it's not working because the current partition is running. in fact, the buttons are not active to proceed.  Please help to divide it.

I have a dual boot setup with Ubuntu and Windows 7. I need to shrink my root Ubuntu volume in order to get some free space to create a new partition. Are there any Windows based tools that will do this for me? I tried booting up in gparted to do this but I cannot tell which partition is which since I cannot find the size (it displays everything in blocks).


In a question I am asked to find $\lim_{n \to \infty}\frac{n!}{n^n}$ using the sandwich theorem.  I can see that the limit is going to be 0 as $\frac{n!}{n^n}$ can be written as $\frac{n}{n}*\frac{n-1}{n}*\frac{n-2}{n}*...*\frac{1}{n}$ but I cannot see how I can find two sequences which 'squeeze' the given function.  Any help would be greatly appreciated!

$$\lim_{n \to\infty} \frac{n!}{n^n}$$  I have a question: is it valid to use Stirling's Formula to prove convergence of the sequence?


I was reading the declaration that Michael Jackson´s daugther posted about her smoking cigarettes these past days, outside a restaurant. And she wrote a sentence like this:  "Sure as hell beats everything else in my past though".  I get that when she refers to " sure as hell beats everything else in my past", she means that the action of smoking isn´t the worst thing she has done in her life. But I would like to understand what "though"means in the end of the sentece of hers.  Thank you, folks.

Okay, of course I've used different popular online dictionaries and the translation makes sense in the most cases.    Sometimes I find usages of 'though' where I don't get the meaning of the word.   An example I've found on twitter     That face, though. [Image of a dog looking weird]   The tweet came without any context or conversation.  When I translate this example to my native language - german - this makes absolutely no sense. At least for me.  So is the above usage some kind of slang? What is the meaning of though in this case?  For the completeness an example that makes absolutely sense for me     Though he tried very hard, he failed the course.


I thought python 3 is standards on ubuntu 16.04, but to use it I have to type 'python3'. Is there a way to use python instead and python2 for the old version?

I type python in a terminal window. I get Python 2.7 and not Python 3.5. According to the docs, Python 3.5 should come preloaded.


The following puzzle being very much recreational for me, I couldn't resist myself from sharing it with my fellow MSE user friends. Let's have a look at it.  You are the most eligible bachelorette in the kingdom, and as such the King has invited you to his castle so that you may choose one of his three sons to marry. The eldest prince is honest and always tells the truth. The youngest prince is dishonest and always lies. The middle prince is mischievous and tells the truth sometimes and lies the rest of the time. As you will be forever married to one of the princes, you want to marry the eldest (truth-teller) or the youngest (liar) because at least you know where you stand with them. The problem is that you cannot tell which brother is which just by their appearance, and the King will only grant you ONE yes or no question which you may only address to ONE of the brothers. What yes or no question can you ask which will ensure you do not marry the middle brother?  Though it wasn't given in the original problem let's impose the condition that "No answer" isn't a possible answer. Note: this problem is also called the Bachelor Problem, with genders reversed (explicitly mentioned so that (SE) searches on either name will succeed).

Is it possible to solve this problem:  A prince wish to marry a princess. There are 3 princesses, one is young, one is a little older and one is old. The prince is able to tell the princesses apart. One of the princesses always tells the truth, one never tells the truth and one sometimes tells the truth and sometimes not.  The prince only wish to marry a princess whom he can trust. Therefore it must be the princess that always tells the truth or the princess that never tells the truth (he can just negate her answers for the rest of their marriage).  Before he chooses the princess he wish to marry, he can ask one and only one princess a single question. She must only answer the question by yes or no.  Which question must he ask to be sure he marries one of the right princesses?  Edit: I was not expecting the question "who is more truthful", so consider this change of rules. Suppose we remove the "random princess", and instead insert an "evil princess". The evil princess can choose her strategy for answering, after she has seen which princess we are asking. So asking "Who is more truthful", does not make sense anymore, since the evil princess could choose to answer correct to every question.


Given seven real numbers. Show that we can always choose two of them, say $a, b$ such that $0 < \dfrac{a-b} {ab+1}< \sqrt{3}$  I think this is one of pigeon hole principle problem. I have tried to think further about the cases for some days, but didn't found any logical sense answer. Instead of plugging random real numbers, do you have any argument to prove it?? Please help

Show that given seven real numbers, it is always possible take two of them, such that $$\left\vert\frac{a-b}{1+ab}\right\vert<\frac{1}{\sqrt{3}}$$   The "Pigeonhole principle" states that if $n$ items are put into $m$ containers, with $n > m$, then at least one container must contain more than one item, but how I an define my "container" such that meets the condition of the problem?


Presidential candidates say "If I were elected president" but why don't they add an article in the sentence? Shouldn't it be "If I were elected a president"? After all, we do add articles in sentences like "When I become a mother" and "While I was a captain." Could someone explain?

Why is there no the before president and captain?     They elected him president.       She was made captain of the team.