locked
why i saved into redis but can not get the record? RRS feed

  • Question

  • use a mouse click a point and wait for 5 seconds , i draw the curve, until 8 seconds

    it succeed to flushall and saved into file dumb.rdb

    but when i retrieve it, there is no one record?

    why i saved into redis but can not get the record?


    New


    Saturday, September 3, 2016 9:55 AM

Answers

  • Hi Map to new space ,

    Thanks for feedback.

    Have you solve your issue ?

    >>i just want to save the List Object of a custom class only.

    As far as I know ,if you want to list object ,you can tryusing List.List(Generic IEnumerable) Constructor which initializes a new instance of the List class that contains elements copied from the specified collection and has sufficient capacity to accommodate the number of elements copied .The elements are copied onto the List in the same order they are read by the enumerator of the collection.Here is a code snippet:

    public static void Main()
        {
            string[] input = { "Brachiosaurus", 
                               "Amargasaurus", 
                               "Mamenchisaurus" };
    
            List<string> dinosaurs = new List<string>(input);
    
            Console.WriteLine("\nCapacity: {0}", dinosaurs.Capacity);
    
            Console.WriteLine();
            foreach( string dinosaur in dinosaurs )
            {
                Console.WriteLine(dinosaur);
            }
    
            Console.WriteLine("\nAddRange(dinosaurs)");
            dinosaurs.AddRange(dinosaurs);
    
            Console.WriteLine();
    
     

    I hope my reply would do help to you ,If you have anything else about C# language , Please feel free to let me know .

    Best regards

    Kevin


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place. Click HERE to participate the survey.

    • Proposed as answer by Hart Wang Wednesday, September 14, 2016 4:55 AM
    • Marked as answer by Kevin Linq Wednesday, September 21, 2016 4:43 AM
    Saturday, September 10, 2016 1:24 PM

All replies

  • This is the Microsoft Visual C# Forum.

    Your question seems to deal with google drive, a clouds service by a firm definitely not Microsoft.

    If this is a programming problem we would need to know at least:
    Type of application (WinForms, WPF, UWP, ASP.Net).
    The code that causes the issue (or at least a minimal, ready to compile example that showcases the issue).
    What you expect to happen. What is happening instead.

    Based a rough look over those shared files, I would guess:
    WPF or UWP and Pathfinding (A* mention) that is drawn on a canvas?
    To much code code to figure out easily where the issue comes from.


    Remember to mark helpfull answers as helpfull and close threads by marking answers.

    • Edited by Christopher84 Saturday, September 3, 2016 10:54 AM
    • Proposed as answer by Cor Ligthert Monday, September 5, 2016 10:14 AM
    Saturday, September 3, 2016 10:52 AM
  • first time install servicestack.redis,

    i had succeeded to saved into database and succeed to retrieve record to show count of list

    before, but after third trial, it begin to become no records after retrieve.

    i do not understand why it had saved but after a number of trial, there is no record

    the problem is in 

    public void MoveBall(string value)

    if initially no dump.rdb,

    after draw with hand move in the air with leap motion, it will create a file dump.rdb

    after create this database file, it will go to retrieve it, however, no record, 

    but it saved before

    i expect it show count of List after retrieve from database

                                        Positionlabel.Content = endselectcircletime.Subtract(startselectcircletime).Seconds.ToString() + " seconds,Number of records=" + coord.Count.ToString();

    if (alreadysaved == false)
                            {
                                Boolean FileExists = File.Exists(@"C:\Users\Username\Documents\Visual Studio 2015\Projects\TestCanvas3\packages\redis-64.3.0.503\tools\dump.rdb");
                                Positionlabel.Content = endselectcircletime.Subtract(startselectcircletime).Seconds.ToString()+ ",FileExists="+ FileExists.ToString();
                                if (FileExists == false)
                                {
                                    if (XList.Count > 0)
                                    {
                                        alreadysaved = true;
                                        Positionlabel.Content = endselectcircletime.Subtract(startselectcircletime).Seconds.ToString() + " seconds ," + XList.Count.ToString();
                                        try
                                        {
                                            redisClient = new RedisClient("localhost", 6379);
                                            redisClient.Store<List<Coordinate>>(XList);
                                            redisClient.FlushAll();
                                        }
                                        catch(System.Exception ex)
                                        {
                                            Positionlabel.Content = ex.Message;
                                        }
                                    }
                                }
                                else
                                {
                                    alreadysaved = true;
                                }
                            }
                            else
                            {
                                if (redisClient == null)
                                {
                                    redisClient = new RedisClient("localhost", 6379);
                                }
                                var getcoord = redisClient.GetAll<List<Coordinate>>();
                                foreach(List<Coordinate> coord in getcoord)
                                {
                                    try
                                    {
                                        Positionlabel.Content = endselectcircletime.Subtract(startselectcircletime).Seconds.ToString() + " seconds,Number of records=" + coord.Count.ToString();
                                    }
                                    catch(System.Exception ex)
                                    {
                                        Positionlabel.Content = ex.Message;
                                    }
                                }
                            }


    New

    Saturday, September 3, 2016 12:05 PM
  • Hi Map to new space

    Thanks for posting there .

    >>first time install servicestack.redis,

    Because the servicestack.redis is a class library from third company , according to the company's policy ,we may not reproduce the issue . 

    I hope your understanding .

    If you have anything else , please feel free to let me know .

    Best regards

    Kevin   

     

    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place. Click HERE to participate the survey.


    • Edited by Kevin Linq Monday, September 5, 2016 8:25 AM
    • Proposed as answer by Cor Ligthert Monday, September 5, 2016 10:14 AM
    Monday, September 5, 2016 8:25 AM
  • is there any other free software like redis available in internet?

    i just want to save the List Object of a custom class only.


    New

    Wednesday, September 7, 2016 7:23 AM
  • is there any other free software like redis available in internet?

    i just want to save the List Object of a custom class only.


    New

    There is any number of ways to serialise a object for storage on a disk or transmission on the network.

    It depends on what you need to opearte with, what you want to archeive and all the other information you have not given us yet :)


    Remember to mark helpfull answers as helpfull and close threads by marking answers.

    Wednesday, September 7, 2016 5:08 PM
  • first time run application

    i just record the time series data from leap motion into List of custom class

    and retrieve it in second time run application

    and compare the data of motion or curve i draw to recognize it,

    if both motion are similar then it succeed to recognize motion every i draw similar curve


    New

    Thursday, September 8, 2016 9:13 AM
  • Hi Map to new space ,

    Thanks for feedback.

    Have you solve your issue ?

    >>i just want to save the List Object of a custom class only.

    As far as I know ,if you want to list object ,you can tryusing List.List(Generic IEnumerable) Constructor which initializes a new instance of the List class that contains elements copied from the specified collection and has sufficient capacity to accommodate the number of elements copied .The elements are copied onto the List in the same order they are read by the enumerator of the collection.Here is a code snippet:

    public static void Main()
        {
            string[] input = { "Brachiosaurus", 
                               "Amargasaurus", 
                               "Mamenchisaurus" };
    
            List<string> dinosaurs = new List<string>(input);
    
            Console.WriteLine("\nCapacity: {0}", dinosaurs.Capacity);
    
            Console.WriteLine();
            foreach( string dinosaur in dinosaurs )
            {
                Console.WriteLine(dinosaur);
            }
    
            Console.WriteLine("\nAddRange(dinosaurs)");
            dinosaurs.AddRange(dinosaurs);
    
            Console.WriteLine();
    
     

    I hope my reply would do help to you ,If you have anything else about C# language , Please feel free to let me know .

    Best regards

    Kevin


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place. Click HERE to participate the survey.

    • Proposed as answer by Hart Wang Wednesday, September 14, 2016 4:55 AM
    • Marked as answer by Kevin Linq Wednesday, September 21, 2016 4:43 AM
    Saturday, September 10, 2016 1:24 PM