text:
namespace Microsoft.Azure.Management.Cdn
{
    using Microsoft.Rest;
    using Microsoft.Rest.Azure;
    using Microsoft.Rest.Serialization;
    using Models;
    using Newtonsoft.Json;
    using System.Collections;
    using System.Collections.Generic;
    using System.Linq;
    using System.Net;
    using System.Net.Http;
    using System.Threading;
    using System.Threading.Tasks;

    /// <summary>
    /// Use these APIs to manage Azure CDN resources through the Azure Resource
    /// Manager. You must make sure that requests made to these resources are
    /// secure.
    /// </summary>
    public partial class CdnManagementClient : ServiceClient<CdnManagementClient>, ICdnManagementClient, IAzureClient
    {
        /// <summary>
        /// The base URI of the service.
        /// </summary>
        public System.Uri BaseUri { get; set; }

        /// <summary>
        /// Gets or sets json serialization settings.
        /// </summary>
        public JsonSerializerSettings SerializationSettings { get; private set; }

        /// <summary>
        /// Gets or sets json deserialization settings.
        /// </summary>
        public JsonSerializerSettings DeserializationSettings { get; private set; }

        /// <summary>
        /// Credentials needed for the client to connect to Azure.
        /// </summary>
        public ServiceClientCredentials Credentials { get; private set; }

        /// <summary>
        /// Azure Subscription ID.
        /// </summary>
        public string SubscriptionId { get; set; }

        /// <summary>
        /// Version of the API to be used with the client request. Current version is
        /// 2017-04-02.
        /// </summary>
        public string ApiVersion { get; private set; }

        /// <summary>
        /// The preferred language for the response.
        /// </summary>
        public string AcceptLanguage { get; set; }

        /// <summary>
        /// The retry timeout in seconds for Long Running Operations. Default value is
        /// 30.
        /// </summary>
        public int? LongRunningOperationRetryTimeout { get; set; }

        /// <summary>
        /// Whether a unique x-ms-client-request-id should be generated. When set to
        /// true a unique x-ms-client-request-id value is generated and included in
        /// each request. Default is true.
        /// </summary>
        public bool? GenerateClientRequestId { get; set; }

        /// <summary>
        /// Gets the IProfilesOperations.
        /// </summary>
        public virtual IProfilesOperations Profiles { get; private set; }

        /// <summary>
        /// Gets the IEndpointsOperations.
        /// </summary>
        public virtual IEndpointsOperations Endpoints { get; private set; }

        /// <summary>
        /// Gets the IOriginsOperations.
        /// </summary>
        public virtual IOriginsOperations Origins { get; private set; }

        /// <summary>
        /// Gets the ICustomDomainsOperations.
        /// </summary>
        public virtual ICustomDomainsOperations CustomDomains { get; private set; }

        /// <summary>
        /// Gets the IResourceUsageOperations.
        /// </summary>
        public virtual IResourceUsageOperations ResourceUsage { get; private set; }

        /// <summary>
        /// Gets the IOperations.
        /// </summary>
        public virtual IOperations Operations { get; private set; }

        /// <summary>
        /// Gets the IEdgeNodesOperations.
        /// </summary>
        public virtual IEdgeNodesOperations EdgeNodes { get; private set; }

        /// <summary>
        /// Initializes a new instance of the CdnManagementClient class.
        /// </summary>
        /// <param name='httpClient'>
        /// HttpClient to be used
        /// </param>
        /// <param name='disposeHttpClient'>
        /// True: will dispose the provided httpClient on calling CdnManagementClient.Dispose(). False: will not dispose provided httpClient</param>
        protected CdnManagementClient(HttpClient httpClient, bool disposeHttpClient) : base(httpClient, disposeHttpClient)
        {
            Initialize();
        }

        /// <summary>
        /// Initializes a new instance of the CdnManagementClient class.
        /// </summary>
        /// <param name='handlers'>
        /// Optional. The delegating handlers to add to the http client pipeline.
        /// </param>
        protected CdnManagementClient(params DelegatingHandler[] handlers) : base(handlers)
        {
            Initialize();
        }

        /// <summary>
        /// Initializes a new instance of the CdnManagementClient class.
        /// </summary>
        /// <param name='rootHandler'>
        /// Optional. The http client handler used to handle http transport.
        /// </param>
        /// <param name='handlers'>
        /// Optional. The delegating handlers to add to the http client pipeline.
        /// </param>
        protected CdnManagementClient(HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : base(rootHandler, handlers)
        {
            Initialize();
        }

        /// <summary>
        /// Initializes a new instance of the CdnManagementClient class.
        /// </summary>
        /// <param name='baseUri'>
        /// Optional. The base URI of the service.
        /// </param>
        /// <param name='handlers'>
        /// Optional. The delegating handlers to add to the http client pipeline.
        /// </param>
        /// <exception cref="System.ArgumentNullException">
        /// Thrown when a required parameter is null
        /// </exception>
        protected CdnManagementClient(System.Uri baseUri, params DelegatingHandler[] handlers) : this(handlers)
        {
            if (baseUri == null)
            {
                throw new System.ArgumentNullException("baseUri");
            }
            BaseUri = baseUri;
        }

        /// <summary>
        /// Initializes a new instance of the CdnManagementClient class.
        /// </summary>
        /// <param name='baseUri'>
        /// Optional. The base URI of the service.
        /// </param>
        /// <param name='rootHandler'>
        /// Optional. The http client handler used to handle http transport.
        /// </param>
        /// <param name='handlers'>
        /// Optional. The delegating handlers to add to the http client pipeline.
        /// </param>
        /// <exception cref="System.ArgumentNullException">
        /// Thrown when a required parameter is null
        /// </exception>
        protected CdnManagementClient(System.Uri baseUri, HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : this(rootHandler, handlers)
        {
            if (baseUri == null)
            {
                throw new System.ArgumentNullException("baseUri");
            }
            BaseUri = baseUri;
        }

        /// <summary>
        /// Initializes a new instance of the CdnManagementClient class.
        /// </summary>
        /// <param name='credentials'>
        /// Required. Credentials needed for the client to connect to Azure.
        /// </param>
        /// <param name='handlers'>
        /// Optional. The delegating handlers to add to the http client pipeline.
        /// </param>
        /// <exception cref="System.ArgumentNullException">
        /// Thrown when a required parameter is null
        /// </exception>
        public CdnManagementClient(ServiceClientCredentials credentials, params DelegatingHandler[] handlers) : this(handlers)
        {
            if (credentials == null)
            {
                throw new System.ArgumentNullException("credentials");
            }
            Credentials = credentials;
            if (Credentials != null)
            {
                Credentials.InitializeServiceClient(this);
            }
        }

        /// <summary>
        /// Initializes a new instance of the CdnManagementClient class.
        /// </summary>
        /// <param name='credentials'>
        /// Required. Credentials needed for the client to connect to Azure.
        /// </param>
        /// <param name='httpClient'>
        /// HttpClient to be used
        /// </param>
        /// <param name='disposeHttpClient'>
        /// True: will dispose the provided httpClient on calling CdnManagementClient.Dispose(). False: will not dispose provided httpClient</param>
        /// <exception cref="System.ArgumentNullException">
        /// Thrown when a required parameter is null
        /// </exception>
        public CdnManagementClient(ServiceClientCredentials credentials, HttpClient httpClient, bool disposeHttpClient) : this(httpClient, disposeHttpClient)
        {
            if (credentials == null)
            {
                throw new System.ArgumentNullException("credentials");
            }
            Credentials = credentials;
            if (Credentials != null)
            {
                Credentials.InitializeServiceClient(this);
            }
        }

        /// <summary>
        /// Initializes a new instance of the CdnManagementClient class.
        /// </summary>
        /// <param name='credentials'>
        /// Required. Credentials needed for the client to connect to Azure.
        /// </param>
        /// <param name='rootHandler'>
        /// Optional. The http client handler used to handle http transport.
        /// </param>
        /// <param name='handlers'>
        /// Optional. The delegating handlers to add to the http client pipeline.
        /// </param>
        /// <exception cref="System.ArgumentNullException">
        /// Thrown when a required parameter is null
        /// </exception>
        public CdnManagementClient(ServiceClientCredentials credentials, HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : this(rootHandler, handlers)
        {
            if (credentials == null)
            {
                throw new System.ArgumentNullException("credentials");
            }
            Credentials = credentials;
            if (Credentials != null)
            {
                Credentials.InitializeServiceClient(this);
            }
        }

        /// <summary>
        /// Initializes a new instance of the CdnManagementClient class.
        /// </summary>
        /// <param name='baseUri'>
        /// Optional. The base URI of the service.
        /// </param>
        /// <param name='credentials'>
        /// Required. Credentials needed for the client to connect to Azure.
        /// </param>
        /// <param name='handlers'>
        /// Optional. The delegating handlers to add to the http client pipeline.
        /// </param>
        /// <exception cref="System.ArgumentNullException">
        /// Thrown when a required parameter is null
        /// </exception>
        public CdnManagementClient(System.Uri baseUri, ServiceClientCredentials credentials, params DelegatingHandler[] handlers) : this(handlers)
        {
            if (baseUri == null)
            {
                throw new System.ArgumentNullException("baseUri");
            }
            if (credentials == null)
            {
                throw new System.ArgumentNullException("credentials");
            }
            BaseUri = baseUri;
            Credentials = credentials;
            if (Credentials != null)
            {
                Credentials.InitializeServiceClient(this);
            }
        }

        /// <summary>
        /// Initializes a new instance of the CdnManagementClient class.
        /// </summary>
        /// <param name='baseUri'>
        /// Optional. The base URI of the service.
        /// </param>
        /// <param name='credentials'>
        /// Required. Credentials needed for the client to connect to Azure.
        /// </param>
        /// <param name='rootHandler'>
        /// Optional. The http client handler used to handle http transport.
        /// </param>
        /// <param name='handlers'>
        /// Optional. The delegating handlers to add to the http client pipeline.
        /// </param>
        /// <exception cref="System.ArgumentNullException">
        /// Thrown when a required parameter is null
        /// </exception>
        public CdnManagementClient(System.Uri baseUri, ServiceClientCredentials credentials, HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : this(rootHandler, handlers)
        {
            if (baseUri == null)
            {
                throw new System.ArgumentNullException("baseUri");
            }
            if (credentials == null)
            {
                throw new System.ArgumentNullException("credentials");
            }
            BaseUri = baseUri;
            Credentials = credentials;
            if (Credentials != null)
            {
                Credentials.InitializeServiceClient(this);
            }
        }

        /// <summary>
        /// An optional partial-method to perform custom initialization.
        /// </summary>
        partial void CustomInitialize();
        /// <summary>
        /// Initializes client properties.
        /// </summary>
        private void Initialize()
        {
            Profiles = new ProfilesOperations(this);
            Endpoints = new EndpointsOperations(this);
            Origins = new OriginsOperations(this);
            CustomDomains = new CustomDomainsOperations(this);
            ResourceUsage = new ResourceUsageOperations(this);
            Operations = new Operations(this);
            EdgeNodes = new EdgeNodesOperations(this);
            BaseUri = new System.Uri("https://management.azure.com");
            ApiVersion = "2017-10-12";
            AcceptLanguage = "en-US";
            LongRunningOperationRetryTimeout = 30;
            GenerateClientRequestId = true;
            SerializationSettings = new JsonSerializerSettings
            {
                Formatting = Newtonsoft.Json.Formatting.Indented,
                DateFormatHandling = Newtonsoft.Json.DateFormatHandling.IsoDateFormat,
                DateTimeZoneHandling = Newtonsoft.Json.DateTimeZoneHandling.Utc,
                NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore,
                ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Serialize,
                ContractResolver = new ReadOnlyJsonContractResolver(),
                Converters = new List<JsonConverter>
                    {
                        new Iso8601TimeSpanConverter()
                    }
            };
            SerializationSettings.Converters.Add(new TransformationJsonConverter());
            DeserializationSettings = new JsonSerializerSettings
            {
                DateFormatHandling = Newtonsoft.Json.DateFormatHandling.IsoDateFormat,
                DateTimeZoneHandling = Newtonsoft.Json.DateTimeZoneHandling.Utc,
                NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore,
                ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Serialize,
                ContractResolver = new ReadOnlyJsonContractResolver(),
                Converters = new List<JsonConverter>
                    {
                        new Iso8601TimeSpanConverter()
                    }
            };
            SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter<DeliveryRuleAction>("name"));
            DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter<DeliveryRuleAction>("name"));
            SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter<DeliveryRuleCondition>("name"));
            DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter<DeliveryRuleCondition>("name"));
            CustomInitialize();
            DeserializationSettings.Converters.Add(new TransformationJsonConverter());
            DeserializationSettings.Converters.Add(new CloudErrorJsonConverter());
        }
        /// <summary>
        /// Check the availability of a resource name. This is needed for resources
        /// where name is globally unique, such as a CDN endpoint.
        /// </summary>
        /// <param name='name'>
        /// The resource name to validate.
        /// </param>
        /// <param name='customHeaders'>
        /// Headers that will be added to request.
        /// </param>
        /// <param name='cancellationToken'>
        /// The cancellation token.
        /// </param>
        /// <exception cref="ErrorResponseException">
        /// Thrown when the operation returned an invalid status code
        /// </exception>
        /// <exception cref="SerializationException">
        /// Thrown when unable to deserialize the response
        /// </exception>
        /// <exception cref="ValidationException">
        /// Thrown when a required parameter is null
        /// </exception>
        /// <exception cref="System.ArgumentNullException">
        /// Thrown when a required parameter is null
        /// </exception>
        /// <return>
        /// A response object containing the response body and response headers.
        /// </return>
        public async Task<AzureOperationResponse<CheckNameAvailabilityOutput>> CheckNameAvailabilityWithHttpMessagesAsync(string name, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
        {
            if (ApiVersion == null)
            {
                throw new ValidationException(ValidationRules.CannotBeNull, "this.ApiVersion");
            }
            if (name == null)
            {
                throw new ValidationException(ValidationRules.CannotBeNull, "name");
            }
            CheckNameAvailabilityInput checkNameAvailabilityInput = new CheckNameAvailabilityInput();
            if (name != null)
            {
                checkNameAvailabilityInput.Name = name;
            }
            // Tracing
            bool _shouldTrace = ServiceClientTracing.IsEnabled;
            string _invocationId = null;
            if (_shouldTrace)
            {
                _invocationId = ServiceClientTracing.NextInvocationId.ToString();
                Dictionary<string, object> tracingParameters = new Dictionary<string, object>();
                tracingParameters.Add("checkNameAvailabilityInput", checkNameAvailabilityInput);
                tracingParameters.Add("cancellationToken", cancellationToken);
                ServiceClientTracing.Enter(_invocationId, this, "CheckNameAvailability", tracingParameters);
            }
            // Construct URL
            var _baseUrl = BaseUri.AbsoluteUri;
            var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "providers/Microsoft.Cdn/checkNameAvailability").ToString();
            List<string> _queryParameters = new List<string>();
            if (ApiVersion != null)
            {
                _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(ApiVersion)));
            }
            if (_queryParameters.Count > 0)
            {
                _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
            }
            // Create HTTP transport objects
            var _httpRequest = new HttpRequestMessage();
            HttpResponseMessage _httpResponse = null;
            _httpRequest.Method = new HttpMethod("POST");
            _httpRequest.RequestUri = new System.Uri(_url);
            // Set Headers
            if (GenerateClientRequestId != null && GenerateClientRequestId.Value)
            {
                _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
            }
            if (AcceptLanguage != null)
            {
                if (_httpRequest.Headers.Contains("accept-language"))
                {
                    _httpRequest.Headers.Remove("accept-language");
                }
                _httpRequest.Headers.TryAddWithoutValidation("accept-language", AcceptLanguage);
            }

            if (customHeaders != null)
            {
                foreach(var _header in customHeaders)
                {
                    if (_httpRequest.Headers.Contains(_header.Key))
                    {
                        _httpRequest.Headers.Remove(_header.Key);
                    }
                    _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);
                }
            }

            // Serialize Request
            string _requestContent = null;
            if(checkNameAvailabilityInput != null)
            {
                _requestContent = SafeJsonConvert.SerializeObject(checkNameAvailabilityInput, SerializationSettings);
                _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8);
                _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8");
            }
            // Set Credentials
            if (Credentials != null)
            {
                cancellationToken.ThrowIfCancellationRequested();
                await Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
            }
            // Send Request
            if (_shouldTrace)
            {
                ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
            }
            cancellationToken.ThrowIfCancellationRequested();
            _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
            if (_shouldTrace)
            {
                ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
            }
            HttpStatusCode _statusCode = _httpResponse.StatusCode;
            cancellationToken.ThrowIfCancellationRequested();
            string _responseContent = null;
            if ((int)_statusCode != 200)
            {
                var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
                try
                {
                    _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
                    ErrorResponse _errorBody =  SafeJsonConvert.DeserializeObject<ErrorResponse>(_responseContent, DeserializationSettings);
                    if (_errorBody != null)
                    {
                        ex.Body = _errorBody;
                    }
                }
                catch (JsonException)
                {
                    // Ignore the exception
                }
                ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
                ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
                if (_shouldTrace)
                {
                    ServiceClientTracing.Error(_invocationId, ex);
                }
                _httpRequest.Dispose();
                if (_httpResponse != null)
                {
                    _httpResponse.Dispose();
                }
                throw ex;
            }
            // Create Result
            var _result = new AzureOperationResponse<CheckNameAvailabilityOutput>();
            _result.Request = _httpRequest;
            _result.Response = _httpResponse;
            if (_httpResponse.Headers.Contains("x-ms-request-id"))
            {
                _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
            }
            // Deserialize Response
            if ((int)_statusCode == 200)
            {
                _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
                try
                {
                    _result.Body = SafeJsonConvert.DeserializeObject<CheckNameAvailabilityOutput>(_responseContent, DeserializationSettings);
                }
                catch (JsonException ex)
                {
                    _httpRequest.Dispose();
                    if (_httpResponse != null)
                    {
                        _httpResponse.Dispose();
                    }
                    throw new SerializationException("Unable to deserialize the response.", _responseContent, ex);
                }
            }
            if (_shouldTrace)
            {
                ServiceClientTracing.Exit(_invocationId, _result);
            }
            return _result;
        }

        /// <summary>
        /// Check the availability of a resource name. This is needed for resources
        /// where name is globally unique, such as a CDN endpoint.
        /// </summary>
        /// <param name='name'>
        /// The resource name to validate.
        /// </param>
        /// <param name='customHeaders'>
        /// Headers that will be added to request.
        /// </param>
        /// <param name='cancellationToken'>
        /// The cancellation token.
        /// </param>
        /// <exception cref="ErrorResponseException">
        /// Thrown when the operation returned an invalid status code
        /// </exception>
        /// <exception cref="SerializationException">
        /// Thrown when unable to deserialize the response
        /// </exception>
        /// <exception cref="ValidationException">
        /// Thrown when a required parameter is null
        /// </exception>
        /// <exception cref="System.ArgumentNullException">
        /// Thrown when a required parameter is null
        /// </exception>
        /// <return>
        /// A response object containing the response body and response headers.
        /// </return>
        public async Task<AzureOperationResponse<CheckNameAvailabilityOutput>> CheckNameAvailabilityWithSubscriptionWithHttpMessagesAsync(string name, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
        {
            if (SubscriptionId == null)
            {
                throw new ValidationException(ValidationRules.CannotBeNull, "this.SubscriptionId");
            }
            if (ApiVersion == null)
            {
                throw new ValidationException(ValidationRules.CannotBeNull, "this.ApiVersion");
            }
            if (name == null)
            {
                throw new ValidationException(ValidationRules.CannotBeNull, "name");
            }
            CheckNameAvailabilityInput checkNameAvailabilityInput = new CheckNameAvailabilityInput();
            if (name != null)
            {
                checkNameAvailabilityInput.Name = name;
            }
            // Tracing
            bool _shouldTrace = ServiceClientTracing.IsEnabled;
            string _invocationId = null;
            if (_shouldTrace)
            {
                _invocationId = ServiceClientTracing.NextInvocationId.ToString();
                Dictionary<string, object> tracingParameters = new Dictionary<string, object>();
                tracingParameters.Add("checkNameAvailabilityInput", checkNameAvailabilityInput);
                tracingParameters.Add("cancellationToken", cancellationToken);
                ServiceClientTracing.Enter(_invocationId, this, "CheckNameAvailabilityWithSubscription", tracingParameters);
            }
            // Construct URL
            var _baseUrl = BaseUri.AbsoluteUri;
            var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/providers/Microsoft.Cdn/checkNameAvailability").ToString();
            _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(SubscriptionId));
            List<string> _queryParameters = new List<string>();
            if (ApiVersion != null)
            {
                _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(ApiVersion)));
            }
            if (_queryParameters.Count > 0)
            {
                _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
            }
            // Create HTTP transport objects
            var _httpRequest = new HttpRequestMessage();
            HttpResponseMessage _httpResponse = null;
            _httpRequest.Method = new HttpMethod("POST");
            _httpRequest.RequestUri = new System.Uri(_url);
            // Set Headers
            if (GenerateClientRequestId != null && GenerateClientRequestId.Value)
            {
                _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
            }
            if (AcceptLanguage != null)
            {
                if (_httpRequest.Headers.Contains("accept-language"))
                {
                    _httpRequest.Headers.Remove("accept-language");
                }
                _httpRequest.Headers.TryAddWithoutValidation("accept-language", AcceptLanguage);
            }

            if (customHeaders != null)
            {
                foreach(var _header in customHeaders)
                {
                    if (_httpRequest.Headers.Contains(_header.Key))
                    {
                        _httpRequest.Headers.Remove(_header.Key);
                    }
                    _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);
                }
            }

            // Serialize Request
            string _requestContent = null;
            if(checkNameAvailabilityInput != null)
            {
                _requestContent = SafeJsonConvert.SerializeObject(checkNameAvailabilityInput, SerializationSettings);
                _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8);
                _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8");
            }
            // Set Credentials
            if (Credentials != null)
            {
                cancellationToken.ThrowIfCancellationRequested();
                await Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
            }
            // Send Request
            if (_shouldTrace)
            {
                ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
            }
            cancellationToken.ThrowIfCancellationRequested();
            _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
            if (_shouldTrace)
            {
                ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
            }
            HttpStatusCode _statusCode = _httpResponse.StatusCode;
            cancellationToken.ThrowIfCancellationRequested();
            string _responseContent = null;
            if ((int)_statusCode != 200)
            {
                var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
                try
                {
                    _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
                    ErrorResponse _errorBody =  SafeJsonConvert.DeserializeObject<ErrorResponse>(_responseContent, DeserializationSettings);
                    if (_errorBody != null)
                    {
                        ex.Body = _errorBody;
                    }
                }
                catch (JsonException)
                {
                    // Ignore the exception
                }
                ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
                ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
                if (_shouldTrace)
                {
                    ServiceClientTracing.Error(_invocationId, ex);
                }
                _httpRequest.Dispose();
                if (_httpResponse != null)
                {
                    _httpResponse.Dispose();
                }
                throw ex;
            }
            // Create Result
            var _result = new AzureOperationResponse<CheckNameAvailabilityOutput>();
            _result.Request = _httpRequest;
            _result.Response = _httpResponse;
            if (_httpResponse.Headers.Contains("x-ms-request-id"))
            {
                _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
            }
            // Deserialize Response
            if ((int)_statusCode == 200)
            {
                _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
                try
                {
                    _result.Body = SafeJsonConvert.DeserializeObject<CheckNameAvailabilityOutput>(_responseContent, DeserializationSettings);
                }
                catch (JsonException ex)
                {
                    _httpRequest.Dispose();
                    if (_httpResponse != null)
                    {
                        _httpResponse.Dispose();
                    }
                    throw new SerializationException("Unable to deserialize the response.", _responseContent, ex);
                }
            }
            if (_shouldTrace)
            {
                ServiceClientTracing.Exit(_invocationId, _result);
            }
            return _result;
        }

        /// <summary>
        /// Check if the probe path is a valid path and the file can be accessed. Probe
        /// path is the path to a file hosted on the origin server to help accelerate
        /// the delivery of dynamic content via the CDN endpoint. This path is relative
        /// to the origin path specified in the endpoint configuration.
        /// </summary>
        /// <param name='probeURL'>
        /// The probe URL to validate.
        /// </param>
        /// <param name='customHeaders'>
        /// Headers that will be added to request.
        /// </param>
        /// <param name='cancellationToken'>
        /// The cancellation token.
        /// </param>
        /// <exception cref="ErrorResponseException">
        /// Thrown when the operation returned an invalid status code
        /// </exception>
        /// <exception cref="SerializationException">
        /// Thrown when unable to deserialize the response
        /// </exception>
        /// <exception cref="ValidationException">
        /// Thrown when a required parameter is null
        /// </exception>
        /// <exception cref="System.ArgumentNullException">
        /// Thrown when a required parameter is null
        /// </exception>
        /// <return>
        /// A response object containing the response body and response headers.
        /// </return>
        public async Task<AzureOperationResponse<ValidateProbeOutput>> ValidateProbeWithHttpMessagesAsync(string probeURL, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
        {
            if (SubscriptionId == null)
            {
                throw new ValidationException(ValidationRules.CannotBeNull, "this.SubscriptionId");
            }
            if (ApiVersion == null)
            {
                throw new ValidationException(ValidationRules.CannotBeNull, "this.ApiVersion");
            }
            if (probeURL == null)
            {
                throw new ValidationException(ValidationRules.CannotBeNull, "probeURL");
            }
            ValidateProbeInput validateProbeInput = new ValidateProbeInput();
            if (probeURL != null)
            {
                validateProbeInput.ProbeURL = probeURL;
            }
            // Tracing
            bool _shouldTrace = ServiceClientTracing.IsEnabled;
            string _invocationId = null;
            if (_shouldTrace)
            {
                _invocationId = ServiceClientTracing.NextInvocationId.ToString();
                Dictionary<string, object> tracingParameters = new Dictionary<string, object>();
                tracingParameters.Add("validateProbeInput", validateProbeInput);
                tracingParameters.Add("cancellationToken", cancellationToken);
                ServiceClientTracing.Enter(_invocationId, this, "ValidateProbe", tracingParameters);
            }
            // Construct URL
            var _baseUrl = BaseUri.AbsoluteUri;
            var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/providers/Microsoft.Cdn/validateProbe").ToString();
            _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(SubscriptionId));
            List<string> _queryParameters = new List<string>();
            if (ApiVersion != null)
            {
                _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(ApiVersion)));
            }
            if (_queryParameters.Count > 0)
            {
                _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
            }
            // Create HTTP transport objects
            var _httpRequest = new HttpRequestMessage();
            HttpResponseMessage _httpResponse = null;
            _httpRequest.Method = new HttpMethod("POST");
            _httpRequest.RequestUri = new System.Uri(_url);
            // Set Headers
            if (GenerateClientRequestId != null && GenerateClientRequestId.Value)
            {
                _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
            }
            if (AcceptLanguage != null)
            {
                if (_httpRequest.Headers.Contains("accept-language"))
                {
                    _httpRequest.Headers.Remove("accept-language");
                }
                _httpRequest.Headers.TryAddWithoutValidation("accept-language", AcceptLanguage);
            }

            if (customHeaders != null)
            {
                foreach(var _header in customHeaders)
                {
                    if (_httpRequest.Headers.Contains(_header.Key))
                    {
                        _httpRequest.Headers.Remove(_header.Key);
                    }
                    _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);
                }
            }

            // Serialize Request
            string _requestContent = null;
            if(validateProbeInput != null)
            {
                _requestContent = SafeJsonConvert.SerializeObject(validateProbeInput, SerializationSettings);
                _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8);
                _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8");
            }
            // Set Credentials
            if (Credentials != null)
            {
                cancellationToken.ThrowIfCancellationRequested();
                await Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
            }
            // Send Request
            if (_shouldTrace)
            {
                ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
            }
            cancellationToken.ThrowIfCancellationRequested();
            _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
            if (_shouldTrace)
            {
                ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
            }
            HttpStatusCode _statusCode = _httpResponse.StatusCode;
            cancellationToken.ThrowIfCancellationRequested();
            string _responseContent = null;
            if ((int)_statusCode != 200)
            {
                var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
                try
                {
                    _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
                    ErrorResponse _errorBody =  SafeJsonConvert.DeserializeObject<ErrorResponse>(_responseContent, DeserializationSettings);
                    if (_errorBody != null)
                    {
                        ex.Body = _errorBody;
                    }
                }
                catch (JsonException)
                {
                    // Ignore the exception
                }
                ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
                ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
                if (_shouldTrace)
                {
                    ServiceClientTracing.Error(_invocationId, ex);
                }
                _httpRequest.Dispose();
                if (_httpResponse != null)
                {
                    _httpResponse.Dispose();
                }
                throw ex;
            }
            // Create Result
            var _result = new AzureOperationResponse<ValidateProbeOutput>();
            _result.Request = _httpRequest;
            _result.Response = _httpResponse;
            if (_httpResponse.Headers.Contains("x-ms-request-id"))
            {
                _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
            }
            // Deserialize Response
            if ((int)_statusCode == 200)
            {
                _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
                try
                {
                    _result.Body = SafeJsonConvert.DeserializeObject<ValidateProbeOutput>(_responseContent, DeserializationSettings);
                }
                catch (JsonException ex)
                {
                    _httpRequest.Dispose();
                    if (_httpResponse != null)
                    {
                        _httpResponse.Dispose();
                    }
                    throw new SerializationException("Unable to deserialize the response.", _responseContent, ex);
                }
            }
            if (_shouldTrace)
            {
                ServiceClientTracing.Exit(_invocationId, _result);
            }
            return _result;
        }

    }
}

redpajama_set_name: RedPajamaGithub


Craig Questions and Steven Malet came to L.A. recently to escape the rain and snow back home for a couple of months. We had some fun, ate some chicken, filmed a few bits here and there and Rogie made a rad little edit. Check it out.


text:
Q: In python using Flask, how can I write out an object for download? I'm using Flask and running foreman. I data that I've constructed in memory and I want the user to be able to download this data in a text file. I don't want write out the data to a file on the local disk and make that available for download.
I'm new to python. I thought I'd create some file object in memory and then set response header, maybe?

A: Streaming files to the client without saving them to disk is covered in the "pattern" section of Flask's docs - specifically, in the section on streaming.  Basically, what you do is return a fully-fledged Response object wrapping your iterator:
from flask import Response

# construct your app

@app.route("/get-file")
def get_file():
    results = generate_file_data()
    generator = (cell for row in results
                    for cell in row)

    return Response(generator,
                       mimetype="text/plain",
                       headers={"Content-Disposition":
                                    "attachment;filename=test.txt"})

redpajama_set_name: RedPajamaStackExchange


It's February already? Wow! I'm sure I say that every month, but 2012 seems to just be flying by so quick!
This is GORGEOUS wedding from a few weeks ago that I second-shot with Kate Robinson in Tauranga. Loved the location and an amazing field of wildflowers Kate found for photos. Beautiful! See more sweetness on Kate's blog here!
The pictures are so lovely! Did you take them?


Apocalypsis is a 24-hour nourishing and rejuvenating cream with Lakesis. The combination of mastic & caprylic triglyceride, named lakesis, has been clinically tested to increase the skin youth up to 29%. It also increases the antioxidant action of the skin up to 50%, while it boosts the skin to benefit from long-lasting tightening, firming and anti ageing effect. Vitamin E combined with mushroom extracts nourish, tone and smooth skin.
Apply every morning or/and night your 24-hour apocalypsis cream to a thoroughly cleansed face and neck, avoiding the area around the eyes.
Increases the youth of the skin up to 29%. Overall anti-ageing active ingredient, which reactivates the youth protein Klotho, for a redensifying effect of the dermis.


text:
From Manila With Love: TLB's Guide to Enjoying and Learning from Philippine Children's Picture Books
₱ 0.00
From Manila With Love: TLB's Guide to Enjoying and Learning from Philippine Children's Picture Books quantity
Category: Free Downloads Tags: free, unit study
The Learning Basket's Guides to Enjoying and Learning From Philippine Children's Picture Books are free downloadable unit studies on different Filipino-authored children's books. Our hope is that these help in teaching our children to appreciate our own Filipino authors, language, culture, and history.
From Manila With Love is a story of a young girl who visits her "home" for the first time. It is a simple but rich story that is a perfect introduction to the beauty of the Philippine culture to Filipino children.
Araw sa Palengke: TLB's Guide to Enjoying and Learning from Philippine Children's Picture Books
₱ 0.00 Add to cart
Ang Pambihirang Sombrero: TLB's Guide to Enjoying and Learning from Philippine Children's Picture Books
Sandosenang Sapatos: TLB's Guide to Enjoying and Learning from Philippine Children's Picture Books
The Mats: TLB's Guide to Enjoying and Learning from Philippine Children's Picture Books

redpajama_set_name: RedPajamaCommonCrawl


Cooking could be the easiest thing with the mastery of a few basics, but, it is the planning for meals that have always never been a walk in the park. Making up a meal plan that is to be stuck to and going for the ingredients to make it happen can be a very difficult task. The following are seven easy dinner suggestions that one should consider having.
This is a dinner which suitably is good for vegetarians. It is full of flavor and made from plenty of greens. It can be eaten with a pita which is toasted or one can serve it with a chunk of crusty bread.it can also be eaten over rice. This dinner can be cooked for two, but if it is done or one, the extra serving will be pretty perfect for a lunch serving.
This is a meal comprising plain beef and broccoli potato combination.it is a sure favorite that will get a person hands-down if tried. For a better aroma and flavor, it is recommended that two tablespoons of tomato paste be added in the beef mixture to make the whole dinner surprisingly delicious. It is easy to increase the recipe in order to make more servings and they can be reheated for lunches or dinners the entire week.
Rice to be used can be that which has been lying in the fridge for a couple of days. To add back the lost moisture in a great way is by stir-frying it in some oil and then afterward adding some liquid to the flavor. The liquid is usually a mixture of rice vinegar and soy sauce. If it is fresh rice, one still has to fry it. Carrots and spinach can be used for this, however, it is easy to use a whole bell pepper than just a half. One can replace a cup of chopped kale with the spinach.
Fish has always been a little intimidating for kitchen beginners. However, it is actually a great and easy dinner option because it is able to cook quicker compared to meat. One easy way to cook it is by wrapping the fish and some quick-cooking vegetables using a parchment paper or foil together with a little liquid. What follows is baking the whole thing for about 10 minutes. The advantage of this meal is that there is minimal cleanup after dinner.
In this dinner option, the cabbage will get soft on the inside; however, it will get crispy around its edges. It goes perfectly well with potatoes which are greatly roasted and chicken breast with skin on. It can be served with grainy mustard with an addition of ketchup sauce or barbecue sauce which really pairs well with that combination.
This is a meal that works wonders after a workout strain. It is comprised of a great mix of protein and whole grain. It is a dinner that keeps one energized because it helps to provide one-third of the body's daily iron requirements. The vegetables are good antioxidants together with herbs and walnut.
Eating a plant-based diet is one difficult task for dinner. This is because it means that an individual must get creative with meal ideas otherwise they will end up every meal eating chips and guac which unhealthy and not sustainable. Ingredients for this dinner include baked sweet potatoes (cut halfway to reduce cooking time), chickpeas (roasted/seasoned), garlic and tomato salad (Parsley). The dinner should be sweet, sensational, satisfying and best of all very healthy.
Rice and broccoli are super delicious. This is a dinner which has no meat but has cheese and nutritional yeast. The yeast usually adds flavor to recipes. Broccoli recipes are always saucy and one savors every moment of eating such. Apart from being easy to cook, it is as just full of taste and flavor if not any better.
The pros at village-bakery.com advise people to make a plan before heading out. If lunch was heavy, try finding dinner which is light. Make commitments to eat slowly because the brain takes about 20 minutes to get to the stomach a message that it is full and no longer hungry. A dinner with a balanced diet is good because it is good for health. Individuals should try and set up realistic dietary goals with healthy eating habits being a daily life thing. A doctor's advice on the type of food one should eat should be the considered issue. Tips about nutrition and dietary information from other sources could be misleading.


It gives us great pleasure to announce J Scott Coatsworth, Angel Martinez, and B. A. Brock as the guests on episode 124: Renewal, or Handsoap for the Masses!
This week J. Scott Coatsworth (Moderator of Queer SciFi, founder of QueeRomance Ink), Angel Martinez (of Mischief Corner Books), and B.A. Brock (Also of Queer SciFi) join Vance to talk about the art that is the Flash Fiction contest, what they looked for as judges, and to announce the release of this year's anthology: Renewal. Scott then shares his upcoming epic science fiction release, The Stark Divide.
J. Scott Coatsworth was indoctrinated into fantasy and sci fi by his mother at the tender age of nine. He devoured her library, but as he grew up, he wondered where all the people like him were.
He decided that if there weren't gay characters in his favorite genres, he would remake them to his own ends. He has published fifteen stories, including two novels.
He runs Queer Sci Fi and QueeRomance Ink with his husband Mark, sites that celebrate fiction that reflects queer reality.
Angel Martinez is the unlikely black sheep of an ivory tower, intellectual family. She has managed to make her way through life reasonably unscathed. Despite a wildly misspent youth, she snagged a degree in English Lit, married once and did it right the first time, (same husband for almost twenty-eight years) gave birth to one amazing son, (now in college) and realized at some point that she could get paid for writing.
It gives us great pleasure to announce J Scott Coatsworth and Angel Martinez as the guests on episode 083: The 2nd Annual GRL Roundup!
This week J. Scott Coatsworth (Moderator of Queer SciFi) and Angel Martinez (of Mischief Corner Books) join us to talk about their recent experiences at GRL!
J. Scott Coatsworth has written more than a dozen short stories. He also runs the Queer Sci Fi (http://www.queerscifi.com) site, a support group for writers of gay sci fi, fantasy, and supernatural fiction.
Angel Martinez writes Science Fiction and Fantasy centered around gay heroes. She's also one of the founders of Mischief Corner Books (http://www.mischiefcornerbooks.com), who give voice to LGBTQ fiction by publishing a diverse range of genres and topics.
Angel Martinez is one busy bunny, being being a chief collaborator with Mischief Corner Books, a prolific writer of sci-fi novels and having time to visit us on more than one occasion! Find out more about Angel and her work on her latest episode with us. Episode 069 – Now With Bonus Content!
What an unusual gem of a book this is. Set in a bleak future, it is the story of an unnamed prisoner, kept in solitary confinement and treated with nothing but contempt. His only companion is a prison guard he has called Scar, but this man barely speaks. Sometimes he offers a tiny bit of comfort, but the prisoner thinks he is imagining it. He dare not hope otherwise.
As we gradually discover who the the prisoner is and why he is being treated so badly, a chink in the granite armour of Scar seems to be widening. This story is so beautifully told, not flinching away from the brutality of the situation, but crafting a gradual relationship forming between prisoner and guard. I did not dare to hope that this story would end well. I was not disappointed with the ending. It is well worth checking this story out. Amidst the grey cells and hideous cruelty, hope dares to flourish. I cannot say more without ruining the surprise.
A very rewarding and cleverly told tale.
It gives us great pleasure to announce Mischief Corner Books as the guest(s) on episode 057: Behind the Mists of Serialized Fiction!
Vance is joined by Freddy MacKay, Toni Griffin, Angel Martinez, and J. Scott Coatsworth in an awesome roundtable discussion about writing serial fiction. They define serial fiction, go over the aspects of planning, world building, and working collaboratively, and then Vance pokes at distribution possibilities. They wrap up with the benefits to serial writing, and offer advice for content creators who want to work on serialized content.
Ah, yes. Mischief Corner is a diverse group of authors who met on a mountain in Tennessee and decided since we probably were too easily distracted to rule the world that we'd settle for causing a bit of mayhem instead.
In addition to making mayhem, we publish books with a diverse range of genres and topics… we live to break molds.
It gives us great pleasure to announce Mischief Corner Books as the guest on our first Publisher Spotlight Episode.
Join us as we talk with Angel, Freddy, and Toni about how the company was formed at a mountaintop retreat, what it's like to wear multiple hats in a small company, the types of submissions MCB is looking to receive, and their current projects!.
This Podcast Episode is AVAILABLE NOW!


Adoption is a process of assigning the parenting position of a child to another. By doing so, the rights of child will be permanently transferred to the adopting parents. Dissimilar to guardianship built for caring young, adoption surname change is involved to induce the permanent change in status.
It requires societal recognition either through legal or religious sanction. Some societies have demanded specific laws under adoption, whereas some societies have tried to achieve adoption through less formal procedures, that is, via contracts. The inheritance rights will be moved to the adopting parents through contracts.
When you are going to approach a family lawyer to handle adoption name change problem, you should hire the best adoption name change lawyers Telangana. In this way, we will recommend Mr Sai Krishna Azad. He will make you to win under any complicated cases. He will solve all issues related with the transferring of responsibilities and rights to that child.
We ensure you to be succeeded in your child adoption case if you approach Mr Sai Krishna Azad. The contact terms will be written on agreement. Adoptive parents have added responsibility to give their address to the own parents of child and also about the life style of their children.
Though agreement is not put legally, the adoptive parents have a moral responsibility to search for the own parents if problems arise. In these cases, as a lawyer, he will clear issue of resolving agreements. Adoptive parents still have rights to maintain privacy with the adoptive children.
Whatever may be the issue, he is responsible to clear it. If you know process of adoption name change in Hyderabad you can approach Mr Sai Krishna Azad. You can be either adoptive parents or own parents, you can deal with Mr Sai, the lawyer. In anyway, adoption name is a legal process of assigning the permanent rights to the adopting parents. Are you facing any problem against the law with own parents or adoptive parents, you can approach him.


text:
Innovation Mile
Explore the Future of Noblesville

Innovation Mile will become a dynamic business and technology hub that will serve as an anchor for revolutionary thinking and a gateway for innovation, leverage long-term growth opportunities, and catalyze reinvestment in the City of Noblesville.
Explore Innovation Mile
Between 141st Street and I-69
A Work, Play, Engage, and Learn Community
The vision for the district is to become a work, play, engage, and learn community designed to drive growth from commercial, flex, residential, office, and light industrial uses within the city's targeted industries. The proposed master-planned business district will be located between 141st Street and I-69 – between Olio Road and Cyntheanne Road in the southeast corner of our City. The design and configuration of the site is currently under development.
Renderings are for illustrative purposes only and are subject to change.
Share your Vision
Take the survey to share your vision for Innovation Mile!
Planning + Development
What We're Doing + What We Plan to Do
To-date, the City has:
Retained a consultant partner
Met with Stakeholders
Hosted a 2-day visioning workshop
Begun drafting the Master Plan Design Principles
Next steps include:
Developing a sustainability & technology plan for the site
Defining potential site configurations
Refining the vision for Innovation Mile
Interested in Moving to Innovation Mile?
If you have any questions about economic development, our team will be happy to assist you. Get in touch to start a conversation.
Businesses to Join Innovation Mile
While the build-out of the site may take up to 10 years to fully complete, innovative companies looking to set roots in our city have already begun to arrive.
A sustainability-focused EV engine manufacturer, BorgWarner opened a state-of-the-art technical center to support the growing hybrid and electric vehicle market.
Innovation One
A medical-tech group comprised of Certus Medical and Radiological Care Services announced plans to build their new headquarters in Innovation Mile.
Indiana Joint Replacement Institute
Innovation Mile will also be home to the Indiana Joint Replacement Institute, a 35,000-square-foot ambulatory surgery center and medical office building dedicated to hip and knee joint replacements. The facility will include 4 operating rooms, 16 pre/post-operative bays, x-ray, physical therapy, and 20-24 exam rooms addition, the building will have dedicated research and education space to continue the ongoing research Dr. Meneghini and his team has conducted for the past 15 years. This medical complex within Noblesville will be the epicenter of the Indiana Joint Replacement Institute within the State of Indiana and across the nation.
Innovation Mile News
Check back here for more information as the project continues along!
Reach Out for More Info


text:
Straight Outta Compton is a 2015 American biographical drama film directed by F. Gary Gray, depicting the rise and fall of the hip hop group N.W.A and its members Eazy-E, Ice Cube, Dr. Dre, MC Ren, and DJ Yella. Members of N.W.A were involved in the production of the film, including Ice Cube and Dr. Dre as producers, as was Eazy-E's widow, Tomica Woods-Wright. MC Ren and DJ Yella served as creative consultants. Ice Cube is played by his real-life son, O'Shea Jackson Jr. who made his film debut. Corey Hawkins portrays Dr. Dre, Jason Mitchell is Eazy-E, Neil Brown Jr. is DJ Yella, and Aldis Hodge is MC Ren. Paul Giamatti stars as N.W.A's manager Jerry Heller.

Talks of an N.W.A biopic began in 2010 by New Line Cinema. Several directors were approached including Craig Brewer, Peter Berg, and John Singleton before Gray was eventually confirmed in April 2012. Much of the cast signed on in June 2014 and principal photography began that August, taking place around Los Angeles and Compton, California. The production faced several controversies, including casting call issues and several acts of violence on set. The film is dedicated to Eazy-E who died from HIV in 1995, twenty years before the release of the film.

Released on August 14, 2015, Straight Outta Compton received positive reviews from critics with praise for its performances (particularly Jackson's and Mitchell's), direction, screenplay and musical sequences, though many criticized the historical inaccuracies. The film was also a box office success, making over $201 million on a production budget of $28–$50 million.

Straight Outta Compton was chosen by the National Board of Review as one of the top ten films of 2015 and was nominated for the Academy Award for Best Original Screenplay. Additionally, the film won the NAACP Image Award for Outstanding Motion Picture at the 47th NAACP Image Awards. It inspired Dr. Dre's third studio album, Compton, which debuted at no. 2 on the US Billboard 200 album chart a week prior to the film's release. The soundtrack album, featuring music by N.W.A, debuted at no. 1 on the Rap Albums chart and reached no. 1 on the Top R&B/Hip-Hop Albums chart. Heller filed a lawsuit against the filmmakers, protesting his depiction and claiming that parts were taken from his autobiography without permission.

Plot

In 1986, Compton, California has become a chaotic dystopia due to street gangs, drug dealers, and police brutality. One night, Eazy-E narrowly evades a police raid at a crack house. The following day, Dr. Dre is struggling with what he wants to do in life and is confronted by his mother for missing a job interview. Meanwhile, Ice Cube is a high school senior aspiring to become a rapper. Intrigued by Cube's "reality raps" reflecting on the crime, gang violence, and police harassment that they and other African Americans have endured recently, Dre convinces Eazy to fund a startup record label, Ruthless Records, with Dre as record producer. When their song "Boyz-n-the-Hood" is rejected by a New York rap group, Dre convinces Eazy to perform it instead. It becomes a local hit, and Eazy, Cube, Dre, DJ Yella, and MC Ren form the group N.W.A ("Niggaz Wit Attitude").

Eazy accepts Jerry Heller's offer to manage N.W.A and co-run Ruthless, and Priority Records offers N.W.A a record deal. While recording their debut album, Straight Outta Compton (1988), the group is harassed by police due to their race and appearance, prompting Cube to compose a diss track towards the police. Heller, having witnessed the altercation and being disgusted by the officers, allows the track. The album becomes a controversial hit due to its explicit lyrics, and the group's style is dubbed gangsta rap by the press. During a 1989 concert tour, the FBI demands N.W.A to not perform "Fuck tha Police" because it encourages violence against law enforcement. Police in Detroit forbid them from performing the song, but they perform it anyway. The concert stalls, and the police arrest the group, resulting in a riot.

Heller delays the individual members' contracts with Ruthless, and when he insists that Cube should sign without legal representation, Cube quits the group. His debut solo album, AmeriKKKa's Most Wanted (1990), is released, but when Priority Records is unable to pay him his advance on his next album, he wrecks the label head's office.

When N.W.A heavily insults Cube on their next record, 100 Miles and Runnin' (1990), he responds with the diss track "No Vaseline," criticizing them and Heller. This, combined with Cube's association with the Nation of Islam, outspoken criticism of the Los Angeles Police Department in the wake of the beating of Rodney King, and a starring role in the 1991 film Boyz n the Hood, make him even more famous and controversial.

Dre hires the imposing Bloods gang member Suge Knight as his manager after Knight proves that Heller has been underpaying him. Dre leaves N.W.A to form Death Row Records with Knight, who has his men threaten Heller and beat Eazy-E to pressure them to release Dre from his contract with Ruthless. Dre enjoys his newfound freedom and begins working with other rappers, including then-newcomer Snoop Dogg. His debut solo album, The Chronic (1992), sells over five million copies and is critically acclaimed, even as he becomes concerned about Knight's violent behavior and the community is rocked by the 1992 Los Angeles riots.

Eazy, whose fortunes and health have declined, is devastated by the comparative success of his former bandmates. Learning that Heller has been embezzling money from Ruthless from the beginning, he fires him and decides to rekindle his friendships with Cube and Dre, who agree to an N.W.A reunion. During the reunion, Eazy collapses and is admitted to the hospital, where he is diagnosed with HIV/AIDS. Amid emotional visits from his bandmates, Eazy dies on March 26, 1995, and is mourned by fans.

Dre parts ways with Knight and Death Row a year later to form his own label, Aftermath Entertainment. Clips shown during the film's credits highlight Cube's subsequent roles as a film actor and Dre's career as a producer and entrepreneur. Several famous rappers credit Dre with helping to launch their careers, and Beats Electronics, which he co-founded, was bought by Apple Inc. in 2014 for $3 billion.

Cast
 O'Shea Jackson Jr. as O'Shea "Ice Cube" Jackson
 Corey Hawkins as Andre "Dr. Dre" Young
 Jason Mitchell as Eric "Eazy-E" Wright
 Neil Brown Jr. as Antoine "DJ Yella" Carraby
 Aldis Hodge as Lorenzo "MC Ren" Patterson
 Paul Giamatti as Jerry Heller
 Marlon Yates Jr. as Tracy "The D.O.C." Curry
 R. Marcos Taylor (credited as R. Marcus Taylor) as Marion "Suge" Knight
 Lakeith Stanfield as Calvin "Snoop Dogg" Broadus
 Alexandra Shipp as Kimberly Woodruff
 Corey Reynolds as Alonzo Williams, club owner and member of Dr. Dre and DJ Yella's pre-N.W.A group World Class Wreckin' Cru
 Tate Ellington as Bryan Turner, head of Priority Records
 Sheldon A. Smith as "Warren G" Griffin III
 Elena Goode as Nicole Threatt, Dr. Dre's wife
 Keith Powers as Tyree Crayon, Dr. Dre's half-brother
 Mark Sherman as Jimmy Iovine, CEO of Interscope Records
LaDell Preston plays Jerome "Shorty" Muhammad, member of Ice Cube's post-N.W.A group Da Lench Mob
 Cleavon McClendon as Anthony "Sir Jinx" Wheaton, a member of Ice Cube's pre-N.W.A group C.I.A.
 Rogelio Douglas, Jr. as Carlton "Chuck D" Ridenhour of The Bomb Squad, producers of Ice Cube's solo album AmeriKKKa's Most Wanted
 Steve Turner as "Keith Shocklee" Boxley, member of The Bomb Squad
 Tyron Woodley as Terry "T-Bone" Gray, member of Ice Cube's post-N.W.A group Da Lench Mob
 Marcc Rose as Tupac Shakur, with Darris Love providing the character's voice
 F. Gary Gray as KDAY disc jockey Greg Mack
 Brandon Lafourche as Kim "Arabian Prince" Nazel

Production

Development
In March 2009, it was announced that the film was in development at New Line Cinema, with S. Leigh Savidge and Alan Wenkus writing, and Tomica Woods-Wright, Ice Cube, and Dr. Dre set to produce the film. In May 2010, it was announced Andrea Berloff would write a draft of the screenplay. In September 2011, John Singleton told The Playlist that he was in talks to direct the film, saying: "I can't talk about it too prematurely about the stuff I'm doing because nothing's come to fruition yet, but Cube and I are talking about doing the N.W.A. story. The script is really, really good, and so we're just figuring it out. New Line really wants to make it."

Also in September 2011, F. Gary Gray, Craig Brewer, and Peter Berg were reportedly in talks to direct the film. In April 2012, Gray was selected as director. Gray had worked with Ice Cube on the film Friday and Dr. Dre on the film Set It Off. He has also directed some of their music videos. By 2013 the film was picked up by Universal Studios, who, in December of that year, hired Jonathan Herman to write a new draft of the script and brought in Will Packer to executive produce, alongside Adam Merims, Alan Wenkus David Engel, Bill Straus, Thomas Tull, and Jon Jashni.

Casting
Casting calls began in the middle of 2010. There had been rumors of Lil Eazy-E playing his late father Eazy-E, and Ice Cube's son and fellow rapper O'Shea Jackson Jr. playing his father as well. Ice Cube said of the movie, "We're taking it to the nooks and crannies, I think deeper than any other article or documentary on the group," he said. "These are the intimate conversations that helped forge N.W.A. To me, I think it's interesting to anybody who loves that era and I don't know any other movie where you can mix Gangster Rap, the F.B.I., L.A. Riots, HIV, and fucking feuding with each other. This movie has everything from Daryl Gates and the battering ram."

On February 21, 2014, director Gray announced a March 9, 2014 open casting call for the film in Gardena, California, via his Twitter account. There were also open casting calls in Atlanta and Chicago. Rapper YG auditioned to play MC Ren in the film. The project was scheduled to start filming in April 2014, but was pushed back due to casting delays.

On June 18, 2014, Universal officially announced that the N.W.A biopic Straight Outta Compton would be released theatrically on August 14, 2015. It was also confirmed that Ice Cube's son, O'Shea Jackson Jr., would play a younger version of his father in the film. O'Shea Jr. joined Jason Mitchell and Corey Hawkins who portrayed group members Eazy-E and Dr. Dre respectively. In early July 2014, casting directors for the film issued a casting call for extras and vintage cars in the Los Angeles area. The casting call release stated that filming would begin in August 2014. In July 2014, it was confirmed Aldis Hodge would portray MC Ren and Neil Brown Jr. would play DJ Yella. On August 15, 2014, Paul Giamatti joined the cast to play N.W.A's manager Jerry Heller. On August 26, 2014, LaKeith Stanfield joined the cast to play Snoop Dogg.

On June 16, 2015, Ice Cube revealed that a "Tupac scene" had been shot for the film. Entertainment Weekly reported that the role of Tupac Shakur in the film would be played by newcomer Marcc Rose who was once rumored to be cast by John Singleton in his unmade Tupac biopic. Rose later reprised the role of Tupac in the first and only season of the true crime drama series Unsolved.

Casting call controversy
On July 16, 2014, a casting call for extras for Straight Outta Compton was released on the Sande Alessi Casting Facebook page. The casting call was looking for African-American girls for the film using an A-D ranking scale. Though the "A girls" category was looking for "classy" women of all colors, the "B through D" categories were very explicitly linked with skin-tone. As the women get less attractive, the casting call wants the women's flesh tone to be darker, with the lowest listing calling for "African American girls. Poor, not in good shape. Medium to dark skin tone."

The casting call post went viral as people expressed their outrage of what they call colorism, sexism, and racism in the categorizing of black women. A representative for Sande Alessi Casting said the ad was an "innocent mistake" and when it comes to casting "poor" people, they are also looking for women of various skin tones and body types. As for the A, B, C, D grouping system, Sande Alessi Casting says "it's the usual method [they] use to look for different types of people for any project and it wasn't meant to offend anyone."

Filming
Straight Outta Compton was filmed in Compton, California and Los Angeles, California. Principal photography began on location in Compton on August 5, 2014. In early September 2014, principal exterior shooting on a large post-riot set was observed on Laurel Canyon Boulevard in North Hollywood. While shooting in California, the production spent $50 million in the state and received the California Film & Television Tax Credit.

Costume designer Kelli Jones says "the script was literally changing the entire time we were shooting, I mean literally the entire time. There would be days where I would get a call on Friday and they were like 'oh by the way we've moved the pool party scene to Monday' and the pool party scene had like 400 people and I needed to get '80s bathing suits, so there wasn't a single weekend where  were not working. It was insane!" Production Designer Shane Valentino says "We had 130 sets which is a lot of sets to try and deal with."

Violence on set
On August 12, 2014, TMZ reported that just seven days into filming in Compton, a drive-by shooting took place directly in front of the cast and crew members while they were on the set. A group of men standing outside the Compton Courthouse flashed gang signs at a passing car and passengers in the car opened fire on the group. No one affiliated with the film was injured, but one other person near the set was shot. Despite the incident, it was announced that filming would continue to take place as planned in the city.

On January 29, 2015, Suge Knight was involved in a hit-and-run incident that left one man dead and another hospitalized. After an argument on the Straight Outta Compton film set, witnesses claim that Knight followed the men to a burger stand parking lot in Compton, and that the collisions looked intentional. Security footage video was released online in early March showing Knight running over both men but which Knight's attorney said helps his client's self-defense claim. Terry Carter, co-founder (along with Ice Cube) of Heavyweight Records and a friend of Knight, was the man killed. The second victim, filmmaker Cle Sloan, suffered a mangled foot and head injuries. Knight was arrested for the incident. In October 2018, he pleaded no contest to voluntary manslaughter in the case in a Los Angeles courtroom and was sentenced to 28 years in prison.

In October 2017, transcripts from a grand jury hearing earlier in the year indicated Knight allegedly gave multiple menacing warnings to director F. Gary Gray during filming. Although Gray would testify he did not recall any calls or texts threatening his safety (a move Deputy District Attorney Cynthia Barnes referred to as intentional perjury out of fear), Knight was allegedly angry at his depiction in the film and that he was not compensated for his portrayal.

Release

Marketing
In December 2014, during a show in Sydney, Australia, Ice Cube gave concertgoers a sneak peek at a trailer for Straight Outta Compton. When an executive producer of the film, Will Packer, was asked if Cube told him he was going to show the trailer or did he "just put it out there?", Packer responded, "Cube does what he does." He added, "Cube is the man. We back him. And I love the fact that it's out there and it's getting the response that it's getting, that's what I'll say."

On February 8, 2015, Universal released the first official trailer for Straight Outta Compton. The red band trailer was preceded by an introduction featuring N.W.A members Dr. Dre and Ice Cube. A second global trailer for Straight Outta Compton was released on April 1, 2015 and was attached with theatrical screenings of Universal's Furious 7.

On August 7, 2015, to help promote the film, Beats by Dre launched a new app through the website StraightOuttaSomewhere.com. The app allows users to create a meme by uploading a picture with the "Straight Outta" logo and fill in the blank with a location of their choice. Some people did proclaim that they were "Straight Outta" a certain city or locale, while others uploaded funny images and phrases. In under 24 hours, over 78,000 "Straight Outta" images were downloaded on social media sites and over 6 million downloads were generated before the film's opening day. Inquisitr.com proclaimed, "It's a successful viral photo campaign that is definitely bringing attention to the movie Straight Outta Compton."

Security concerns
Straight Outta Compton premiered on August 10, 2015, at the entertainment complex LA Live in Los Angeles, California. An earlier report by LA Weekly said that the LAPD was "beefing up its presence" for the event; The Hollywood Reporter said that organizers had tripled security. Due to concerns surrounding the violence in the film, it was reported that movie theaters hired extra security during the film's opening weekend and Universal Studios would reimburse them. Universal denied that it would reimburse them, but would partner with theaters seeking "support". No major incidents were reported at showings during the film's opening weekend. Some critics said it was because of the extra security at some theaters, while others argued that it showed the extra security was unnecessary.

Home media
Straight Outta Compton was released on Digital HD on January 5, 2016, by Universal Pictures Home Entertainment and on Blu-ray and DVD on January 19, 2016. The Blu-ray and DVD includes both the theatrical version and an Unrated Director's Cut which featured 20 additional minutes of the film.

Universal Pictures announced a 4K Blu-ray release including both cuts of the film to be released on February 6, 2018.

Reception

Box office
Straight Outta Compton grossed $161.2 million in the United States and Canada and $40.4 million in other territories for a worldwide total of $201.6 million. Deadline Hollywood calculated the net profit of the film to be $91.1 million, when factoring together all expenses and revenues for the film.

In the United States and Canada, the opening weekend projections were continuously revised upwards, starting from $25 million and going as high as $45 million. The film made $5 million from Thursday night shows, which began at 7 p.m. in 2,264 theaters. After its strong Thursday night showing, Universal was able to add nearly 500 theaters for the film's opening weekend. Straight Outta Compton made $24.1 million on its opening day, the fourth biggest August opening in history.

It finished first at the box office in its opening weekend earning $60.2 million from 2,757 theaters and ahead of the week's other new release The Man from U.N.C.L.E. 46% of its opening weekend audience was African American while 23% was non-Hispanic White and 21% Hispanic. Its opening weekend total was the fifth-best August opening weekend of all-time, the highest in August for an R-rated film and the highest for a musical biopic.

It also set the record for best opening by a film with an African American director, until it was passed by Gray's own The Fate of the Furious in April 2017. After a strong first full week showing ($84.7 million), Universal added the film to over 200 additional theaters. The film grossed $26.4 million in its second weekend and again finished first at the box office, ahead of the week's new releases Sinister 2, Hitman: Agent 47, and American Ultra.

On August 27, 2015, Straight Outta Compton became the highest grossing musical biopic of all-time in the United States with $120.9 million, passing the 2005 Johnny Cash biopic Walk the Lines $119.5 million total (it was then passed itself on December 1, 2018, by Bohemian Rhapsodys $162 million). The film grossed $13.1 million in its third weekend and, once again, finished first at the box office ahead of the week's new releases War Room, No Escape and We Are Your Friends.

On September 18, 2015, the film's domestic gross crossed $157.5 million, surpassing Keenen Ivory Wayans' Scary Movie ($157 million) to become the all-time highest domestic grossing film from a black director in the United States. This record was surpassed by Gray's own The Fate of the Furious in April 2017. By September 21, 2015, the film had grossed $188 million worldwide to become the all-time highest grossing music biopic, surpassing Walk the Line's $186.4 million worldwide gross, again, past itself by Bohemian Rhapsody in November 2018.

Critical response
On review aggregator Rotten Tomatoes the film has an approval rating of 89% based on 248 reviews with an average rating of 7.40/10. The site's consensus reads, "Straight Outta Compton is a biopic that's built to last, thanks to F. Gary Gray's confident direction and engaging performances from a solid cast." On Metacritic, it has a weighted average score of 72 out of 100, based on 41 critics, indicating "generally favorable reviews".

Richard Roeper of the Chicago Sun-Times awarded the film 3.5 stars out of 4, calling the film "enthralling" and "energized", praising the cast for delivering "strong, memorable work that transcends mere imitation." He called the film "one of the better musical biopics of the last 20 years". Lou Lumenick of the New York Post, also awarding the film a 3.5 out of 4, called it "one of the summer's most entertaining and provocative movies", finding it "surprisingly candid" about the negatives in N.W.A's career for a film produced by Ice Cube and Dr. Dre themselves.

Peter Travers of Rolling Stone, also giving the film 3.5 out of 4 stars, praised the picture for its honesty in its portrayal of the group and complemented Jackson's performance as Ice Cube, as well as the supporting cast, finding Mitchell's Eazy-E "award-caliber". He did wish that the film elaborated more on the group's troubles involving misogyny, homophobia, and the media. Joe Morgenstern of The Wall Street Journal found the group's musical performances to be "far and away the most appealing parts of the picture." However, he criticized the film for slowing down towards the end, particularly when it gets "ploddingly sentimental" once it focuses on the decline and death of Eazy-E.

Scott Foundas of Variety praised director Gray for taking familiar biopic paces and bringing a "richness of observation to the table that transcends cliche." He also praised the film for its "high but never overindulgent" style and the attention to detail in the production, ranging from the "exhaustively researched" screenplay to the "meticulous care" involved in assembling the film's soundtrack. He stated, "if Compton is undeniably of the moment, it's also timeless in its depiction of how artists and writers transform the world around them into angry, profane, vibrant and singular personal expression." Michael Phillips of the Chicago Tribune stated, "Straight Outta Compton at its best evokes the heady atmosphere of Crenshaw Boulevard and what the group's success meant to Compton, and vice versa. When the songs themselves take center stage the movie works. What remains in the wings constitutes another, fuller story."

In a mixed review, Kenneth Turan of the Los Angeles Times felt that the film attempted to take on more storylines than it could handle, also criticizing how bloated it becomes towards the end regarding Heller, though he did praise Giamatti's performance. Jordan Hoffman of The Guardian also criticized the film's second half for being "cheesy" and "[playing] it too safe". Ignatiy Vishnevetsky of The A.V. Club gave the film a C, feeling it had to rely on its timeliness for its thematic weight, and saying the film "simplifies N.W.A.'s arc to a gangster-movie knock-off about three friends from way back when who are driven apart by bad influences." Alyssa Rosenberg of The Washington Post noted the film's "lack of interest in process and personality" compared to the concurrently-released music biopic Love & Mercy, writing: "it's no contest as to which Giamatti picture is the better depiction of the actual music-making process."

Historical accuracy
Compared to the biopic Bohemian Rhapsody, which took major liberties with Freddy Mercury's life, and Queen's career, Straight Outta Compton stays fairly close to the overall truth of how N.W.A. came together, while the exact details are sometimes re-arranged.

 In the film, the formation of N.W.A happens after Dre punches a man who attacks his little brother one night. He is arrested, and Eazy bails him out of jail. According to recorded N.W.A lore, Dre did land in jail, but it was over unpaid tickets on his Mazda RX7. He paged Eazy to bail him out and, to return the favor, agreed to produce a track for a record label Eazy wanted to start.
 In the film, Cube and Dre's first show together takes place at local club. Dre is DJing there with Yella in a puffy, lavender jacket and warns Cube that the crowd will be tough. Cube wins over the crowd with "Gangsta Gangsta." Eazy and MC Ren are the only Crips in a crowd of mostly Bloods. The show actually happened at a Compton skating rink in which there was an overwhelming presence of Bloods. Cube did perform "Gangsta Gangsta," but mostly did dirty parodies of popular tracks. Dre's costumes were reserved for his first group World Class Wreckin' Cru.
 In the film, "Boyz-n-the-Hood" almost doesn't happen because HBO doesn't like the lyrics. In real life, HBO did recoil at the song and walked out on the session.
 In the film, Heller hears "Boyz-in-the-Hood" and asks Eazy to go into business together. They later form Ruthless Records and Heller lands N.W.A a deal with Priority Records after a show in a roller rink. In his 2007 memoir "Ruthless," Heller (who was not involved with the film) says that it was Eazy who sought him out, not the other way around, and he even paid a mutual acquaintance $750 to make an introduction. The Priority deal went down the week after N.W.A played a successful show at a local roller rink.
 In the film, NWA is brutally harassed by racist cops who hate rappers for looking like gangbangers as an outraged Heller looks on in shock. Soon afterward Cube writes some lyrics, Dre gives his approval, and they quickly begin recording Fuck tha Police. In real life, members of N.W.A did get harassed by cops outside of Audio Achievements while recording Straight Outta Compton in 1987. But Cube had the concept for "Fuck tha Police" long before Dre was on board, despite Dre's own frustrations with law enforcement.
 In the film, Ice Cube finally quits N.W.A after voicing his displeasure over his contract status with Heller and Eazy. In his book, Heller claims the group voted Cube out at the end of their first tour because of his griping about proper compensation. Ice Cube has said he thought it was ridiculous that Eazy and Heller were driving luxury cars and living in mansions while he still lived with his parents. But departing N.W.A. was not an easy decision. He secretly consulted with publicist Pat Charbonnet (who isn't portrayed in the film), who facilitated his solo deal with Priority Records.
 In the film, Knight and his goons beat up Eazy to get him to release Dre from the label. Dre has denied knowing of Knight's plans that night in 1991. In real life, Suge Knight told Eazy-E that he had kidnapped Jerry Heller and was holding him prisoner in a van. This did not convince Eazy-E to release Dr. Dre and The D.O.C. from Ruthless, and Suge Knight threatened Eazy-E's family. He gave Eazy-E a piece of paper that contained Eazy's mother's address, telling him, "I know where your mama stays." Eazy-E finally signed Dr. Dre and The D.O.C.'s releases, officially ending N.W.A. In his book, Heller corroborates the movie's assertion that Eazy-E wanted to retaliate by killing Knight. He also claims that Knight wanted three Ruthless artists—Dre, D.O.C., and Dre's girlfriend Michel'le (whom Knight later married)—released from their contracts so they could sign with Knight and Sony. A lawsuit against Dre, Knight, and Sony was later settled out of court.
 Dre witnesses Knight and his gangbanger buddies intimidating a man in his underwear with a dog in the Death Row Records offices, then leaves in protest and leads cops on a dramatic high-speed chase that ends with his arrest. Dre told The Hollywood Reporter that the scene really happened: "I was like, 'What the f— is going on?' I was ready to leave anyways. This was the extra push. The guy in the underwear? All this shit actually happened." Dre was sentenced to eight months in prison for drunk-driving his Ferrari through Beverly Hills in the late-night, 90-mph chase.
 In the film, Eazy is visited in the hospital by Dr. Dre. Ice Cube arrives to see him too, but can't bring himself to enter Eazy's room. In real life, DJ Yella remained close to Eazy throughout the post-N.W.A breakup. Yella was also the only member of N.W.A to attend Eazy's funeral.
 In the film, Cube and his new group Da Lench Mob are suddenly attacked by unidentified assailants. In reality, Cube's dispute was with Above the Law. He and their rapper/producer Cold 187 um had already fought at an Anaheim show earlier that year, and Cube brought along Da Lench Mob partly as protection. Shorty from Da Lench Mob threw the first blow. It was a wild showdown, with tables flying and shiners administered. But, Cube wasn't involved. When it began, he was speaking on a panel.
 Towards the movie's end, Eazy asks Cube about reuniting NWA. Cube says he's down if Jerry Heller isn't involved, and Eazy fires the manager shortly after. Eazy then brings the reunion idea to Dre, who is 100% on board. In reality, Eazy and Cube did speak of an NWA reunion not long before Eazy was diagnosed with AIDS. But, Dre hadn't committed to it. In fact, Cold 187 um says he wasn't planning on producing any new NWA tracks.

Reactions from the depicted
On June 10, 2015, MC Ren took to Twitter to voice his displeasure at the lack of exposure his character had in the Straight Outta Compton trailer, saying "Man fuck these bitches at universal pictures leaving me out the movie trailers  to rewrite history." and "When you have bitches work on a hip hop film that don't know shit about hip hop this is what happens. How the hell  leave me out after all the work I put into them records." After the film's release, Ren tweeted, "True fans know my role in the group as far as lyrics are concerned, don't let the movie fool you about my contribution to the group." He later praised the filmmakers saying, "Congrats to the cast and crew. Great job of telling our story."

Despite being a founding member, Arabian Prince's contribution to the group has been ignored in the movie, and his character has a brief, uncredited cameo in the film when the album cover for 'Straight Outta Compton' is shown momentarily. While going on record that he personally harbored no ill will towards the producers, Arabian Prince did note that it led to numerous inquiries and interview requests as to the possible reasons for such a revisionist approach. According to Arabian Prince, "Maybe for 50% of the [movie] scenes, I was there in real life, on stage, or in the studio. A lot of N.W.A's early music production was done with my equipment."

On August 24, 2015, Alonzo Williams referred to the film as "a great fusion of fantasy and reality", after admitting that he enjoyed the film. He disputed the accuracy of the scenes where he forbade gangsta rap from being played at his club, saying that the members of N.W.A had not started gangsta rap at that point. He also commented on the scene when Dr. Dre was bailed out of jail by Eazy-E, saying that Dr. Dre had been jailed several times for non-payment of parking fees and that he had an argument with Dre after having bailed him out of jail numerous times. When Alonzo refused to bail Dre out another time, Eazy-E bailed him out instead. Alonzo claimed that it was he who introduced Eazy-E to Jerry Heller and that contrary to how it was depicted in the movie, he was supportive of Boyz-n-the-Hood, unlike most others at the time.

Lawsuit from Heller
On August 27, 2015, Heller reported to the Los Angeles Times that he had seen the film: "I'm still not willing to comment right now on that movie because I think sooner or later it may be part of an ongoing litigation."

On October 30, 2015, Heller filed a 12-claim lawsuit in the Superior Court of Los Angeles against NBCUniversal, director F. Gary Gray, Legendary Pictures, the screenwriters of the film, Ice Cube, Dr. Dre and the estate of Eazy-E. As well as protesting his depiction in the film, Heller claimed that a significant amount of the film's content had been taken from his autobiography without permission. The defendants countered with a request that Heller's defamation charges be dismissed. In December 2018, two years after Heller's death, a judge dismissed the lawsuit.

Omissions
On August 17, 2015, Michel'le, Dr. Dre's former girlfriend and mother of one of his children, did an exclusive interview with Vlad TV. In the interview, the former Ruthless and Death Row Records artist ponders her and Dre's abusive relationship and she states that she was aware she was not included in the Straight Outta Compton film. "Why would Dre put me in it? I mean 'cause if they start from where they start from I was just a quiet girlfriend who got beat up and told to shut up."

On August 18, 2015, Gawker published an editorial by Dee Barnes titled "Here's What's Missing from Straight Outta Compton: Me and the Other Women Dr. Dre Beat Up." Barnes notes that Dr. Dre had repeated instances of physical abuse to female associates during his time in N.W.A, including the infamous January 1991 beating of Barnes in the bathroom of Po Na Na Souk nightclub. In the film, these incidents were never acknowledged. She further notes that important women from the era with close and historically important ties to N.W.A (J. J. Fad, Yo Yo, Tairrie B, etc.) were absent from the film. In the end, most women portrayed in the film are partying groupies, and Barnes felt that it could have also acknowledged the female MCs who contributed to N.W.A's and individual members' successes.

Gerrick D. Kennedy of the Los Angeles Times revealed the Barnes incident was originally included in an earlier version of the film's script. On August 21, 2015, Dr. Dre responded, apologizing to "the women I've hurt. I deeply regret what I did and know that it has forever impacted all of our lives." The next day, Apple Inc., which bought Beats Electronics for $3 billion in 2014 from Dr. Dre and made him an executive, weighed in on the abuse allegations to offer their support to Dre. The company said in a statement, "Dre has apologized for the mistakes he's made in the past and he's said that he's not the same person that he was 25 years ago."

On August 26, 2015, Randall Roberts of the Los Angeles Times criticized the film for leaving out the story of the all-female rap group J. J. Fad and how some in the media claim the group was responsible for "forging a path for the breakout success of N.W.A".

Dr. Dre and Snoop Dogg dissing Eazy-E in "Dre Day," Eazy-E's retaliation "Real Muthaphuckkin G's" and its guest rappers Dresta and B.G. Knocc Out are never portrayed in the film.

Accolades
The film received numerous award nominations, including one for Best Original Screenplay at the Oscars.

Music

Compton

On August 7, 2015, Dr. Dre released the album Compton: A Soundtrack by Dr. Dre exclusively on Apple Music and the iTunes Store at first and later released on other digital music platforms and in CD and vinyl form. Though not an official soundtrack to the film Straight Outta Compton, Dr. Dre said this album would be "inspired by the movie". Dre said on The Pharmacy (his Beats 1 radio show) that during principal photography of Straight Outta Compton, "I felt myself going to the studio and being so inspired by the movie that I started recording an album." He added, "It's an 'inspired by' album. It's inspired by Straight Outta Compton."

Part of Straight Outta Compton's successful opening has been attributed to Compton: A Soundtrack, Dr. Dre's first collection of original music since his 1999's 2001 album, which was released a week prior to the film's premiere and debuted at No. 2 on the US Billboard 200 charts and No. 1 on the iTunes charts. Dr. Dre said he would donate royalties from his album to the city of Compton for a new performing arts facility.

Soundtrack

An official soundtrack album to the film entitled Straight Outta Compton: Music from the Motion Picture was released on January 8, 2016 by Universal Music Enterprises. It features songs mainly by N.W.A, but also has songs by Ice Cube, Eazy-E, Dr. Dre featuring Snoop Dogg, and others.

See also
List of black films of the 2010s
List of films that most frequently use the word "fuck"
List of hood films
The Defiant Ones, topic-related 2017 documentary

Footnote

 The "New Line Cinema" logo does not appear in this film's opening.

References

External links

 Official screenplay

2015 biographical drama films
2015 crime drama films
American gangster films
2015 films
African-American films
African-American biographical dramas
2010s musical drama films
American crime drama films
American musical drama films
Biographical films about musicians
Crime films based on actual events
Cube Vision films
Compton, California
Drama films based on actual events
Films scored by Joseph Trapanese
Films about drugs
Films about music and musicians
Films about musical groups
Films about race and ethnicity
Films about racism
Films set in the 1980s
Films set in 1986
Films set in 1987
Films set in 1988
Films set in 1989
Films set in the 1990s
Films set in 1990
Films set in 1991
Films set in 1992
Films set in 1993
Films set in 1995
Films set in Los Angeles
Films shot in Los Angeles
2010s hip hop films
Hood films
American gang films
HIV/AIDS in American films
Legendary Pictures films
N.W.A
New Line Cinema films
Films about police misconduct
Universal Pictures films
Will Packer Productions films
Films directed by F. Gary Gray
Films produced by Ice Cube
Films with screenplays by Andrea Berloff
Criticism of police brutality
West Coast hip hop
Obscenity controversies in film
Works subject to a lawsuit
2010s English-language films
2010s American films

redpajama_set_name: RedPajamaWikipedia