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?
In the following method definitions, what does the * and ** do for param2?  def foo(param1, *param2): def bar(param1, **param2):
Are there strange attractors whose coordinates are "almost integers"? In the Ubuntu dock on Ubuntu 18.04, multiple windows of the same application are grouped and orange dots are shown to tell you how many windows of the application are opened. When you click on the icon, a small screen capture of each of the windows is shown.  However, these screen captures are shown in an order that's based on which window was last active on the desktop. This is something that clashes with the way I use the dock. I'm used to mentally mapping the windows to their dock positions. As such, I will often be trying to get to "the top one" and then I end up needing several clicks before I actually get to the terminal (or some other application) that I was looking for.  Is there some way to make sure that the order of these screen captures does not change whenever a window becomes active? Modifying Score text in Locate Widget of Flexviewer 2.4? I want to add text where it says "score" to make it more clear that this is an address matching score.    I am using the LocateWidget_US.xml and do not think I can do it here.  I think the place to do it may be in the LocateWidget.mxml in this line????   locateResult.content = getDefaultString("resultScoreText") + " " +   (addrCandidate.score % 1 == 0 ? addrCandidate.score : addrCandidate.score.toFixed(1)); Matching a space in regex I need to match a space character in a PHP regular expression. Anyone got any ideas?  I mean like "gavin schulz", the space in between the two words. I am using a regular expression to make sure that I only allow letters, number and a space. But I'm not sure how to find the space. This is what I have right now:  $newtag = preg_replace("/[^a-zA-Z0-9s|]/", "", $tag); How can we read and write values in a multidimensional array in verilog, i had read in  regarding different operations that can be done on multidimensional array. like if there is a part of code like this  input [15:0] me;  reg [15:0] p_array [7:0]; reg abc_pqr [2:0];  abc_pqr[0] &lt;= me[0]; abc_pqr[1] &lt;= me[1]; abc_pqr[2] &lt;= me[1]; p_array[abc_pqr[0]] &lt;= me[0]; p_array[abc_pqr[1]] &lt;= me[1]; p_array[abc_pqr[2]] &lt;= me[2];   so is this code will work and will not produce any error?  What is the difference between these two while assigning value  "&lt;=" and "=", i had seen "&lt;=" in most of the places during passing values. I am compiling a program which requires boost-thread-mt library. I have installed libboost-all-dev using sudo apt-get install libboost-all-dev but compiler says that it cannot find boost-thread-mt library. Is this library in some other package? Please guide me what i need to install for this. How do I calculate the closest power of 2 or 10 a number is? What is the most efficient way to cacluate the closest power of a 2 or 10 to another number? e.g.  3.5 would return 4 for power of 2 and 1 for power of 10  123 would return 128 for power of 2 and 100 for power of 10  0.24 would return 0.25 for power of 2 and 0.1 for power of 10  I'm just looking for the algorithm and don't mind the language. I have a (symmetric) matrix M that represents the distance between each pair of nodes. For example,       A   B   C   D   E   F   G   H   I   J   K   L A   0  20  20  20  40  60  60  60 100 120 120 120 B  20   0  20  20  60  80  80  80 120 140 140 140 C  20  20   0  20  60  80  80  80 120 140 140 140 D  20  20  20   0  60  80  80  80 120 140 140 140 E  40  60  60  60   0  20  20  20  60  80  80  80 F  60  80  80  80  20   0  20  20  40  60  60  60 G  60  80  80  80  20  20   0  20  60  80  80  80 H  60  80  80  80  20  20  20   0  60  80  80  80 I 100 120 120 120  60  40  60  60   0  20  20  20 J 120 140 140 140  80  60  80  80  20   0  20  20 K 120 140 140 140  80  60  80  80  20  20   0  20 L 120 140 140 140  80  60  80  80  20  20  20   0   Is there any method to extract clusters from M (if needed, the number of clusters can be fixed), such that each cluster contains nodes with small distances between them. In the example, the clusters would be (A, B, C, D), (E, F, G, H) and (I, J, K, L).  I've already tried UPGMA and k-means but the resulting clusters are very bad.  The distances are the average steps a random walker would take to go from node A to node B (!= A) and go back to node A. It's guaranteed that M^1/2 is a metric. To run k-means, I don't use the centroid. I define the distance between node n cluster c as the average distance between n and all nodes in c.  Thanks a lot :) Connect Talend to Salesforce using OAuth JWT Flow I followed the steps exactly mentioned here  for connecting Talend to salesforce.  I have done the configuration in Talend and added the test(sandbox) URL in the advanced setting. I am facing an error while trying to establish the Oauth connection (JWT) between Talend ETL tool and salesforce: {'error':'invalid_grant','error_description':'invalid assertion'} Here is the screenshot of the configuration and error message:   Please help to resolve this issue. Linux network troubleshooting and debugging From time to time Linux and Unix users faced with various network problems. Many of these problems are presented here and at some others troubleshooting forums, but they are very concrete and contains a lot of additional technical information, and sometimes it's rather difficult to understand the main point and the real reason of buggy system behavior.   By asking this question, my intention is to start a community wiki page which allows generalizing our network troubleshooting and debugging experience. I hope the Linux and Unix users could easier recognize and solve("divide and conquer") their network problems using this page.   The parent of this page should be  . But here we should focus on troubleshooting the network problems from user- and kernel-space.  I suppose, if you:    Share the information about using some great network diagnostic tool with concrete usage examples and examples of network bugs, which they help to catch. Share the link to the great network tutorial connected with this subject Tell about a general method or recipe which allows to tackle some class of network problems Share information about your tool-set for network debugging and troubleshooting   it would perfectly fits for this topic.    I'll begin from sharing the link to varios  and . Also  seem to have actual information about our subject. And for diving into linux networking we definetely need to visit . Black artifacts when looking through many transparent objects? Using v2.73, cycles and a very simple scene: an array of cubes, no big deal.   If I set the shader's material to transparent, the cubes in the foreground do become transparent but those far away in the back do not disappear completely and this strange dark things appear (visible in rendered mode and in final renders)    I've played with the clipping distance on the viewport and camera, but I can't figure out how to make those ghosts go away... Novel where pyramids "grow" and change Earth's magnetic field? I read this in (most likely) the 1980s or 1990s. The protagonists found what they believed were alien spacecraft; over time, they &quot;morphed&quot; into Mesoamerican-style pyramids (stepped, not smooth like Egyptian pyramids). Each time they &quot;grew&quot;, an area where electrical equipment either failed or was unreliable grew; the pyramid itself became a new magnetic pole. It turned out that there were a dozen of these objects, spaced to cover the entire world from the corners of an icosahedron; the final morph of the pyramids caused the fields of electrical &quot;disablement&quot; to cover the entire world. What is included in Wolfram Extras? Height of Water 'Splashing' Suppose from a height $H$, I throw a ball of mass $M$ and radius $R$ with initial velocity $u$ into a pool of depth $x$ having a liquid with density $\rho$ and coefficient of viscosity $\eta$.  Upto what height will the Water Splash?   This may be a silly question! (Source : my brain) Assume every condition to be identical with no air resistance. Feel free to assume any other parameters if needed.  P.S. $\rightarrow$ I've see similar questions but some of them want an exact answer and some are not so direct while some are incomplete questions...  Small Note : We do not have to consider the highest 'single' drop... Just assuming almost every water droplet jumped upto a height $h$. Ideal conditions...  Feel free to assume the liquid as WATER if required! Custom post type - posts list - white screen of death i am getting a weird error - white screen in the list of posts for a specific Custom post type (just for that one)   tried deactivating all the plugins tried checking for error (debugging = true)   Still nothing the page just doesnt echos anything... (nothing in source too)  I am talking about such a url in the admin:     Here is register_post_type part i am using:    function register_submodelcpt() {     $labels = array(         'name'                  =&gt; __('Sub Models', THEME_NAME),         'singular_name'         =&gt; __('Sub Models', THEME_NAME),         'add_new'               =&gt; __('New Model', THEME_NAME),         'add_new_item'          =&gt; __('Add new Model', THEME_NAME),         'edit_item'             =&gt; __('Edit Model', THEME_NAME),         'new_item'              =&gt; __('New Model', THEME_NAME),         'all_items'             =&gt; __('All Sub Models', THEME_NAME),         'view_item'             =&gt; __('Watch Model', THEME_NAME),         'search_items'          =&gt; __('Search Models', THEME_NAME),         'not_found'             =&gt;  __('No Models found', THEME_NAME),         'not_found_in_trash'    =&gt; __('No Models found in trash', THEME_NAME),          'parent_item_colon'     =&gt; '',         'menu_name'             =&gt; __('Sub Models', THEME_NAME),      );      $args = array(         'labels'                =&gt; $labels,         'public'                =&gt; true,         'publicly_queryable'    =&gt; true,         'show_ui'               =&gt; true,          'show_in_menu'          =&gt; true,          'query_var'             =&gt; true,         'rewrite'               =&gt; array('slug' =&gt; 'submodels'),         'capability_type'       =&gt; 'post',         'has_archive'           =&gt; true,          'hierarchical'          =&gt; true,         'menu_position'         =&gt; 5,         'menu_icon'             =&gt; get_stylesheet_directory_uri().'/images/cpt/subcars.png',                     'supports'              =&gt; array('title', 'thumbnail', 'revisions', 'page-attributes')     );      register_post_type('submodelscpt',$args); } add_action('init', 'register_submodelcpt');   Did anyone encounter such an issuse? can you think of a reason this might happen?   Another weird thing when i change this:    To this:     The posts list loads correctly... I have a large amount of duplicate records (25.000) in an even larger table (250.000 records). I've done the detection using the reporting function. The criteria I used to detect the duplicates were 3 fields (unique account identifier, unique user identifier and date). Based on a list of criteria, I would like to either merge or delete these records. I've got a handle on the logic associated with the merging and the deleting but what I'm having trouble with is defining the duplicate detection process.   I'm looking at either creating a custom object to take care of the detection or dumping the records into an SQL database and taking care of it offline. Any thoughts on which one of the two is the best approach?  Edit:  After reading the first comment, I think the more appropriate question would be "How do I approach the problem in SOQL".  The object I'm working with is the Event object and I'm really only looking at the standard fields, AccountId, OwnerId and ActivityDate. From what I've found online, there's no easy way to find records that have the same value for these three fields. I think it could be accomplished by nesting SOQL queries but I'd like to use a different approach if at all possible. Doesn't the end of Looper create a time paradox? I guess this is more a question about the nature of time travel more than anything else.  At the end of the movie,      Joe shoots himself in a field and changes the course of history.   Does this create a paradox as it changes the history that led up to that point?      If his future self had never existed he'd never have gone on the mission he did and thus he never would have ended up in the field.   Once he did what he did, he could no longer have done it, and so theoretically, time and space should have just folded in on itself and popped out of existence.  Is there something I'm missing that would explain how the movie could have ended where it did without the events at the beginning to lead it there? Showing that two definitions of $\limsup$ are equivalent Why does extended piston become stuck if air above it is powered? To reproduce this problem make layout like this and then power the piston. Once the piston is extended, removing the power source will not retract it:    Since piston head block is transparent, I see no explanation for this. Also, even if it wasn't transparent, it still wouldn't power a piston. For example this doesn't power the piston:    But if I place redstone and THEN place the piston, it's powered:    It also remains powered no matter what, as long as there isn't a block update event:    I suppose this behavior can be used to make a block update detector, but in my case this sucks. I wanted such setup for automatic smooth stone generator (without any clocks):    But due to this bug, it won't work - the piston will be always extended. Creating a default preamble Since I am using (almost) the same set up for my tex documents, I wonder if there is a way to create a preamble with my default packages and to recall it anytime I want to create a tex document.  If yes, how I can call this "default" preamble?  Thanks in advance