If date of death is specified, set is_deceased to true
17739
def save(self, *args, **kwargs):
        
        if self.date_of_death != None:
            self.is_deceased = True
            
        # Since we often copy and paste names from strange sources, do some basic cleanup
        self.first_name = self.first_name.strip()
        self.last_name = self.last_name.strip()
        self.other_names = self.other_names.strip()
        
        # Call save method
        super(Person, self).save(*args, **kwargs)
936720
function DBDate($d, $isfld = false)
	{
		if (is_string($d)) $d = ADORecordSet::UnixDate($d);
		if (is_object($d)) $ds = $d->format($this->fmtDate);
		else $ds = adodb_date($this->fmtDate,$d);
		return 'TO_DATE('.$ds.",'YYYY-MM-DD')";
	}
1062277
def __die(self, synchronous=False):
        
        already_killed = self.__killed
        self.__killed = True
        if self.__id and not already_killed:
            if self.__exhaust and self.__exhaust_mgr:
                # If this is an exhaust cursor and we haven't completely
                # exhausted the result set we *must* close the socket
                # to stop the server from sending more data.
                self.__exhaust_mgr.sock.close()
            else:
                address = _CursorAddress(
                    self.__address, self.__collection.full_name)
                if synchronous:
                    self.__collection.database.client._close_cursor_now(
                        self.__id, address, session=self.__session)
                else:
                    # The cursor will be closed later in a different session.
                    self.__collection.database.client._close_cursor(
                        self.__id, address)
        if self.__exhaust and self.__exhaust_mgr:
            self.__exhaust_mgr.close()
        if self.__session and not self.__explicit_session:
            self.__session._end_session(lock=synchronous)
            self.__session = None
194475
def set(self, status_item, status):
        
        lg = logging.getLogger("%s.%s" % (self.ln, inspect.stack()[0][3]))
        lg.setLevel(self.log_level)
        sparql = '''
            DELETE {{
                kdr:{0} kds:{1} ?o
            }}
            INSERT {{
                kdr:{0} kds:{1} "{2}"^^xsd:boolean
            }}
            WHERE {{
                OPTIONAL {{ kdr:{0} kds:{1} ?o }}
            }}'''
        return self.conn.query(sparql=sparql.format(self.group,
                                                     status_item,
                                                     str(status).lower()),
                                mode='update')
919199
def should_execute(self):
        """"""
        return self.args.apply and (self.args.no_confirm or self.confirm_execution())
976297
def set(self, instance, value, **kw):
        
        if value:
            try:
                value = DateTime(value)
            except SyntaxError:
                logger.warn("Value '{}' is not a valid DateTime string"
                            .format(value))
                return False

        self._set(instance, value, **kw)
1058310
function DBDate($d,$isfld=false)
	{
		if (empty($d) && $d !== 0) {
			return 'null';
		}

		if ($isfld) {
			$d = _adodb_safedate($d);
			return 'TO_DATE('.$d.",'".$this->dateformat."')";
		}

		if (is_string($d)) {
			$d = ADORecordSet::UnixDate($d);
		}

		if (is_object($d)) {
			$ds = $d->format($this->fmtDate);
		}
		else {
			$ds = adodb_date($this->fmtDate,$d);
		}

		return "TO_DATE(".$ds.",'".$this->dateformat."')";
	}
106309
def set(self, value):
        """"""
        if self.validate(value):
            #print "Parameter " + self.id + " successfully set to " + repr(value)
            self.hasvalue = True
            if isinstance(value, float):
                self.value = round(value)
            else:
                self.value = int(value)
            return True
        else:
            #print "Parameter " + self.id + " COULD NOT BE set to " + repr(value)
            return False
805411
def isalive (self):
        ''' '''

        if self.child_fd == -1:
            return False
        try:
            os.fstat(self.child_fd)
            return True
        except:
            return False
958178
def set(self, key, value, *, expire=0, pexpire=0, exist=None):
        
        if expire and not isinstance(expire, int):
            raise TypeError("expire argument must be int")
        if pexpire and not isinstance(pexpire, int):
            raise TypeError("pexpire argument must be int")

        args = []
        if expire:
            args[:] = [b'EX', expire]
        if pexpire:
            args[:] = [b'PX', pexpire]

        if exist is self.SET_IF_EXIST:
            args.append(b'XX')
        elif exist is self.SET_IF_NOT_EXIST:
            args.append(b'NX')
        fut = self.execute(b'SET', key, value, *args)
        return wait_ok(fut)
27401
function(self, callback) {
  // Cursor is dead but not marked killed, return null
  if (self.cursorState.dead && !self.cursorState.killed) {
    self.cursorState.killed = true;
    setCursorNotified(self, callback);
    return true;
  }

  return false;
}
908200
def check_required(self):
        
        die = False
        for key, value in self.spec.items():
            if not getattr(self, key.upper()) and value['required']:
                print(f"{key} is a required setting. "
                      "Set via command-line params, env or file. "
                      "For examples, try '--generate' or '--help'.")
                die = True
        if die:
            sys.exit(1)
190157
public final void setWholeDay(Boolean isWholeDay) {

        m_isWholeDay = (null != isWholeDay) && isWholeDay.equals(Boolean.TRUE);

    }
710257
def __die(self, synchronous=False):
        
        if self.__id and not self.__killed:
            if self.__exhaust and self.__exhaust_mgr:
                # If this is an exhaust cursor and we haven't completely
                # exhausted the result set we *must* close the socket
                # to stop the server from sending more data.
                self.__exhaust_mgr.sock.close()
            else:
                address = _CursorAddress(
                    self.__address, self.__collection.full_name)
                if synchronous:
                    self.__collection.database.client._close_cursor_now(
                        self.__id, address)
                else:
                    self.__collection.database.client.close_cursor(
                        self.__id, address)
        if self.__exhaust and self.__exhaust_mgr:
            self.__exhaust_mgr.close()
        self.__killed = True
121689
public function hasStatementForDate($date)
    {
        if (is_string($date)) {
            $date = new \DateTime($date);
        }

        return null !== $this->getStatementForDate($date);
    }
464953
public boolean isPostDeathEvent(final Attribute event) {
        if ("Burial".equals(event.getString())) {
            return true;
        }
        if ("Cremation".equals(event.getString())) {
            return true;
        }
        if ("Funeral".equals(event.getString())) {
            return true;
        }
        return "Headstone unveiling".equals(event.getString());
    }
1274530
def p_if_statement_woelse(self, p):
        ''
        p[0] = IfStatement(p[3], p[5], None, lineno=p.lineno(1))
        p.set_lineno(0, p.lineno(1))