This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public List<int> GetWeekdaysWithIntervalOverlaps(IEnumerable<int> selectedWeekdays, ChannelPlaylistPlaytimeRuleInterval interval, int channelPlaylistId) | |
{ | |
var playtimeRules = GetChannelPlaylistPlaytimeRules(channelPlaylistId); | |
var overlappingDays = selectedWeekdays | |
.Where(weekdayIndex => IsOverlapped(playtimeRules, interval, weekdayIndex)) | |
.ToList(); | |
return overlappingDays; | |
} | |
public bool IsWeekdayWithIntervalOverlaps(int selectedWeekday, ChannelPlaylistPlaytimeRuleInterval interval, int channelPlaylistId, int channelPlaylistItemId) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Drawing; | |
using System.Drawing.Imaging; | |
using System.Linq; | |
using System.Runtime.InteropServices; | |
using C5; | |
namespace Ai.framework2 | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private static void Main(string[] args) | |
{ | |
var connection = new SqlConnection(@"Server=(local);Database=EF7.ConsoleTests;Trusted_Connection=True;"); | |
foreach (var result in connection.Query<Result>(@" | |
SELECT NAME as Name, | |
Count(NAME) AS Number | |
FROM [EF7.ConsoleTests].[dbo].[multiple] as k | |
GROUP BY NAME | |
ORDER BY Name, Number")) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Linq; | |
using Microsoft.Data.Entity; | |
namespace Ef7Tests | |
{ | |
internal class Program | |
{ | |
/// <summary> | |
/// <para /> Nuget packages: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[assembly: MeasureTimeSpan] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static class RootCertificates | |
{ | |
public static async void AddEsteidSk() | |
{ | |
try | |
{ | |
var certificateFile = new Uri("ms-appx:///Assets/ESTEID-SK_2015.der.crt"); | |
var file = await StorageFile.GetFileFromApplicationUriAsync(certificateFile); | |
var certBlob = await FileIO.ReadBufferAsync(file); | |
var trustedStore = CertificateStores.TrustedRootCertificationAuthorities; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Drawing; | |
using Gif.Components; | |
using System.Collections.Generic; | |
namespace Example | |
{ | |
class ExampleMain | |
{ | |
[STAThread] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Drawing; | |
using System.Drawing.Imaging; | |
using System.Text; | |
namespace ConwaysGameOfLife | |
{ | |
class Program | |
{ | |
public class GameOfLifeConsoleUi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Speech.Synthesis; | |
using System.Windows.Forms; | |
using Gma.System.MouseKeyHook; | |
namespace SoundSynthesize | |
{ | |
internal class Program | |
{ | |
public static SpeechSynthesizer Talk; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using NAudio.Lame; | |
using NAudio.Wave; | |
namespace CaptureAudio | |
{ | |
class Program | |
{ | |
static LameMP3FileWriter _writer; |