Similar python list is giving different print layout

This is from Udacity’s Algorithm course and it was about graph DFS representation.

# answer code     def dfs_helper(self, start_node):         ret_list = [start_node.value]         start_node.visited = True         edges_out = [e for e in start_node.edges                      if e.node_to.value != start_node.value]         for edge in edges_out:             if not edge.node_to.visited:                 ret_list.extend(self.dfs_helper(edge.node_to))         return ret_list # printed: ['London', 'Shanghai', 'Mountain View', 'San Francisco', 'Berlin', 'Sao Paolo'] 
# my modify     def dfs_helper(self, start_node):         ret_list = [start_node.value]         # Your code here         start_node.visited = True         edges_out = [e for e in start_node.edges if not e.node_to.visited] # only difference         for e in edges_out:             ret_list.extend(self.dfs_helper(e.node_to))         return ret_list # printed: # [ 'London', #  'Shanghai', #  'Mountain View', #  'San Francisco', #  'Berlin', #  'Sao Paolo', #  'San Francisco', #  'Berlin', #  'Sao Paolo'] 

It seems so weird, so I even checked it’s data type and if I could access it with index, but everything was fine, but I still have no idea why the printed result is formated differently.

Interface with similar methods

I’m currently taking over a project that has a common pattern of interfaces like this:

public interface EmailService {   void sendInvitationEmail(Payload payload);   void sendNotificationEmailToAdmin(Payload payload);   void sendPasswordResetEmailToUser(User user);   void sendValidationEmailToNewUser(User user); } 

Then the implementation gets injected with many different services and repositories to collect the necessary relations that are needed to have every piece of information. I feel like this could be an interface with a single method:

public interface EmailService {    void sendEmail(String recipient, EmailContext context); } 

But then I would often end up having multiple implementations injected into a single class that would send different types of emails, which also smells. Am I overthinking this? What’s the preferred way to go about this?

How can a company tell if my password is similar to the previous 5 passwords?

Closely related (but not a duplicate): Company can tell if new and old passwords are too similar. Is there a security problem?

Also closely related (but not a duplicate): How can a system enforce a minimum number of changed characters in passwords, without storing or processing old passwords in cleartext?

A particular company (I won’t say which one) requires that my password not be similar to any of the previous 5 passwords.

According to the linked questions, when they check to see if your password is too similar to the previous one, they just force you to enter both the old and new password and compare them that way. I understand that, and there doesn’t appear to be any security problem with that.

However, the company in question actually compares my password to the previous 5 passwords, none of which I enter. How might they be doing this? Should I take this as evidence that they’re either storing my passwords in plaintext or that they’re using a really weak hashing function, or is there a legitimate way that they could do that without potentially compromising my password?

The linked answer in the second linked question briefly alludes to this issue but doesn’t really fully address how they might be doing this or how big of a security concern it is.

How does ZFS snapshots work and how would I implement a retention policy similar to OpenSolaris’?

I’ve been using ZFS for a while and have snapshots piling up.

I believe I can start deleting the old snapshots, but want to be doubly sure. A ZFS snapshot would be essentially similar to a git tag where it is a read-only reference to a point in time version of the repository. The active data set would be HEAD and would remain unaffected if I delete a pointer to that point in time?

So, if that is the case, then if I want to have a 30-day retention policy, I can merely look at the creation date for the snapshot and discard anything > 30 days?

Are those assumptions accurate?

Thanks,

Walter

Do Artificers, Archivists, and similar classes have any way to exploit the transmuter’s Spell Versatility?

From Unearthed Arcana, specialist transmuters can gain the following:

Spell Versatility (Ex)

A 5th-level transmuter using this variant can adapt magic of other schools to his own style of spellcasting. For every five class levels that the transmuter gains, he can select one spell of any spell level that he has access to and treat it as if it were a transmutation spell. This means, for example, that the specialist can learn the spell normally and even prepare it as a bonus spell from the transmutation school. This spell can even be from a school that he has chosen as a prohibited school. Once a spell is chosen to be affected by this ability, it cannot be changed.

The example text describes this as a convenient way for a transmuter to obtain spells from schools that they have prohibited and I have little doubt that it’s handy for giving spells some boosts from whatever bonuses to transmutation that you happen to have. However, does this ability have any use for classes that are not Wizards, but can obtain their spells? For example, I struggle to imagine that there’s not some sort of Artificer, Archivists, Spell-to-Power Erudite, or even Advanced Learning exploit for this. Are their any tricks this can lead to this ability giving a class that really shouldn’t have a certain spell access to said spell?

Note: Although it may be relevant and answers related to it would be accepted, this isn’t intended as a question about multi-classing. My interest is mostly in what the optimization consequences of say, having a non-enchantment version of Charm Person existing or being able to make or access such a modified spell in scroll form.

IA Structures Similar to Salesforce?

Scenario:
I’m working on the information architecture a new product that in many respects has the same design considerations as Salesforce; a platform that has it’s own core functionality, but the user may buy additional “modules” or “apps.”

The attached images show Salesforce’s solution to this scenario; Salesforce has a persistent global navigation related to it’s core functionality, but there’s also an “App Launcher” where the user can navigate in and out of the apps they’ve subscribed to.

I’m guessing their logic is as follows: if every time the user subscribes to a new module/app it gets layered into the global side-navigation, the navigation will quickly become cumbersome and overloaded. Better to segregate these other apps from the global navigation in the “App Launcher” screen.

Question:
Salesforce’s model is one way to handle the above scenario. I’m curious if anyone can think of other platforms that have implemented different design solutions for similar scenarios.


Fig 1: Salesforce Dashboard Salesforce Dashboard
Fig 2: App Launcher: a screen with all the apps the user subscribes to enter image description here

How can I use ARRAYFORMULA (or something similar) with GOOGLETRANSLATE?

I’m learning a new language and I recently discovered Google Sheets’ GOOGLETRANSLATE function. I thought it’d be neat to have a personal dictionary of translations which I can even annotate. So I created a simple sheet that translates words from column A in column B. So far so good.

The problem is I can’t tell Google Sheets to “translate every cell in column A to column B”. I used ARRAYFORMULA but it doesn’t work as expected. =ArrayFormula(GOOGLETRANSLATE(A2:A,"en","de")) only results to

only B2 is translated, not everything else

As you can see, only B2 is translated, not everything else.

FWIW, dragging the fill handle down still works but I want an endless dictionary of such translations. I created the sheet on the webapp but I use it primarily via the Android app. I want to just type the word in column A and get its translation. Unfortunately, if the fill handle even works in mobile, I don’t know how to trigger it. (And I know this forum is for webapps so I’m going to stop right there.)

What service to use to create an audio chat bridge similar to Talky.io but just audio

I want to create a small audio chat bridge that works in the following way:

[Person A] and [Person B] go to http://www.mybridge.com/pass1234 and both of them can talk (just audio). I’m not interested on video.

Only two persons can talk at the same time. If [Person C] goes to the same url above, then he/she won’t be able to enter on the conversation.

Talky.io: https://talky.io does something very similar but with audio and video but I only want audio.

By the way, is there any online service that allow you to do that for free?

If I’m not wrong, Chatroulette uses or used to use: Stratus Beta.

Any idea on how to achieve this in the most cheaper way as possible?

Thanks!