text:
Q: How can I call an environment variable in a batch script? I'd like to create a batch file that creates a directory symbolic link for My Pictures - in the Downloads folder...
mklink /D "%USERPROFILE%\Downloads\Pictures" "%USERPROFILE%\Pictures\Saved Pictures"

But the above doesn't work

redpajama_set_name: RedPajamaStackExchange


Hymen: an accurate description of the ceremonies used in marriage, by every nation in the known world. Shewing, the oddity of some, the absurdity of others, the drollery of many, and the real or intended piety of all. Dedicated to the ladies of Great-Britain and Ireland.
You are here: CollectionsOnline / Hymen: an accurate description of the ceremonies used in marriage, by every nation in the known world. Shewing, the oddity of some, the absurdity of others, the drollery of many, and the real or intended piety of all. Dedicated to the ladies of Great-Britain and Ireland.
London: printed for I. Pottinger, 1760.
Anonymous. The dedication is signed 'Uxorius'. ESTC t116155.
Copy Notes Front pastedown inscribed in pencil with price 2s-6d.


Jacksonville Symphony "Listen Up" Ensemble Concert, presented in partnership with the Beaches Museum & History Park.
$15 tickets are available for purchase in advance online or by calling the Ticket Office at 904.354.5547. Symphony members at the $1,000 Concertmaster's Circle level and above may reserve up to two complimentary tickets to this event.


text:
Home > About > General > KERA News > KERA Radio > KERA TV > News Releases > "STUDENTS SPEAK OUT" PREMIERES ON KERA TV
"STUDENTS SPEAK OUT" PREMIERES ON KERA TV
General, KERA News, KERA Radio, KERA TV, News Releases August 6, 2013 94
DALLAS/FORT WORTH – What does it take to finish high school when the odds are against you? Just ask six North Texas students. KERA, the North Texas public broadcasting station, premieres Students Speak Out: An American Graduate Special on Wednesday, August 28 at 7:00 p.m. on KERA TV.
Krys Boyd, host of KERA FM's Think, talks with four students who have overcome the odds to graduate and two students still working hard to finish. The students reveal the significant challenges they have faced on the path to high school graduation – from teen pregnancy, drug abuse and parental absence to significant family health and financial difficulties.
"Getting a high school diploma is such an important step in becoming an adult, but only three of every four American young people are graduating," said KERA Executive Producer Jeff Whittington. "We'll hear from the students themselves about success, family, school and the pressures they face everyday on the road to graduation."
As part of KERA's larger American Graduate initiative – a public media project spotlighting the high school dropout crisis – Students Speak Out features both a student-led roundtable discussion and one-on-one interviews with graduates Jarrell Brown and Mayra Millan of Dallas, as well as Ashley Tilley and Prabhesh Patel, of Fort Worth. High school seniors Scottie Gipson, of Lewisville, and Arlington's Leslie Beltran share their goals as they near graduation. The students reveal their secrets to success and offer hope to young people and families facing similar challenges.
Meet the inspirational students of Students Speak Out.
After the television premiere, Students Speak Out will be available at kera.org/graduate as an educational resource. Students Speak Out: An American Graduate Special is the first installment of a two-episode television series focused on education in North Texas. The second episode will feature a discussion with North Texas teachers tentatively scheduled to premiere in November. Students Speak Out is funded by the Lyda Hill Foundation, The Meadows Foundation and the Corporation for Public Broadcasting.
KERA News also has created a multiyear education project following another group of North Texas teens. The newly launched Class of 17 blog is the centerpiece of an in-depth education series by KERA News following a diverse group of North Texas students on their very personal journeys to graduate from high school. The series includes on-air news reports and online video profiles by KERA News education reporters Bill Zeeble and Stella Chavez as well as reports, blogs and videos from the students themselves.
Meet the students of KERA News' Class of 17.
ABOUT KERA
KERA is a not-for-profit public media organization that serves the people of North Texas. The station broadcasts to the fourth-largest population area in the United States. KERA produces original multimedia content, carries the best in national and international public television and radio programs, and provides online resources at www.kera.org. The station's extensive coverage of the arts can be found at www.artandseek.org. KERA-TV broadcasts on Channel 13.1. KERA WORLD broadcasts on 13.2. KERA-FM broadcasts on 90.1 in Dallas/Fort Worth/Denton, 88.3 in Wichita Falls, 100.1 in Tyler and 99.3 in Sherman. KXT 91.7 FM, KERA's new music station, KXT 91.7, is streamed online at www.kxt.org.
Christopher Wagley
Director, Marketing & Communications
KERA, KXT and Art&Seek
cwagley@kera.org
« Previous KERA'S "CEO" FEATURES STEVEN AND ERIC WANG OF MING WANG KNITWEAR
Next » KERA'S "CEO" FEATURES JOEL ALLISON OF BAYLOR HEALTH CARE SYSTEM

redpajama_set_name: RedPajamaCommonCrawl


The 5Dimes MatchPlay Casino is everything you ever wanted in an online casino and much more.
Some of the highlights of the MatchPlay Casino are the Video Poker games as well as theSingle-Deck Blackjack. Choose Single-Deck Blackjack games ranging for $1-$500. The MatchPlay Casino also features several other of your favorite poker games all with realistic graphics and sounds.
Would you like to try out all of the MatchPlay Casino games for free? Register with us to receive your 5Dimes User ID and password. After registering, your User ID will be sent to you via email within minutes. When you receive a 5Dimes User ID and password, log into the MatchPlay Casino and then select the game you want to try and play "FOR FUN."
When you're ready to play for real money, you only need to fund your account. For fast and easy instructions on making a deposit, refer to our funding methods page.


text:
//  ----------------------------------------------------------------------------------
//  Copyright Microsoft Corporation
//  Licensed under the Apache License, Version 2.0 (the "License");
//  you may not use this file except in compliance with the License.
//  You may obtain a copy of the License at
//  http://www.apache.org/licenses/LICENSE-2.0
//  Unless required by applicable law or agreed to in writing, software
//  distributed under the License is distributed on an "AS IS" BASIS,
//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
//  See the License for the specific language governing permissions and
//  limitations under the License.
//  ----------------------------------------------------------------------------------

namespace DurableTask.SqlServer.Tracking
{
    using DurableTask.Core;
    using DurableTask.Core.History;
    using DurableTask.Core.Serializing;
    using DurableTask.Core.Tracking;
    using DurableTask.SqlServer.Internal;
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text.RegularExpressions;
    using System.Threading.Tasks;

    /// <summary>
    /// SQL Server Instance store provider to allow storage and lookup for orchestration state event history with query support
    /// </summary>
    public class SqlServerInstanceStore : IOrchestrationServiceInstanceStore
    {
        private readonly DataConverter dataConverter = new JsonDataConverter();
        private readonly SqlServerInstanceStoreSettings settings;

        /// <summary>
        /// Creates a new SqlServerInstanceStore using the supplied settings
        /// </summary>
        /// <param name="settings">Configuration values for the Instnace Store</param>
        public SqlServerInstanceStore(SqlServerInstanceStoreSettings settings)
        {
            ValidateSettings(settings);

            this.settings = settings;
        }

        /// <inheritdoc />
        public int MaxHistoryEntryLength => int.MaxValue;

        /// <inheritdoc />
        public async Task<object> DeleteEntitiesAsync(IEnumerable<InstanceEntityBase> entities)
        {
            using (var connection = await settings.GetDatabaseConnection())
            using (var command = connection.CreateCommand())
            {
                foreach (var entity in entities)
                {
                    if (entity is OrchestrationStateInstanceEntity state)
                    {
                        command.AddStatement($"DELETE FROM {settings.OrchestrationStateTableName} WHERE InstanceId = @instanceId AND ExecutionId = @executionId",
                            new { instanceId = state.State.OrchestrationInstance.InstanceId, executionId = state.State.OrchestrationInstance.ExecutionId });

                    }
                    else if (entity is OrchestrationWorkItemInstanceEntity workItem)
                    {
                        command.AddStatement($"DELETE FROM {settings.WorkItemTableName} WHERE InstanceId = @instanceId AND ExecutionId = @executionId AND SequenceNumber = @sequenceNumber",
                            new { instanceId = workItem.InstanceId, executionId = workItem.ExecutionId, sequenceNumber = workItem.SequenceNumber });
                    }
                    else
                        throw new InvalidOperationException($"Invalid history event type: {entity.GetType()}");
                }

                if (command.CommandText.Any() == false) return null;

                await connection.OpenAsync();
                await command.ExecuteNonQueryAsync();
            }

            return null;
        }

        /// <summary>
        /// Not Supported
        /// </summary>
        public Task<object> DeleteJumpStartEntitiesAsync(IEnumerable<OrchestrationJumpStartInstanceEntity> entities) => throw new NotSupportedException("JumpStart Entities not supported.");

        /// <inheritdoc />
        public async Task DeleteStoreAsync()
        {
            using (var connection = await settings.GetDatabaseConnection())
            using (var command = connection.CreateCommand())
            {
                command.AddStatement($"DROP TABLE IF EXISTS {settings.WorkItemTableName}");
                command.AddStatement($"DROP TABLE IF EXISTS {settings.OrchestrationStateTableName}");

                await connection.OpenAsync();
                await command.ExecuteNonQueryAsync();
            }
        }

        /// <inheritdoc />
        public async Task<IEnumerable<OrchestrationStateInstanceEntity>> GetEntitiesAsync(string instanceId, string executionId)
        {
            using (var connection = await settings.GetDatabaseConnection())
            using (var command = connection.CreateCommand())
            {
                command.CommandText = $"SELECT StateData FROM {settings.OrchestrationStateTableName} WHERE InstanceId = @instanceId AND ExecutionId = @executionId";

                command.AddParameter("instanceId", instanceId)
                    .AddParameter("executionId", executionId);

                await connection.OpenAsync();
                using (var reader = await command.ExecuteReaderAsync())
                {
                    var entities = new List<OrchestrationStateInstanceEntity>();

                    while (await reader.ReadAsync())
                    {
                        entities.Add(new OrchestrationStateInstanceEntity { State = dataConverter.Deserialize<OrchestrationState>(reader.GetString(0)) });
                    }

                    return entities;
                }
            }
        }

        /// <summary>
        /// Not Supported
        /// </summary>
        public Task<IEnumerable<OrchestrationJumpStartInstanceEntity>> GetJumpStartEntitiesAsync(int top) => throw new NotSupportedException("JumpStart Entities not supported.");

        /// <inheritdoc />
        public async Task<IEnumerable<OrchestrationWorkItemInstanceEntity>> GetOrchestrationHistoryEventsAsync(string instanceId, string executionId)
        {
            using (var connection = await settings.GetDatabaseConnection())
            using (var command = connection.CreateCommand())
            {
                command.CommandText = $"SELECT InstanceId, ExecutionId, EventTimestamp, SequenceNumber, HistoryEvent FROM {settings.WorkItemTableName} WHERE InstanceId = @instanceId AND ExecutionId = @executionId ORDER BY SequenceNumber";
                command.AddParameter("instanceId", instanceId)
                    .AddParameter("executionId", executionId);

                await connection.OpenAsync();

                var reader = await command.ExecuteReaderAsync();
                var entities = new List<OrchestrationWorkItemInstanceEntity>();

                while (await reader.ReadAsync())
                {
                    entities.Add(new OrchestrationWorkItemInstanceEntity
                    {
                        InstanceId = reader.GetFieldValue<string>(0),
                        ExecutionId = reader.GetFieldValue<string>(1),
                        EventTimestamp = reader.GetFieldValue<DateTime>(2),
                        SequenceNumber = reader.GetFieldValue<long>(3),
                        HistoryEvent = dataConverter.Deserialize<HistoryEvent>(reader.GetFieldValue<string>(4))
                    });
                }

                return entities;
            }
        }

        /// <inheritdoc />
        public async Task<IEnumerable<OrchestrationStateInstanceEntity>> GetOrchestrationStateAsync(string instanceId, bool allInstances)
        {
            using (var connection = await settings.GetDatabaseConnection())
            using (var command = connection.CreateCommand())
            {
                command.CommandText = $"SELECT StateData FROM {settings.OrchestrationStateTableName} WHERE InstanceId = @instanceId ";
                command.AddParameter("instanceId", instanceId);

                if (allInstances == false)
                {
                    command.CommandText += "AND OrchestrationStatus != @status ";
                    command.AddParameter("status", OrchestrationStatus.ContinuedAsNew.ToString());
                }

                command.CommandText += "ORDER BY LastUpdatedTime";

                await connection.OpenAsync();
                using (var reader = await command.ExecuteReaderAsync())
                {
                    var entities = new List<OrchestrationStateInstanceEntity>();

                    while (await reader.ReadAsync())
                    {
                        entities.Add(new OrchestrationStateInstanceEntity { State = dataConverter.Deserialize<OrchestrationState>(reader.GetFieldValue<string>(0)) });

                        if (allInstances == false) break;
                    }

                    return entities;
                }
            }
        }

        /// <inheritdoc />
        public async Task<OrchestrationStateInstanceEntity> GetOrchestrationStateAsync(string instanceId, string executionId)
        {
            using (var connection = await settings.GetDatabaseConnection())
            using (var command = connection.CreateCommand())
            {
                command.CommandText = $"SELECT TOP 1 StateData FROM {settings.OrchestrationStateTableName} WHERE InstanceId = @instanceId AND ExecutionId = @executionId";
                command.AddParameter("instanceId", instanceId)
                    .AddParameter("executionId", executionId);

                await connection.OpenAsync();
                var value = await command.ExecuteScalarAsync();

                return new OrchestrationStateInstanceEntity { State = dataConverter.Deserialize<OrchestrationState>(value.ToString()) };
            }
        }

        /// <inheritdoc />
        public async Task InitializeStoreAsync(bool recreate)
        {
            using (var connection = await settings.GetDatabaseConnection())
            using (var command = connection.CreateCommand())
            {
                if (recreate) await DeleteStoreAsync();

                command.AddStatement($@"IF(SCHEMA_ID(@schema) IS NULL)
                    BEGIN
                        EXEC sp_executesql N'CREATE SCHEMA [{settings.SchemaName}]'
                    END", new { schema = settings.SchemaName });

                command.AddStatement($@"IF(OBJECT_ID(@table) IS NULL)
                    BEGIN
                        CREATE TABLE {settings.OrchestrationStateTableName} (
	                        [InstanceId] NVARCHAR(50) NOT NULL,
	                        [ExecutionId] NVARCHAR(50) NOT NULL,
	                        [Name] NVARCHAR(MAX) NOT NULL,
	                        [Version] NVARCHAR(MAX) NOT NULL,
	                        [OrchestrationStatus] NVARCHAR(50) NOT NULL,
	                        [CreatedTime]  DATETIME2 NOT NULL,
	                        [CompletedTime] DATETIME2 NOT NULL,
	                        [LastUpdatedTime] DATETIME2 NOT NULL,
	                        [StateData] NVARCHAR(MAX) NOT NULL,
                            CONSTRAINT [PK_{settings.SchemaName}_{settings.HubName}{SqlServerInstanceStoreSettings.OrchestrationTable}_InstanceId_ExecutionId] PRIMARY KEY CLUSTERED ([InstanceId], [ExecutionId]))
                    END", new { table = settings.OrchestrationStateTableName });

                command.AddStatement($@"IF(OBJECT_ID(@table) IS NULL)
                    BEGIN
                        CREATE TABLE {settings.WorkItemTableName} (
	                        [InstanceId] NVARCHAR(50) NOT NULL,
	                        [ExecutionId] NVARCHAR(50) NOT NULL,
	                        [SequenceNumber] BIGINT NOT NULL,
	                        [EventTimestamp] DATETIME2 NOT NULL,
	                        [HistoryEvent] NVARCHAR(MAX) NOT NULL,
                            CONSTRAINT [PK_{settings.SchemaName}_{settings.HubName}{SqlServerInstanceStoreSettings.WorkitemTable}_InstanceId_ExecutionId_SequenceNumber] PRIMARY KEY CLUSTERED ([InstanceId], [ExecutionId], [SequenceNumber]))
                    END", new { table = settings.WorkItemTableName });

                await connection.OpenAsync();
                await command.ExecuteNonQueryAsync();
            }
        }

        /// <inheritdoc />
        public async Task<int> PurgeOrchestrationHistoryEventsAsync(DateTime thresholdDateTimeUtc, OrchestrationStateTimeRangeFilterType timeRangeFilterType)
        {
            var deleteStatement = $@"DELETE h FROM {settings.WorkItemTableName} h JOIN {settings.OrchestrationStateTableName} e ON e.InstanceId = h.InstanceId AND e.ExecutionId = h.ExecutionId ";

            switch (timeRangeFilterType)
            {
                case OrchestrationStateTimeRangeFilterType.OrchestrationCompletedTimeFilter:
                    deleteStatement += "WHERE e.CompletedTime <= @thresholdDateTimeUtc";
                    break;
                case OrchestrationStateTimeRangeFilterType.OrchestrationCreatedTimeFilter:
                    deleteStatement += "WHERE e.CreatedTime <= @thresholdDateTimeUtc";
                    break;
                case OrchestrationStateTimeRangeFilterType.OrchestrationLastUpdatedTimeFilter:
                    deleteStatement += "WHERE e.LastUpdatedTime <= @thresholdDateTimeUtc";
                    break;
                default:
                    throw new ArgumentOutOfRangeException($"Unknown {nameof(timeRangeFilterType)} value: {timeRangeFilterType}");
            }

            using (var connection = await settings.GetDatabaseConnection())
            using (var command = connection.CreateCommand())
            {
                command.AddParameter("thresholdDateTimeUtc", thresholdDateTimeUtc)
                    .CommandText = deleteStatement;

                await connection.OpenAsync();
                return await command.ExecuteNonQueryAsync();
            }
        }

        /// <inheritdoc />
        public async Task<object> WriteEntitiesAsync(IEnumerable<InstanceEntityBase> entities)
        {
            using (var connection = await settings.GetDatabaseConnection())
            using (var command = connection.CreateCommand())
            {
                foreach (var entity in entities)
                {
                    if (entity is OrchestrationStateInstanceEntity orchestration)
                    {
                        OrchestrationState state = orchestration.State;
                        command.AddStatement(string.Format(MergeOrchestrationStateInstanceEntityQuery, settings.OrchestrationStateTableName),
                            new
                            {
                                instanceId = state.OrchestrationInstance.InstanceId,
                                executionId = state.OrchestrationInstance.ExecutionId,
                                name = state.Name,
                                version = state.Version,
                                orchestrationStatus = state.OrchestrationStatus.ToString(),
                                createdTime = state.CreatedTime,
                                completedTime = state.CompletedTime,
                                lastUpdatedTime = state.LastUpdatedTime,
                                stateData = dataConverter.Serialize(state)
                            });

                    }
                    else if (entity is OrchestrationWorkItemInstanceEntity workItem)
                    {
                        command.AddStatement(string.Format(MergeOrchestrationWorkItemInstanceEntityQuery, settings.WorkItemTableName),
                            new
                            {
                                instanceId = workItem.InstanceId,
                                executionId = workItem.ExecutionId,
                                sequenceNumber = workItem.SequenceNumber,
                                eventTimestamp = workItem.EventTimestamp,
                                historyEvent = dataConverter.Serialize(workItem.HistoryEvent)
                            });
                    }
                    else
                        throw new InvalidOperationException($"Invalid history event type: {entity.GetType()}");
                }

                if (command.CommandText.Any() == false) return null;

                await connection.OpenAsync();
                await command.ExecuteNonQueryAsync();
            }

            return null;
        }

        /// <summary>
        /// Not Supported
        /// </summary>
        public Task<object> WriteJumpStartEntitiesAsync(IEnumerable<OrchestrationJumpStartInstanceEntity> entities) => throw new NotSupportedException("JumpStart Entities not supported.");

        private void ValidateSettings(SqlServerInstanceStoreSettings settings)
        {
            if (settings.GetDatabaseConnection == null) throw new ArgumentException($"{nameof(settings.GetDatabaseConnection)} cannot be null.");
            if (settings.HubName == null) throw new ArgumentException($"{nameof(settings.HubName)} cannot be null.");
            if (settings.SchemaName == null) throw new ArgumentException($"{nameof(settings.SchemaName)} cannot be null.");

            //Validate schema and hubnames are valid SQL Identifiers
            var sqlIdentifierRegex = new Regex(@"^[\p{L}_][\p{L}\p{N}@$#_]{0,127}$");
            if (sqlIdentifierRegex.IsMatch(settings.SchemaName) == false) throw new ArgumentException($"{nameof(settings.SchemaName)} must be a valid SQL Identifier");
            if (sqlIdentifierRegex.IsMatch(settings.HubName) == false) throw new ArgumentException($"{nameof(settings.HubName)} must be a valid SQL Identifier");
        }

        private const string MergeOrchestrationStateInstanceEntityQuery =
            @"MERGE {0} [Target] USING (VALUES (@instanceId,@executionId,@name,@version,@orchestrationStatus,@createdTime,@completedTime,@lastUpdatedTime,@stateData)) as [Source](InstanceId,ExecutionId,[Name],[Version],OrchestrationStatus,CreatedTime,CompletedTime,LastUpdatedTime,StateData)
                ON [Target].InstanceId = [Source].InstanceId AND [Target].ExecutionId = [Source].ExecutionId
              WHEN NOT MATCHED THEN INSERT (InstanceId,ExecutionId,[Name],[Version],OrchestrationStatus,CreatedTime,CompletedTime,LastUpdatedTime,StateData) VALUES (InstanceId,ExecutionId,[Name],[Version],OrchestrationStatus,CreatedTime,CompletedTime,LastUpdatedTime,StateData)
              WHEN MATCHED THEN UPDATE SET InstanceId = [Source].InstanceId,ExecutionId = [Source].ExecutionId,[Name] = [Source].[Name],[Version] = [Source].[Version],OrchestrationStatus = [Source].OrchestrationStatus,CreatedTime = [Source].CreatedTime,CompletedTime = [Source].CompletedTime,LastUpdatedTime = [Source].LastUpdatedTime,StateData = [Source].StateData;";

        private const string MergeOrchestrationWorkItemInstanceEntityQuery =
            @"MERGE {0} [Target] USING (VALUES (@instanceId,@executionId,@sequenceNumber,@eventTimestamp,@historyEvent)) as [Source](InstanceId,ExecutionId,SequenceNumber,EventTimestamp,HistoryEvent)
                ON [Target].InstanceId = [Source].InstanceId AND [Target].ExecutionId = [Source].ExecutionId AND [Target].SequenceNumber = [Source].SequenceNumber
              WHEN NOT MATCHED THEN INSERT (InstanceId, ExecutionId, SequenceNumber, EventTimestamp, HistoryEvent) VALUES (InstanceId, ExecutionId, SequenceNumber, EventTimestamp, HistoryEvent)
              WHEN MATCHED THEN UPDATE SET EventTimestamp = [Source].EventTimestamp, HistoryEvent = [Source].HistoryEvent;";
    }
}

redpajama_set_name: RedPajamaGithub