using *args and **kwargs as a substitute for function's arguments I hava a question about *args and **kwargs. I know that they are used when you do not know how many arguments will be passed to function. But can it be a substitute for some arguments that are actually required when I do not know what those are?   If there is a function:  def functionName(a, b):     ...some code...     doSomethingUsing(a)     doSomethingUsing(b)   If I do not what arguments does the function take can I simply use functionName(*args, **kwargs) - or functionName(*args)? I noticed that some people tend to use it that way - but I am not sure if this is how * and ** work in python?
What does ** (double star/asterisk) and * (star/asterisk) do for parameters? In the following method definitions, what does the * and ** do for param2?  def foo(param1, *param2): def bar(param1, **param2):
How do I tell Maven to use the latest version of a dependency? Given two input layers  The clip layer - an arbitrary layer (though in my case it's a float 1 band geotiff) The mask layer - a paletted raster in which every pixel is either NO DATA or a single &quot;color&quot; value, same for every pixel.  I want to create an output raster whose overall extent matches the extent of the mask layer and each pixel is either NO DATA if the corresponding pixel of the mask layer is NO DATA or the value of the corresponding pixel from the clip layer if the corresponding pixel of the mask layer is not NO DATA. I know I can mask the clip layer with a polygon, but the mask layer is a raster. Polygonizing the raster layer is possible in principle, but would result in a polygon with a lot of very short edges. Is there a direct way to do this in QGIS? I suppose there's probably a path that involves creating a new layer and using the raster calculator, but I'm hoping there's something more direct. Further complicating the matter is that the two rasters might not have the same resolution and origin. I believe this is equivalent to  in ArcMap. I set up Windows 10 and have been using it for months on a spare laptop.  When installing, I did not use a Microsoft account to enable all of the app connectivity because I don't need that functionality.  I do not want these features active on this device, and I used a simple user name during the install.  Everything was going fine until I read about the Linux/bash features that are available in the anniversary update.  I decided to try them out and entered my Microsoft Insider credentials to enable the features in the developer options of the Control Panel.  I didn't realize the primary account on this device would now become linked to that Microsoft account.  Is there a simple way to disassociate the Microsoft account from the local account, or are they now linked forever in an unholy union?  I can set up a new local account, but I'd rather not lose all the settings and folder preferences prior to my gaffe. Let $A \in \mathbb{R}^{p \times p}$ and $B \in \mathbb{R}^{q \times q}$ be nonsymmetric positive definite matrices in the sense that $v^T A v &gt; 0, \forall v \in \mathbb{R}^p$ and $v^T B v &gt; 0, \forall v \in \mathbb{R}^q$.  I know that $A \oplus B$, i.e. a matrix with a block structure \begin{align} \pmatrix{A &amp; 0 \\          0 &amp; B} \end{align} is positive definite and I also know that if $p=q$, then $A+B$ is positive definite as well.  Can I say that as well if the blocks overlap partially? When?   For instance a matrix as follows: \begin{align} \pmatrix{a_{11} &amp; a_{12} &amp; a_{13} &amp; a_{14} &amp; 0&amp; 0\\          a_{21} &amp; a_{22} &amp; a_{23} &amp; a_{24}&amp; 0&amp; 0\\          a_{31} &amp; a_{32} &amp; a_{33} + b_{11} &amp; a_{34} + b_{12} &amp;b_{13}&amp;b_{14}\\          a_{41} &amp; a_{42} &amp; a_{43} + b_{21} &amp; a_{44} + b_{22} &amp;b_{23}&amp;b_{24}\\          0 &amp; 0 &amp; b_{31} &amp; b_{32} &amp;b_{33}&amp;b_{34} \\          0 &amp; 0 &amp; b_{41} &amp; b_{42} &amp;b_{43}&amp;b_{44}} \end{align} What sort of waves are produced by tuning forks? Is it transverse, longitudinal or both? We often know tuning forks are used to to produce wave in various experiments that we do in lab. But the matter of concern is what sort of waves are produced by it? Is it transverse, longitudinal or both? What did Hegel mean by 'world spirit'? I understand that Hegel intends to justify the history of mankind by stating that every town and society that has existed has been a test indirectly arranged by the 'world spirit' in order to eventually create a town in which people would live ethically, and that this process has been done in order for the 'world spirit' to become aware of its freedom. But what exactly is this 'world spirit'?   In the last quiz of a course I'm taking (I´ve taken this year a philosophy course at college), I wrote that the 'world spirit' was some kind of parasitic entity which inhabits every human being that has existed and is going to exist. Does this seem right? Activity Monitor in Mavericks "Show Memory Usage" dock icon gone? I just purchased a new MacBook Pro with Mavericks installed and noticed that Activity Monitor doesn't have the "Show Memory Usage" dock icon option anymore.  I really liked this option since I used it to prevent disk swapping by closing applications when I had too many open.  What gives? What's the best and quickest way to detect whether you're running a 32 or 64-bit version of Windows Server from the command line?  (Cygwin is installed) Show path of a body of where it should go after linear impulse is applied I am making a game with Andengine and Box2D. I have a dynamic body and I apply linear impulse on the body to move it around when the user have touched the screen.  Now I want to show the path where the body will go when the user have touched. If you have played Angry Birds or Basket Ball Shoot or any other which have projectile motion with a path shown you will get my point. I want to show the white dots which are shown in those games. Can a shadow move faster than the speed of light? Alternative to Photoshop or Paint.NET Messed up my PATH environment variable and can't login to desktop To get an maven environment variable to run, I tried several options. Basically, I followed some options from , such as ~/.pam_environment, /etc/bash.bashrc and I don't really know anymore. Within them I exported sth like export PATH=/opt/apache-maven-3.6.0/bin:$PATH (I'm being so unconcrete because I cannot look it up).   Afterwards, I did run gnome-session-quit and my machine got stuck.   So after hard restart I try to login again, but I'm not able to do that: I see my username, enter the password, hit enter, screen turns black and after 2 seconds I'm back at the login screen.   So, that very strange and worrying. Next step: Login via tty (Strg + ALT + F3). Within there I can login, but can not do much. I thought about sth like . But whatever I do: The command could not be located because '\bin' is not included in the PATH environment variable. I think, altogether thats alarming and I'm getting really nervous.  Executing export PATH="/usr/bin:$PATH seems to work and echo $PATHgives an output starting with /usr/bin:/usr/bin:/usr/bin:/home/user/Documents/.../esper/examples/transaction/etc:/home/user/anaconda3/bin:/usr/lib/jvm/java-1.8.0-openjdk-amd64/bin:/opt/apache-maven-3.6.0/bin:/opt/apache-maven-3.6.0/bin:/opt/apache-maven-3.6.0/bin but does not really help.  I'm running an Ubuntu 18.04 on an Lenovo G50-70.   Can you help me accessing my desktop again and/or fixing my PATH issue? Prove that a subset of a separable set is itself separable Air friction at supersonic velocities An entire function whose real part is bounded must be constant. Lighting in a Minecraftian World Minecraft is a game that is largely based on a heightmap and uses that heigtmap information to flood the world with light.  From my understanding the highest point in the heightmap is the end of the sunlight influenced area.  Everything above that is lit by sunlight, everything below that just is influenced by light nearby in a radius of 8 blocks.  Thus if you have a floating island on the top of your world everything below that will be seen essentially as a cave.  When two lights influence the same point the brighter light wins (unsure about that).  Either way there are a couple of problems with minecrafts lighting model: first of all, if your world does not have a heightmap it becomes trickier to figure out what exactly is supposed to emit sunlight and what not.  A simple way would be to assume that the world is (in my case) a floating rock and then traverse each axis from both directions and figure out where the rock starts and ends.  But this does not fully eliminate the problem as dents in the rock are not supposed to be in darkness.  Minecraft itself will cache the light information in its chunks together with the information about the material of a block.  Thus only if the world is modified the lighting has to update.  Unfortunately that process is still pretty slow on updates and on quick light changes one can see the lighting lag behind.  That's especially true if a lot of blocks change (TNT, sunset etc.) and you're not running the fastest computer (Or Java on Mac).  From my still limited understanding of 3D graphics lighting a world like minecraft shouldn't be the biggest issue.  How would you tackle the problem?  I think the basic requirements for lighting in a voxel world would be   update fast enough that it could happen in a single frame.  One might be able to do the lighting in the graphics device and download the changed light information to the main RAM. light information must be quickly available for the main game logic so not entirely based on the graphics device: reasoning: light affects the growth of grass, spawning of monsters etc. light updates would have to be local to a chunk or have some other limit so that one does not have to relight the whole world which might be very large in size.   The main idea would be to make the light updates fast, not necessarily more beautiful. For general light rendering performance improvements one could easily add SSAO on top of that which should result in much nicer worlds. Commutator of a group We have to evaluate the following integral:  $$\int \frac{\sqrt{\sin x}}{\sqrt{\sin x} + \sqrt{\cos x}} dx$$  I tried this:  I multiplied both the numerator and denominator by $\sec x$ And substituted $\tan x = t$.  But after that I got stuck.  The book where this is taken from gives the following as the answer: $$\ln(1+t)-\frac14\ln(1+t^4)+\frac1{2\sqrt2}\ln\frac{t^2-\sqrt2t+1}{t^2+\sqrt2t+1}-\frac12\tan^{-1}t^2+c$$ where $t=\sqrt{\cot x}$ On some Microsoft Access queries, I get the following message:  Operation must use an updatable query. (Error 3073).  I work around it by using temporary tables, but I'm wondering if there's a better way.  All the tables involved have a primary key. Here's the code:  UPDATE CLOG SET CLOG.NEXTDUE = (     SELECT H1.paidthru      FROM CTRHIST as H1     WHERE H1.ACCT = clog.ACCT AND     H1.SEQNO = (         SELECT MAX(SEQNO)          FROM CTRHIST          WHERE CTRHIST.ACCT = Clog.ACCT AND          CTRHIST.AMTPAID &gt; 0 AND         CTRHIST.DATEPAID &lt; CLOG.UPDATED_ON     ) ) WHERE CLOG.NEXTDUE IS NULL; Is time continuous or discrete?