text:
package containerserver

import (
	"crypto/md5"
	"database/sql"
	"encoding/base64"
	"encoding/hex"
	"encoding/json"
	"errors"
	"fmt"
	"io"
	"io/ioutil"
	"math"
	"os"
	"path"
	"path/filepath"
	"strconv"
	"strings"
	"sync"
	"sync/atomic"
	"time"

	"github.com/mattn/go-sqlite3"
	"github.com/troubling/hummingbird/common"
	"github.com/troubling/hummingbird/common/fs"
	"github.com/troubling/hummingbird/common/pickle"
)

const (
	maxQueryArgs       = 990
	maxOpenConns       = 2
	maxIdleConns       = 2
	pendingCap         = 131072
	maxMetaCount       = 90
	maxMetaOverallSize = 4096
)

var infoCacheTimeout = time.Second * 10

func chexor(old, name, timestamp string) string {
	oldDigest, err := hex.DecodeString(old)
	if err != nil {
		panic(fmt.Sprintf("Error decoding hex: %v", err))
	}
	h := md5.New()
	if _, err := io.WriteString(h, name+"-"+timestamp); err != nil {
		panic("THIS SHOULD NEVER HAPPEN")
	}
	digest := h.Sum(nil)
	for i := range digest {
		digest[i] ^= oldDigest[i]
	}
	return hex.EncodeToString(digest)
}

func init() {
	// register our sql driver with user-defined chexor function
	sql.Register("sqlite3_hummingbird",
		&sqlite3.SQLiteDriver{
			ConnectHook: func(conn *sqlite3.SQLiteConn) error {
				if err := conn.RegisterFunc("chexor", chexor, true); err != nil {
					return err
				}
				if _, err := conn.Exec(pragmaScript, nil); err != nil {
					return err
				}
				if _, err := conn.Exec(`CREATE TEMPORARY VIEW IF NOT EXISTS maxrowid (max) AS
				  						SELECT IFNULL(MAX(seq), -1) FROM sqlite_sequence WHERE name='object'`, nil); err != nil {
					return err
				}
				return nil
			},
		},
	)
}

// SqliteContainer wraps a connection to the underlying database and provides all of the operations on that database.
type sqliteContainer struct {
	connectLock sync.Mutex
	*sql.DB
	containerFile       string
	hasDeletedNameIndex bool
	infoCache           atomic.Value
	ringhash            string
}

var _ Container = &sqliteContainer{}

func (db *sqliteContainer) connect() error {
	db.connectLock.Lock()
	defer db.connectLock.Unlock()
	if db.DB != nil {
		return nil
	}
	dbConn, err := sql.Open("sqlite3_hummingbird", "file:"+db.containerFile+"?psow=1&_txlock=immediate&mode=rw")
	if err != nil {
		if common.IsCorruptDBError(err) {
			return fmt.Errorf("Failed to open: %v; %v", err, common.QuarantineDir(path.Dir(db.containerFile), 4, "containers"))
		}
		return fmt.Errorf("Failed to open: %v", err)
	}
	dbConn.SetMaxOpenConns(maxOpenConns)
	dbConn.SetMaxIdleConns(maxIdleConns)
	hasDeletedNameIndex, err := schemaMigrate(dbConn)
	if err != nil {
		db.closeAlreadyLocked()
		if common.IsCorruptDBError(err) {
			return fmt.Errorf("Error migrating database: %v; %v", err, common.QuarantineDir(path.Dir(db.containerFile), 4, "containers"))
		}
		return fmt.Errorf("Error migrating database: %v", err)
	}
	db.hasDeletedNameIndex = hasDeletedNameIndex
	db.DB = dbConn
	return nil
}

// GetInfo returns the container's information as a ContainerInfo struct.
func (db *sqliteContainer) GetInfo() (*ContainerInfo, error) {
	if err := db.connect(); err != nil {
		return nil, err
	}
	if err := db.flush(); err != nil {
		return nil, err
	}
	if _, err := db.Exec("DELETE FROM object WHERE expires < ?", time.Now().Unix()); err != nil {
		return nil, err
	}
	if info, ok := db.infoCache.Load().(*ContainerInfo); ok && !info.invalid && time.Since(info.updated) < infoCacheTimeout {
		return info, nil
	}
	info := &ContainerInfo{updated: time.Now()}
	row := db.QueryRow(`SELECT cs.account, cs.container, cs.created_at, cs.put_timestamp,
							cs.delete_timestamp, cs.status_changed_at,
							cs.object_count, cs.bytes_used,
							cs.reported_put_timestamp, cs.reported_delete_timestamp,
							cs.reported_object_count, cs.reported_bytes_used, cs.hash,
							cs.id, cs.x_container_sync_point1, cs.x_container_sync_point2,
							cs.storage_policy_index, cs.metadata, maxrowid.max
						FROM container_stat cs, maxrowid`)
	if err := row.Scan(&info.Account, &info.Container, &info.CreatedAt, &info.PutTimestamp,
		&info.DeleteTimestamp, &info.StatusChangedAt, &info.ObjectCount,
		&info.BytesUsed, &info.ReportedPutTimestamp, &info.ReportedDeleteTimestamp,
		&info.ReportedObjectCount, &info.ReportedBytesUsed, &info.Hash,
		&info.ID, &info.XContainerSyncPoint1, &info.XContainerSyncPoint2,
		&info.StoragePolicyIndex, &info.RawMetadata, &info.MaxRow); err != nil {
		if common.IsCorruptDBError(err) {
			return nil, fmt.Errorf("Failed to GetInfo: %v; %v", err, common.QuarantineDir(path.Dir(db.containerFile), 4, "containers"))
		}
		return nil, err
	}
	if info.RawMetadata == "" {
		info.Metadata = make(map[string][]string)
	} else if err := json.Unmarshal([]byte(info.RawMetadata), &info.Metadata); err != nil {
		return nil, err
	}
	db.infoCache.Store(info)
	return info, nil
}

func (db *sqliteContainer) invalidateCache() {
	db.infoCache.Store(&ContainerInfo{invalid: true})
}

// IsDeleted returns true if the container is deleted - if its delete timestamp is later than its put timestamp.
func (db *sqliteContainer) IsDeleted() (bool, error) {
	info, err := db.GetInfo()
	if err != nil {
		return false, err
	}
	return info.DeleteTimestamp > info.PutTimestamp, nil
}

// Delete sets the container's deleted timestamp and tombstones any metadata older than that timestamp.
// This may or may not make the container "deleted".
func (db *sqliteContainer) Delete(timestamp string) error {
	if err := db.connect(); err != nil {
		return err
	}
	tx, err := db.Begin()
	if err != nil {
		return err
	}
	defer tx.Rollback()
	var metastr string
	var metadata map[string][]string
	if err := tx.QueryRow("SELECT metadata FROM container_info").Scan(&metastr); err != nil {
		if common.IsCorruptDBError(err) {
			return fmt.Errorf("Failed to Delete SELECT: %v; %v", err, common.QuarantineDir(path.Dir(db.containerFile), 4, "containers"))
		}
		return err
	}
	if err := json.Unmarshal([]byte(metastr), &metadata); err != nil {
		return err
	}
	for key, value := range metadata {
		if value[1] < timestamp {
			metadata[key] = []string{"", timestamp}
		}
	}
	serializedMetadata, err := json.Marshal(metadata)
	if err != nil {
		return err
	}
	if _, err = tx.Exec("UPDATE container_info SET delete_timestamp = ?, metadata = ?", timestamp, string(serializedMetadata)); err != nil {
		if common.IsCorruptDBError(err) {
			return fmt.Errorf("Failed to Delete UPDATE: %v; %v", err, common.QuarantineDir(path.Dir(db.containerFile), 4, "containers"))
		}
		return err
	}
	defer db.invalidateCache()
	if err := tx.Commit(); err != nil {
		if common.IsCorruptDBError(err) {
			return fmt.Errorf("Failed to Delete Commit: %v; %v", err, common.QuarantineDir(path.Dir(db.containerFile), 4, "containers"))
		}
		return err
	}
	return nil
}

// MergeItems merges ObjectRecords into the container.  If a remote id is provided (incoming replication), the incoming_sync table is updated.
func (db *sqliteContainer) MergeItems(records []*ObjectRecord, remoteID string) error {
	if err := db.connect(); err != nil {
		return err
	}
	type recordID struct {
		policy int
		name   string
	}
	names := make([]interface{}, len(records))
	existing := make(map[recordID]*ObjectRecord)
	toAdd := make(map[recordID]*ObjectRecord)
	tx, err := db.Begin()
	if err != nil {
		return err
	}
	defer tx.Rollback()
	for i, record := range records {
		names[i] = record.Name
	}
	for i := 0; i < len(records); i += maxQueryArgs {
		j := i + maxQueryArgs
		if j > len(records) {
			j = len(records)
		}
		batch := names[i:j]
		query := ""
		if db.hasDeletedNameIndex {
			query = fmt.Sprintf("SELECT name, storage_policy_index, created_at, ROWID FROM object WHERE deleted IN (0, 1) AND name IN (%s)",
				strings.TrimRight(strings.Repeat("?,", len(batch)), ","))
		} else {
			query = fmt.Sprintf("SELECT name, storage_policy_index, created_at, ROWID FROM object WHERE name IN (%s)",
				strings.TrimRight(strings.Repeat("?,", len(batch)), ","))
		}
		rows, err := tx.Query(query, batch...)
		if err != nil {
			if common.IsCorruptDBError(err) {
				return fmt.Errorf("Failed to MergeItems SELECT: %v; %v", err, common.QuarantineDir(path.Dir(db.containerFile), 4, "containers"))
			}
			return err
		}
		for rows.Next() {
			var name, timestamp string
			var rowid int64
			var policy int
			if err := rows.Scan(&name, &policy, &timestamp, &rowid); err != nil {
				if common.IsCorruptDBError(err) {
					return fmt.Errorf("Failed to MergeItems SELECT Scan: %v; %v", err, common.QuarantineDir(path.Dir(db.containerFile), 4, "containers"))
				}
				return err
			}
			existing[recordID{policy, name}] = &ObjectRecord{CreatedAt: timestamp, Rowid: rowid}
		}
		if err := rows.Err(); err != nil {
			if common.IsCorruptDBError(err) {
				return fmt.Errorf("Failed to MergeItems SELECT Err: %v; %v", err, common.QuarantineDir(path.Dir(db.containerFile), 4, "containers"))
			}
			return err
		}
		if err := rows.Close(); err != nil {
			if common.IsCorruptDBError(err) {
				return fmt.Errorf("Failed to MergeItems SELECT Close: %v; %v", err, common.QuarantineDir(path.Dir(db.containerFile), 4, "containers"))
			}
			return err
		}
	}

	dst, err := tx.Prepare("DELETE FROM object WHERE ROWID=?")
	if err != nil {
		return err
	}
	defer dst.Close()

	ast, err := tx.Prepare("INSERT INTO object (name, created_at, size, content_type, etag, deleted, storage_policy_index, expires) VALUES (?, ?, ?, ?, ?, ?, ?, ?)")
	if err != nil {
		return err
	}
	defer ast.Close()

	var maxRowid int64 = -1
	for _, record := range records {
		if record.Rowid > maxRowid {
			maxRowid = record.Rowid
		}
		rid := recordID{record.StoragePolicyIndex, record.Name}
		if alreadyIn, ok := toAdd[rid]; !ok || record.CreatedAt > alreadyIn.CreatedAt {
			current, inExisting := existing[rid]
			if inExisting && current.CreatedAt < record.CreatedAt {
				if _, err := dst.Exec(current.Rowid); err != nil {
					if common.IsCorruptDBError(err) {
						return fmt.Errorf("Failed to MergeItems DELETE: %v; %v", err, common.QuarantineDir(path.Dir(db.containerFile), 4, "containers"))
					}
					return err
				}
				delete(existing, rid)
				toAdd[rid] = record
			} else if !inExisting {
				toAdd[rid] = record
			}
		}
	}

	for _, record := range toAdd {
		if _, err := ast.Exec(record.Name, record.CreatedAt, record.Size, record.ContentType, record.ETag, record.Deleted, record.StoragePolicyIndex, record.Expires); err != nil {
			if common.IsCorruptDBError(err) {
				return fmt.Errorf("Failed to MergeItems INSERT: %v; %v", err, common.QuarantineDir(path.Dir(db.containerFile), 4, "containers"))
			}
			return err
		}
	}

	if remoteID != "" && maxRowid > -1 {
		if _, err := tx.Exec(`UPDATE incoming_sync SET sync_point = ? WHERE remote_id = ?;
							  INSERT INTO incoming_sync (remote_id, sync_point) SELECT ?, ? WHERE changes() == 0;`,
			maxRowid, remoteID, remoteID, maxRowid); err != nil {
			if common.IsCorruptDBError(err) {
				return fmt.Errorf("Failed to MergeItems UPDATE: %v; %v", err, common.QuarantineDir(path.Dir(db.containerFile), 4, "containers"))
			}
			return err
		}
	}

	defer db.invalidateCache()
	if err := tx.Commit(); err != nil {
		if common.IsCorruptDBError(err) {
			return fmt.Errorf("Failed to MergeItems Commit: %v; %v", err, common.QuarantineDir(path.Dir(db.containerFile), 4, "containers"))
		}
		return err
	}
	return nil
}

func indexAfter(s, sep string, after int) int {
	index := strings.Index(s[after:], sep)
	if index == -1 {
		return -1
	}
	return index + after
}

func updateRecord(rec *ObjectListingRecord) error {
	f, err := strconv.ParseFloat(rec.LastModified, 64)
	if err != nil {
		return err
	}
	whole, nans := math.Modf(f)
	rec.LastModified = time.Unix(int64(whole), int64(nans*1.0e9)).In(common.GMT).Format("2006-01-02T15:04:05.000000")

	rec.ContentType, rec.Size, err = common.ParseContentTypeForSlo(
		rec.ContentType, rec.Size)
	return err
}

// ListObjects implements object listings.  Path is a string pointer because behavior is different for empty and missing path query parameters.
func (db *sqliteContainer) ListObjects(limit int, marker string, endMarker string, prefix string, delimiter string,
	pth *string, reverse bool, storagePolicyIndex int) ([]interface{}, error) {
	if err := db.connect(); err != nil {
		return nil, err
	}
	var point, pointDirection, queryTail, queryStart string

	if pth != nil {
		if *pth != "" {
			p := strings.TrimRight(*pth, "/") + "/"
			pth = &p
		}
		delimiter = "/"
		prefix = *pth
	}
	if db.hasDeletedNameIndex {
		queryStart = "SELECT name, created_at, size, content_type, etag FROM object WHERE deleted = 0 AND"
	} else {
		queryStart = "SELECT name, created_at, size, content_type, etag FROM object WHERE +deleted = 0 AND"
	}
	if reverse {
		marker, endMarker = endMarker, marker
		queryTail = "ORDER BY name DESC LIMIT ?"
		pointDirection = "name < ?"
	} else {
		queryTail = "ORDER BY name LIMIT ?"
		pointDirection = "name > ?"
	}

	results := []interface{}{}
	queryArgs := make([]interface{}, 8)
	wheres := make([]string, 8)
	gotResults := true

	for len(results) < limit && gotResults {
		wheres := append(wheres[:0], "storage_policy_index == ?")
		queryArgs := append(queryArgs[:0], storagePolicyIndex)
		if prefix != "" {
			wheres = append(wheres, "name BETWEEN ? AND ?")
			queryArgs = append(queryArgs, prefix, prefix+"\xFF")
		}
		if marker != "" {
			wheres = append(wheres, "name > ?")
			queryArgs = append(queryArgs, marker)
		}
		if endMarker != "" {
			wheres = append(wheres, "name < ?")
			queryArgs = append(queryArgs, endMarker)
		}
		if point != "" {
			wheres = append(wheres, pointDirection)
			queryArgs = append(queryArgs, point)
		}
		rows, err := db.Query(queryStart+" "+strings.Join(wheres, " AND ")+" "+queryTail,
			append(queryArgs, limit-len(results))...)
		if err != nil {
			if common.IsCorruptDBError(err) {
				return nil, fmt.Errorf("Failed to ListObjects SELECT: %v; %v", err, common.QuarantineDir(path.Dir(db.containerFile), 4, "containers"))
			}
			return nil, err
		}
		gotResults = false
		for rows.Next() && len(results) < limit {
			gotResults = true
			record := &ObjectListingRecord{}
			if err := rows.Scan(&record.Name, &record.LastModified, &record.Size, &record.ContentType, &record.ETag); err != nil {
				if common.IsCorruptDBError(err) {
					return nil, fmt.Errorf("Failed to ListObjects Scan: %v; %v", err, common.QuarantineDir(path.Dir(db.containerFile), 4, "containers"))
				}
				return nil, err
			}
			point = record.Name
			if delimiter != "" {
				if pth != nil && record.Name == *pth {
					continue
				}
				end := indexAfter(record.Name, delimiter, len(prefix))
				if end >= 0 && (pth == nil || len(record.Name) > end+1) {
					dirName := record.Name[:end] + delimiter
					if reverse {
						point = record.Name[:end+len(delimiter)]
					} else {
						point = dirName + "\xFF"
					}
					if pth == nil && dirName != marker {
						results = append(results, &SubdirListingRecord{Name2: dirName, Name: dirName})
					}
					break
				}
			}
			if err := updateRecord(record); err != nil {
				return nil, err
			}
			results = append(results, record)
		}
		if err := rows.Err(); err != nil {
			if common.IsCorruptDBError(err) {
				return nil, fmt.Errorf("Failed to ListObjects Err: %v; %v", err, common.QuarantineDir(path.Dir(db.containerFile), 4, "containers"))
			}
			return nil, err
		}
		rows.Close()
		if delimiter == "" && pth == nil {
			break
		}
	}
	return results, nil
}

// NewID sets the container's ID to a new, random string.
func (db *sqliteContainer) NewID() error {
	if err := db.connect(); err != nil {
		return err
	}
	tx, err := db.Begin()
	if err != nil {
		return err
	}
	defer tx.Rollback()
	_, err = tx.Exec(`INSERT OR REPLACE INTO incoming_sync (remote_id, sync_point)
					  SELECT container_info.id, maxrowid.max FROM container_info, maxrowid`)
	if err != nil {
		return err
	}
	if _, err = tx.Exec("UPDATE container_info SET id = ?", common.UUID()); err != nil {
		return err
	}
	defer db.invalidateCache()
	return tx.Commit()
}

// ItemsSince returns (count) object records with a rowid greater than (start).
func (db *sqliteContainer) ItemsSince(start int64, count int) ([]*ObjectRecord, error) {
	db.flush()
	records := []*ObjectRecord{}
	rows, err := db.Query(`SELECT ROWID, name, created_at, size, content_type, etag, deleted, storage_policy_index, expires
						   FROM object WHERE ROWID > ? ORDER BY ROWID ASC LIMIT ?`, start, count)
	if err != nil {
		if common.IsCorruptDBError(err) {
			return nil, fmt.Errorf("Failed to ItemsSince SELECT: %v; %v", err, common.QuarantineDir(path.Dir(db.containerFile), 4, "containers"))
		}
		return nil, err
	}
	for rows.Next() {
		r := &ObjectRecord{}
		if err := rows.Scan(&r.Rowid, &r.Name, &r.CreatedAt, &r.Size, &r.ContentType, &r.ETag, &r.Deleted, &r.StoragePolicyIndex, &r.Expires); err != nil {
			if common.IsCorruptDBError(err) {
				return nil, fmt.Errorf("Failed to ItemsSince Scan: %v; %v", err, common.QuarantineDir(path.Dir(db.containerFile), 4, "containers"))
			}
			return nil, err
		}
		records = append(records, r)
	}
	if err := rows.Err(); err != nil {
		if common.IsCorruptDBError(err) {
			return nil, fmt.Errorf("Failed to ItemsSince Err: %v; %v", err, common.QuarantineDir(path.Dir(db.containerFile), 4, "containers"))
		}
		return nil, err
	}
	rows.Close()
	return records, nil
}

// GetMetadata returns the current container metadata as a simple map[string]string, i.e. it leaves out tombstones and timestamps.
func (db *sqliteContainer) GetMetadata() (map[string]string, error) {
	info, err := db.GetInfo()
	if err != nil {
		return nil, err
	}
	metadata := make(map[string]string)
	for key, value := range info.Metadata {
		if value[0] != "" {
			metadata[key] = value[0]
		}
	}
	return metadata, nil
}

func (db *sqliteContainer) mergeMetas(a map[string][]string, b map[string][]string, deleteTimestamp string) (string, error) {
	newMeta := map[string][]string{}
	for k, v := range a {
		newMeta[k] = v
	}
	for k, v := range b {
		if existing, ok := a[k]; ok {
			if existing[1] < v[1] {
				newMeta[k] = v
			}
		} else {
			newMeta[k] = v
		}
	}
	metaSize := 0
	metaCount := 0
	for k, v := range newMeta {
		if deleteTimestamp != "" && v[1] < deleteTimestamp {
			newMeta[k] = []string{"", deleteTimestamp}
		} else if v[0] != "" && strings.HasPrefix(strings.ToLower(k), "x-container-meta-") {
			metaSize += len(k) - 17
			metaSize += len(v[0])
			metaCount++
		}
	}
	if metaCount > maxMetaCount || metaSize > maxMetaOverallSize {
		return "", ErrorInvalidMetadata
	}
	serMeta, err := json.Marshal(newMeta)
	if err != nil {
		return "", err
	}
	return string(serMeta), nil
}

// UpdateMetadata merges the current container metadata with new incoming metadata.
func (db *sqliteContainer) UpdateMetadata(newMetadata map[string][]string, timestamp string) error {
	if err := db.connect(); err != nil {
		return err
	}
	if len(newMetadata) == 0 {
		return nil
	}
	tx, err := db.Begin()
	if err != nil {
		return err
	}
	defer tx.Rollback()
	var metadataValue, deleteTimestamp string
	if err := tx.QueryRow("SELECT metadata, delete_timestamp FROM container_info").Scan(&metadataValue, &deleteTimestamp); err != nil {
		if common.IsCorruptDBError(err) {
			return fmt.Errorf("Failed to UpdateMetadata SELECT: %v; %v", err, common.QuarantineDir(path.Dir(db.containerFile), 4, "containers"))
		}
		return err
	}
	var existingMetadata map[string][]string
	if metadataValue == "" {
		existingMetadata = map[string][]string{}
	} else if err := json.Unmarshal([]byte(metadataValue), &existingMetadata); err != nil {
		return err
	}
	metastr, err := db.mergeMetas(existingMetadata, newMetadata, deleteTimestamp)
	if err != nil {
		return err
	}
	if _, err = tx.Exec("UPDATE container_info SET metadata=?, put_timestamp=MAX(put_timestamp, ?)", metastr, timestamp); err != nil {
		if common.IsCorruptDBError(err) {
			return fmt.Errorf("Failed to UpdateMetadata UPDATE: %v; %v", err, common.QuarantineDir(path.Dir(db.containerFile), 4, "containers"))
		}
		return err
	}
	defer db.invalidateCache()
	if err := tx.Commit(); err != nil {
		if common.IsCorruptDBError(err) {
			return fmt.Errorf("Failed to UpdateMetadata Commit: %v; %v", err, common.QuarantineDir(path.Dir(db.containerFile), 4, "containers"))
		}
		return err
	}
	return nil
}

// MergeSyncTable updates the container's current incoming_sync table records.
func (db *sqliteContainer) MergeSyncTable(records []*SyncRecord) error {
	if err := db.connect(); err != nil {
		return err
	}
	tx, err := db.Begin()
	if err != nil {
		return err
	}
	defer tx.Rollback()
	for _, record := range records {
		if _, err := tx.Exec(`UPDATE incoming_sync SET sync_point = ? WHERE remote_id = ?;
							  INSERT INTO incoming_sync (remote_id, sync_point) SELECT ?, ? WHERE changes() == 0;`,
			record.SyncPoint, record.RemoteID, record.RemoteID, record.SyncPoint); err != nil {
			if common.IsCorruptDBError(err) {
				return fmt.Errorf("Failed to MergeSyncTable UPDATE: %v; %v", err, common.QuarantineDir(path.Dir(db.containerFile), 4, "containers"))
			}
			return err
		}
	}
	if err := tx.Commit(); err != nil {
		if common.IsCorruptDBError(err) {
			return fmt.Errorf("Failed to MergeSyncTable Commit: %v; %v", err, common.QuarantineDir(path.Dir(db.containerFile), 4, "containers"))
		}
		return err
	}
	return nil
}

// CleanupTombstones removes any expired tombstoned objects or metadata.
func (db *sqliteContainer) CleanupTombstones(reclaimAge int64) error {
	if err := db.connect(); err != nil {
		return err
	}
	now := float64(time.Now().UnixNano()) / 1000000000.0
	reclaimTimestamp := common.CanonicalTimestamp(now - float64(reclaimAge))

	tx, err := db.Begin()
	if err != nil {
		return err
	}
	defer tx.Rollback()
	if _, err = tx.Exec("DELETE FROM object WHERE deleted=1 AND created_at < ?", reclaimTimestamp); err != nil {
		if common.IsCorruptDBError(err) {
			return fmt.Errorf("Failed to CleanupTombstones DELETE: %v; %v", err, common.QuarantineDir(path.Dir(db.containerFile), 4, "containers"))
		}
		return err
	}
	var metastr string
	if err := tx.QueryRow("SELECT metadata FROM container_info").Scan(&metastr); err != nil {
		if common.IsCorruptDBError(err) {
			return fmt.Errorf("Failed to CleanupTombstones SELECT: %v; %v", err, common.QuarantineDir(path.Dir(db.containerFile), 4, "containers"))
		}
		return err
	}
	var metadata map[string][]string
	updated := false
	if metastr == "" {
		metadata = map[string][]string{}
		updated = true
	} else {
		if err := json.Unmarshal([]byte(metastr), &metadata); err != nil {
			return err
		}
		for k, v := range metadata {
			if v[0] == "" {
				if ts, err := common.GetEpochFromTimestamp(v[1]); err != nil || ts < reclaimTimestamp {
					delete(metadata, k)
					updated = true
				}
			}
		}
	}
	if updated {
		if mb, err := json.Marshal(metadata); err != nil {
			return err
		} else if _, err = tx.Exec("UPDATE container_info SET metadata = ?", string(mb)); err != nil {
			if common.IsCorruptDBError(err) {
				return fmt.Errorf("Failed to CleanupTombstones UPDATE: %v; %v", err, common.QuarantineDir(path.Dir(db.containerFile), 4, "containers"))
			}
			return err
		}
	}
	defer db.invalidateCache()
	if err := tx.Commit(); err != nil {
		if common.IsCorruptDBError(err) {
			return fmt.Errorf("Failed to CleanupTombstones Commit: %v; %v", err, common.QuarantineDir(path.Dir(db.containerFile), 4, "containers"))
		}
		return err
	}
	return nil
}

// SyncTable returns the container's current incoming_sync table, and also includes the current container's id and max row as an entry.
func (db *sqliteContainer) SyncTable() ([]*SyncRecord, error) {
	if err := db.connect(); err != nil {
		return nil, err
	}
	records := []*SyncRecord{}
	rows, err := db.Query(`SELECT sync_point, remote_id FROM incoming_sync
						   WHERE remote_id NOT IN (SELECT id FROM container_info)
						   UNION
						   SELECT maxrowid.max AS sync_point, container_info.id AS remote_id
						   FROM container_info, maxrowid`)
	if err != nil {
		if common.IsCorruptDBError(err) {
			return nil, fmt.Errorf("Failed to SyncTable SELECT: %v; %v", err, common.QuarantineDir(path.Dir(db.containerFile), 4, "containers"))
		}
		return nil, err
	}
	for rows.Next() {
		rec := &SyncRecord{}
		if err := rows.Scan(&rec.SyncPoint, &rec.RemoteID); err != nil {
			if common.IsCorruptDBError(err) {
				return nil, fmt.Errorf("Failed to SyncTable Scan: %v; %v", err, common.QuarantineDir(path.Dir(db.containerFile), 4, "containers"))
			}
			return nil, err
		}
		records = append(records, rec)
	}
	if err := rows.Err(); err != nil {
		if common.IsCorruptDBError(err) {
			return nil, fmt.Errorf("Failed to SyncTable Err: %v; %v", err, common.QuarantineDir(path.Dir(db.containerFile), 4, "containers"))
		}
		return nil, err
	}
	rows.Close()
	return records, nil
}

// SyncRemoteData compares a remote container's info to the local info and updates any necessary replication bookkeeping, returning the current container's info.
func (db *sqliteContainer) SyncRemoteData(maxRow int64, hash, id, createdAt, putTimestamp, deleteTimestamp, metadata string) (*ContainerInfo, error) {
	if err := db.connect(); err != nil {
		return nil, err
	}
	tx, err := db.Begin()
	if err != nil {
		return nil, err
	}
	defer tx.Rollback()
	var localMeta, localHash, localDeleteTimestamp string
	var localPoint int64
	if err := tx.QueryRow("SELECT hash, metadata, delete_timestamp FROM container_info").Scan(&localHash, &localMeta, &localDeleteTimestamp); err != nil {
		if common.IsCorruptDBError(err) {
			return nil, fmt.Errorf("Failed to SyncRemoteData SELECT: %v; %v", err, common.QuarantineDir(path.Dir(db.containerFile), 4, "containers"))
		}
		return nil, err
	}
	var lm, rm map[string][]string
	if err := json.Unmarshal([]byte(metadata), &rm); err != nil {
		return nil, err
	}
	if err := json.Unmarshal([]byte(localMeta), &lm); err != nil {
		return nil, err
	}
	if deleteTimestamp > localDeleteTimestamp {
		localDeleteTimestamp = deleteTimestamp
	}
	metastr, err := db.mergeMetas(lm, rm, localDeleteTimestamp)
	if _, err = tx.Exec(`UPDATE container_info SET created_at=MIN(?, created_at), put_timestamp=MAX(?, put_timestamp),
	  					 delete_timestamp=MAX(?, delete_timestamp), metadata=?`,
		createdAt, putTimestamp, deleteTimestamp, metastr); err != nil {
		if common.IsCorruptDBError(err) {
			return nil, fmt.Errorf("Failed to SyncRemoteData UPDATE: %v; %v", err, common.QuarantineDir(path.Dir(db.containerFile), 4, "containers"))
		}
		return nil, err
	}
	if err := tx.QueryRow("SELECT IFNULL(MAX(sync_point), -1) FROM incoming_sync WHERE remote_id = ?", id).Scan(&localPoint); err != nil {
		if common.IsCorruptDBError(err) {
			return nil, fmt.Errorf("Failed to SyncRemoteData SELECT2: %v; %v", err, common.QuarantineDir(path.Dir(db.containerFile), 4, "containers"))
		}
		return nil, err
	}
	if localHash == hash && maxRow > localPoint {
		localPoint = maxRow
		if _, err = tx.Exec("INSERT OR REPLACE INTO incoming_sync (remote_id, sync_point) VALUES (?, ?)", id, localPoint); err != nil {
			if common.IsCorruptDBError(err) {
				return nil, fmt.Errorf("Failed to SyncRemoteData INSERT: %v; %v", err, common.QuarantineDir(path.Dir(db.containerFile), 4, "containers"))
			}
			return nil, err
		}
	}
	if err := tx.Commit(); err != nil {
		if common.IsCorruptDBError(err) {
			return nil, fmt.Errorf("Failed to SyncRemoteData Commit: %v; %v", err, common.QuarantineDir(path.Dir(db.containerFile), 4, "containers"))
		}
		return nil, err
	}
	db.invalidateCache()
	info, err := db.GetInfo()
	if err != nil {
		return nil, err
	}
	info.Point = localPoint
	return info, nil
}

// CheckSyncLink makes sure the database's container sync symlink exists or doesn't exist, as in accordance with the existence of the X-Container-Sync-To header.
func (db *sqliteContainer) CheckSyncLink() error {
	metadata, err := db.GetMetadata()
	if err != nil {
		return err
	}
	containersDir := filepath.Dir(filepath.Dir(filepath.Dir(filepath.Dir(db.containerFile))))
	deviceDir := filepath.Dir(containersDir)
	pathFromDataDir, err := filepath.Rel(containersDir, db.containerFile)
	if err != nil {
		return err
	}
	symLoc := filepath.Join(deviceDir, "sync_containers", pathFromDataDir)
	if metadata["X-Container-Sync-To"] != "" {
		if fs.Exists(symLoc) {
			return nil
		}
		if err := os.MkdirAll(filepath.Dir(symLoc), 0755); err != nil {
			return err
		}
		return os.Symlink(db.containerFile, symLoc)
	} else if fs.Exists(symLoc) {
		for err := error(nil); err == nil; symLoc = filepath.Dir(symLoc) {
			err = os.Remove(symLoc)
		}
	}
	return nil
}

// OpenDatabaseFile blocks updates and opens the underlying database file for reading, so it can be uploaded to a remote server.
func (db *sqliteContainer) OpenDatabaseFile() (*os.File, func(), error) {
	if err := db.connect(); err != nil {
		return nil, nil, err
	}
	var fp *os.File
	if _, err := db.Exec(`
		PRAGMA locking_mode = EXCLUSIVE;      -- grab and hold a shared lock
		SELECT 1 FROM container_info LIMIT 1; -- it doesn't actually lock until you hit the database
		PRAGMA wal_checkpoint(TRUNCATE);      -- truncate the wal file, if it exists`,
	); err != nil {
		if common.IsCorruptDBError(err) {
			return nil, nil, fmt.Errorf("Failed to OpenDatabaseFile: %v; %v", err, common.QuarantineDir(path.Dir(db.containerFile), 4, "containers"))
		}
		return nil, nil, fmt.Errorf("Error locking database%s: %v", db.containerFile, err)
	}
	cleanup := func() {
		db.Exec(`
			PRAGMA locking_mode = NORMAL;         -- release shared lock
			SELECT 1 FROM container_info LIMIT 1; -- actually release shared lock
		`)
		if fp != nil {
			fp.Close()
		}
	}
	// make sure there aren't any journals lying around
	if stat, err := os.Stat(db.containerFile + "-wal"); err == nil && stat.Size() != 0 {
		cleanup()
		return nil, nil, fmt.Errorf("Stubborn wal file still exists: %s", db.containerFile)
	}
	if stat, err := os.Stat(db.containerFile + "-journal"); err == nil && stat.Size() != 0 {
		cleanup()
		return nil, nil, fmt.Errorf("Stubborn journal file still exists: %s", db.containerFile)
	}
	fp, err := os.Open(db.containerFile)
	if err != nil {
		fp = nil
		cleanup()
		return nil, nil, fmt.Errorf("Error opening %s: %v", db.containerFile, err)
	}
	return fp, cleanup, nil
}

// ID returns the container's ring hash as a unique identifier for it.
func (db *sqliteContainer) ID() string {
	return db.ringhash
}

// RingHash returns the container's ring hash as a string.
func (db *sqliteContainer) RingHash() string {
	return db.ringhash
}

func (db *sqliteContainer) flushAlreadyLocked() error {
	if err := db.connect(); err != nil {
		return err
	}
	if stat, err := os.Stat(db.containerFile + ".pending"); err != nil || stat.Size() == 0 {
		return nil
	}
	contents, err := ioutil.ReadFile(db.containerFile + ".pending")
	if err != nil || len(contents) == 0 {
		if os.IsNotExist(err) {
			return nil
		}
		return err
	}
	var records []*ObjectRecord
	for _, base64ed := range strings.Split(string(contents), ":") {
		if len(base64ed) < 1 {
			continue
		}
		serialized, err := base64.StdEncoding.DecodeString(base64ed)
		if err != nil {
			continue
		}
		if serialized[0] == '{' {
			rec := &ObjectRecord{}
			if err = json.Unmarshal(serialized, &rec); err == nil {
				records = append(records, rec)
			} else {
				return fmt.Errorf("Invalid commit pending json record")
			}
		} else {
			r, err := pickle.PickleLoads(serialized)
			if err != nil {
				continue
			}
			record, ok := r.([]interface{})
			if !ok || len(record) < 7 {
				return fmt.Errorf("Invalid commit pending record")
			}
			casts := make([]bool, 7)
			var deleted, policy int64
			rec := &ObjectRecord{}
			rec.Name, casts[0] = record[0].(string)
			rec.CreatedAt, casts[1] = record[1].(string)
			rec.Size, casts[2] = record[2].(int64)
			rec.ContentType, casts[3] = record[3].(string)
			rec.ETag, casts[4] = record[4].(string)
			deleted, casts[5] = record[5].(int64)
			policy, casts[6] = record[6].(int64)
			rec.Deleted = int(deleted)
			rec.StoragePolicyIndex = int(policy)
			for i := 0; i < 7; i++ {
				if !casts[i] {
					return fmt.Errorf("Invalid commit pending record")
				}
			}
			records = append(records, rec)
		}
	}
	err = db.MergeItems(records, "")
	if err == nil {
		err = os.Truncate(db.containerFile+".pending", 0)
	}
	return err
}

func (db *sqliteContainer) flush() error {
	lock, err := fs.LockPath(filepath.Dir(db.containerFile), 10*time.Second)
	if err != nil {
		return err
	}
	defer lock.Close()
	return db.flushAlreadyLocked()
}

func (db *sqliteContainer) addObject(name string, timestamp string, size int64, contentType string, etag string, deleted int, storagePolicyIndex int, expires string) error {
	lock, err := fs.LockPath(filepath.Dir(db.containerFile), 10*time.Second)
	if err != nil {
		return err
	}
	defer lock.Close()
	rec := ObjectRecord{
		Name:               name,
		CreatedAt:          timestamp,
		Size:               size,
		ContentType:        contentType,
		ETag:               etag,
		Deleted:            deleted,
		StoragePolicyIndex: storagePolicyIndex,
		Expires:            &expires,
	}
	if expires == "" {
		rec.Expires = nil
	}
	file, err := os.OpenFile(db.containerFile+".pending", os.O_RDWR|os.O_APPEND|os.O_CREATE, 0644)
	if err != nil {
		return err
	}
	defer file.Close()
	marshalled, err := json.Marshal(&rec)
	if err != nil {
		return err
	}
	if _, err := file.WriteString(":" + base64.StdEncoding.EncodeToString(marshalled)); err != nil {
		return err
	}
	if info, err := file.Stat(); err == nil && info.Size() > pendingCap {
		db.flushAlreadyLocked()
	}
	return nil
}

// PutObject adds an object to the container, by way of pending file.
func (db *sqliteContainer) PutObject(name string, timestamp string, size int64, contentType string, etag string, storagePolicyIndex int, expires string) error {
	return db.addObject(name, timestamp, size, contentType, etag, 0, storagePolicyIndex, expires)
}

// DeleteObject removes an object from the container, by way of pending file.
func (db *sqliteContainer) DeleteObject(name string, timestamp string, storagePolicyIndex int) error {
	return db.addObject(name, timestamp, 0, "", "", 1, storagePolicyIndex, "")
}

// Close closes the underlying sqlite database connection.
func (db *sqliteContainer) Close() error {
	db.connectLock.Lock()
	defer db.connectLock.Unlock()
	return db.closeAlreadyLocked()
}

func (db *sqliteContainer) closeAlreadyLocked() error {
	if db.DB != nil {
		err := db.DB.Close()
		db.DB = nil
		return err
	}
	return nil
}

func sqliteCreateExistingContainer(db Container, putTimestamp string, newMetadata map[string][]string, policyIndex, defaultPolicyIndex int) (bool, error) {
	cdb, ok := db.(*sqliteContainer)
	if !ok {
		return false, errors.New("Unable to work with non-sqliteContainer")
	}
	if err := cdb.connect(); err != nil {
		return false, err
	}
	tx, err := cdb.Begin()
	if err != nil {
		return false, err
	}
	defer tx.Rollback()
	var cDeleteTimestamp, cPutTimestamp, cMetadata string
	var cPolicyIndex int
	row := tx.QueryRow("SELECT put_timestamp, delete_timestamp, storage_policy_index, metadata FROM container_info")
	if err := row.Scan(&cPutTimestamp, &cDeleteTimestamp, &cPolicyIndex, &cMetadata); err != nil {
		if common.IsCorruptDBError(err) {
			return false, fmt.Errorf("Failed to sqliteCreateExistingContainer SELECT: %v; %v", err, common.QuarantineDir(path.Dir(cdb.containerFile), 4, "containers"))
		}
		return false, err
	}
	if cDeleteTimestamp <= cPutTimestamp { // not deleted
		if policyIndex < 0 {
			policyIndex = cPolicyIndex
		} else if cPolicyIndex != policyIndex {
			return false, ErrorPolicyConflict
		}
	} else { // deleted
		if policyIndex < 0 {
			policyIndex = defaultPolicyIndex
		}
	}
	var existingMetadata map[string][]string
	if cMetadata == "" {
		existingMetadata = make(map[string][]string)
	} else if err := json.Unmarshal([]byte(cMetadata), &existingMetadata); err != nil {
		return false, err
	}
	metastr, err := cdb.mergeMetas(existingMetadata, newMetadata, cDeleteTimestamp)
	if err != nil {
		return false, err
	}
	if _, err := tx.Exec("UPDATE container_info SET put_timestamp = ?, storage_policy_index = ?, metadata = ?",
		putTimestamp, policyIndex, metastr); err != nil {
		if common.IsCorruptDBError(err) {
			return false, fmt.Errorf("Failed to sqliteCreateExistingContainer UPDATE: %v; %v", err, common.QuarantineDir(path.Dir(cdb.containerFile), 4, "containers"))
		}
		return false, err
	}
	defer cdb.invalidateCache()
	if err := tx.Commit(); err != nil {
		if common.IsCorruptDBError(err) {
			return false, fmt.Errorf("Failed to sqliteCreateExistingContainer Commit: %v; %v", err, common.QuarantineDir(path.Dir(cdb.containerFile), 4, "containers"))
		}
		return false, err
	}
	return (cDeleteTimestamp > cPutTimestamp && putTimestamp > cDeleteTimestamp), nil
}

func sqliteCreateContainer(containerFile string, account string, container string, putTimestamp string,
	metadata map[string][]string, policyIndex int) error {
	var serializedMetadata []byte
	var err error

	hashDir := filepath.Dir(containerFile)
	if err := os.MkdirAll(hashDir, 0755); err != nil {
		return err
	}
	lock, err := fs.LockPath(filepath.Dir(hashDir), 10*time.Second)
	if err != nil {
		return err
	}
	defer lock.Close()

	if fs.Exists(containerFile) {
		return nil
	}

	if metadata == nil {
		serializedMetadata = []byte("{}")
	} else if serializedMetadata, err = json.Marshal(metadata); err != nil {
		return err
	}

	tfp, err := ioutil.TempFile(hashDir, ".newdb")
	if err != nil {
		return err
	}
	if err := tfp.Chmod(0644); err != nil {
		return err
	}
	defer tfp.Close()
	tempFile := tfp.Name()
	dbConn, err := sql.Open("sqlite3_hummingbird", "file:"+tempFile+"?psow=1&_txlock=immediate&mode=rwc")
	if err != nil {
		return err
	}
	defer dbConn.Close()
	tx, err := dbConn.Begin()
	if err != nil {
		return err
	}
	defer tx.Rollback()
	if _, err := tx.Exec(objectTableScript + policyStatTableScript + policyStatTriggerScript +
		containerInfoTableScript + containerStatViewScript + syncTableScript); err != nil {
		return err
	}
	if _, err := tx.Exec(`INSERT INTO container_info (account, container, created_at, id, put_timestamp,
						  status_changed_at, storage_policy_index, metadata) VALUES (?, ?, ?, ?, ?, ?, ?, ?)`,
		account, container, common.GetTimestamp(), common.UUID(), putTimestamp,
		putTimestamp, policyIndex, string(serializedMetadata)); err != nil {
		return err
	}
	if _, err := tx.Exec("INSERT INTO policy_stat (storage_policy_index) VALUES (?)", policyIndex); err != nil {
		return err
	}
	if err := tx.Commit(); err != nil {
		return err
	}
	if err := os.Rename(tempFile, containerFile); err != nil {
		return err
	}
	return nil
}

func sqliteOpenContainer(containerFile string) (ReplicableContainer, error) {
	if !fs.Exists(containerFile) {
		return nil, ErrorNoSuchContainer
	}
	db := &sqliteContainer{
		containerFile:       containerFile,
		hasDeletedNameIndex: false,
		ringhash:            filepath.Base(filepath.Dir(containerFile)),
	}
	return db, nil
}

func (db *sqliteContainer) Reported(putTimestamp, deleteTimestamp string, objectCount, bytesUsed int64) error {
	if err := db.connect(); err != nil {
		return err
	}
	tx, err := db.Begin()
	if err != nil {
		return err
	}
	defer tx.Rollback()
	if _, err = tx.Exec("UPDATE container_info SET reported_put_timestamp = ?, reported_delete_timestamp = ?, reported_object_count = ?, reported_bytes_used = ?", putTimestamp, deleteTimestamp, objectCount, bytesUsed); err != nil {
		if common.IsCorruptDBError(err) {
			return fmt.Errorf("Failed to Reported UPDATE: %v; %v", err, common.QuarantineDir(path.Dir(db.containerFile), 4, "containers"))
		}
		return err
	}
	defer db.invalidateCache()
	if err := tx.Commit(); err != nil {
		if common.IsCorruptDBError(err) {
			return fmt.Errorf("Failed to Reported Commit: %v; %v", err, common.QuarantineDir(path.Dir(db.containerFile), 4, "containers"))
		}
		return err
	}
	return nil
}

redpajama_set_name: RedPajamaGithub


text:
Best Wishes for 2022!
Edited & Posted by the Editor | 6:35 AM | View the original post
National Press Club of Washington elects Jen Judson of Defense News as its 115th President.
Photo: Miss. Jed Judson of Defense News elected President of the National Press Club.
WASHINGTON, December 30, 2021 — Jen Judson, the land warfare reporter for Defense News, was elected as the 115th president of the National Press Club on Friday, December 10, 2021. She will officially assume the duties of the presidency in January 2022.
Judson delivered her acceptance remarks among fellow members at the Press Club, acknowledging the delight of being able to celebrate and gather in person once again:
"I have found the Club to be a haven of both inspiration and camaraderie in good times and bad, and my goal as President is to ensure this continues for all members. I also look forward to new members with a new, diverse array of attributes that will contribute to the continued success of the institution, especially as the nature of journalism rapidly evolves."
As a faithful Press Club member for nearly a decade, Judson looks to continue the Club's dedication to the field of journalism by supporting reporters day-to-day and upholding a significant pillar of our democracy.
"This coming year, as pandemic problems slowly fade, I hope we can sharpen our focus on matters of press freedom. As we know, the pandemic has only contributed to polarizing the public's view of the press worldwide and has aided in the degradation of global press freedom. I hope to double down on Club efforts to promote a free press, help protect the press in danger, and repair public trust. To make headway on these goals will require time, hard work, and a lot of help from our membership," Jed said.
As the land warfare reporter at Defense News for over six years, Judson has navigated the complicated bureaucracy of the Pentagon and Capitol Hill. In addition, she brings her previous experience tackling the challenges of reporting in smaller communities at local newspapers. She won the National Press Club's best analytical reporting award in 2014 and was named the Defense Media Awards' best young defense journalist in 2018. Judson had previously served as Club Secretary on the board, and later, as vice president to Lisa Nicole Matthews, the outgoing President.
"The Club has a solid leader in Jen Judson and her leadership team in continued uncertain times. I look forward to continued work with her and our membership," said Matthews.
Judson holds a master of science degree in print journalism from Boston University and a bachelor of arts degree from Kenyon College.
An inaugural gala is scheduled early in 2022 for the Club's new President.
Additional results of Friday's Club election include Eileen Drage O'Reilly (Axios) as vice president; Michael Balsamo (The Associated Press) as secretary; Emily Wilkins (Bloomberg) as treasurer; and Gillian Rich (Investor's Business Daily) as membership secretary. In addition, elected to the Board of Governors Journalist seat for three-year terms: Herb Jackson, Tara Copp, Alisa Parenti; Board of Governors Journalist seat for one-year terms: Mark Schoeff Jr. and Poonam Sharma; and Board of Governors Communicator seat for three years: Mike Smith.
Founded in 1908, the National Press Club is the World's Leading Professional Organization for Journalists™. Located three blocks from the White House, the Club has as its members more than 3,000 reporters, editors, and expert communicators worldwide representing almost every leading news organization.
Source: National Press Club
— The Editor is a Member of the National Press Club, Washington, DC.
Edited & Posted by the Editor | 3:49 PM | View the original post
New Lamborghini Countach LPI 800−4 Posters for the Walls of Teenagers
A poster collection that celebrates the success of an icon.
Photo: COUNTACH LPI 800-4 BY ANDREAS WANNERSTEDT
Photo: COUNTACH LPI 800-4 BY OMAR AQIL
Photo: COUNTACH LPI 800-4 BY LRNZ (Lorenzo Ceccotti)
Photo: COUNTACH LPI 800-4 BY YEGOR ZHULDYBIN
Sant' Agata Bolognese (Italy), December 29, 2021 - Lamborghini has released a series of new Lamborghini Countach LPI 800-4 posters. The posters feature the limited edition super sports car, presented at Pebble Beach in August 2021 on the original Countach's 50th anniversary.
The futuristic limited edition Countach LPI, 800-4, continues to be a source of inspiration, reflecting its predecessor's non-conformist iconic status that defined a new horizon for automotive design. The image of the original Countach powerfully denoted the passion of the most refined car connoisseurs, as well as the teenagers of a generation choosing a Countach poster for their walls.
This poster collection has reinterpreted the love for the Countach's timeless lines, emphasizing how image alone can stimulate creativity. The five posters by Automobili Lamborghini each bear the signature of artists and illustrators specializing in 3D and digital works, feeding the Countach myth and confirming the immortality of the icon.
The contributing designers from around the world bring a particular dimension and interpretation of the Countach LPI 800-4 as a future icon.
Omar Aqil, a Pakistani 3D illustrator and CGI artist, places the Countach in the center of the incredible technological evolution of the last 50 years.
Yegor Zhuldybin, a young Russian creator specializing in surreal digital collages, explores the integration of the new Countach into today's world, balancing between the modern incarnation of the iconic model and the celebration of Lamborghini's history.
Shy. Studio, an independent motion graphics studio specializing in 3D animations and still life, is inspired by the influence of the vintage 1980s posters, reproducing the legendary Countach design in a modern setting mixed with abstract, tactile elements and objects that seem to come from another world.
Andreas Wannerstedt, a Swedish artist known for his 3D works featuring hypnotic looped animations, proposes a reinterpretation that stages the encounter between nature and the most advanced human technology: the delicate shades of an imaginary sunset meet the clean lines of the Countach LPI 800-4.
LRNZ (Lorenzo Ceccotti): graphic designer, motion graphics creator, animator, and illustrator highlights the extraordinary visual qualities of the new Countach, focusing on extreme minimalism and high-tech vibrations.
Source: Lamborghini
World Economic Forum's Annual Meeting 2022 Deferred
Photo: Impressions from the World Economic Forum Annual Meeting 2020 in Davos-Klosters, Switzerland. Image provided by & Copyright © World Economic Forum/Sikarin Fon Thanachaiary. [File Photo]
Geneva, 29 December 2021 - The World Economic Forum will defer its Annual Meeting in Davos, Switzerland, in the light of continued uncertainty over the Omicron outbreak.
The Annual Meeting was scheduled in Davos-Klosters, Switzerland, between 17-21 January 2022. The World Economic Forum now plans it for early summer.
Instead, participants will join a series of State of the World sessions bringing together global leaders online to focus on shaping solutions to the world's most pressing challenges.
"Current pandemic conditions make it extremely difficult to deliver a global in-person meeting. However, preparations have been guided by expert advice and have benefited from the close collaboration of the Swiss government at all levels," WEF stated.
"Despite the meeting's stringent health protocols, the transmissibility of Omicron and its impact on travel and mobility have made deferral necessary," the WEF announcement said.
"The health and safety of everyone involved in physical meetings - participants, collaborators, and the host community - have always been the Forum's priority," WEF added.
"The deferral of the Annual Meeting will not prevent progress through the continued digital convening of leaders from business, government, and civil society," said Professor Klaus Schwab, Founder and Executive Chairman of the World Economic Forum. "Public-private cooperation has moved forward throughout the pandemic, and that will continue apace. We look forward to bringing global leaders together in person soon."
Source: World Economic Forum
Edited & Posted by the Editor | 11:48 AM | View the original post
National Gallery of Modern Art, New Delhi to celebrate Kala Kumbh- Azadi ka Amrit Mahotsav in Chandigarh from December 25, 2021 - January 2, 2022
• National Gallery of Modern Art, New Delhi, will organize Artist workshops for painting scrolls on unsung heroes of the freedom movement.
Photo: The Minister of State for External Affairs and Culture, Ms. Meenakashi Lekhi, at the Grand Finale of All India Vande Bharatam, Nritya Utsav 2021, organized by the Ministry of Defence and the Ministry of Culture, as part of Azadi Ka Amrit Mahotsav to commemorate 75 years of independence of India at Auditorium, Jawaharlal Nehru Stadium, in New Delhi on December 19, 2021.
New Delhi/Chandigarh, December 24, 2021 — The National Gallery of Modern Art, New Delhi, will celebrate Azadi ka Amrit Mahotsav with Kala Kumbh (artist workshops for painting scrolls) in Chandigarh from December 25, 2021 - January 2, 2022. The celebration represents the tales of bravery of unsung heroes of India's freedom movement. These will form an integral part of the Republic day celebrations 2022, analyzing the potential of art as a means to express National pride and excellence.
The National Gallery will organize these celebrations with artist workshops to paint five scrolls of seventy-five meters portraying India's indigenous arts in Chandigarh from December 25, 2021 - January 2, 2022. The National Gallery of Modern Art has organized similar workshops in other parts of the country.
The works of art will reflect diverse art forms forming a unique amalgamation of traditional and modern. It will also draw inspiration from the creative illustrations in the Constitution of India, wherein the artistic elements painted by Nandalal Bose and his team have imparted a distinctive appeal. Approximately 250 artists from various geographical locations of the country will portray the heroic lives and struggles of unsung heroes of India's freedom movement. Eminent senior artists and the Director-General of the National Gallery of Modern Art will mentor the artists.
The entire program focuses on collaborative strength. The National Gallery of Modern Art, New Delhi, has collaborated with Chitkara University in Chandigarh for this workshop.
Azadi Ka Amrit Mahotsav is an initiative of the Government of India to celebrate and commemorate 75 years of progressive India and the glorious history of its people, culture, and achievements.
At Chandigarh, the narratives would reflect the tales of courage from Ladakh, Jammu & Kashmir, Uttar Pradesh, Delhi, Haryana, Punjab, Himachal Pradesh, and Rajasthan with artistic expressions reflecting the indigenous forms of art such as Phad, Pichwai, Miniature, Kalamkari, Mandana and Warli, to name a few. The scrolls will also reflect the contemporary expressions, which would showcase the essence of India's rich cultural and artistic heritage while also analyzing the absolute sacrifice and contribution of the unsung heroes.
Source: Ministry of Culture, Government of India.
India's Defence Minister, Rajnath Singh, interacts with Indian students of Harvard Business School & Harvard Kennedy School in New Delhi.
Photo: The Union Minister for Defence, Mr. Rajnath Singh, interacts with the Indian students of Harvard Business School and Harvard Kennedy School in New Delhi on December 22, 2021.
New Delhi, December 22, 2021 — Defence Minister Rajnath Singh interacted with Indian students of Harvard Business School and Harvard Kennedy School (John F. Kennedy School of Government, Harvard University) today. Expressing happiness over meeting with the students, Mr. Rajnath Singh termed them the country's soft power, currently discovering the best-in-class management and governance practices from the two top-class institutes. He urged them to use their innovative ideas and participate in nation-building.
The Defence Minister exuded confidence that the students will play an essential role in the country's holistic development by adequately using their ability & network and sharing the latest best practices. Furthermore, he hoped that the students would work as the ambassadors of the Indian value system worldwide, not just in their student phase but also in the future.
During the interaction, the students shared their views on India's changed perception in the world, especially after the rollout of the largest vaccination drive in the fight against the COVID-19 pandemic and schemes like 'Make in India.' They expressed their willingness to return to India, saying that the atmosphere created due to the policies of the Government in the last few years, such as ease of doing business and providing opportunities to startups, will help them contribute to the holistic development of the Nation.
Source: Ministry of Defence, Government of India
— The editor holds certificates from both Harvard Business Schools and Harvard Kennedy School.
Edited & Posted by the Editor | 12:39 PM | View the original post
The Academy announces Oscar Shortlists. Once again, Snubs the International Feature Film Entry from India.
Photo: Oscar nominee, American singer, and songwriter, H.E.R. arrives on the red carpet of The 93rd Oscars at Union Station in Los Angeles, CA, on Sunday, April 25, 2021. Image Credit: Troy Harvey / A.M.P.A.S. [File Photo]
LOS ANGELES, CA — The Academy of Motion Picture Arts and Sciences today announced shortlists in 10 categories for the 94th Academy Awards: Documentary Feature, Documentary Short Subject, International Feature Film, Makeup, and Hairstyling, Music (Original Score), Music (Original Song), Animated Short Film, Live Action Short Film, Sound and Visual Effects.
• DOCUMENTARY FEATURE
Fifteen films will advance in the Documentary Feature category for the 94th Academy Awards. One hundred thirty-eight films were eligible in the class. Members of the Documentary Branch vote to determine the shortlist and the nominees.
The films, listed in alphabetical order by title, are:
"Billie Eilish: The World's a Little Blurry"
"Faya Dayi"
"In the Same Breath"
"Simple as Water"
"Summer of Soul (…Or, When the Revolution Could Not Be Televised)"
• DOCUMENTARY SHORT SUBJECT
Fifteen films will advance in the Documentary Short Subject category for the 94th Academy Awards. Eighty-two films qualified in the class. Members of the Documentary Branch vote to determine the shortlist and the nominees.
"A Broken House"
"Camp Confidential: America's Secret Nazis"
"Coded: The Hidden Love of J. C. Leyendecker"
"Day of Rage"
"Lead Me Home"
"Lynching Postcards: "Token of a Great Day"
"The Queen of Basketball"
"Sophie & the Baron"
"Terror Contagion"
"Three Songs for Benazir"
"When We Were Bullies"
• INTERNATIONAL FEATURE FILM
Fifteen films will advance to the next round of voting in the International Feature Film category for the 94th Academy Awards. Films from 92 countries were eligible in the class.
Academy members from all branches participated in the preliminary round of voting.
The films, listed in alphabetical order by country, are:
Austria, "Great Freedom"
Belgium, "Playground"
Bhutan, "Lunana: A Yak in the Classroom"
Denmark, "Flee"
Finland, "Compartment No. 6"
Germany, "I'm Your Man"
Iceland, "Lamb"
Iran, "A Hero"
Italy, "The Hand of God"
Japan, "Drive My Car"
Kosovo, "Hive"
Mexico, "Prayers for the Stolen"
Norway, "The Worst Person in the World"
Panama, "Plaza Catedral"
Spain, "The Good Boss"
As is the tradition for many years, the Academy once again snubbed India's Official Entry in the International Feature Film category. As a result, the country's submission, "Pebbles," failed to qualify for the next round.
• MAKEUP AND HAIRSTYLING
Ten films will advance in the Makeup and Hairstyling category for the 94th Academy Awards.
MUSIC (ORIGINAL SCORE)
Fifteen scores will advance in the Original Score category for the 94th Academy Awards. One hundred thirty-six scores were eligible in the class. Members of the Music Branch vote to determine the shortlist and the nominees.
The scores, listed in alphabetical order by film title, are:
"The French Dispatch of the Liberty, Kansas Evening Sun"
• MUSIC (ORIGINAL SONG)
Fifteen songs will advance in the Original Song category for the 94th Academy Awards. Eighty-four songs were eligible in the class. Members of the Music Branch vote to determine the shortlist and the nominees.
The original songs are listed below in alphabetical order by film title along with the motion picture in which each piece features:
"So May We Start?" from "Annette"
"Down To Joy" from "Belfast"
"Right Where I Belong" from "Brian Wilson: Long Promised Road"
"Automatic Woman" from "Bruised"
"Dream Girl" from "Cinderella"
"Beyond The Shore" from "CODA"
"The Anonymous Ones" from "Dear Evan Hansen"
"Just Look Up" from "Don't Look Up"
"Dos Oruguitas" from "Encanto"
"Somehow You Do" from "Four Good Days"
"Guns Go Bang" from "The Harder They Fall"
"Be Alive" from "King Richard"
"No Time To Die" from "No Time to Die"
"Here I Am (Singing My Way Home)" from "Respect"
"Your Song Saved My Life" from "Sing 2"
• ANIMATED SHORT FILM
Fifteen films will advance in the Animated Short Film category for the 94th Academy Awards. Eighty-two films qualified in the class. The Short Films and Feature Animation Branch members vote to determine the shortlist and the nominees.
"Affairs of the Art"
"Angakusajaujuq: The Shaman's Apprentice"
"Bad Seeds"
"Boxballet"
"Flowing Home"
"Mum Is Pouring Rain"
"Namoo"
"Only a Child"
"Robin Robin"
"Step into the River"
"Us Again"
"The Windshield Wiper"
• LIVE-ACTION SHORT FILM
Fifteen films will advance in the Live Action Short Film category for the 94th Academy Awards. One hundred forty-five films qualified in the class. Members of the Short Films and Feature Animation, Directors, Producers, and Writers Branches vote to determine the shortlist and the nominees.
"Ala Kachuu - Take and Run"
"Censor of Dreams"
"The Criminals"
"Frimas"
"Les Grandes Claques"
"Please Hold"
"Stenofonen"
"Tala'vision"
"Under the Heavens"
"When the Sun Sets"
"You're Dead Helen"
• SOUND
Ten films will advance in the Sound category for the 94th Academy Awards. Members of the Sound Branch vote to determine the shortlist and the nominees.
"tick, tick…BOOM!"
• VISUAL EFFECTS
Ten films remain in the running in the Visual Effects category for the 94th Academy Awards. The Visual Effects Branch Executive Committee determined the shortlist.
Nominations voting begins on Thursday, January 27, 2022, and concludes on Tuesday, February 1, 2022.
The Academy will announce the Nominations for the 94th Academy Awards on Tuesday, February 8, 2022.
The 94th Oscars will take place on Sunday, March 27, 2022, at the Dolby Theatre at Hollywood & Highland in Hollywood and will be televised live on ABC and in more than 200 territories worldwide.
Source: The Academy of Motion Picture Arts and Sciences
Porsche Exclusive Nights held across Five Cities in India for Customer Preview of 2022 Models.
• Porsche India celebrates with more than a thousand customers to wind up a strong 2021
Photo: Manolito Vujicic, Brand Director at Porsche India, unveiling the first all-electric model, the Taycan, at the Porsche Exclusive Night in Chandigarh. Image provided by Porsche India.
Photo: The latest Macan and the all-new fully electric Taycan at the Porsche Exclusive Night in Mumbai. Image provided by Porsche India.
Photo: Photocall in Ahmedabad following the reveal of the latest Porsche Macan. Image provided by Porsche India.
Photo: Porsche Taycan saloon range. Image provided by Porsche India.
Photo: Latest Macan S in Mumbai. Image provided by Porsche India.
Mumbai, December 21, 2021 — Porsche India celebrated the completion of a successful year capped by the strongest ever third-quarter sales result and a preview of two new models. In addition, it hosted a series of Porsche Exclusive Nights across the country (especially in five cities — Mumbai, Delhi NCR, Chandigarh, Ahmedabad, and Kochi) to thank its customers for their continued loyalty and support throughout 2021.
For five weeks starting mid-November, more than 1,200 customers witnessed the reveal of Porsche's first fully electric sports saloon, the all-new Taycan, as well as the latest Macan compact SUV. Both models are available for order now, with the first units expected to arrive in the first quarter of 2022.
Manolito Vujicic, Brand Director at Porsche India, said the events had been an ideal way to thank Porsche owners for their trust and loyalty over the year and show them the first two essential models that will arrive in 2022. "Our customers helped Porsche India achieve a remarkable bounce-back after the difficult pandemic situation in the first half of the year. As a result, demand is high, as evidenced by strong sales across the country this year and most recently with a 96-percent gain in the third quarter over our 2019 sales. This result also records a 24-percent increase over our previous best third quarter recorded back in 2014," Mr. Vujicic added.
Following a year of many disruptions in life and business, Vujicic added: "These nights are our way of thanking our loyal customers in person. It also gives them an exclusive preview of what's to come with the revolutionary electric vehicle range of Taycan models as well as our popular new Macan that has already received enormous interest."
The latest Macan offers increased performance and sharper styling in three variants comprising the Macan, Macan S, and Macan GTS, along with a range of 14 colors newly available for the Macan.
The all-new, all-electric Taycan is available in four saloon models, comprising the Taycan, Taycan 4S, Turbo, and Turbo S. The exciting Cross Turismo in 4S, Turbo, and Turbo S versions complement it. They add the versatility of extra ground clearance, Gravel Mode, and 1,200 liters of rear cargo space.
Porsche India is confident about the business performance next year, with many projects in full swing. Plans include expanding the national dealer network with new partners and upgrading several facilities. As a result, the network shall consist of nine locations by the end of 2022.
Source: Porsche India
Ducati MotoE bike takes to the track for the first time on the Misano circuit.
The Ducati prototype that will race in the FIM Enel MotoE™ World Cup has completed its first laps on the track at Misano.
Michele Pirro, official Ducati rider and test rider took part in the tests.
Photos: Ducati MotoE prototype. Images provided by & copyright © DUCATI.
Borgo Panigale (Bologna, Italy), 20 December 2021 - The Ducati MotoE bike took to the track first at the Misano World Circuit Marco Simoncelli. Starting from the 2023 season, the Borgo Panigale motorcycle manufacturer will be the sole supplier of motorcycles for the FIM Enel MotoE™ World Cup, the electric class of the MotoGP™ World Championship.
The electric motorcycle prototype, code-named "V21L", is the result of the joint work of the Ducati Corse team and the Ducati R&D engineers. Roberto Canè, Ducati eMobility Director, led the team, and the bike was taken out on track by Michele Pirro, a professional rider and Ducati test rider since 2013. He evaluated the technical characteristics and potential of Ducati's first electric motorcycle.
Roberto Canè, Ducati eMobility Director: "We are experiencing a truly extraordinary moment. I find it hard to believe it is real and still not a dream! The first electric Ducati on the track is exceptional not only for its uniqueness but also for the type of undertaking: challenging both for its performance objectives and its extremely short timescales. Precisely for this reason, the work of the whole team dedicated to the project has been incredible, and today's result repays us for the efforts made in recent months. We are certainly not finished yet; indeed, we know that the road ahead is still very long, but in the meantime, we have laid a first important 'brick.'"
Michele Pirro, Ducati test rider: "Testing the MotoE prototype on the circuit was a great thrill because it marks the beginning of an important chapter in Ducati history. The bike is light and already has a good balance. Furthermore, the throttle connection in the first opening phase and the ergonomics are very similar to a MotoGP bike. If it weren't for the silence and for the fact that in this test, we decided to limit the power output to just 70% of performance, I could easily have imagined that I was riding my bike."
The most critical challenges in developing an electric racing motorcycle remain related to the batteries' size, weight, and range. Ducati's goal is to make electric motorcycles that are high-performance and characterized by their lightness available to all FIM Enel MotoE™ World Cup participants.
Ducati's experience in the FIM Enel MotoE™ World Cup will be fundamental support for product R&D. The goal is to create a Ducati electric vehicle for road use as soon as the technology allows it. Sporty, light, exciting, and able to satisfy all enthusiasts.
Source: DUCATI
Three years waiting for a flag-to-flag race and it didn't disappoint!!! 💥
Check out the top five moments from a frenetic #FrenchGP! 🇫🇷#MotoGP pic.twitter.com/jtirNBPbel
— MotoGP™🏁 (@MotoGP) December 19, 2021
The new French National Identity Card gets the Best Identity Card recognition.
PARIS, Dec. 20, 2021 — The new French electronic National Identity Card (eID) has been awarded the prestigious Best New National ID Card prize by Reconnaissance International at the HSP Awards EMEA (High-Security Printing for Europe - Africa - Middle East). A jury of independent international experts has recognized this personal identification document program's outstanding achievement and technical sophistication. The French Ministry of the Interior, ANTS (Agence Nationale des Titres Sécurisés), and IN Groupe worked to design and produce the new French eID.
• An identity document at the cutting edge of technology
Under its Regulation, France has deployed a new identity card, more secure, convenient, and innovative. This card can be used to prove one's identity and serves as a travel document in the European Union. As a result, France has issued more than 2 million new eID(s) since June 2021.
This next-generation polycarbonate card can meet French citizens' everyday needs. It incorporates both tried and tested security features and innovations with security design validated by the Ministry of the Interior experts.
The card incorporates new security features, including the DOVID, a new-generation holographic device. The card's secure background extends into the transparent border of the card. In addition, a Visible Digital Seal allows the card to be digitally signed and ensures the integrity and origin of the credentials. Further, it is impossible to access the data on a highly secured chip.
• IN Groupe at the service of the State
In the French National Identity Card program, IN Groupe acts as a solutions integrator, relying on the contribution of some twenty different companies. As a result, IN Groupe qualifies, tests, and selects the best technologies, components, and IT systems that the French government needs to build the most secure document according to the ANTS specifications and the expected security targets.
IN Groupe is a public limited company. It guarantees France the sovereignty to issue its legal identity documents. Further, it equips the French government with identity technology operations.
For IN Groupe, identity and its protection are at the heart of its raison d'être because it ensures States' sovereignty and trusts with their citizens, especially since legal identity remains the reference identity among all others both in the physical and digital worlds.
Source: IN Groupe
Kia Carens, a three−row recreational vehicle, debuts in India with six standard airbags across variants
Kia Corporation has launched the Carens during a world premiere event in India. The recreational vehicle (RV) is another made-in-India global product from Kia that brings the sophistication of a family mover and the sportiness of an SUV in one compelling package.
The Kia Carens, designed for modern Indian families, is a comfortable and spacious three-row seater with the most extended wheelbase in its class. In addition, the car comes with a first in India Hi-Secure Safety Package as standard across all trims, including six airbags, making it one of the safest vehicles in India. The Kia Carens is also a connected car with many class-leading features, setting new benchmarks in the industry.
"With its bold design, high-tech features, and industry-leading safety systems, the Kia Carens would create a completely new segment and industry benchmark for family vehicles," said Ho Sung Song, President, and CEO at Kia Corporation. "Kia is especially honored to launch Carens in India, where new ideas and innovations are taking shape. We are confident that the Kia Carens will deliver meaningful experiences to modern families both in their daily and leisure life."
Tae-Jin Park, the Managing Director, and CEO, Kia India, said, "India is diverse, and the people here have different preferences. It is the most exciting insight we tried to unlock while developing the Carens. It's safe, is feature-rich, has artistry in its design, and is comfortable and classy; it packs everything a modern Indian family would want in their vehicle. The Carens, in all aspects, is another true customer-centric offering from Kia. The vehicle is all set to revolutionize and redefine family commuting. It is another game-changing product dedicated to our discerning Indian customers."
The Kia Carens will be available in India and selected markets starting from the first quarter of 2022.
Source: Kia Corporation
Hyundai IONIQ 5 East Coast Buyer Exemplifies New Set of Owners Making the Transition to Electric
Photo: John Szymanski, general manager, Eastern Region, Hyundai Motor America, IONIQ 5 customer Ms. Sandra Bergland, and Gary Rome, dealer principal, Gary Rome Hyundai at Gary Rome Hyundai in Holyoke, Mass. on December 17, 2021. (Photo/Hyundai)
HOLYOKE, Mass., December 17, 2021 — Hyundai celebrates one of its early IONIQ 5 electric cross-over utility vehicle buyers, Ms. Sandra Bergland of Boston, Mass. Ms. Bergland purchased a 2022 IONIQ 5 Limited AWD in the Digital Teal exterior finish. Coming from a family of early adopters of electric vehicles, Ms. Bergland was drawn to the IONIQ 5's driving range and ultra-fast charging coupled with Hyundai's new Electric-Global Modular Platform that allows for more interior space and optimized performance. In addition, IONIQ 5's progressive design represents a departure from past norms, exploring new design freedom.
"As a captain for a major cargo airline flying large freighter planes, I am immersed in technology and how it's reshaped the industry. The IONIQ 5 is the perfect vehicle for me. I appreciate its progressive aerodynamic exterior design with a spacious and smart interior, innovative connectivity, and advanced technologies; it's redefining the industry and providing new choices for customers like me. After the wait, I'm thrilled to be among the first to drive the IONIQ 5 and embark on road trips that complement my active lifestyle without the need to stop at gas stations." said Ms. Bergland.
Sandra Bergland is a captain for a major cargo airline based in the United States, flying one of the giant freight airplanes in the industry. When not flying to Europe and Asia, Ms. Bergland enjoys spending time with her family and skiing in Park City, Utah. The IONIQ 5's flexible and intelligent interior design and towing capability are perfect for carrying ski equipment and providing the extra space her two dogs will enjoy. The ultra-fast charging and impressive driving range are key attributes as she plans to drive the IONIQ 5 from the Berkshires in Massachusetts to Park City, Utah, next year. Sandra Bergland comes from a family of early EV adopters, including her brother, who currently owns a 2019 IONIQ EV. Hyundai plans to work with Ms. Bergland to chronicle her first year driving the IONIQ 5 and share this journey via social media platforms.
Source: Hyundai Motor America
UNESCO inscribes 'Durga Puja in Kolkata' on the Representative List of Intangible Cultural Heritage of Humanity
Photos: Durga Puja inscribed on the UNESCO Representative List of the Intangible Cultural Heritage of Humanity. Images Credit: UNESCO; Ministry of Culture, Government of India.
New Delhi, December 15, 2021 — In an important announcement, the Intergovernmental Committee of UNESCO's 2003 Convention on Safeguarding of the Intangible Cultural Heritage has inscribed 'Durga Puja in Kolkata' on the Representative List of Intangible Cultural Heritage of Humanity during its 16th session being held at Paris, France from 13th to 18th December 2021. The Committee commended Durga Puja for its initiatives to involve marginalized groups and individuals and women in their participation in safeguarding the element.
As a ten-day celebration, Durga Puja represents the collective worship of the Hindu Goddess Durga. During this time, masterfully designed clay models of the Goddess are worshipped in "pandals" or pavilions where communities get together and celebrate. In addition, several folk pieces of music, culinary, craft, and performing arts traditions add to the dynamism of this celebration.
While Durga Puja is one of the most important festivals of West Bengal, India, it is widely observed across the country and in major cities of the world by the Bengali diaspora.
Durga Puja celebrates feminine divinity and a consummate expression of dance, music, crafts, rituals, practices, culinary and cultural aspects. The festival transcends the boundaries of caste, creed, and economic classes and joins the people together in its celebration.
With the inscription of Durga Puja in Kolkata, India now has 14 intangible cultural heritage elements on the prestigious UNESCO Representative List of ICH of Humanity. The recent ICH elements that saw inscriptions are Kumbh Mela (2017) and Yoga (2016).
India is a signatory of the 2003 UNESCO Convention, which aims for the Safeguarding of the Intangible Heritage and traditions and living expression. Intangible cultural heritage means the practices, representations, words, knowledge, skills - as well as the instruments, objects, artifacts, and cultural spaces associated with them that communities, groups, and, in some cases, individuals recognize as a part of their cultural inheritance.
Sources: UNESCO; Ministry of Culture, Government of India.
TIME Names the 2021 Person of the Year: Elon Musk
NEW YORK, December 13, 2021 — Today, TIME named Elon Musk the 2021 Person of the Year.
TIME Editor-in-Chief and CEO Edward Felsenthal write, "Person of the Year is a marker of influence, and few individuals have had more influence than Musk on life on Earth, and potentially life off Earth too. In 2021, Musk emerged not just as the world's richest person but also as perhaps the richest example of a massive shift in our society."
Felsenthal continues, "Musk's rise coincides with broader trends of which he and his fellow technology magnates are part cause and part effect: the continuing decline of traditional institutions in favor of individuals; government dysfunction that has delivered more power and responsibility to business; and chasms of wealth and opportunity. In an earlier era, ambitions on the scale of interplanetary travel were the ultimate collective undertaking, around which Presidents rallied nations….For creating solutions to an existential crisis, for embodying the possibilities and the perils of the age of tech titans, for driving society's most daring and disruptive transformations, Elon Musk is TIME's 2021 Person of the Year."
In his letter to readers, Felsenthal writes, " Elon Musk's spacefaring adventures are a direct line from the very first Person of the Year, Charles Lindbergh, whom the editors selected in 1927 to commemorate his historic first solo transatlantic airplane flight over the Atlantic. For us at TIME, it has also been a year of building on the past to forge the future."
In the cover story, which includes an exclusive interview with Musk, TIME's Molly Ball, Jeffrey Kluger, and Alejandro de la Garza, write, "His startup rocket company, SpaceX, has leapfrogged Boeing and others to own America's spacefaring future. His car company, Tesla, controls two-thirds of the multibillion-dollar electric-vehicle market it pioneered and is valued at a cool $1 trillion. That has made Musk, with a net worth of more than $250 billion, the richest private citizen in history, at least on paper. In addition, he's a player in robots and solar, cryptocurrency and climate, brain-computer implants to stave off the menace of artificial intelligence and underground tunnels to move people and freight at super speeds."
The December 27, 2021 - January 3, 2022, Person of the Year issue of TIME goes on sale on Friday, December 17.
Source: TIME
Miss Universe India, Harnaaz Sandhu, crowned 70th Miss Universe in Global Anniversary Televised Event.
• Three-Hour Special included inspiring performances by powerhouse female musical artists JOJO and Noa Kirel.
Photo: Harnaaz Sandhu, Miss Universe India 2021, poses for a portrait after being crowned Miss Universe after the 70th Miss Universe Competition on December 12, 2021, at the Universe Arean in Eilat, Israel. The new winner will move to New York City, where she will live during her reign and become a spokesperson for various causes alongside The Miss Universe Organization. Photographer: Benjamin Askinas. Image provided by & copyright © Miss Universe Organization, New York.
Photo: Harnaaz Sandhu, Miss Universe India 2021, is crowned Miss Universe by Miss Universe 2020 Andrea Meza after the 70th Miss Universe Competition on December 12, 2021, at the Universe Arena in Eilat, Israel. The new winner will move to New York City, where she will live during her reign and become a spokesperson for various causes alongside The Miss Universe Organization. Photographer: Benjamin Askinas. Image provided by & copyright © Miss Universe Organization, New York.
ISRAEL (December 12, 2021) - Miss Universe India Harnaaz Sandhu was crowned Miss Universe live on FOX and Telemundo tonight from Eilat, Israel. Harnaaz will use her time as Miss Universe to advocate for menstrual equity through public administration.
After a two-week-long visit to Jerusalem and Eilat, a beautiful National Costume Competition, rounds of interviews, a preliminary competition, and the live Finals, Harnaaz was crowned with the iconic Mouawad "Power of Unity" Crown. It was presented to her by outgoing Miss Universe Andrea Meza. Harnaaz will move to New York City in the new year to represent the brand and various philanthropic organizations during her reign.
"This has been an experience of a lifetime!" said Miss Universe Harnaaz Sandhu. "The past three weeks have been a dream getting to know these exceptional women, and I'm honored to be chosen among them to represent this inspiring organization. I hope to serve the global community to the best of my ability in the year to come."
Miss Universe India, Harnaaz Sandhu, credits her mother, who broke generations of patriarchy to become a successful gynecologist, for inspiring her to follow her dreams. Driven to support women similarly, Harnaaz grew up working with her mother at health camps, educating women about their health and menstrual hygiene. Deeply conscious of the privilege her mother's struggles have gifted her, Harnaaz strongly advocates for women's empowerment today, particularly their constitutional rights to education, careers, and freedom of choice. She is currently pursuing her master's degree in Public Administration. Harnaaz is also an actress and enjoys yoga, dancing, cooking, horse riding, and playing chess in her free time.
"It's been exceptional getting to know the contestants through our shared admiration of the history and beauty of our host country these past two weeks," stated Paula M. Shugart, President of the Miss Universe Organization. "I'm thrilled to have Miss India Harnaaz Sandhu represent Miss Universe this year, as her passion for helping educate women and fight for their freedoms emulates all the crown stands for."
The 70th MISS UNIVERSE competition aired live from a bespoke venue in Eilat, Israel. Legendary entertainer Steve Harvey hosted it, along with backstage correspondents, Emmy Award-winning TV personality and style expert Carson Kressley ("RuPaul's Drag Race," "Queer Eye for the Straight Guy") and TV presenter and former Miss USA Cheslie Kryst ("Extra").
One of the evening's many highlights included the powerful performances from GRAMMY Award-winning artist, JoJo and Israeli singer Noa Kirel. In addition, women representing 80 countries competed to become the next Miss Universe in this anniversary spectacular. Selection committee members for the 70th annual show included:
International supermodel, actress, and businesswoman Adriana Lima.
Model, television host, and Miss Universe 2016 Iris Mittenaere.
Beauty entrepreneur and model Lori Harvey.
Bollywood actress Urvashi Rautela.
Filipino actress Marian Rivera.
Actress, author, TV host & Telemundo star Adamari Lopez.
'The Bold and the Beautiful' actress, Rena Sofer.
Source: Miss Universe Organization, New York.
The new Miss Universe is…India!!!! #MISSUNIVERSE pic.twitter.com/DTiOKzTHl4
— Miss Universe (@MissUniverse) December 13, 2021
FINAL STATEMENT: India. #MISSUNIVERSE
The 70th MISS UNIVERSE Competition is airing LIVE around the world from Eilat, Israel on @foxtv pic.twitter.com/wwyMhsAyvd
Academy announces International Feature Films Eligible for Consideration for the 94th Oscars
Photo: Margot Robbie arrives on the red carpet of The 93rd Oscars at Union Station in Los Angeles, CA, on Sunday, April 25, 2021. Photo Credit: Matt Petit. Copyright © Academy of Motion Picture Arts & Sciences. [File Photo]
Los Angeles, December 8, 2021 — Ninety-three countries have submitted films eligible for consideration in the International Feature Film category for the 94th Academy Awards. However, some films have not yet had their required qualifying release and must fulfill that requirement and comply with all the category's other qualifying rules to advance in the voting process.
An international feature film is a feature-length motion picture (more than 40 minutes) produced outside the United States with a predominantly (more than 50%) non-English dialogue track. Somalia is a first-time entrant.
The shortlist of 15 films will be announced on Tuesday, December 21, 2021.
• 94TH ACADEMY AWARDS •
INTERNATIONAL FEATURE FILMS ELIGIBLE FOR CONSIDERATION
(Listed in Alphabetical Order by Country)
Albania, "Two Lions to Venice"
Algeria, "Heliopolis"
Argentina, "The Intruder"
Armenia, "Should the Wind Drop"
Australia, "When Pomegranates Howl"
Azerbaijan, "The Island Within"
Bangladesh, "Rehana"
Bolivia, "The Great Movement"
Bosnia and Herzegovina, "The White Fortress"
Brazil, "Private Desert"
Bulgaria, "Fear"
Cambodia, "White Building"
Cameroon, "Hidden Dreams"
Canada, "Drunken Birds"
Chad, "Lingui, The Sacred Bonds"
Chile, "White on White"
China, "Cliff Walkers"
Colombia, "Memoria"
Costa Rica, "Clara Sola"
Croatia, "Tereza37"
Czech Republic, "Zátopek"
Dominican Republic, "Holy Beasts"
Ecuador, "Submersible"
Egypt, "Souad"
Estonia, "On the Water"
France, "Titane"
Georgia, "Brighton 4th"
Greece, "Digger"
Haiti, "Freda"
Hong Kong, "Zero to Hero"
Hungary, "Post Mortem"
India, "Pebbles"
Indonesia, "Yuni"
Iraq, "Europa"
Ireland, "Shelter"
Israel, "Let It Be Morning"
Jordan, "Amira"
Kazakhstan, "Yellow Cat"
Kenya, "Mission to Rescue"
Kyrgyzstan, "Shambala"
Latvia, "The Pit"
Lebanon, "Costa Brava, Lebanon"
Lithuania, "Isaac"
Luxembourg, "Io Sto Bene"
Malawi, "Fatsani: A Tale of Survival"
Malaysia, "Hail, Driver!"
Malta, "Luzzu"
Montenegro, "After the Winter"
Morocco, "Casablanca Beats"
Netherlands, "Do Not Hesitate"
North Macedonia, "Sisterhood"
Palestine, "The Stranger"
Paraguay, "Nothing but the Sun"
Peru, "Powerful Chief"
Poland, "Leave No Traces"
Portugal, "The Metamorphosis of Birds"
Romania, "Bad Luck Banging or Loony Porn"
Russia, "Unclenching the Fists"
Saudi Arabia, "The Tambour of Retribution"
Serbia, "Oasis"
Singapore, "Precious Is the Night"
Slovakia, "107 Mothers"
Slovenia, "Sanremo"
Somalia, "The Gravedigger's Wife"
South Africa, "Barakat"
South Korea, "Escape from Mogadishu"
Sweden, "Tigers"
Switzerland, "Olga"
Taiwan, "The Falls"
Thailand, "The Medium"
Tunisia, "Golden Butterfly"
Turkey, "Commitment Hasan"
Ukraine, "Bad Roads"
United Kingdom, "Dying to Divorce"
Uruguay, "The Broken Glass Theory"
Uzbekistan, "2000 Songs of Farida"
Venezuela, "The Inner Glow"
Vietnam, "Dad, I'm Sorry"
Source: The Academy of Motion Picture Arts & Sciences
Miss Universe Contestants in Eilat, Israel for the Sunday, December 12 Contest
Photo: Contestants in "Fashion by Portia and Scarlett" on stage during the opening of the MISS UNIVERSE Preliminary Competition at the Universe Arena in Eilat, Israel on December 10, 2021. Tune in to the LIVE telecast on FOX and Telemundo on Sunday, December 12 at 7:00 PM ET to see who will become the next Miss Universe. Photographer: Benjamin Askinas. Image provided by & copyright © Miss Universe Organization, New York.
Photo: Kawtar Benhalima, Miss Universe Morocco 2021, on stage during the National Costume Show at the Universe Arena in Eilat, Israel, on December 10, 2021. The National Costume Show is an international tradition where contestants display an authentic costume of choice that best represents the culture of their home country. The Miss Universe contestants are touring, filming, rehearsing, and preparing to compete for the Miss Universe finals on Sunday, December 12 at 7:00 PM ET. Photographer: Benjamin Askinas. Image provided by & copyright © Miss Universe Organization, New York.
Photo: Shiyin Yang, Miss Universe China 2021, on stage during the National Costume Show at the Universe Arena in Eilat, Israel, on December 10, 2021. The National Costume Show is an international tradition where contestants display an authentic costume of choice that best represents the culture of their home country. The Miss Universe contestants are touring, filming, rehearsing, and preparing to compete for the Miss Universe finals on Sunday, December 12 at 7:00 PM ET. Photographer: Benjamin Askinas. Image provided by & copyright © Miss Universe Organization, New York.
Photo: Harnaaz Sandhu, Miss Universe India 2021, on stage during the National Costume Show at the Universe Arena in Eilat, Israel, on December 10, 2021. The National Costume Show is an international tradition where contestants display an authentic costume of choice that best represents the culture of their home country. The Miss Universe contestants are touring, filming, rehearsing, and preparing to compete for the Miss Universe finals on Sunday, December 12 at 7:00 PM ET. Photographer: Benjamin Askinas. Image provided by & copyright © Miss Universe Organization, New York.
Photo: Harnaaz Sandhu, Miss Universe India 2021, enjoys the morning swimming with the dolphins in Eilat, Israel. The Miss Universe delegates are touring, filming, rehearsing, and preparing to compete for the Miss Universe crown before the show airs LIVE on Sunday, December 12 at 7:00 PM ET on FOX and Telemundo. Photographer: BENJAMIN ASKINAS. Image provided by & copyright © Miss Universe Organization, New York.
Photo: Essi Unkuri, Miss Universe Finland 2021, starred in a fashion show showcasing Haboydem and sustainable dresses. After the show, the delegates celebrated all night long! The Miss Universe delegates are touring, filming, rehearsing, and preparing to compete for the Miss Universe crown before the show airs LIVE from Eilat, Israel, on Sunday, December 12 at 7:00 PM ET on FOX and Telemundo. Photographer: BENJAMIN ASKINAS. Image provided by & copyright © Miss Universe Organization, New York.
Photo: Sofia Arapogianni, Miss Universe Greece 2021, poses while spending the day at Ein Karem in Jerusalem, Israel. The Miss Universe delegates are touring the sights, filming, rehearsing, and preparing to compete for the Miss Universe crown before the show airs LIVE from Eilat, Israel, on Sunday, December 12 at 7:00 PM ET on FOX and Telemundo. Photographer: BENJAMIN ASKINAS. Image provided by & copyright © Miss Universe Organization, New York.
Photo: Harnaaz Sandhu, Miss Universe India 2021, goes on an adventure in the desert while exploring Eilat, Israel! The Miss Universe delegates are touring the sights, filming, rehearsing, and preparing to compete for the Miss Universe crown before the show airs LIVE from Eilat, Israel, on Sunday, December 12 at 7:00 PM ET on FOX and Telemundo. Photographer: BENJAMIN ASKINAS. Image provided by & copyright © Miss Universe Organization, New York.
Get to know Miss Universe Paraguay Nadia Ferreira: entrepreneur and business owner.
Download the Miss Universe app to vote your favorite delegate into the semifinals at the 70th MISS UNIVERSE Competition. ✨
First vote FREE! pic.twitter.com/s6fxgpOEAR
— Miss Universe (@MissUniverse) December 9, 2021
Get to know Miss Universe India Harnaaz Sandhu: passionate about women's rights and acting.
First vote FREE! pic.twitter.com/xfWOIuCuho
Get to know Miss Universe Russia Ralina Arabova: passionate flute player whose goal is to experience different cultures and countries.
First vote FREE! pic.twitter.com/AIOqC0IVs9
Ecom Express launches its first All-women Delivery Center in India.
Photo: Delivery Associates of Ecom Express All-women Delivery Centre.
GURUGRAM, India, Dec. 4, 2021 — Ecom Express Private Limited, one of the leading technology-enabled end-to-end logistics solutions providers to the e-commerce industry, announced the launch of its first all-women Delivery Center in Delhi today. The all-women Delivery Center is an initiative towards empowering women and providing them financial independence while strengthening the company's Diversity and Inclusion agenda.
The company has already inducted women forces in the Delivery Center. However, it will be the first time that a 10-member team, exclusively comprising women from the ranks of Delivery Center Head to Delivery Associates, will be engaged independently in all operational activities, the company stated.
Manju Dhawan, Co-founder, Ecom Express Limited, inaugurated the all-women delivery center. She said, "The launch of our all-women delivery center is a conscious plan and an extension of our continued effort supporting women with opportunities that empower them to grow and economically elevate them. We aim to create more and more opportunities for female team members across roles, including the front-line delivery role. We are steadfast in our approach to support them and their career progression."
Ecom Express is also planning to establish more all-women delivery centers soon. In addition, the firm is breaking the glass ceiling by bringing in need of the hour ideas and business models. Today, Ecom Express has close to 2000 women working across its processing centers, hubs, centers, fulfillment centers, and many women bikers as delivery associates across the country.
"I am pursuing my graduation, and I look forward to creating a good career for myself in the future. I was thrilled to explore this field and wondered if men can get into delivering goods, why can't women. I have always received a positive response. In a year, I have grown in my role with Ecom Express, from a part-time delivery partner to a full-time on-roll employee," stated Kusum Jain, Delivery Associate at Ecom Express's all-women delivery center.
Ecom Express is looking to increase diversity across its supply chain to make it more inclusive. Several of its extensive facilities across the country have their operations for general shifts entirely run by women. Sortation and fulfillment centers, including Bilaspur (Haryana), Bhiwandi, Surat, Vijayawada, Guwahati, and others, have women staff take care of millions of shipments, contributing to a seamless e-commerce experience for customers.
Ecom Express Private Limited, headquartered in Gurugram, is a leading end-to-end technology-enabled logistics solutions provider to the Indian e-commerce industry.
Source: Ecom Express
Gita Gopinath to Be IMF's New First Deputy Managing Director
Photo: The International Monetary Fund's HQ1 and HQ2 buildings sit amid the season's first snow. December 16, 2020. Washington, DC, United States. IMF Photo/ Cory Hancock.
Photo: Chief Economist Gita Gopinath provides the World Economic Outlook during the 2021 Annual Meetings at the International Monetary Fund. October 12, 2021. Washington, DC, United States. IMF Photo/ Cory Hancock.
Washington, DC, December 2, 2021: Today, the IMF said that First Deputy Managing Director (FDMD) Geoffrey Okamoto would leave the Fund early next year. Gita Gopinath, currently the IMF's Chief Economist, is proposed to be the Fund's new First Deputy Managing Director. Kristalina Georgieva, the IMF's Managing Director, announced, "Both Geoffrey and Gita are tremendous colleagues — I am sad to see Geoffrey go. But, at the same time, I am delighted that Gita has decided to stay and accept the new responsibility of being our FDMD." Ms. Gopinath was to return to her academic position at Harvard University in January 2022.
Ms. Georgieva added: "Especially given that the pandemic has led to an increase in the scale and scope of the macroeconomic challenges facing our member countries. I believe that Gita — universally recognized as one of the world's leading macroeconomists — has precisely the expertise that we need for the FDMD role at this point. Indeed, her particular skill set—combined with her years of experience at the Fund as Chief Economist—make her uniquely well qualified. She is the right person at the right time."
Ms. Georgieva noted that Ms. Gopinath's contribution to the Fund's work has already been exceptional, especially her "intellectual leadership in helping the global economy and the Fund to navigate the twists and turns of the worst economic crisis of our lives." She also said that Ms. Gopinath—the first female Chief Economist in IMF history—has garnered respect and admiration across our member countries and the institution, with a proven track record in leading analytically rigorous work on a broad range of issues."
Ms. Georgieva observed that under Ms. Gopinath's leadership, the IMF's Research Department had gone from "strength to strength." For example, the IMF Research Department now does multilateral surveillance via The World Economic Outlook, a new analytical approach to help countries respond to international capital flows. Ms. Georgieva also praised Ms. Gopinath's recent work on a Pandemic Plan to end the COVID-19 crisis by setting targets to vaccinate the world at a feasible cost.
On her new appointment, Ms. Gopinath said:
"I am honored and humbled to become the IMF's next FDMD. Over the past three years, I have had the opportunity to experience first-hand and be a part of the hugely important work done by the IMF at the intersection of rigorous economic analysis and public policy. It is gratifying to see the positive impact of our work on economies and the lives of many people worldwide. As the pandemic continues its grip on us, the work of the Fund has never been more critical. I am very thankful to Kristalina and the Board for this opportunity, and so look forward to collaborating closely with all the incredibly brilliant and committed colleagues at the Fund, working with whom has been an absolute privilege."
Source: IMF
Indian School of Hospitality and Sommet Education Kick-off Development Plans for India Region
Photo: Benoît-Etienne Domenget, CEO, Sommet Education and Dilip Puri, Founder & CEO, Indian School of Hospitality.
GURUGRAM, India and GLION-SUR-MONTREUX, Switzerland, December 01, 2021 — Sommet Education, a world leader in hospitality and culinary education, has entered into a strategic partnership with the Indian School of Hospitality (ISH), founded by hospitality veteran Dilip Puri.
Sommet Education is the world's leader in hospitality management education. Its global network of prestigious institutions comprises Swiss-originated hospitality business schools Glion Institute of Higher Education and Les Roches.
The partners aim at offering a global standard of education to a more significant number of hospitality and culinary arts aspirants in the years to come in India and neighboring countries. Through this partnership, worldwide education reference in culinary arts, École Ducasse now has its first campus in India at ISH, and Les Roches, one of the world's leading hospitality business schools.
At an event in Delhi NCR to celebrate the partnership, Benoît-Etienne Domenget, CEO, Sommet Education, and Dilip Puri, Founder & CEO, Indian School of Hospitality, announced their future development plans for India. The first step of this plan is to expand the current ISH Gurugram campus, which will feature an additional 25,000 sq. ft of classrooms, training kitchens, and student experience areas. This expansion will take up the capacity of the campus to over 500 students per intake, with an overall total of 1,200 students per year. New facilities are under construction and will be operational by early 2022.
While ISH has set benchmarks with its global curriculum, faculty, and state-of-the-art infrastructure, expansion of the campus will lay grounds for more talented students to choose the exciting field of hospitality and culinary arts and become future leaders in the industry.
In terms of expansion outside the Gurugram campus, Sommet Education and ISH are evaluating opportunities for a second campus in Mumbai, Bengaluru, or Hyderabad. They also intend to launch a network of Ecole Ducasse studios in select cities across India. These culinary institutes will cater to the needs of professionals, enthusiasts, and career changers for upskilling and acquiring new skills. The targeted cities include New Delhi, Mumbai, and Bengaluru.
Together, the partners shared their ambition to become India's largest hospitality and culinary arts education player in the next three years.
Indian School of Hospitality (ISH) is an institute of higher education focused on reimagining hospitality education for today's generation and tomorrow's businesses. ISH is part of Sommet Education's global network of 18 campuses across eight countries.
At its ultra-modern campus in Gurugram (Delhi NCR), ISH offers degree and diploma, and certificate programs in hospitality management and culinary arts at the undergraduate and postgraduate levels.
Source: Sommet Education

redpajama_set_name: RedPajamaCommonCrawl


How do companies get a quote for courier services?
Organizations large and small often have the need for recurring delivery or 'courier' services.
Pharmacies utilize pharmacy deliver couriers to deliver their products to their customers, either in their homes, hospitals or care homes.
Medical labs use medical couriers to transport lab specimens and medical supplies.
All types of companies utilize couriers to deliver their products to consumers or their customers. These include E-commerce, automotive warehouses and stores, retail sales companies and distributors.
To get a quote on courier services in California, call Scott Parvin at HB Express, a California 3PL, (800) 690-6410 or email at Scottp@hbexpressit.com.