Performance – Run to see if the tribe in Golang has been merged

I have some code to check if any listed branches have already been merged with master src-d / go-git.v4 Library.

It goes through the commits in the master and then compares the head of the various branches with the commit. If it fits, it means the branch has already been merged with the master.

merged Branches: = make ([]String, 0)

err = masterCommits.ForEach (func (commit * object.Commit) error {
for branchName, branchHead: = range remoteBranchHeads {
if (branchHead.String () == commit.Hash.String ()) && (branchName! = "origin / master") {
log.Infof ("branch% s (% s) was found in the master and merged!  n", branchName, branchHead)
mergedBranches = attach (mergedBranches, branchName)
come back

if wrong! = null {
fmt.Sprintf ("Finding merged commits failed:", err)

This works fine, but loops in loops always make me uncomfortable, and it's not very performant when a repo has many branches and many commits in the master.

My question is: is there a cleaner way to do that? And would using Channels / Goroutines improve performance? I'm relatively new to Golang, so I have not really learned how to use it correctly.

finite automata – How to minimize this DFA with already merged states?

The original non-deterministic FSA that I have is:


After converting to a DFA, I get:


When I use the Myhill Nerode theorem for the current DFA, I get all the pairs marked, so this is already minimized. But I think that's wrong.

I want to minimize this DFA. How do I do that with the Myhill Nerode theorem, since some states are already merged?

dnd 5e – Can a druid choose to wear certain equipment while other gear is merged or dropped when in Wild Shape?

When a druid enters Wild Shape, can some items of equipment choose while merging or dropping other pieces of equipment?

For example, if the player forms wildly into a baboon, could he decide to cling to his staff and still wear bracers while putting their clothes together, etc.?

How can multiple PowerPoint files be merged into a SharePoint list?

I have a document library in a SharePoint 2016 site. There are several Powerpoint files (pptx files) in this library. I would like to add a button to the website. When users click this button, these pptx files are merged into a pptx file.
The problem is that I can not use Sharepoint Designer to develop much, or can not do much on the server due to fixed policies. I can only write some JavaScript Web Parts.

Can someone make a suggestion in my case?

I also see in the SharePoint 2010 version a slide library, with the pptx files can be merged. Can I write some lines of JavaScript to call functions used in the 2016 Slide Library?

Many Thanks!

Info-Visualization – When will data be merged into one form?

1. Where is this step in the whole process?

If this is a time-critical task (for example, if someone is talking to the customer on the phone and waiting times are best avoided), the solution is to display a pop-up with a message that shows all other customer data related to the detected duplicate (as confirmation that it is indeed a duplicate). The main action was to cancel the creation of a new customer or to update the customer data (to open the page with the customer data) and to display these customers on another tab.

2. Are coincidences common or is it a marginal case?

For common "coincidences," you can rename the main action to "Create anyway" to indicate a deliberate decision to create a duplicate (for example, a company-approved phone or a sales email, but different names).

In this design, the fields that would require a match are already the first ones (email and phone numbers), so it is a good thing to show this early in the registration process.

Example of a solution below

quick sketch of a solution


Due to the tab order, I think the best position for the action is & # 39; Cancel & # 39; stands behind the primary button. Most users will enter data and then type the next field – there is no need to add an extra tab.

high sierra – The backspace left by the bootcamp can not be merged

So, I'm uninstalling Windows 10 with Bootcamp, but now I've got this free space that I can not rejoin. I have tried everything that has already been answered in this forum for these kinds of questions, since starting in recovery mode the & # 39; sudo diskutil apfs resizeContainer / dev / disk0s2 0
# Command on the terminal

When I tried to do it in a better ability, I got the following error
Enter the image description here

When I try to execute the command to change the partition size, the following error appears:
Enter the image description here

Here is an additional picture of my command to discuss the list:
Enter the image description here

And my discussion
Enter the image description here

Any proposal ? I use High Sierra version 10.13.6

Facebook page can not be merged because "merge is pending"

I'm in the process of merging some duplicate Facebook pages, but I come across the following issue of some pages:

When I ask for a merge, I get an error message The merge can not be performed because a merge is pending,

However, I'm pretty sure it's the first merge request (at least for some of the pages) and if I'm in the Page Settings> Inbox I do not see a connection request pending.

I see that quite a few people have come across this situation, but I could not find a reason for it or find a way to fix it. Do you have any insights?

Hard disk partitions can not be merged or OSX reinstalled

I have 1 SSD disk in MacBook Pro Mid 2009 with 2 partitions and would like to do a clean install.

So .. with the Disk Utility I deleted both partitions (OS X Extended – Journaled). So far, so good. Now I wanted to merge both partitions, and when I do that I get "Operation failed .. disk could not hang". When I click Done, both partitions will not be deployed.

When I try to merge partitions again, I get an immediate error message "The volume Macintosh HDD 1 is not a journal. To enable the journal, click on" Journal Enable "on the" File "menu. I did that but no luck Still the same mistake.

So I gave up merging partitions and tried to install OS X. But no luck. There is no partition that you can select during the installation process. Only the recovery partition is visible.

I've tried removing disks from the terminal using diskutil, but none of the partitions can be detached.

Please help me! Many Thanks.

Mac OS Sierra – Previous time machine partition can not be merged to external hard drive

I use I have an external hard drive with two partitions. One partition was used to store files and the other for Time Machine. Now I have a new hard drive that I only use for Time Machine. In the first disk I just want to delete the Time Machine partition and merge its empty space in the other partition.

The problem is that I was able to use the Disk Utility to delete the content in the Time Machine partition, but I can not merge it. The minus sign that I would normally use to remove a partition is greyed out and displays the message "You can not remove the first volume from disk".

I read that diskutil It may work from the command line, but I'm not sure how.
this is that diskutil Output:

~ ❯❯❯ discussil list disk2
/ dev / disk2 (external, physical):
0: GUID_partition_scheme * 2.0 TB floppy disk2
1: EFI EFI 209.7 MB disk2s1
2: Apple_HFS Time Machine backup 750.0 GB disk2s2
3: Apple_HFS files 1.2 TB disk2s3