text:
package sample.docs;

import com.google.gdata.client.GoogleAuthTokenFactory.UserToken;
import com.google.gdata.client.GoogleService;
import com.google.gdata.client.Query;
import com.google.gdata.client.docs.DocsService;
import com.google.gdata.data.MediaContent;
import com.google.gdata.data.PlainTextConstruct;
import com.google.gdata.data.acl.AclEntry;
import com.google.gdata.data.acl.AclFeed;
import com.google.gdata.data.acl.AclRole;
import com.google.gdata.data.acl.AclScope;
import com.google.gdata.data.docs.DocumentEntry;
import com.google.gdata.data.docs.DocumentListEntry;
import com.google.gdata.data.docs.DocumentListFeed;
import com.google.gdata.data.docs.FolderEntry;
import com.google.gdata.data.docs.PresentationEntry;
import com.google.gdata.data.docs.RevisionFeed;
import com.google.gdata.data.docs.SpreadsheetEntry;
import com.google.gdata.data.media.MediaSource;
import com.google.gdata.util.AuthenticationException;
import com.google.gdata.util.ServiceException;

import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
import java.util.Set;

/**
 * An application that serves as a sample to show how the Documents List Service
 * can be used to search your documents, upload and download files, change
 * sharing permission, file documents in folders, and view revisions history.
 *
 *
 *
 */
public class DocumentList {
  public DocsService service;
  public GoogleService spreadsheetsService;

  public static final String DEFAULT_HOST = "docs.google.com";

  public static final String SPREADSHEETS_SERVICE_NAME = "wise";
  public static final String SPREADSHEETS_HOST = "spreadsheets.google.com";

  private final String URL_FEED = "/feeds";
  private final String URL_DOWNLOAD = "/download";
  private final String URL_DOCLIST_FEED = "/private/full";

  private final String URL_DEFAULT = "/default";
  private final String URL_FOLDERS = "/contents";
  private final String URL_ACL = "/acl";
  private final String URL_REVISIONS = "/revisions";

  private final String URL_CATEGORY_DOCUMENT = "/-/document";
  private final String URL_CATEGORY_SPREADSHEET = "/-/spreadsheet";
  private final String URL_CATEGORY_PDF = "/-/pdf";
  private final String URL_CATEGORY_PRESENTATION = "/-/presentation";
  private final String URL_CATEGORY_STARRED = "/-/starred";
  private final String URL_CATEGORY_TRASHED = "/-/trashed";
  private final String URL_CATEGORY_FOLDER = "/-/folder";
  private final String URL_CATEGORY_EXPORT = "/Export";

  private final String PARAMETER_SHOW_FOLDERS = "showfolders=true";

  private String host;

  private final Map<String, String> DOWNLOAD_DOCUMENT_FORMATS;
  {
    DOWNLOAD_DOCUMENT_FORMATS = new HashMap<String, String>();
    DOWNLOAD_DOCUMENT_FORMATS.put("doc", "doc");
    DOWNLOAD_DOCUMENT_FORMATS.put("txt", "txt");
    DOWNLOAD_DOCUMENT_FORMATS.put("odt", "odt");
    DOWNLOAD_DOCUMENT_FORMATS.put("pdf", "pdf");
    DOWNLOAD_DOCUMENT_FORMATS.put("png", "png");
    DOWNLOAD_DOCUMENT_FORMATS.put("rtf", "rtf");
    DOWNLOAD_DOCUMENT_FORMATS.put("html", "html");
    DOWNLOAD_DOCUMENT_FORMATS.put("zip", "zip");
  }

  private final Map<String, String> DOWNLOAD_PRESENTATION_FORMATS;
  {
    DOWNLOAD_PRESENTATION_FORMATS = new HashMap<String, String>();
    DOWNLOAD_PRESENTATION_FORMATS.put("pdf", "pdf");
    DOWNLOAD_PRESENTATION_FORMATS.put("png", "png");
    DOWNLOAD_PRESENTATION_FORMATS.put("ppt", "ppt");
    DOWNLOAD_PRESENTATION_FORMATS.put("swf", "swf");
    DOWNLOAD_PRESENTATION_FORMATS.put("txt", "txt");
  }

  private final Map<String, String> DOWNLOAD_SPREADSHEET_FORMATS;
  {
    DOWNLOAD_SPREADSHEET_FORMATS = new HashMap<String, String>();
    DOWNLOAD_SPREADSHEET_FORMATS.put("xls", "xls");
    DOWNLOAD_SPREADSHEET_FORMATS.put("ods", "ods");
    DOWNLOAD_SPREADSHEET_FORMATS.put("pdf", "pdf");
    DOWNLOAD_SPREADSHEET_FORMATS.put("csv", "csv");
    DOWNLOAD_SPREADSHEET_FORMATS.put("tsv", "tsv");
    DOWNLOAD_SPREADSHEET_FORMATS.put("html", "html");
  }

  /**
   * Constructor.
   *
   * @param applicationName name of the application.
   *
   * @throws DocumentListException
   */
  public DocumentList(String applicationName) throws DocumentListException {
    this(applicationName, DEFAULT_HOST);
  }

  /**
   * Constructor
   *
   * @param applicationName name of the application
   * @param host the host that contains the feeds
   *
   * @throws DocumentListException
   */
  public DocumentList(String applicationName, String host) throws DocumentListException {
    if (host == null) {
      throw new DocumentListException("null passed in required parameters");
    }

    service = new DocsService(applicationName);

    // Creating a spreadsheets service is necessary for downloading spreadsheets
    spreadsheetsService = new GoogleService(SPREADSHEETS_SERVICE_NAME, applicationName);

    this.host = host;
  }

  /**
   * Set user credentials based on a username and password.
   *
   * @param user username to log in with.
   * @param pass password for the user logging in.
   *
   * @throws AuthenticationException
   * @throws DocumentListException
   */
  public void login(String user, String pass) throws AuthenticationException,
      DocumentListException {
    if (user == null || pass == null) {
      throw new DocumentListException("null login credentials");
    }

    service.setUserCredentials(user, pass);
    spreadsheetsService.setUserCredentials(user, pass);
  }

  /**
   * Allow a user to login using an AuthSub token.
   *
   * @param token the token to be used when logging in.
   *
   * @throws AuthenticationException
   * @throws DocumentListException
   */
  public void loginWithAuthSubToken(String token) throws AuthenticationException,
      DocumentListException {
    if (token == null) {
      throw new DocumentListException("null login credentials");
    }

    service.setAuthSubToken(token);
    spreadsheetsService.setAuthSubToken(token);
  }

  /**
   * Create a new item in the DocList.
   *
   * @param title the title of the document to be created.
   * @param type the type of the document to be created. One of "spreadsheet",
   *        "presentation", or "document".
   *
   * @throws DocumentListException
   * @throws ServiceException
   * @throws IOException
   * @throws MalformedURLException
   */
  public DocumentListEntry createNew(String title, String type) throws MalformedURLException,
      IOException, ServiceException,
      DocumentListException {
    if (title == null || type == null) {
      throw new DocumentListException("null title or type");
    }

    DocumentListEntry newEntry = null;
    if (type.equals("document")) {
      newEntry = new DocumentEntry();
    } else if (type.equals("presentation")) {
      newEntry = new PresentationEntry();
    } else if (type.equals("spreadsheet")) {
      newEntry = new SpreadsheetEntry();
    } else if (type.equals("folder")) {
      newEntry = new FolderEntry();
    }

    newEntry.setTitle(new PlainTextConstruct(title));
    return service.insert(buildUrl(URL_DEFAULT + URL_DOCLIST_FEED), newEntry);
  }

  /**
   * Gets a feed containing the documents.
   *
   * @param category what types of documents to list:
   *     "all": lists all the doc objects (documents, spreadsheets, presentations)
   *     "folders": lists all doc objects including folders.
   *     "documents": lists only documents.
   *     "spreadsheets": lists only spreadsheets.
   *     "pdfs": lists only pdfs.
   *     "presentations": lists only presentations.
   *     "starred": lists only starred objects.
   *     "trashed": lists trashed objects.
   *
   * @throws IOException
   * @throws MalformedURLException
   * @throws ServiceException
   * @throws DocumentListException
   */
  public DocumentListFeed getDocsListFeed(String category) throws IOException,
      MalformedURLException, ServiceException, DocumentListException {
    if (category == null) {
      throw new DocumentListException("null category");
    }

    URL url;

    if (category.equals("all")) {
      url = buildUrl(URL_DEFAULT + URL_DOCLIST_FEED);
    } else if (category.equals("folders")) {
      String[] parameters = {PARAMETER_SHOW_FOLDERS};
      url = buildUrl(URL_DEFAULT + URL_DOCLIST_FEED + URL_CATEGORY_FOLDER, parameters);
    } else if (category.equals("documents")) {
      url = buildUrl(URL_DEFAULT + URL_DOCLIST_FEED + URL_CATEGORY_DOCUMENT);
    } else if (category.equals("spreadsheets")) {
      url = buildUrl(URL_DEFAULT + URL_DOCLIST_FEED + URL_CATEGORY_SPREADSHEET);
    } else if (category.equals("pdfs")) {
      url = buildUrl(URL_DEFAULT + URL_DOCLIST_FEED + URL_CATEGORY_PDF);
    } else if (category.equals("presentations")) {
      url = buildUrl(URL_DEFAULT + URL_DOCLIST_FEED + URL_CATEGORY_PRESENTATION);
    } else if (category.equals("starred")) {
      url = buildUrl(URL_DEFAULT + URL_DOCLIST_FEED + URL_CATEGORY_STARRED);
    } else if (category.equals("trashed")) {
      url = buildUrl(URL_DEFAULT + URL_DOCLIST_FEED + URL_CATEGORY_TRASHED);
    } else {
      return null;
    }

    return service.getFeed(url, DocumentListFeed.class);
  }

  /**
   * Gets the entry for the provided object id.
   *
   * @param resourceId the resource id of the object to fetch an entry for.
   *
   * @throws IOException
   * @throws MalformedURLException
   * @throws ServiceException
   * @throws DocumentListException
   */
  public DocumentListEntry getDocsListEntry(String resourceId) throws IOException,
      MalformedURLException, ServiceException, DocumentListException {
    if (resourceId == null) {
      throw new DocumentListException("null resourceId");
    }
    URL url = buildUrl(URL_DEFAULT + URL_DOCLIST_FEED + "/" + resourceId);

    return service.getEntry(url, DocumentListEntry.class);
  }

  /**
   * Gets the feed for all the objects contained in a folder.
   *
   * @param folderResourceId the resource id of the folder to return the feed
   *        for the contents.
   *
   * @throws IOException
   * @throws MalformedURLException
   * @throws ServiceException
   * @throws DocumentListException
   */
  public DocumentListFeed getFolderDocsListFeed(String folderResourceId) throws IOException,
      MalformedURLException, ServiceException, DocumentListException {
    if (folderResourceId == null) {
      throw new DocumentListException("null folderResourceId");
    }
    URL url = buildUrl(URL_DEFAULT + URL_DOCLIST_FEED + "/" + folderResourceId
        + URL_FOLDERS);
    return service.getFeed(url, DocumentListFeed.class);
  }

  /**
   * Gets a feed containing the documents.
   *
   * @param resourceId the resource id of the object to fetch revisions for.
   *
   * @throws IOException
   * @throws MalformedURLException
   * @throws ServiceException
   * @throws DocumentListException
   */
  public RevisionFeed getRevisionsFeed(String resourceId) throws IOException,
      MalformedURLException, ServiceException, DocumentListException {
    if (resourceId == null) {
      throw new DocumentListException("null resourceId");
    }

    URL url = buildUrl(URL_DEFAULT + URL_DOCLIST_FEED + "/" + resourceId
        + URL_REVISIONS);

    return service.getFeed(url, RevisionFeed.class);
  }

  /**
   * Search the documents, and return a feed of docs that match.
   *
   * @param searchParameters parameters to be used in searching criteria.
   *
   * @throws IOException
   * @throws MalformedURLException
   * @throws ServiceException
   * @throws DocumentListException
   */
  public DocumentListFeed search(Map<String, String> searchParameters) throws IOException,
      MalformedURLException, ServiceException, DocumentListException {
    return search(searchParameters, null);
  }

  /**
   * Search the documents, and return a feed of docs that match.
   *
   * @param searchParameters parameters to be used in searching criteria.
   *    accepted parameters are:
   *    "q": Typical search query
   *    "alt":
   *    "author":
   *    "updated-min": Lower bound on the last time a document' content was changed.
   *    "updated-max": Upper bound on the last time a document' content was changed.
   *    "edited-min": Lower bound on the last time a document was edited by the
   *        current user. This value corresponds to the app:edited value in the
   *        Atom entry, which represents changes to the document's content or metadata.
   *    "edited-max": Upper bound on the last time a document was edited by the
   *        current user. This value corresponds to the app:edited value in the
   *        Atom entry, which represents changes to the document's content or metadata.
   *    "title": Specifies the search terms for the title of a document.
   *        This parameter used without title-exact will only submit partial queries, not exact
   *        queries.
   *    "title-exact": Specifies whether the title query should be taken as an exact string.
   *        Meaningless without title. Possible values are true and false.
   *    "opened-min": Bounds on the last time a document was opened by the current user.
   *        Use the RFC 3339 timestamp format. For example: 2005-08-09T10:57:00-08:00
   *    "opened-max": Bounds on the last time a document was opened by the current user.
   *        Use the RFC 3339 timestamp format. For example: 2005-08-09T10:57:00-08:00
   *    "owner": Searches for documents with a specific owner.
   *        Use the email address of the owner.
   *    "writer": Searches for documents which can be written to by specific users.
   *        Use a single email address or a comma separated list of email addresses.
   *    "reader": Searches for documents which can be read by specific users.
   *        Use a single email address or a comma separated list of email addresses.
   *    "showfolders": Specifies whether the query should return folders as well as documents.
   *        Possible values are true and false.
   * @param category define the category to search. (documents, spreadsheets, presentations,
   *     starred, trashed, folders)
   *
   * @throws IOException
   * @throws MalformedURLException
   * @throws ServiceException
   * @throws DocumentListException
   */
  public DocumentListFeed search(Map<String, String> searchParameters, String category)
      throws IOException, MalformedURLException, ServiceException, DocumentListException {
    if (searchParameters == null) {
      throw new DocumentListException("searchParameters null");
    }

    URL url;

    if (category == null || category.equals("")) {
      url = buildUrl(URL_DEFAULT + URL_DOCLIST_FEED);
    } else if (category.equals("documents")) {
      url = buildUrl(URL_DEFAULT + URL_DOCLIST_FEED + URL_CATEGORY_DOCUMENT);
    } else if (category.equals("spreadsheets")) {
      url = buildUrl(URL_DEFAULT + URL_DOCLIST_FEED + URL_CATEGORY_SPREADSHEET);
    } else if (category.equals("presentations")) {
      url = buildUrl(URL_DEFAULT + URL_DOCLIST_FEED + URL_CATEGORY_PRESENTATION);
    } else if (category.equals("starred")) {
      url = buildUrl(URL_DEFAULT + URL_DOCLIST_FEED + URL_CATEGORY_STARRED);
    } else if (category.equals("trashed")) {
      url = buildUrl(URL_DEFAULT + URL_DOCLIST_FEED + URL_CATEGORY_TRASHED);
    } else if (category.equals("folders")) {
      url = buildUrl(URL_DEFAULT + URL_DOCLIST_FEED + URL_CATEGORY_FOLDER);
    } else {
      throw new DocumentListException("invaild category");
    }

    Query qry = new Query(url);

    for (String key : searchParameters.keySet()) {
      qry.setStringCustomParameter(key, searchParameters.get(key));
    }

    return service.query(qry, DocumentListFeed.class);
  }

  /**
   * Upload a file.
   *
   * @param filepath path to uploaded file.
   * @param title title to use for uploaded file.
   *
   * @throws ServiceException when the request causes an error in the Doclist
   *         service.
   * @throws IOException when an error occurs in communication with the Doclist
   *         service.
   * @throws DocumentListException
   */
  public DocumentListEntry uploadFile(String filepath, String title)
      throws IOException, ServiceException, DocumentListException {
    if (filepath == null || title == null) {
      throw new DocumentListException("null passed in for required parameters");
    }

    File file = new File(filepath);
    String mimeType = DocumentListEntry.MediaType.fromFileName(file.getName())
        .getMimeType();

    DocumentEntry newDocument = new DocumentEntry();
    newDocument.setFile(file, mimeType);
    newDocument.setTitle(new PlainTextConstruct(title));

    return service
        .insert(buildUrl(URL_DEFAULT + URL_DOCLIST_FEED), newDocument);
  }

  /**
   * Trash an object.
   *
   * @param resourceId the resource id of object to be trashed.
   * @param delete true to delete the permanently, false to move it to the
   *        trash.
   *
   * @throws IOException
   * @throws MalformedURLException
   * @throws ServiceException
   * @throws DocumentListException
   */
  public void trashObject(String resourceId, boolean delete) throws IOException,
      MalformedURLException, ServiceException, DocumentListException {
    if (resourceId == null) {
      throw new DocumentListException("null resourceId");
    }

    String feedUrl = URL_DEFAULT + URL_DOCLIST_FEED + "/" + resourceId;
    if (delete) {
      feedUrl += "?delete=true";
    }

    service.delete(buildUrl(feedUrl), getDocsListEntry(resourceId).getEtag());
  }

  /**
   * Remove an object from a folder.
   *
   * @param resourceId the resource id of an object to be removed from the
   *        folder.
   * @param folderResourceId the resource id of the folder to remove the object
   *        from.
   *
   * @throws IOException
   * @throws MalformedURLException
   * @throws ServiceException
   * @throws DocumentListException
   */
  public void removeFromFolder(String resourceId, String folderResourceId)
      throws IOException, MalformedURLException, ServiceException,
      DocumentListException {
    if (resourceId == null || folderResourceId == null) {
      throw new DocumentListException("null passed in for required parameters");
    }

    URL url = buildUrl(URL_DEFAULT + URL_DOCLIST_FEED + "/" + folderResourceId
        + URL_FOLDERS + "/" + resourceId);
    service.delete(url, getDocsListEntry(resourceId).getEtag());
  }

  /**
   * Downloads a file.
   *
   * @param exportUrl the full url of the export link to download the file from.
   * @param filepath path and name of the object to be saved as.
   *
   * @throws IOException
   * @throws MalformedURLException
   * @throws ServiceException
   * @throws DocumentListException
   */
  public void downloadFile(URL exportUrl, String filepath) throws IOException,
      MalformedURLException, ServiceException, DocumentListException {
    if (exportUrl == null || filepath == null) {
      throw new DocumentListException("null passed in for required parameters");
    }

    MediaContent mc = new MediaContent();
    mc.setUri(exportUrl.toString());
    MediaSource ms = service.getMedia(mc);

    InputStream inStream = null;
    FileOutputStream outStream = null;

    try {
      inStream = ms.getInputStream();
      outStream = new FileOutputStream(filepath);

      int c;
      while ((c = inStream.read()) != -1) {
        outStream.write(c);
      }
    } finally {
      if (inStream != null) {
        inStream.close();
      }
      if (outStream != null) {
        outStream.flush();
        outStream.close();
      }
    }
  }

  /**
   * Downloads a spreadsheet file.
   *
   * @param filepath path and name of the object to be saved as.
   * @param resourceId the resource id of the object to be downloaded.
   * @param format format to download the file to. The following file types are
   *        supported: spreadsheets: "ods", "pdf", "xls", "csv", "html", "tsv"
   *
   * @throws IOException
   * @throws MalformedURLException
   * @throws ServiceException
   * @throws DocumentListException
   */
  public void downloadSpreadsheet(String resourceId, String filepath,
      String format) throws IOException, MalformedURLException,
      ServiceException, DocumentListException {
    if (resourceId == null || filepath == null || format == null) {
      throw new DocumentListException("null passed in for required parameters");
    }

    UserToken docsToken = (UserToken) service.getAuthTokenFactory()
        .getAuthToken();
    UserToken spreadsheetsToken = (UserToken) spreadsheetsService
        .getAuthTokenFactory().getAuthToken();
    service.setUserToken(spreadsheetsToken.getValue());

    HashMap<String, String> parameters = new HashMap<String, String>();
    parameters
        .put("key", resourceId.substring(resourceId.lastIndexOf(':') + 1));
    parameters.put("exportFormat", format);

    // If exporting to .csv or .tsv, add the gid parameter to specify which
    // sheet to export
    if (format.equals(DOWNLOAD_SPREADSHEET_FORMATS.get("csv"))
        || format.equals(DOWNLOAD_SPREADSHEET_FORMATS.get("tsv"))) {
      parameters.put("gid", "0"); // download only the first sheet
    }

    URL url = buildUrl(SPREADSHEETS_HOST, URL_DOWNLOAD + "/spreadsheets"
        + URL_CATEGORY_EXPORT, parameters);

    downloadFile(url, filepath);

    // Restore docs token for our DocList client
    service.setUserToken(docsToken.getValue());
  }

  /**
   * Downloads a document.
   *
   * @param filepath path and name of the object to be saved as.
   * @param resourceId the resource id of the object to be downloaded.
   * @param format format to download the file to. The following file types are
   *        supported: documents: "doc", "txt", "odt", "png", "pdf", "rtf",
   *        "html"
   *
   * @throws IOException
   * @throws MalformedURLException
   * @throws ServiceException
   * @throws DocumentListException
   */
  public void downloadDocument(String resourceId, String filepath, String format)
      throws IOException, MalformedURLException, ServiceException,
      DocumentListException {
    if (resourceId == null || filepath == null || format == null) {
      throw new DocumentListException("null passed in for required parameters");
    }
    String[] parameters = {"docID=" + resourceId, "exportFormat=" + format};
    URL url = buildUrl(URL_DOWNLOAD + "/documents" + URL_CATEGORY_EXPORT,
        parameters);

    downloadFile(url, filepath);
  }

  /**
   * Downloads a presentation.
   *
   * @param filepath path and name of the object to be saved as.
   * @param resourceId the resource id of the object to be downloaded.
   * @param format format to download the file to. The following file types are
   *        supported: presentations: "pdf", "ppt", "png", "swf", "txt"
   *
   * @throws IOException
   * @throws MalformedURLException
   * @throws ServiceException
   * @throws DocumentListException
   */
  public void downloadPresentation(String resourceId, String filepath,
      String format) throws IOException, MalformedURLException,
      ServiceException, DocumentListException {
    if (resourceId == null || filepath == null || format == null) {
      throw new DocumentListException("null passed in for required parameters");
    }

    String[] parameters = {"docID=" + resourceId, "exportFormat=" + format};
    URL url = buildUrl(URL_DOWNLOAD + "/presentations" + URL_CATEGORY_EXPORT,
        parameters);

    downloadFile(url, filepath);
  }

  /**
   * Moves a object to a folder.
   *
   * @param resourceId the resource id of the object to be moved to the folder.
   * @param folderId the id of the folder to move the object to.
   *
   * @throws IOException
   * @throws MalformedURLException
   * @throws ServiceException
   * @throws DocumentListException
   */
  public DocumentListEntry moveObjectToFolder(String resourceId, String folderId)
      throws IOException, MalformedURLException, ServiceException, DocumentListException {
    if (resourceId == null || folderId == null) {
      throw new DocumentListException("null passed in for required parameters");
    }

    DocumentListEntry doc = new DocumentListEntry();
    doc.setId(buildUrl(URL_DEFAULT + URL_DOCLIST_FEED + "/" + resourceId).toString());

    URL url = buildUrl(URL_DEFAULT + URL_DOCLIST_FEED + "/" + folderId + URL_FOLDERS);
    return service.insert(url, doc);
  }

  /**
   * Gets the access control list for a object.
   *
   * @param resourceId the resource id of the object to retrieve the ACL for.
   *
   * @throws IOException
   * @throws MalformedURLException
   * @throws ServiceException
   * @throws DocumentListException
   */
  public AclFeed getAclFeed(String resourceId) throws IOException,
      MalformedURLException, ServiceException, DocumentListException {
    if (resourceId == null) {
      throw new DocumentListException("null resourceId");
    }

    URL url = buildUrl(URL_DEFAULT + URL_DOCLIST_FEED + "/" + resourceId
        + URL_ACL);

    return service.getFeed(url, AclFeed.class);
  }

  /**
   * Add an ACL role to an object.
   *
   * @param role the role of the ACL to be added to the object.
   * @param scope the scope for the ACL.
   * @param resourceId the resource id of the object to set the ACL for.
   *
   * @throws IOException
   * @throws MalformedURLException
   * @throws ServiceException
   * @throws DocumentListException
   */
  public AclEntry addAclRole(AclRole role, AclScope scope, String resourceId)
      throws IOException, MalformedURLException, ServiceException,
      DocumentListException {
    if (role == null || scope == null || resourceId == null) {
      throw new DocumentListException("null passed in for required parameters");
    }

    AclEntry entry = new AclEntry();
    entry.setRole(role);
    entry.setScope(scope);
    URL url = buildUrl(URL_DEFAULT + URL_DOCLIST_FEED + "/" + resourceId + URL_ACL);

    return service.insert(url, entry);
  }

  /**
   * Change the ACL role of a file.
   *
   * @param role the new role of the ACL to be updated.
   * @param scope the new scope for the ACL.
   * @param resourceId the resource id of the object to be updated.
   *
   * @throws IOException
   * @throws MalformedURLException
   * @throws ServiceException
   * @throws DocumentListException
   */
  public AclEntry changeAclRole(AclRole role, AclScope scope, String resourceId)
      throws IOException, ServiceException, DocumentListException {
    if (role == null || scope == null || resourceId == null) {
      throw new DocumentListException("null passed in for required parameters");
    }

    URL url = buildUrl(URL_DEFAULT + URL_DOCLIST_FEED + "/" + resourceId
        + URL_ACL);

    return service.update(url, scope, role);
  }

  /**
   * Remove an ACL role from a object.
   *
   * @param scope scope of the ACL to be removed.
   * @param email email address to remove the role of.
   * @param resourceId the resource id of the object to remove the role from.
   *
   * @throws IOException
   * @throws MalformedURLException
   * @throws ServiceException
   * @throws DocumentListException
   */
  public void removeAclRole(String scope, String email, String resourceId) throws IOException,
      MalformedURLException, ServiceException, DocumentListException {
    if (scope == null || email == null || resourceId == null) {
      throw new DocumentListException("null passed in for required parameters");
    }

    URL url = buildUrl(URL_DEFAULT + URL_DOCLIST_FEED + "/" + resourceId
        + URL_ACL + "/" + scope + "%3A" + email);

    service.delete(url);
  }

  /**
   * Returns the format code based on a file extension, and object id.
   *
   * @param resourceId the resource id of the object you want the format for.
   * @param ext extension of the file you want the format for.
   *
   * @throws DocumentListException
   */
  public String getDownloadFormat(String resourceId, String ext) throws DocumentListException {
    if (resourceId == null || ext == null) {
      throw new DocumentListException("null passed in for required parameters");
    }

    if (resourceId.indexOf("document") == 0) {
      if (DOWNLOAD_DOCUMENT_FORMATS.containsKey(ext)) {
        return DOWNLOAD_DOCUMENT_FORMATS.get(ext);
      }
    } else if (resourceId.indexOf("presentation") == 0) {
      if (DOWNLOAD_PRESENTATION_FORMATS.containsKey(ext)) {
        return DOWNLOAD_PRESENTATION_FORMATS.get(ext);
      }
    } else if (resourceId.indexOf("spreadsheet") == 0) {
      if (DOWNLOAD_SPREADSHEET_FORMATS.containsKey(ext)) {
        return DOWNLOAD_SPREADSHEET_FORMATS.get(ext);
      }
    }
    throw new DocumentListException("invalid document type");
  }

  /**
   * Gets the suffix of the resourceId. If the resourceId is
   * "document:dh3bw3j_0f7xmjhd8", "dh3bw3j_0f7xmjhd8" will be returned.
   *
   * @param resourceId the resource id to extract the suffix from.
   *
   * @throws DocumentListException
   */
  public String getResourceIdSuffix(String resourceId) throws DocumentListException {
    if (resourceId == null) {
      throw new DocumentListException("null resourceId");
    }

    if (resourceId.indexOf("%3A") != -1) {
      return resourceId.substring(resourceId.lastIndexOf("%3A") + 3);
    } else if (resourceId.indexOf(":") != -1) {
      return resourceId.substring(resourceId.lastIndexOf(":") + 1);
    }
    throw new DocumentListException("Bad resourceId");
  }

  /**
   * Gets the prefix of the resourceId. If the resourceId is
   * "document:dh3bw3j_0f7xmjhd8", "document" will be returned.
   *
   * @param resourceId the resource id to extract the suffix from.
   *
   * @throws DocumentListException
   */
  public String getResourceIdPrefix(String resourceId) throws DocumentListException {
    if (resourceId == null) {
      throw new DocumentListException("null resourceId");
    }

    if (resourceId.indexOf("%3A") != -1) {
      return resourceId.substring(0, resourceId.indexOf("%3A"));
    } else if (resourceId.indexOf(":") != -1) {
      return resourceId.substring(0, resourceId.indexOf(":"));
    } else {
      throw new DocumentListException("Bad resourceId");
    }
  }

  /**
   * Builds a URL from a patch.
   *
   * @param path the path to add to the protocol/host
   *
   * @throws MalformedURLException
   * @throws DocumentListException
   */
  private URL buildUrl(String path) throws MalformedURLException, DocumentListException {
    if (path == null) {
      throw new DocumentListException("null path");
    }

    return buildUrl(path, null);
  }

  /**
   * Builds a URL with parameters.
   *
   * @param path the path to add to the protocol/host
   * @param parameters parameters to be added to the URL.
   *
   * @throws MalformedURLException
   * @throws DocumentListException
   */
  private URL buildUrl(String path, String[] parameters)
      throws MalformedURLException, DocumentListException {
    if (path == null) {
      throw new DocumentListException("null path");
    }

    return buildUrl(host, path, parameters);
  }

  /**
   * Builds a URL with parameters.
   *
   * @param domain the domain of the server
   * @param path the path to add to the protocol/host
   * @param parameters parameters to be added to the URL.
   *
   * @throws MalformedURLException
   * @throws DocumentListException
   */
  private URL buildUrl(String domain, String path, String[] parameters)
      throws MalformedURLException, DocumentListException {
    if (path == null) {
      throw new DocumentListException("null path");
    }

    StringBuffer url = new StringBuffer();
    url.append("https://" + domain + URL_FEED + path);

    if (parameters != null && parameters.length > 0) {
      url.append("?");
      for (int i = 0; i < parameters.length; i++) {
        url.append(parameters[i]);
        if (i != (parameters.length - 1)) {
          url.append("&");
        }
      }
    }

    return new URL(url.toString());
  }

  /**
   * Builds a URL with parameters.
   *
   * @param domain the domain of the server
   * @param path the path to add to the protocol/host
   * @param parameters parameters to be added to the URL as key value pairs.
   *
   * @throws MalformedURLException
   * @throws DocumentListException
   */
  private URL buildUrl(String domain, String path, Map<String, String> parameters)
      throws MalformedURLException, DocumentListException {
    if (path == null) {
      throw new DocumentListException("null path");
    }

    StringBuffer url = new StringBuffer();
    url.append("https://" + domain + URL_FEED + path);

    if (parameters != null && parameters.size() > 0) {
      Set<Map.Entry<String, String>> params = parameters.entrySet();
      Iterator<Map.Entry<String, String>> itr = params.iterator();

      url.append("?");
      while (itr.hasNext()) {
        Map.Entry<String, String> entry = itr.next();
        url.append(entry.getKey() + "=" + entry.getValue());
        if (itr.hasNext()) {
          url.append("&");
        }
      }
    }

    return new URL(url.toString());
  }
}

redpajama_set_name: RedPajamaGithub


text:
Saudi Arabia Allowing 8 Year Old Girls to Marry Old Men
In the nation of Saudi Arabia the despotic feudal system remains and the rights of girls, women, non-Muslims, Shia Muslims, and others, are violated by the Sunni Islamic justice system. Despite this, major nations still desire to trade with Saudi Arabia and the oil factor and geopolitical issue, appears to override human rights. So when will Saudi Arabia be challenged by the international community?
Before focusing on deeper political issues it is important to mention that laws in Saudi Arabia are based on Sharia Islamic Law and the Hadiths. Therefore, we are not talking about people on the margins of society who have no power, but who support child marriage; on the contrary, we are talking about major political leaders and Sunni Muslim religious leaders who support child marriage.
Therefore, the kingdom's Grand Mufti, Sheikh Abdul Aziz al-Sheikh, supports child marriage and to him, and other Sunni Islamic leaders, they will site the life of Mohammed, who also married a child. Given this, Sheikh Abdul Aziz al-Sheikh supports young girls as young as ten years of age to get married to elderly men. He stated that "It is incorrect to say that it's not permitted to marry off girls who are 15 and younger."
The Grand Mufti, of course, will look to Islamic scripture and focus on the Hadiths and then regulate this within Islamic Sharia Law. So he further added that "A girl aged 10 or 12 can be married. Those who think she's too young are wrong and they are being unfair to her." While only last month, a Saudi Arabian judge justified the right of an 8-year-old girl to be married to a 47-year-old man. The judge, Sheikh Habib Abdallah al-Habib, refused to annul the marriage after the mother signed a petition against the marriage of her young daughter.
This problem does not only apply to Saudi Arabia because violations like this can be found in many other societies, however, the political ties between major nations and Saudi Arabia is a reality. Also, in other poorer societies the rule of law may either be weak or centralization via the state may not be enforceable. However, in Saudi Arabia, we are talking about the judicial system, leading Sunni Islamic clerics, and of course the government is turning a blind eye to this serious issue.
Today, in Saudi Arabia, and other nations like Yemen, you are seeing grass-roots organizations rising up to challenge the conservative status quo. So some moderate Sunni Muslim clerics are speaking out and the media is also highlighting these cases in order to challenge the system. Therefore, some changes are happening and these brave individuals, organizations, and clerics, need international support.
Wajeha al-Huwaider also spoke out against the violation of human rights in Saudi Arabia. Wajeha al-Huwaider stated that it is essential to stand up against people who want to "keep us backward and in the dark ages." This brave individual is the co-founder of the Society of Defending Women's Rights in Saudi Arabia. Organizations like this need greater global media coverage and the same applies to economic and political support.
Change of course must come from within but outside nations, institutions, and individuals, must play their part because issues like this must not be held to ransom by any one nation or religious faith. Issues like slavery, religious persecution, child marriages, and other global issues, must come under a global charter.
Of course, it is clear that nations and societies are at different development stages but issues like child marriage and slavery can not be ignored. So nations have a collective responsibility to defend people who are not protected by national laws. This does not imply that direct confrontation is the way, but economic, political, and other pressures must be enforced and the same applies to isolation within international institutions.
If America and the European Union, and other major democracies, are concerned about human rights and social justice, then they must stand up to the ruling elites in Saudi Arabia. After all, conversion from Islam to Christianity is punishable by death in Saudi Arabia and not one Buddhist temple or Christian church is allowed in this nation.
When we add religious persecution to child marriage, alongside the persecution of women, then clearly this nation needs to be challenged. The democratic world "must not sell its soul for oil and geopolitics."After all, the global community ignored the role of Saudi Arabia with regards to global terrorism, and September 11 was the ultimate consequence of this, for the majority of attackers were Saudi nationals. Therefore, violations of human rights will come back to haunt other societies if they keep on turning a blind eye and the issue of child marriage is very serious.
Lee Jay Walker
leejayteach@hotmail.com
THE SEOUL TIMES
Lee Jay Walker serves as Tokyo Correspondent of The Seoul Times. He specializes in int'l relations and geopolitics. He is also involved in analyst work and research on business. After finishing BA degree in East European Studies at the University of London, He earned MA degree in Asia Pacific Studies in Nottingham Trent University. He also studied business at London Institute.

redpajama_set_name: RedPajamaCommonCrawl


text:
Together in Monaco è un CD a nome di Curtis Fuller - Paul Jeffrey Sextet, pubblicato dalla Amosaya Music Records nel 1997. Il disco fu registrato nel maggio 1996 a Nizza, Francia.

Tracce

Musicisti
Brani numero 1, 2, 3, 5 e 6
 Curtis Fuller - trombone
 Paul Jeffrey - sassofono tenore
 Charles Vaudano - tromba
 Jeb Patton - pianoforte
 Marc Abrams - contrabbasso
 Washington Duke - batteria
Brano numero 4
 Paul Jeffrey - sassofono tenore
 Marcello Tonolo - pianoforte
 Calvin Jones - contrabbasso
 Michael Scott - batteria

Note

Collegamenti esterni

  (data pubblicazione CD, durata brani)
  (crediti musicisti e date registrazioni)

redpajama_set_name: RedPajamaWikipedia


text:
Oh My God What a Complete Aisling The Novel
Aisling is 28, and she's a complete … Aisling.
Living 'Down Home' with Mammy and Daddy, she commutes to her good pensionable job in Dublin and stays two nights a week with her boyfriend of seven years, John.
But Aisling wants more. She wants the ring on her finger. She wants the hen with the willy straws. She wants the grand big house with the utility room of her dreams.
When a week in Tenerife doesn't result in a proposal, Aisling decides she's had enough. It's time for a change.
A new start, a love triangle (well, more of a square) and some home truths force Aisling out of her comfort zone and into a life she never imagined.
Praise for Oh My God, What a Complete Aisling
'Oh lads! This book! There aren't enough words for how much I love it. It's feckin' HILAIRE and very touching'. MARIAN KEYES
'Everyone in Ireland was reading Oh My God, What A Complete Aisling this Christmas and I got thoroughly swept up in the hype, devouring it in a couple of sittings. It's been called 'An Irish Bridget Jones' – and that should give you an idea of what you're dealing with. It's sweet and it's funny and it's moving.' LYNN ENRIGHT, THE POOL
'If I had a book of the year award for 2017 it would go to Oh My God, What a Complete Aisling by Emer McLysaght and Sarah Breen. I was expecting comedy and social satire but what I hadn't bargained for was the sheer humanity of the book that left me giggling at some pages and sobbing at others. Aisling will be back and I'll be waiting to hear more.' SINEAD CROWLEY
'A loving ode to a certain type of Irish woman that's hilarious, comforting and warm. A hot water bottle of a book, if you will.' THE DAILY EDGE
'A hilarious and heart-warming journey with our favourite country girl'. THE IRISH TIMES
'An utter ray of sunshine. Now that I've finished the book, I miss Aisling so much that it hurts. There's a beautiful rhythm to the way that Sarah Breen and Emer McLysaght have written OMGWACA; I've rarely read a book that has such a strong, distinctive voice but more than that, it's funny. Proper funny. Actual, literal, LOL funny. I laughed. Out loud. On the tube.' RED MAGAZINE
'Sweet, charming, funny and poignant.' THE JOURNAL
'There's a little bit of Aisling in all of us'. THE SUNDAY TIMES
'One of the funniest books I've read in twenty years.' PAUL HOWARD
'One of my fave novels of 2017. It really does remind me of Marian Keyes.' LOUISE O'NEILL
€9.99 VAT Inc.
By Emer McLysaght By Sarah Breen
Emer McLysaght is former editor of DailyEdge.ie, and has worked extensively in journalism and radio. She writes a column for The Sunday Business Post. She lives in Dublin with her cat, Pip
Sarah Breen is a journalist whose work has appeared in Stellar, Image, U, the Irish Independent and she is currently Assistant Features Editor at The Gloss. She lives in Dublin with her husband and their two daughters.


Hello,in this c# tutorial i will explain how to display data from sql server to the datagridview in csharp.then how to update and delete that data from datagridview.SqlCommandBuilder predefined class used here for display and modify data in to datagridview .
3.This class cannot be inherited.
1 .Create a database name as Employee .Create a Table name as EmployeeDetails in this database.


text:
Joe, Lo, And Dibs Hang Up on Aubrey Huff
"The former Major Leaguer has become a polarizing figure in retirement, largely due to his activity on social media."
He was one of the best players on their 2010 World Series winning team, but the San Francisco Giants told Aubrey Huff he's not welcome at their 10-year reunion celebration later this season. Tuesday morning, Huff joined the Bay Area's 95.7 The Game to discuss the Giants decision, but it took just eight minutes for the morning show to hang up on him.
Joe, Lo and Dibbs, featuring Joe Fortenbaugh, former All-Pro fullback Lorenzo Neal and Jim Kozimor who was filling in for Dan Dibley, welcomed Huff to the show with an open mind, offering him the opportunity to share his point of view.
The former Major Leaguer has become a polarizing figure in retirement, largely due to his activity on social media. Beyond his political views, Huff has shared numerous offensive opinions on Twitter, some of which he refers to as "satire."
Huff's offensive behavior includes his infamous tweet about kidnapping Iranian women.
"Let's get a flight over and kidnap about 10 each. We can bring them back here as they fan us and feed us grapes, amongst other things," he wrote earlier this year.
When Fortenbaugh asked if he regrets the tweet, Huff said he only regrets saying "kidnap" and excused the decision because he hadn't had his morning coffee yet.
"I hadn't had my coffee yet."@aubrey_huff on his deleted tweet about kidnapping Iranian women 🤦♂ pic.twitter.com/5fqFQRV50j
— 95.7 The Game (@957thegame) February 18, 2020
While many people in baseball celebrated Alyssa Nakken becoming the first female full-time coach in MLB history last month with the Giants, Huff spoke out against the hire and doubled down on his opinion Tuesday morning.
"There's so many more people, especially men who grind it out who deserve that spot more than she does. But I also don't believe that men belong in women's college sports or sports in general, either."
"Why would they want to be? I wouldn't want to coach women in sports." Huff said while laughing. "Women are tough enough to deal with anyway."
It was the final straw for Fortenbaugh and the 95.7 The Game morning show.
"Aubrey, do you really think right now is the time to make that joke?" Fortenbaugh asked.
"Hey man, you guys have me on, this is how I joke. You don't like it? You don't have to interview me," Huff answered.
Shortly after, a disgusted Fortenbaugh said he regretted bringing Huff onto the show and hung up on him before the former Giant could reply, ending the interview after eight minutes.
"I can completely understand why the Giants would want nothing to do with you…"
"You're exactly the turd you make yourself out to be on social media."
Click. @joefortenbaugh hangs up on Aubrey Huff ☎ pic.twitter.com/yIRcRBFJUg
Related Topics:95.7 The GameAubrey HuffBarrett Sports MediaBrandon ContesBSMJason BarrettJoe Lo and DibsSan Francisco Giantssports radio
Raccoons Invade ESPN Cleveland
A's Games Leave Broadcast Radio In Bay Area


I'm quite grateful to the former colleague who left this book in my office despite my protestations that I don't have the time to read this as well and that I'm not interested and that I already have several dozen books at home waiting to be read (and reviewed) anyway. I can honestly say that I would never have picked up The Great Man myself. The book cover and synopsis looked totally unappealing to me. Since she always reads everything I lend her I felt compelled to at least take this book home with me and add it to the stack of books she's already forced on my in the previous months. And the very next day I decided to read the first few pages so I would be justified to say "not my cuppa" and put it aside – at least I would have tried. Interestingly, I kept reading.
The story-telling is intriguing, the themes and topics pile up and you get the feeling that you could write academic papers on the treatment of this and that aspect in the novel along the way. It gets you thinking about all kinds of existential questions.
The mystery or big secret (a bet, really) was hinted at early on but took completely second place to my reading and enjoyment of the novel. I just wanted to read on and didn't know why. I didn't identify with any of the characters, didn't even feel particularly sympathetic towards them, I wasn't interested in seeing what would happen to them or what would be revealed about their past and intricacies. They sort of crept up on me. I didn't get actively invested in them – or I never noticed when I did. When one of the characters died (which was to be expected) I did feel bittersweet about it even though she was the character I liked the least, a cantankerous, bitter, old women – ghastly, lonely. Brilliantly portrayed by Christensen!
The great man of the title is painter Oscar who we are supposed to learn more about through the narratives of the women in his life as told to two interviewers researching for their books. Oscar is not the hero of this book. He's not even a subject. He's an object and in light of what is being revealed about his character, his treatment of people and art, his very own insecurities, this objectification is excellently executed. Oscar wasn't special or especially interesting, yet he seemed to be a great influence or focal points in the lives of the women portrayed here. It's a turning of the tables. In a way, a reversal in the question of victim and culprit. Heroines are characterised as "strong women" more often than not these days, the women in The Great Man come out stronger than most and you would never have suspected it on a glance. It's a bit like "The First Wives Club," only that the women here never have to take revenge as they don't see themselves as the victims of a man. These women do not glorify the supposedly "great man" in their lives, they don't even seem to respect him much. They are quite independent, contrary to expectations.
The two biographers (interviewers), who compete with each other without knowing and who unwittingly become instruments of the women's controlling of the narrative, only play a marginal role, which makes them even more interesting. The women are only supposed to provide details for the portrayal of the great man, Oscar, but instead of becoming minor objects in the story of the biographies' subject, they become puppet masters instead.
Maxine's bitterness any cynicism and disappointment with the whole world and people at large is suffocating and stifling and oddly entertaining, at least for me. I felt sorry for her but also was very amused by her curmudgeonly rants.
There are also excursions into politics, culture and its representation, in particular African-American culture "mumbo jumbo" as vocalised by the secondary character of Paula Jabar.
As I said, the book is full with all kinds of themes to ponder. There's a lot about self-reflection, taking risks in life, suffering, rejection, and failure. In tandem with the topic of ageing, there's also quite a bit of reflection on death and dying, a topic I usually give a wide berth (unless it's in genre fiction – there it's awesome in al its forms! :o)): death is presented as a freedom from need, but the terrifying dimension, described as a suspension in nothingness, is also acknowledged. Well, there's a lot to think about, but not to get dragged down by. The tone of the novel is never heavy, never depressing.
Well, this has already gone on longer than expected so I'll end here. The Great Man was intriguing and beguiling reading for me, something completely different from my usual literary diet.


text:
Business Insider | Life
We 'audited' 5 kilograms of Quality Streets in South Africa - and the results were surprising
Andrew Thompson , Business Insider SA
Quality Street audit. Photo: Andrew Smith
Quality Street is a popular confectionary brand in South Africa - especially towards the end of the year.
But the assortment of sweets in each packet or box is far from equal, and not particularly random, either.
We sifted through five kilograms of Quality Streets to see which are the rarest, and most common, you'll find in a 500g bag.
More than 13% of each bag was made up of the rectangular toffees that's surely nobody's first choice.
For more articles, go to www.BusinessInsider.co.za.
Quality Street, a brand founded in England in the 1930s, is a popular product in South Africa - especially as the end of year approaches. The packaging, and varieties, differ between countries, and South Africa has long done away with the classy tins and a few old favourites.
Even so, Nestle, who now manufactures Quality Street around the world, sold more than 300,000 kilograms of the assorted individually wrapped toffees and chocolates in the last quarter of 2020, in South Africa alone.
And a recent social media "audit" in the UK on the types and quantities of chocolates and toffees included in a single box of the sweets has put the sweets back in the spotlight - and revealed discrepancies in the assortment of Quality Street types per box:
This variability, and individuals' preferences towards different types, is, according to Nestle, central to the popularity of Quality Street - and the result of careful research.
"The reality is that every person has their favourite Quality Street sweet. The fact that the pack contains a variety of sweets [means] it therefore caters for different tastes and preferences," Nestlé South Africa's Zweli Mnisi told Business Insider South Africa.
The seemingly random allocation of each type is apparently part of the fun, and evident frustration, behind the sweets - but after sifting through five kilograms of the wrapped goods it's clear that the quantities of each in a single bag isn't random, but rather based on calculations made down to the gram.
Our Quality Street audit findings
Business Insider bought ten 500g bags of Quality Street to test the variability, value, and ratio of each type of chocolate present. Here's what we found:
In each bag sold in South Africa there are 12 varieties on offer:
Fudge Delight
Enchanted Toffee
Deluxe Toffee Cup
Nut Toffee Royale
Hazelnut Surprise
Duo Decadence
Dessert Coffee Cream
Tropical Coconut
Noisette Supreme
Luxury Toffee Finger
Dairy Fresh Toffee
Strawberry Secret
According to a Nestle UK survey in 2016, the all-time favourite Quality Street is "the purple one", which South Africa calls Nut Toffee Royale. Second place belongs to Strawberry Secret, with the "green triangle", or Noisette Supreme, coming in third.
The total quantity and variety of sweets vary between each individual bag - in some cases significantly.
Quality Street Audit
If you're lucky, you might get as many as 58 sweets in a bag. The lowest total we had was 56. The average over 10 bags was 56.6 sweets per bag. In all cases, however, you'll get 500g of sweets per bag - almost always to the exact gram.
According to our findings, the sweet you're most likely to find in a bag is the Dairy Fresh Toffee - a squat rectangular toffee in a pale yellow wrapper, which is one of the simplest and chunkiest (at 8 grams) on offer.
There was an average of 7.5 of these toffees per bag, making up 13.25% of all sweets - it's therefore no surprise that these are often the last ones to leave the box.
The two rarest, and thus presumedly most valuable, sweets in the world of Quality Street economics is a tie between the stalwart Luxury Toffee Finger (the long yellow one, which is toffee covered in a thin layer of chocolate) and Duo Decadence (a solid oval white and milk chocolate combination, that Mnisi says is soon to be discontinued).
There were exactly two of each in all 10 bags that we audited - making up just 3.5% of the total bag.
These rare varieties were the most consistent, too, with no bag containing more or less than two - while the remainder of the sweets varied in quantity, sometimes by as much as 33%.
The UK's favourite purple one is in ninth place, and the strawberry one is in seventh place.
On the fringes is the green triangular Noisette Supreme. Were it not for one remarkable bag that had two bonus triangles, these would be almost as cherished as the other two rarities - there were an average of just 3.2 per bag, making up 5.65% of an average bag.
The most common non-toffee sweets were Dessert Coffee Cream (12% of each bag), followed by Tropical Coconut (11.5%), and Deluxe Toffee Cup (11.1%).
From our findings it seems as if there are three consistent categories in every Quality Street bag - the extremely rare, the extremely common, and the happy middle ground.
Presumably the extremely rare are popular but expensive to make; the extremely common cheap enough to excuse their unpopularity and bulk up the bag; and the happy middle ground enough to bridge the gap between the two.
Nestle confirmed to Business Insider South Africa that there is little equal about the distribution of the sweets in each bag - instead, according to Mnisi, it's the result of "a balance of a few factors, including consumer preference."
Deciding which items appear in an assorted bag is usually the domain of an industrial engineer - who will tweak plant machinery and assortments to make the most economical sense for the business, while not alienating customers in the process.
Gabriel Roodt, managing director at Africa Industrial Engineering Services, has worked on several similar projects for other companies. Roodt says that unlike in the past, consumer feedback is one of the leading factors behind the makeup of assorted bags like these - but that there are a few other important factors at play.
"You won't be able to satisfy every customer's choice, so scientifically what they have to do is gather information from market research sample groups, which they use to mix the contents of a bag," says Roodt.
"Some companies vary the assortment every couple of months, which is based on feedback from consumers - it does happen that they get complaints about mixes being different from what it was," he says.
But the makeup of a bag only has as much to do with customer satisfaction as it needs to - in selling such vast quantities of chocolate around the world, a company like Nestle will weigh up customer satisfaction against the cost of production and generating maximum profit.
In some cases, says Roodt, companies will identify the most popular items, and if they happen to be the most expensive to produce, they'll provide a bare minimum of these to satisfy customers. In the case of Quality Street, these would appear to be the long thin chocolate covered toffees, and the milk and white chocolate ovals. They may also reduce the weight of the more popular ones while attempting to retain their essence.
"There's certainly a cost factor that influences the decisions, and they obviously price it per bag. They factor in how many of the cheapest and most expensive to include, and they'll make the bag up according to that," says Roodt.
Although the allotment seems somewhat random, Roodt says companies like Nestle will invest in machines that can carefully allocate products to bags based on colours or types - and calculations often come down to fractions of a gram.
"In general terms they look at the cost of what they're offering, the quality, and consumer feedback. They even take into consideration the wrappings of the individual sweets, which have different costs associated with them," Roodt says.
The intricacy isn't just about flavours and specific sweet types either, Roodt says - manufacturers of products like Jelly Tots and Smarties will distribute colours among packs according to market research and customer preference.
Desperate for your favourite?
Customers desperate to gorge on their favourites - or who live in a household that shares a common favourite - are, largely, out of luck.
Unlike in the United Kingdom, where you can customise a tin of Quality Street to enjoy more of your favourites, Mnisi says there are no plans to do the same in South Africa. Instead, he says, they will continue to mix the bags up based on "consumer preference".
Roodt says assorted bags often make more sense than special editions featuring a single type.
"There have been studies where one type per bag doesn't do as well as a mixed bag, so it's usually driven by the consumer," he says.
If you're terrified of picking a bag overrun by a certain type, though, your best bet may be to look for the 500g plastic bags, rather than the smaller boxes. These have a small transparent window that you can use to identify a rough outline of the makeup on the specific bag.
But even this window - offered only as a small slither at the bottom of a bloated bag - seems to have been carefully thought out so as to avoid picky consumers trying to avoid the burden of a bag too laden with those bulky Dairy Fresh Toffees.
1.5m children in West Africa work in the chocolate industry - mostly in dangerous jobs
First Tempo, now Chocolate Log: Another SA favourite bites the dust
Cadbury's name-free wrappers may cause some confusion – but they are for a good cause


It should be acknowledged on the onset, that the photographer may be skilled or an amateur, however the results can't be categorized as amateurish or professional based mostly on the profession of the photographer. The Unbiased Photographer reserves the precise to change, droop, to discontinue permanently or briefly, or cancel the Competition at any time and with out being required to offer any clarification, in case it's in the incapacity to proceed operating as anticipated, for any motive that's exterior it is jurisdiction and influence.
You may discover a lot of assets all through the website for photographers who wish to develop their business expertise as a lot as their technical skills. Photographers seize professional-high quality images. This information offers in-depth info that can help readers determine if a images degree can put them on the precise career path.
The time period professional may additionally indicate preparation, for instance, by academic research or apprenticeship by the photographer in pursuit of photographic skills. Photographers retain all copyright on their photos and the competitors entries are judged anonymously.
The Impartial Photographer will refund the entry fees to all Members if the Competitors is completely suspended for a selected month, and The Independent Photographer will not reserve rights to make use of any of the photographs which were submitted that specific month.
If the customer wishes to be able to reproduce the photos themselves, they may talk about an alternative contract with the photographer in advance earlier than the pictures are taken, through which a bigger up entrance charge could also be paid in exchange for reprint rights passing to the customer.


text:
Buttersäureethylester ist ein Carbonsäureester mit charakteristischem Ananasgeruch.

Wegen des ausgeprägt aromatischen Geruches werden die Ester kurzkettiger Carbonsäuren – wie Buttersäureethylester – auch Fruchtester genannt (siehe auch Fruchtaroma).

Buttersäureethylester wird durch eine Veresterung von Buttersäure mit Ethanol hergestellt. Verwendung findet Buttersäureethylester als Aroma in der Parfümherstellung und in Getränken, z. B. in Likören und in Orangensaft.

Eigenschaften
Die erste ausführliche Beschreibung des Buttersäureethylesters von 1843 nennt folgende Eigenschaften: "er ist flüssig, farblos, sehr beweglich, sehr leicht entzündbar und besitzt einen angenehmen Geruch, welcher eine Aehnlichkeit hat mit dem der Ananas. Er ist wenig löslich in Wasser, in allen Verhältnissen aber auflöslich in Alkohol und Methanol. […] Alkalien, selbst bei Kochhitze, zersetzen ihn nur langsam."

Vorkommen
Buttersäureethylester kommt nicht nur in der Ananas vor, sondern trägt auch zum typischen Aroma von Erdbeeren, Äpfeln, Bananen, Pfirsichen und Orangen bei. Auch in alkoholischen Getränken und Käse kann er nachgewiesen werden. Er ist zusammen mit Decanal der wichtigste Beitrag zum Geschmack von Orangensaft und wird diesem daher häufig als Aromastoff zugesetzt. Buttersäureethylester zählt zu den wichtigen Komponenten von frischem Ananasgeruch, insbesondere bei der Sorte Smooth Cayenne. Es gibt aber auch Ananassorten, deren Aroma von anderen Estern dominiert wird.

Einzelnachweise

Buttersäureester
Aromastoff (EU)
Futtermittelzusatzstoff (EU)


Our spacious guest rooms and suites feature complimentary WiFi, secure remote printing in our business center, a large work desk and ergonomic desk chair. Enjoy a restful night on our king- or queen-sized beds with our signature mattresses offering adjustable firmness. If you prefer to dine in your guest room, order room service or heat a prepared meal from Pavilion Pantry® in the microwave.
Enjoy complimentary WiFi in our business center, lobby and restaurant. Relax with an evening cocktail in our Pavilion Lounge. Maintain your home workout routine in our fitness center or with a swim in our heated indoor pool. Unwind with a relaxing soak in the indoor whirlpool spa.
Our Westbury hotel is conveniently located near Long Island restaurants, shops and attractions. During summer months, join locals at nearby Jones Beach or take a day trip to the Hamptons or Fire Island. Westbury attractions include the Roosevelt House, Theodore Roosevelt Museum, and the Sagamore Hill Nature Trail. See the horses race at Belmont Park Racetrack, home of the Belmont Stakes. Shop at Mall at the Source or Roosevelt Field. Westbury is home to a variety of restaurants, from the Cheesecake Factory and P.F. Chang's. Take a 22-minute train ride from the nearby Long Island Rail Road station to New York's Penn Station, steps from Madison Square Garden.
Enjoy a great room featuring a coffee brewing system and breakfast for four!
Learn how to earn double Hilton Honors points during your next stay!


Appointment of Additional and Independent Directors 1.	Appointment of Mr Rajender Mohan Malla (DIN 00136657) as Additional and Independent Director for a period of three years with effect from 6 February 2019 subject to the approval of the shareholders 2.	Appointment of Mr Harpal Singh (DIN 06658043) as Additional and Independent Director for a period of three years with effect from 6 February 2019 subject to the approval of the shareholders 3.	Reconstitution of committees of board on appointment of independent directors.


At their October meeting, the Atlantic States Marine Fisheries Commission (ASMFC) voted to reduce the annual harvest of striped bass by 25% or more along the coast, and by just over 20% in the Chesapeake. The motion, which passed 14-2, calls for reducing harvest in the coastal recreational fishery by implementing a one fish bag limit while keeping a 28-inch size limit.
However, as per regulations set forth in the official striped bass management plan, states may use conservation equivalency to develop their own state-specific measures so long as any combination of size and bag still achieves a 25% reduction in harvest.
The approved addendum (IV) to Amendment 6 to the Interstate Fishery Management Plan for Atlantic Striped Bass responds to results of the 2013 Atlantic striped bass benchmark assessment which shows that reductions are required to keep the female spawning stock biomass from dipping below the target level. Even though the stock is not overfished and overfishing is not occurring, that spawning stock biomass is approaching what is considered "overfished threshold," with stock projections showing that will likely fall below that threshold if some type of action is not taken.
The approved addendum will be implemented on January 1, 2015, while the ASFMC Technical Committee will have to review any submitted conservation equivalency proposals by the states with the Board to review and consider approval at the Commission's Winter Meeting in Alexandria, VA from February 3-5. Addendum IV will be made available on the Commission's website, www.asmfc.org, under Breaking News, by mid-November.


text:
Big Tech Makes an Unsurprising Statement on Immigration and DACA
ICE's 287(g) Program Highly Effective in FY 2020
Despite Little Media Attention, Coastal Apprehensions Saw Record Numbers in FY 2020
ICE Displays Criminal Aliens on Billboards in Several North Carolina Cities
California's Sanctuary Policies Allow 10-Time Deportee to Commit Brutal Murder
Warning: Biden Promises to Unveil Mass Amnesty Bill "Immediately" After Inauguration
Report: Fewer Immigrants Receiving Public Benefits
Will the Biden Administration Take a Stand Against Catch and Release?
Site Guidelines & Policies
Hot Immigration Issues
Legal Opinion & Analysis
Site Guidelines and Policies
You are at:Home»Immigration Blog Posts»No, Rescinding DACA Does Not Create New Illegal Aliens
Immigration Blog Posts
No, Rescinding DACA Does Not Create New Illegal Aliens
By Spencer Raley	 September 13, 2017 12 Comments
Silhouette of a refugees family with children
One of the most common misconceptions about the Deferred Action for Childhood Arrivals program, commonly called DACA, is that it somehow offered legal status for illegal aliens. This incorrect perception of DACA has allowed open borders proponents to conjure up scenarios where assumedly legalized immigrants will have their lives suddenly and unexpectedly uprooted and destroyed if the program is indeed rescinded by the Trump administration.
For example, popular illegal immigration proponent, Jose Antonio Vargas, who has changed his Twitter title to #DefendDACA, retweeted a tweet suggesting that Trump is creating a new class of illegal aliens by rescinding DACA. "A lot of us are not 'new' Americans," the tweet suggested, "we must remember that, we have just been illegalized."
??so important https://t.co/BSFFc6r7O0
— #DefendDACA (@joseiswriting) September 12, 2017
However, this couldn't be farther from the truth. DACA never offered any form of legal status to illegal aliens, nor does it protect them from future deportation. This is clearly stated on the United States Citizenship and Immigration Service's webpage for the DACA program: "Deferred action is a use of prosecutorial discretion to defer removal action against an individual for a certain period of time. Deferred action does not provide lawful status."
DACA recipients remain illegal aliens, and are therefore still subject to the penalties associated with unlawful presence in the United States. Deferment under the program does not offer any special rights. All discretion concerning whether to continue deferring action against DACA recipients belongs to the federal government.
Whether DACA should be rescinded, left untouched, or placed in the hands of Congress is hotly debated. However, it is important that the program be accurately described for what it is. Because, so far, many in the mainstream media are presenting the program as a form of legal status – which simply isn't true.
DACA End DACA trump administration
Previous ArticleCollege Park, Maryland – Where Citizenship Just Doesn't Matter Anymore
Next Article The Dream Act: What Americans Need to Know
Spencer Raley
Spencer joined the Federation for American Immigration Reform (FAIR) in 2015. He conducts research, and writes content for FAIR's publications and website. He brings previous experience in state politics, gubernatorial and district campaigns, and D.C. political non-profits. Spencer holds a B.A. in Government from the University of Texas at Austin.
Joe Biden's Border Wall Cave-In: 'Savings' That Cost Untold Billions
Will Mexico Continue Holding the Line Against Illegal Immigration for the Next U.S. President?
Anonymous on September 19, 2017 11:32 am
Pingback: Nancy Pelosi confronted by immigration rights protesters about her DACA talks with Trump | Upfrontpost
Pingback: Nancy Pelosi confronted by immigration rights protesters about her DACA talks with Trump – Wanda Posner
ronald hansen on September 18, 2017 9:44 pm
The DACA program is being funded by the Social Security Fund, money supposedly meant to be for retirees and for people with physical impairment that keeps them from working. This is a crime against the citizens of this country and Trump proclaimed during his campaign he would put a end to it but now seems to be "flip flopping" by handing it over to Congress or "kicking the can further down the road".
Pingback: Pelosi shouted down by protesters during DREAM Act conference – Wanda Posner
Melisa Denbo on September 17, 2017 1:32 pm
DACA is mis-represented in the media on purpose. DACA does not consist of children only, but there are mothers with 3, 4, 5, children applying for DACA. There are 20 – 30 year illegal immigrants on DACA. More than 1/3 of DACA recipients are on Government Assistance. The number of DACA is not 800,000 but closer to 3 million. States like California, Texas and Arizona have the largest number of DACA recipients many which have 1 or more crinimal offences in the last 10 years. The media claims all DACA speak English this is not true and even those DACA receipients that have completed high school and some college still do ot speak, read and write fluent English.
SickAndtired on September 16, 2017 9:55 pm
The media is misrepresenting what DACA is on purpose. They want viewers to believe that the "Dreamers" were granted special rights and that President Trump just took those rights away. Some of us know an executive order is NOT law. The President does not have the power to MAKE laws. The Executive branch is obligated to ENFORCE laws.
Sadly, some of our modern Presidents have pretended to not understand the role of the Executive office and have sought to grab powers not given to them in the Constitution: Stated in the Constitution, the President must "take care that the laws be faithfully executed", and "preserve, protect and defend the Constitution". DACA was never law. I am sick of the endless media efforts to mislead.
Pingback: The Dream Act: What Americans Need to Know | ImmigrationReform.com
SecBorders on September 13, 2017 7:52 pm
Not surprised so many in the media are distirring what DACA is. But they are future voters for the Democrats and help keep wages depressed so that is all that matters.
that's "…distorting what DACA is."
peter on September 14, 2017 12:56 am
Not really SecBorders…..these kids are smarter and some will vote for Democrats and others for Republicans etc…remember Trump got the Cuban vote……so this is a misconception……big time…..n DACA is a temporary status…….
Leland on September 17, 2017 12:51 am
You keep lying about this when you know better. Cubans are nowhere near the majority of Latinos in this country. They are in fact a relatively small percentage of the Latino vote. They are the only ones who vote GOP, because of their hard line against the Castro brothers, and even then by only a small margin. Latinos as a rule keep voting Democratic by huge margins.
FAIR's Breaking Immigration News!
#BuildTheWall
Get the Mug
Follow on Twitter 416.7K
Subscribe on YouTube 11.1K
Support FAIR
Immigration controls and limits are now under vigorous attack every day, and FAIR urgently needs your support to defend our borders, national self-determination and the American quality of life ensured by responsible immigration limits. Any contribution is greatly appreciated and will make a significant impact.
Your source for the latest immigration news written by experts from the Federation for American Immigration Reform in Washington, DC.
Copyright © 2019. Federation for American Immigration Reform


Through organizing and coaching partnerships, I help people simplify their lives and function at a higher level.
Through this process, together my clients and I create the life they value.
As an Associate Certified Coach, I understand that sometimes we just get stuck. We know where we want to go and what we want to accomplish, we just don't know how to get there. That's where my genuine curiosity and thoughtful coaching process generate awareness, understanding and learning within my clients.
But I began to realize that sometimes—not always, but sometimes—our physical spaces reflect our state of mind. Physical discomfort in our personal spaces, whether home or business, can be telling us about internal discomforts as well.
—how our mental and emotional processes affect how we manage our physical surroundings.
From there, it was a logical step to become not just an organizer, but a Certified Organizer Coach. This certification gave me the tools to help clients create and maintain their own organizing superpowers even after my work with them is over.
I help my clients become more aware not just of their physical space, but of the gaps in process awareness that led them to their current predicament.
Through coaching collaborations, my organizing clients learn to define goals, recognize opportunities, find and rely on their strengths, and use their own skills to ensure their desired outcome becomes a reality.
I have the skills necessary to help clients define goals and then organize themselves to act on their intentions and attain those goals. By focusing on goals and structuring follow-through, my clients organize their lives to achieve the success they're looking for. And, with every bit of success, they increase their motivation to move forward and achieve their desired outcome over and over again.
With well over 100 educational course hours, I hold certifications in specialties including ADD/ADHD, chronic disorganization, mental health, hoarding, time management, and administering to the special needs and conditions of chronically disorganized clients.
I love to be outdoors walking, hiking, golfing, snowshoeing or walking our rescue Boxers, Copper and Rosie.
Cindy Jobs Coaching & Organizing is a limited liability company that is fully insured to perform coaching and organization services. You may rest assured that I will treat you and your spaces with the utmost care and respect; however, if an accident does happen, I am prepared to make it right.
Organize to Simplify is a member of the National Association of Professional Organizers (NAPO), International Coach Federation (ICF), Children and Adults with Attention-Deficit/Hyperactivity Disorder (CHADD), and the Institute for Applied Coaching, and strictly adheres to the ethics and confidentiality required as a member of each organization.
For more information visit my insurance and ethics guidelines.


COLLINSVILLE, IL (January 29, 2019). With wind chills expected to be below zero throughout most of the week as another round of winter storms moves into the Midwest, Ameren Illinois is reminding customers of tips on how to stay safe and warm.
"With the threat of severe weather forecasted for most of our service territory this week, we are taking additional steps to ensure the safety of our customers and personnel," said Richard Mark, chairman and president of Ameren Illinois. "In addition to activating the Emergency Operations Center to monitor the potential for disruptions to our system, we're reducing the amount of time personnel are outdoors and making sure call-outs will be handled by at least two people so no one is traveling alone."
Ameren Illinois activated its Emergency Operations Center (EOC), as of 4 p.m. on Monday, to help coordinate response efforts associated with the winter weather threat this week.
Never use a stove or other cooking device to heat your home.
Be sure to check on elderly friends and neighbors and those with disabilities.


Thomas L. Smith, better known as 'Peg Leg' Smith 1801-1866, was a mountain man, prospector, and spinner of tall tales. Legends regarding his lost gold mine have grown through the years, and countless people have searched the desert for its fabulous wealth. The mine could be within a few miles of this monument.
All comers are welcome to enter the contest. Sign up is on arrival at the contest site, which is held at the Pegleg Smith memorial, about seven miles east of Borrego Springs on Route S-22. Presentations are done in order of sign up. Stories should be of no more than five minutes in length (another little joke). They should be about lost gold and/or Pegleg Smith. Costumes and other original touches are always appreciated by the crowd and judges.