@AndrasDeak ah the realism, someone commented this: In the game there was a thunderstorm. The land-line phone rings. Player goes to answer the call - it was a lightning ringing and he dies.
@AndrasDeak sounds like Hungary already: prime minister called the national broadcaster and silenced them from making news about his possible corruption.
cv-pls resource request stackoverflow.com/questions/40885915/… Some people are un-yamming-believable. Maybe the OP wants to write code that analyses the performance / behaviour of an existing the AI, but still...
@CodeIdenti The reason for our rule on not linking your fresh question here is so we don't get people here spending energy working on an answer independently from people doing the same thing on the main site, since that leads to pointless duplication of effort, and that effort should all be happening in the comments & answers on the main site.
@poke Sadly, we can't dupe-hammer to a deleted target. :) And he's just deleted the new one. So there's not much we can do. Presumably, if he keeps behaving like this he'll get a question ban.
I suppose what I should have done with that pydot question is to have posted my comment as an answer, so it could've been upvoted to prevent deletion. Oh well.
The question wasn't good, but it's conceivable that someone else will encounter the same bug. OTOH, I guess a better solution would've been to look for a suitable dupe target re Python 2.6 requiring a field name in format.
@BhargavRao Well, we don't need to CV, since the OP's now deleted the duplicate. But I suspect that the OP will repeat this behaviour in the future if he doesn't like the response he gets to his question. Is there a standard way to alert the mods to this, or will the system track that sort of thing automatically?
Nope, Not really. I remember a meta post about that. But yep, the user will soon be que banned if they continue to do so. I'll try to fetch that meta post now.
@AnttiHaapala I'm glad you're following suit. Does that silencing work? Here we've evolved: they don't even need to call down, everybody censors themselves, it's encoded on a cellular level in many of my people
Today I wrote an answer saying "you need to do X", then researched some more and edited it to "you need to do X and also Y", then researched some more and edited it to "you need to do Y". Turns out X is neither necessary nor sufficient to do the needful, and yet the only upvote I got during this whole process was when my answer was wrong.
I've never used SOAP before and I'm sort of new to Python. I'm doing this to get myself acquainted with both technologies. I've installed SOAPlib and I've tried to read their Client documentation, but I don't understand it too well. Is there anything else I can look into which is more suited f...
@poke which is funny, because in hungarian, we say "jo napot" (~have a nice day), and when you shorten it in real life conversations, you would say "'pot"
@AndrasDeak the speech of PM in a nutshell: PM doesn't feel having done anything wrong, still believes in the management of national broadcaster (that silenced a journalist), he has the right to protect his family and relatives, because it has been so hard, and things move from facts to feelings...
@Theo This may not be relevant if your object is a tree, but you can get that behaviour by making the class iterable:
class Test:
def __init__(self, a, b, c):
self.a = a; self.b = b; self.c = c
def __iter__(self):
yield from (self.a, self.b, self.c)
t = Test('one', 'two', 'three')
a, b, c = t
print(a, b, c)
#output
one two three
"In an email sent to an Yle reporter late Friday evening, Sipilä said that his confidence in Yle was "zero". On Wednesday he said that "my confidence in Yle is quite ok"."
I have a function who seek 'href's from a web page
from HTMLParser import HTMLParser
class MyHTMLParser(HTMLParser):
def handle_starttag(self, tag, attrs): # Only parse the 'anchor' tag. if tag == "a": # Check the list of defined attributes. for name, value in attrs: # If href is defined, print it. if name == "href": print name, "=", value
from HTMLParser import HTMLParser
class MyHTMLParser(HTMLParser):
def handle_starttag(self, tag, attrs):
# Only parse the 'anchor' tag.
if tag == "a":
# Check the list of defined attributes.
for name, value in attrs:
# If href is defined, print it.
if name == "href":
print name, "=", value
parser = MyHTMLParser()
parser.feed(your_html_string)
@IsabelCariod You could write handlers for start and end tags that sets an attribute isInsideHeadTag to true or false, whenever a head tag starts or ends. Then you can change if tag == "a": to if tag == "a" and isInsideHeadTag:
Although if it's for tags other than head, it becomes trickier, because then you can have multiple nested tags...
A simple isInsideSpanTag bool won't suffice if a span can be inside another span
You'd need like, a spanDepth int to tell you how many spans you're inside.
Alternatively, you could install BeautifulSoup, which I'm willing to bet has a powerful enough selector syntax to allow you to easily query "all A tags inside a span tag"
basically, whenever you encounter an a tag, store that information (I’m using a counter here to make sure you can nest those tags multiple levels), and then check when you encounter a span whether you are inside a already. And whenever you see the closing tag, make sure to go “out” of the a tag again.
You've got to be careful when you recommend a third party library, the question-asker might be running their code on an integrated environment with no internet access. Like a toaster. Well, some toasters have internet access.
Yeah, just saying that “anything more complex than this” might justify pulling in a library to handle all the edge cases that will ultimately come up (because HTML is messy).
@poke I mean on the array prototype, like Array.prototype.replace(findFunction, replacement), which is like a combination of findIndex and splice with a callback
If you ran poke's code exactly as it appears here, it's because there's no statements in the elif block. At the very least, you need a pass in there for it to parse.
@IsabelCariod The code poke provided is not fully functional. It's a main idea of what to do. There is no code in the elif in the previous method. That is why you are getting that error. Kevin'd....Kevin'd hard
@Isabel ^ what Kevin said. Basically, you still need to replace those # a-tag handling and # span-tag inside a-tag handling and fill in your actual code you want to run in these cases
Because JS did not have a solid base base base standard library since its creation. It’s only very recently that it has been expanded with common use cases.
== Français ==
=== Étymologie ===
(Adjectif, Nom commun 1) (1389) Déverbal de chagriner [1] (1450) pour le substantif. Étant donné la rareté des adjectifs déverbaux de verbe, on peut aussi imaginer un composé de cha-, ca- et de l’ancien français grain (« chagrin, affligé, triste »).
(Nom commun 2) (XVIe siècle) Première attestation sous la forme peau de sagrin ; du turc sağrı (« croupe d'un animal, la peau qu'on en prépare ») avec évolution de \s\ vers \ʃ\ sous l’influence du précédent.
=== Adjectif ===
chagrin \ʃa.ɡʁɛ̃\
Qui éprouve du déplaisir, de la tristesse.
André est chagrin de l...