This file contains hidden or 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 abstract class FileSystemBase | |
{ | |
protected Dictionary<string, File> _cachedFiles; | |
protected FileSystemBase() | |
{ | |
_cachedFiles = new Dictionary<string, File>(); | |
} | |
public abstract File CreateFile(string filename); |
This file contains hidden or 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
namespace Data | |
{ | |
public class Point | |
{ | |
public double x { get; set; } | |
public double y { get; set; } | |
} | |
public static class Drawings | |
{ |
This file contains hidden or 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 class Circle | |
{ | |
private readonly Func<SKImageInfo, SKPoint> _centerfunc; | |
public Circle(float redius, Func<SKImageInfo,SKPoint> centerfunc) | |
{ | |
_centerfunc = centerfunc; | |
Redius = redius; | |
} | |
public SKPoint Center { get; set; } |
This file contains hidden or 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 partial class CircularProgressbarView: ContentView | |
{ | |
private ProgressDrawer _ProgressDrawer; | |
public static readonly BindableProperty ProgressProperty = BindableProperty.Create( | |
"Progress", typeof(double), typeof(CircularProgressbarView),propertyChanged:OnProgressChanged); | |
public double Progress | |
{ | |
get { return (double) GetValue(ProgressProperty); } |
This file contains hidden or 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; | |
namespace TimeTable.Core.Models | |
{ | |
public class Entity | |
{ | |
public string Id { get; set; } | |
} |
This file contains hidden or 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 Microsoft.EntityFrameworkCore; | |
using TimeTable.Core.Models; | |
namespace TimeTableServer.Context | |
{ | |
public class DataContext : DbContext | |
{ | |
public DbSet<StudentCourse> StudentCourse { get; set; } | |
public DbSet<Student> Students { get; set; } |
This file contains hidden or 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
struct TimeSlotChromosome | |
{ | |
public TimeSpan StartAt { get; set; } | |
public TimeSpan EndAt => StartAt.Add(TimeSpan.FromHours(3)); | |
public string CourseId { get; set; } | |
public string PlaceId { get; set; } | |
public string TeacherId { get; set; } | |
public List<string> Students { get; set; } | |
public int Day { get; set; } | |
} |
This file contains hidden or 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.Linq; | |
using Accord.Genetic; | |
using Microsoft.EntityFrameworkCore; | |
namespace TimeTable.Builder | |
{ | |
class TimeTableChromosome:ChromosomeBase | |
{ |
This file contains hidden or 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
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
using (var dataContext = new DataContext()) | |
{ | |
Population population = new Population(1000, new TimeTableChromosome(dataContext), | |
new TimeTableChromosome.FitnessFunction(), new EliteSelection()); |
This file contains hidden or 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.Linq; | |
using System.Threading.Tasks; | |
using Microsoft.AspNetCore.Mvc; | |
using Microsoft.EntityFrameworkCore; | |
using TimeTable.Core.Models; | |
using TimeTableServer.Context; | |
// For more information on enabling Web API for empty projects, visit https://go.microsoft.com/fwlink/?LinkID=397860 |