So, this equation we get when we find  that makes new hamiltonian=0. There are 4 main transformations: F1(q,Q,t), F2(q,P,t), F3(p,Q,t), F4(p,P,t). On practice and in every book I've seen, we use F2 and F1 to solve Hamilton Jacobi equation, but can we use F3 and F4?
The derivation of the Hamilton-Jacobi equation using canonical transformations is typically done involving a type-2 generating function.  Is it possible to use a another type of generating function, namely type 1, 3 or 4?
How to check if Node connected to another node input in Python I am doing a process to some switch links in materials. I need to know if something is ever linked or not before to process. I can't find out how to :/ The script works well if something is linked only.  import bpy for m in bpy.context.object.material_slots:     mat = m.material     nodes = mat.node_tree.nodes      # get node input (socket)     alphasocket = mat.node_tree.nodes.get("Principled BSDF").inputs[18]     # get node link that connects into the socket     lnk = (link.from_socket for link in mat.node_tree.links if link.to_socket == alphasocket)      #add emission node     emi= nodes.new('ShaderNodeEmission')     emi.name= "emibak"     outepute= mat.node_tree.nodes.get("Material Output").inputs[0]      #make new link destination     #here 's where I cant find out how to check     if lnk != None:         print(mat.name + " alphanod found")        # mat.node_tree.links.new(lnk, emi.inputs[0])     else :         print(mat.name + " alphanod missing")      mat.node_tree.links.new(emi.outputs[0], outepute)     here is another way I am searching...  import bpy  for m in bpy.context.object.material_slots:      mat = m.material     nodes = mat.node_tree.nodes          print("**** Material " + mat.name+ " ****")      for mat_node in mat.node_tree.nodes:         if mat_node.type == 'BSDF_PRINCIPLED':             print("From " + mat_node.name )                         alphasocket = mat_node.inputs[18]             #print(alphasocket)             node_in = mat_node.inputs             #print(node_in)                    for n in alphasocket.links:                                print("Alpha connected to " + n.from_node.name)   This show me what is connected to the alpha channel but if nothing is connected I want to connect a new node. On the three Stack Overflow chat servers, the  page displays the following image:    Is it from an actual episode, or is it a 'shop? I have studied some of Einstein's Theory of General Relativity, and I understand that it states that gravity isn't a force but rather the effects of objects curving space-time. If this is true, then why are we instructed in middle school that it is a force? What spell almost killed Hermione in The Order of the Phoenix? The spell was cast without words, simply a flick of the Death Eater's wand, and a 'streak of purple flame' that lanced across her chest. It was later mentioned that the spell was weakened because of the lack of a verbal component, but still 'did enough damage as it was'. She was in the infirmary healing from the damage for some time. What spell was this? Adding a Method to an Existing Object Instance At the end of the scene in the cemetery in GoF, the spirits who emerged from Voldemort's wand tell Harry to go grab the trophy (which, of course, was a portkey that took Harry and Cedric from the maze to the cemetery), and that the trophy portkey would take Harry back to Hogwarts.  Why would the portkey do that?  Are all the portkeys 2-way?  If possible, I would prefer as much of the answer based on canon (or JKR) as feasible Explode string into array with no empty elements? PHP's explode function returns an array of strings split on some provided substring. It will return empty strings when there are leading, trailing, or consecutive delimiters, like this: var_dump(explode('/', '1/2//3/')); array(5) {   [0]=&gt;   string(1) &quot;1&quot;   [1]=&gt;   string(1) &quot;2&quot;   [2]=&gt;   string(0) &quot;&quot;   [3]=&gt;   string(1) &quot;3&quot;   [4]=&gt;   string(0) &quot;&quot; }  Is there some different function or option or anything that would return everything except the empty strings? var_dump(different_explode('/', '1/2//3/')); array(3) {   [0]=&gt;   string(1) &quot;1&quot;   [1]=&gt;   string(1) &quot;2&quot;   [2]=&gt;   string(1) &quot;3&quot; } I'm using +[NSUserDefaults standardUserDefaults] to store application settings. This consists of roughly a dozen string values. Is it possible to delete these values permanently instead of just setting them to a default value? Asserting that Atheism and Theism are both faith based positions I am recently testing an assertion that I have concluded namely that atheism is a faith based position just like theism is a faith based position.  The reason I arrived at this conclusion is that theists have no proof that God actually exists. It's purely a matter of faith. Yes, there maybe strong implicit proof that God exists in their opinion (scriptures, history, etc) but there is no concrete proof of God's existence. In my view, atheists also suffer from the same problem of providing a proof of their position. Specifically that they cannot prove that God is non-existent.  The typical rebuttal I get is that the burden of proof is on the theists. But I view this as a cop out and they hide behind the wall of burden of proof which is just a bias in the debate.  Given the above, I claim that both atheism and theism are positions based on faith. Would it be incorrect to claim that? What does "$$" mean in the shell? Can QGIS preserve layers when exporting to PDF? How do the Chitauri "ships" propel themselves? In the 2012 The Avengers film, the Chitauri army arrives through the portal along with these big robot alien whale Chitauri dudes. Here's one chasing Iron Man:  These guys basically swim through the air like... giant robot alien whales. I don't see any means of propulsion. Other, more humanoid Chitauri soldiers fly around on things that seem to be mechanical &quot;speeders&quot; of sorts. What are these guys? Are they ships, creatures, or both? Is there an explanation anywhere in the Avengers universe for how they defy gravity and swim through the air? How can I execute a terminal command (like grep) from my Objective-C Cocoa application? Is there word for this, other than know-it-all? Just wondering, if there's a word for:  One who makes it appear as if they're an expert on a subject while there are also signals (subtly or blatantly noticeable) that this person doesn't know very much on the subject or at least as much as they're acting like they do on the subject; pretending to have much knowledge on a subject matter.  I found pedantic but I don't suppose it's the right word. Who can use magic scrolls? I'm confused about who can use scrolls in 5e. In the DMG, p139 under Magic Item Categories: Scrolls, it states that:     Any creature that can understand a written language can read the   arcane script on a scroll and attempt to activate it.   This implies that anyone can try to cast a spell using a scroll. However, on p.200 in the Spell Scroll entry it states that:     If the spell is on your class's spell list, you can use an action to read the scroll and cast its spell without having to provide any of the spell's components. Otherwise, the scroll is unintelligible.   Then there is the bit about a DC 10 + scroll spell level ability check if the spell is higher than a spell slot that you can cast.     If the spell is on your class's spell list but of a higher level than you can normally cast, you must make an ability check using your spellcasting ability to determine whether you cast it successfully. The DC equals 10 + spell's level. On a failed check, the spell disappears from the scroll with no other effect.    So, which is it? Can anyone who can read a language use a scroll (like a fighter) if they make an arcana check, or just a PC with that specific spell in their spell list (only spell casters)? I've been to South Korea a few times already and always enjoy it but I've always had an onward ticket before.  Now I need to fly home from a trip that's lasted over a year, but I still want to take my time and keep my options open.  There's a good choice of cheap flights from Istanbul to Seoul and from Seoul I can't decide yet whether to fly straight home or take a ferry to China, hitchhike to Guangzhou, and get a cheap flight home from there.  I can't really just buy the China-Australia flight now because I'm not sure yet whether I'll be able to get the Chinese visa easily enough or how long my remaining money will last.  I know Korea, like most countries, has rules saying you need an onward ticket, but in my experience many countries never try to verify that you have this ticket unless you fit some profile. So in this instance I would find first-hand knowlegde much more informative that pointers to a government website.  In practice does South Korea admit tourists with one-way tickets? Exporting animation created with animate package Consider the following minimal working example.   It's great to have an animation in pdf format.   But sometimes it would be good to be able to export it into an animated gif or something else (swf, video file, svg?).  How do I achieve this?   Note: I often have animations together with pgfplots.     \documentclass{article}  \usepackage{animate}  \usepackage[active,tightpage]{preview} \PreviewEnvironment{animateinline}  \begin{document}  \begin{center} \fboxsep1mm     \begin{animateinline}[autoplay,loop]{2}     a     \newframe         b     \newframe       c                      \end{animateinline} \end{center}  \end{document}   Remark   The animation is not visible in all PDF viewers. It surely works with a current Adobe Reader. How can I crack a 16 bit hash/CRC/checksum with a large sample set? Is Dragonstone unoccupied after Stannis Baratheon's defeat? Is anything known about Dragonstone after:      Stannis Baratheon is killed in his bid for the Iron Throne?   As the seat of the naval defense of King's Landing and the birthplace of Daenerys Targaryen, she has a vested interest in taking it.   At the conclusion of Season 6 Episode 10, is Dragonstone unoccupied? Shell script to delete directories older than n days