Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public Organization(string name, int userId)
public int CreatedBy { get; private set; }
public int ModifiedBy { get; private set; }
public DateTime DateCreated { get; private set; }
public DateTime DateModified { get; private set; }
public DateTime DateModified { get; private set; }

public void UpdateName(UpdateOrganizationDto dto, int userId)
{
Expand Down
85 changes: 85 additions & 0 deletions Documentmanager.Core/Domain/Services/test/test.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
// using AutoMapper;
// using Documentmanager.Core.Domain.Dtos.Organizations;
// using Documentmanager.Core.Domain.Dtos.Users;
// using Documentmanager.Core.Domain.Models.Common;
// using Documentmanager.Core.Domain.Models.Users;
// using Documentmanager.Core.Domain.Repositories.Interfaces;

// namespace Documentmanager.Core.Domain.Services.Users
// {
// public class TestService
// {
// public int LengthOfLongestSubstring(string s)
// {
// int n = s.Length;
// int res = 0;
// HashSet<char> set = new HashSet<char>();
// for (int i = 0, j = 0; i < n; i++)
// {
// while (j < n && !set.Contains(s[j]))
// {
// set.Add(s[j]);
// j++;
// }
// res = Math.Max(res, j - i);
// set.Remove(s[i]);
// }
// return res;
// }
// public int CharacterReplacement(string s, int k)
// {
// var res = 0;
// var found = new Dictionary<char,int>();
// var r = 0;
// for (int l = 0; l < s.Length; l ++) {
// while ( r < s.Length){
// if (!isValid(r+1, found.Values.Max(),k)){
// break;
// }
// if (!found.ContainsKey(s[r]))
// {
// found[s[r]] = 1;
// } else {
// found[s[r]]++;
// }
// r++;
// }
// res = Math.Max(res, r+1);
// found[s[l]]--;
// }
// return res;
// }

// public int LeastInterval(char[] tasks, int n) {
// var dict = new Dictionary<char, int>();
// var queue = new Queue<int[]>();
// var pq = new PriorityQueue<int,int>();
// foreach(var c in tasks){
// if (!dict.ContainsKey(c)){
// dict[c] = 1;
// } else {
// dict[c]++;
// }
// }
// foreach (var kvp in dict) {
// pq.Enqueue(kvp.Value, -kvp.Value);
// }
// var time = 0;
// while (pq.Count > 0 || queue.Count > 0){
// time++;
// var task = pq.Dequeue();
// var taskWithNextTime = new int[]{task - 1, time+n};
// queue.Enqueue(taskWithNextTime);
// var peek = queue.Peek();
// if (peek[1] == time) {
// var t = queue.Dequeue();
// pq.Enqueue(t, -t);
// }
// }
// return time;
// }
// private bool isValid(int total, int mostUsed, int k) {
// return (total - mostUsed) <= k;
// }
// }
// }
Empty file.
Binary file modified Documentmanager.Core/bin/Debug/net6.0/Documentmanager.Core.dll
Binary file not shown.
Binary file modified Documentmanager.Core/bin/Debug/net6.0/Documentmanager.Core.pdb
Binary file not shown.