I just want to understand why we use *args when the same work can be done by list when we pass it as a argument. In which scenarios do we really need *args, where list as a argument will fail to do that operation.  list =[1,2,3,4,5,6,7] def method1(args):     for i in args:         print(i*2) method1(list)   list =[1,2,3,4,5,6,7] def method1(*args):     for i in args:         print(i*2) method1(*list)    I didn't find any differences. Please correct me if i am wrong.
In the following method definitions, what does the * and ** do for param2?  def foo(param1, *param2): def bar(param1, **param2):
google search index what is fresh content I read that sites have good reputation in google search index if it is fresh content.  what does fresh content means from google's point of view?  I have many pages. I have created articles and tutorials.  These page dosent change except the comments which are at the bottom.  I have made this page as static (.html) and never edit cause that is the information i wanted to be ever. cause the concept is not going to change?  with these parameters how to judge whether my page is fresh or not? How will going from 75% Credit Utilization to 0% Credit Utilization affect my credit score? How can I change font rendering to sub-pixel BGR ordering? Using image sequence of medical scans as volume data in cycles I know it's possible to do this in BI, but I need your help to do this in cycles. For now, I have a setup to use an image sequence as volume but it only shows 1 slice/frame. I'm using generated texture coordinates for easy mapping (0-1 on each axis). The images are mapped on XY and I would like to use normalized frame# as Z coordinate to map the sequence as a volume.       Images sequence can be found  (I'm using 16-bit TIF files of MRBrain in this exemple).    Any solution is welcome but try to keep it simple and user friendly :).  Final Edit: I had a hard time choosing between Lemon's and PGmath's answers. Lemon's is more user friendly and flexible, and uses the image sequence without any change inside blender. PGmath's uses a 3rd party converter to make the sequence 1 single image, but allows GPU rendering. Well, ImageMagick's command line is : "convert +append *.tif anim.tif" from the folder where the sequence is unzipped. Not so hard. That's why I accepted PGmath's answer.      Now, i played with it, and here's the result.  The "volume" object contains the volume shader (playing with the color ramp gives funny things) and the boolean modifiers (turn them off to see the complete volume, but reduce the final density multiplier for better view). The "Slice Control" arrow empty controls the slice position/rotation. The "Texture Mapping" object controls...the mapping, if it need some tunning (position, rotation, scale, and then tiling if necessary?). I have a query pattern that must be very common, but I don't know how to write an efficient query for it.  I want to look up the rows of a table that correspond to "the most recent date not after" the rows of another table.  I have a table, inventory say, which represents the inventory I hold on a certain day.  date       | good | quantity ------------------------------ 2013-08-09 | egg  | 5 2013-08-09 | pear | 7 2013-08-02 | egg  | 1 2013-08-02 | pear | 2   and a table, "price" say, which holds the price of a good on a given day  date       | good | price -------------------------- 2013-08-07 | egg  | 120 2013-08-06 | pear | 200 2013-08-01 | egg  | 110 2013-07-30 | pear | 220   How can I efficiently get the "most recent" price for each row of the inventory table, i.e.  date       | pricing date | good | quantity | price ---------------------------------------------------- 2013-08-09 | 2013-08-07   | egg  | 5        | 120 2013-08-09 | 2013-08-06   | pear | 7        | 200 2013-08-02 | 2013-08-01   | egg  | 1        | 110 2013-08-02 | 2013-07-30   | pear | 2        | 220   I know one way of doing this:  select inventory.date, max(price.date) as pricing_date, good from inventory, price where inventory.date &gt;= price.date and inventory.good = price.good group by inventory.date, good   and then join this query again to inventory. For large tables even doing the first query (without joining again to inventory) is very slow.  However, the same problem is quickly solved if I simply use my programming language to issue one max(price.date) ... where price.date &lt;= date_of_interest ... order by price.date desc limit 1 query for each date_of_interest from the inventory table, so I know there is no computational impediment.  I would, however, prefer to solve the whole problem with a single SQL query, because it would allow me to do further SQL processing on the result of the query.  Is there a standard way to do this efficiently? It feels like it must come up often and that there should be a way to write a fast query for it.  I'm using Postgres, but an SQL-generic answer would be appreciated. Video editing software options? What video editing software would you recommend on Ubuntu (or Linux in general) and why?  It can be for either beginners or experienced users.  Please only place one piece of software per response and include details to what makes it great! How do you prove the set $G = \{(x, f(x)) \mid x \in \mathbb R\}$ is closed? Let $f : \mathbb R \to \mathbb R$ continuous. Prove that graph $G = \{(x, f(x)) \mid x \in \mathbb R\}$ is closed.  I'm a little confused on how to prove $G$ is closed. I get the general strategy is to show that every arbitrary convergent sequence in $G$ converges to a point in $G$.  Here is what I tried so far:   Let $x_k$ be a sequence which converges to $x$. Since $f$ is continuous, this implies that $f(x_k)$ converges to $f(x)$. At this point, can you say every $(x_k, f(x_k))$ converges to a $(x, f(x))$, so $G$ is closed? C# equivalent to wildcard imports in Java Is there a way in C# to import everything inside a namespace like there is in Java with the wildcard character?  import java.awt.*; What is the limiting factor in lens construction when it comes to f-stop values? Magic quotes in PHP According to the , in order to make code more portable, they recommend using something like the following for escaping data:  if (!get_magic_quotes_gpc()) {     $lastname = addslashes($_POST['lastname']); } else {     $lastname = $_POST['lastname']; }   I have other validation checks that I will be performing, but how secure is the above strictly in terms of escaping data? I also saw that magic quotes will be deprecated in PHP 6. How will that affect the above code? I would prefer not to have to rely on a database-specific escaping function like mysql_real_escape_string(). Where to find the Mac OS X Lion security configuration guide? Term for a person who can read but cannot write I'm looking for a term to accurately describe a person who can only read but cannot write. While I'm primarily concerned with people who have never learned to write, I would also be interested in any additional terms used to represent people who have lost the ability to write as a result of disuse.  Both illiterate and unlettered imply an inability to read as well as to write. I am trying to auto-mount my NFS drives, but it doesn't work too well sadly.  What does work is mounting from CLI:  me@client:/$ sudo mount 192.168.178.4:/mountdir /mnt/mountdir me@client:/$ mount -t nfs 192.168.178.4:/mountdir on /mnt/mountdir type nfs (rw,addr=192.168.178.4)   when I try to add mountdir in the fstab, I cannot mount it due to "protocol not supported" (which seems strange as I can mount it)  $ sudo mount films_d3 mount.nfs: Protocol not supported   So there might be something wrong with my fstab entry. This is my current entry:  192.168.178.4:/mountdir /mnt/mountdir  nfs auto,_netdev,noatime,nolock,bg,nfsvers=4,intr,tcp,actimeo=1800 0 0   During startup I also get this error twice: I was trying to fix the mount-from-fstab first, then worry about that, but nevertheless this might be a different problem:  init: idmapd-mounting (/mnt/kazemat/films_d3) main process (445) killed by TERM signal   This seems to be before the eth0 is initialised, while I thought the "_netdev" option would make the entry wait for the network to be up?  can anywone see the mistake in my fstab entry? $\mathbb R$ has the same cardinality of any interval Suppose $\displaystyle P(x,y)$ a polynomial in the variables $x,y$.   For example, $\displaystyle x^4$ or $\displaystyle x^3y^2 + 3xy + 1$.  Is there a general method which allows us to evaluate the indefinite integral     $$ \int P(\sin x, \cos x) \text{d} x$$   What about the case when $\displaystyle P(x,y)$ is a rational function (i.e. a ratio of two polynomials)?   Example of a rational function: $\displaystyle \frac{x^2y + y^3}{x+y}$.    This is being asked in an effort to cut down on duplicates, see here:   and here: Sometimes you spend a day or more solving a technical problem, and when you finally solve it, you may want to post it on your blog (if you have one) to share with the community.  However, most developers don't have a lot of time to update their blogs, and that is why personal blogs are not ranked very highly on Google/Bing.  So even if you describe a brilliant idea, chances are that, except a few of your friends, nobody will ever find it. This is a common reason why some developers start their blogs and soon give up; it is not interesting to write for the community if you have no feedback on your posts.  Unlike personal blogs, Stack Exchange sites are highly ranked in Google (I was amazed when I saw that a question asked on SO just an hour ago appeared 3rd in my Google search!), so if your question and answer are valuable for others, they will be rated highly and will be visible for other developers.  With this in mind, is it good practice to post a question and answer it yourself immediately when you want to share an idea with the community? I'd like to implement a big int class in C++ as a programming exercise&mdash;a class that can handle numbers bigger than a long int.  I know that there are several open source implementations out there already, but I'd like to write my own.  I'm trying to get a feel for what the right approach is.  I understand that the general strategy is get the number as a string, and then break it up into smaller numbers (single digits for example), and place them in an array.  At this point it should be relatively simple to implement the various comparison operators.  My main concern is how I would implement things like addition and multiplication.  I'm looking for a general approach and advice as opposed to actual working code. How to look up a symbol or identify a letter from a math alphabet or other character? I know what my symbol or character looks like, but I don't know what the command is or which math alphabet it came from. How do I go about finding this out? Where do the bipolar jets of black holes come from? Formula for calculating $\sum_{n=0}^{m}nr^n$