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
const CalendarWeekRule WeekRule = CalendarWeekRule.FirstFourDayWeek; | |
const DayOfWeek FirstWeekDay = DayOfWeek.Monday; | |
var calendar = System.Threading.Thread.CurrentThread.CurrentCulture.Calendar; | |
var currentWeek = calendar.GetWeekOfYear(curDateTime, WeekRule, FirstWeekDay); |
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
regular: (?:(?!med).) | |
Example: | |
regular: a(?:(?!med).)*bb | |
data: amada, admeta, medbbsasdfbb | |
result: , , asdfbb |
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.Linq; | |
using System.Threading.Tasks; | |
namespace Utils | |
{ | |
using System.Threading; | |
public interface ITaskBuilder |
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
// minimum: one digit, one Uppercase, one Lowercase | |
(?=.*\d)(?=.*\p{Lu})(?=.*\p{Ll})(.|D){6,} | |
// 6 - minimum length | |
for c#: | |
String pattern = @"^(?=.*\d)(?=.*\p{Lu})(?=.*\p{Ll}).{6,}$"; |
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
namespace Model.Enums | |
{ | |
using System; | |
using System.ComponentModel.DataAnnotations; | |
using System.Reflection; | |
public static class EnumHelper<T> | |
{ | |
private static String LookupResource(Type resourceManagerProvider, String resourceKey) | |
{ |
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
[System.Web.Http.Authorize] | |
[ApiVersion("1.0")] | |
[RoutePrefix("api/v{version:apiVersion}")] | |
public class BaseApiController : ApiController |
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
{ | |
"cart_id": 56, | |
"drugs": [ | |
{ | |
"id": 8, | |
"count": 2 | |
}, | |
{ | |
"id": 456, | |
"count": 0 |
OlderNewer