Səhifələr

Blogroll

23 August 2017

Rename SQL Server hostname

To rename a computer that hosts a stand-alone instance of SQL Server For a renamed computer that hosts a default instance of SQL Server, run the following procedures: Copy sp_dropserver ; GO sp_addserver , local; GO Restart the instance of SQL Server. For a renamed computer that hosts a named instance of SQL Server, run the following procedures: Copy sp_dropserver ; GO sp_addserver , local; GO Restart the instance of SQL Server. + ...

08 August 2017

What is the use of the yield keyword in Python? What does it do?

Sual For example, I'm trying to understand this code1: def _get_child_candidates(self, distance, min_dist, max_dist): if self._leftchild and distance - max_dist < self._median: yield self._leftchild if self._rightchild and distance + max_dist >= self._median: yield self._rightchild And this is the caller: result, candidates = list(), [self] while candidates: node = candidates.pop() distance = node._get_dist(obj) if distance <= max_dist and distance >= min_dist: result.extend(node._values) ...

Page 1 of 2512345Next