/mdt/ - Code

Code (2 Réponses)

1 .

public static void deleteDups2(LinkedListNode head)

{

if (head == null) return;

LinkedListNode previous = head;

LinkedListNode current = previous.head;

while (current != null)

{

LinkedListNode runner = head;

while (runner != current) // Check for earlier dups

{

if (runner.data == current.data)

{

LinkedListNode tmp = current.next; //remove current

previous.next = tmp;

current = tmp; // update current to next node

break; //all other dups have already been removed

}

runner = runner.next;

}

if (runner == current) // current not updated - update now

{

previous = current;

current = current.next;

}

}

}

2 .

>>1
Pas merci, j'ai bobo tête maintenant.

3 .

ontents
zone_information = get(ONLINE_API_URL + 'domain/' + DOMAIN_ROOT + '/zone', headers = ONLINE_AUTH_HEADER).json()

# Create a new empty zone version
new_version_uuid = post(ONLINE_API_URL + 'domain/' + DOMAIN_ROOT + '/version', data = {
'name': new_zone_version_name
}, headers = ONLINE_AUTH_HEADER).json()['uuid_ref9;]

# Copy the records of the current zone version into the new empty zone version
for record in zone_information:
if record['name'] == record_name and record['type'] == record_type:
continue # Don't have two entries matching the subdomain we are willing to add

assert post(ONLINE_API_URL + 'domain/' + DOMAIN_ROOT + '/version/' + new_version_uuid + '/zone', data = {
'name': record['name'],
'type': record['type'],
'priority': record.get('priority', 0), # Used for MX
'ttl': record['ttl'],
'data': record['data']
}, headers = ONLINE_AUTH_HEADER).json()['id']
Styles : Acrimonie Nuit