Search results for query: *

  1. Dragon4ik

    Resolved CustomValidationAttribute doesn't work

    My fault, sorry. But can you say me why it doesn't work as I expect?
  2. Dragon4ik

    Resolved CustomValidationAttribute doesn't work

    I expect that exception would be thrown when I try to return not appropriate value in Index action, but it doesn't. And what I expect the ExceptionThrown message in output, but not the string, which I show on image in previous post.
  3. Dragon4ik

    Resolved CustomValidationAttribute doesn't work

    Because this value wouldn't be parsed. The valid string is "Sat Aug 30 2014 00:00:00 GMT+0300"
  4. Dragon4ik

    Resolved CustomValidationAttribute doesn't work

    The following String format Fri Aug 30 2014 00:00:00 GMT+0300 isn't right and isn't supposed to be valid to parse. So when I try to initialize a variable with this value, I expect that exception would be thrown, but instead of it my app works properly and return the string without any problem...
  5. Dragon4ik

    Resolved CustomValidationAttribute doesn't work

    Hi. everyone! Actually this question is the continuation of Question, but now I have the same problem on ASP.Net MVC I have the following task : write the validation attribute, which checks, if String format is right to parse into DateTimeOffset and if it isn't, app should throw an Exception. I...
  6. Dragon4ik

    Resolved CustomAttribute doesn't work

    Hi, everybody! I try to create attribute, which would validate a string format for parsing into DateTimeOffset. Here is DateStringAttribute code: public class DateStringAttribute : ValidationAttribute { public override bool IsValid(object value) { string date =...
  7. Dragon4ik

    Resolved Getting 404 from axios.post()

    Thank you so much. I changed URL and also passes information through dataForm.append(). Thanks to this I started to get a response from controller. But there the next problem appears: controller returns Comment object, which fields are null, except Id. What can be the reason of this problem...
  8. Dragon4ik

    Resolved Getting 404 from axios.post()

    Hello everybody! I am a novice in ASP.NET and try to write my first application, whose client-size which is written in React.js, using this technology . This is the simple SPA, which should send the data from its form and getting respomse. But every request ends up with the message ("Uncaught...
  9. Dragon4ik

    Resolved Nothing happen , when async method runs

    I'm bad in async programming, so tried to make a simple program, which should consolidate my knowledge. But when I compile code, nothing happen Here is my code: static void Main(string[] args) { int x,y; x = y = 0; string str = "abcd"...
  10. Dragon4ik

    Resolved Async method doesn't work

    I tried your solution , and first, what i realized, that BitmapSource doesn't contain any definition of Invoke() method. So I created PixelDelagate: private delegate PixelColor[,] PixelDelegate(BitmapSource el); And call him in such way: private BitmapSource GetRightImage(BitmapSource first...
  11. Dragon4ik

    Resolved Async method doesn't work

    I've faced with the problem, trying to set a timeout for function execution. I have the following code: public BitmapImage[,] GetResult(List<BitmapImage> list) { var task = Task.Run(() => GetBestPuzzleImage(list)); if (task.Wait(TimeSpan.FromSeconds(10)))...
  12. Dragon4ik

    Resolved Alghoritm of autocompleting puzzles

    It happens in this block of code: public static void CopyPixels(this BitmapSource source, PixelColor[,] pixels, int stride, int offset, bool dummy) { var height = source.PixelHeight; var width = source.PixelWidth; var pixelBytes = new byte[height *...
  13. Dragon4ik

    Resolved Alghoritm of autocompleting puzzles

    It's source image And what returns alghoritm: or I look through the alghoritm with debugger, but can't understand, why it choose this variant as the best choice and see it as variant with the least total difference between border pixels. And when it work with the RIGHT variant of completed...
  14. Dragon4ik

    Resolved Hi guys, currently making a guessing game and need some help with my code..

    Maybe it can be solution: for(int i=0;i<secret.Length;i++) { //TODO: } //Just take out foreach block from th loop //displaying the word to the user after each guess foreach (string k in hidden) { Console.Write(k.ToString()); } Console.WriteLine(); //TODO:
  15. Dragon4ik

    Resolved Alghoritm of autocompleting puzzles

    I have a task to write a programm, which slice the image into the equal rectangle puzzles . Then the program must solve this puzzle without knowing the way it was sliced. I wrote the code, but it works time after time and i can't understand what problem is. Thank you in advance for any help...
Back
Top Bottom