paan's Profile User Rating: -----

Reputation: 0 Apprentice
Group:
New Members
Active Posts:
11 (0.02 per day)
Joined:
25-November 12
Profile Views:
152
Last Active:
User is offline Dec 01 2012 02:17 AM
Currently:
Offline

Previous Fields

Dream Kudos:
0
Icon   paan has not set their status

Posts I've Made

  1. In Topic: How to Insert value in array

    Posted 1 Dec 2012

    thank you very much. but, i already find the solution by itself and it worked as i plan it..this is a simple code that fulfill my requirement.

                int index = 0;
                foreach (string v in l)
                {
                    MessageBox.Show(v.Length.ToString(), "v");
                    double[] terms = new double[v.Length];
                    string a = v.Replace("\r\n", " ");
                    
                    foreach (var s in a)
                    {
                        qq = s.ToString();
                        MessageBox.Show(qq, "q");
                        //qq = match with dictionary(dic_FrequentItemsL1) single set...if 1 get  5 , meanwhile 2 get 3...
                        sqq = dic_FrequentItemsL1[qq];
                        terms[index] = sqq;
                        index++;
                    }
                    MessageBox.Show(terms[0].ToString(),"terms[0]");
                    MessageBox.Show(terms[1].ToString(), "terms[1]");
                    getMaxValue(terms);
                }
    
    


    Simple enough right. Anyway, I'm appreciate your kindness when want help me solve this problem. I already get what i want... :bananaman:
  2. In Topic: How to Insert value in array

    Posted 30 Nov 2012

    i have ilustration that want give to you guys...



    Get some value from foreach loop. Let’s say, the value is 5 and 3. Then I want these values insert in arrays named terms as below. For details, I want value 5 insert in terms 0. Then, for the second loop, value 3 insert in terms 1. See illustrations below…My purposes to do that because, I want compare the value in array later to find maximum value…the number of loop depends with number of value get from foreach loop. Let’s say, value from foreach loop is, 5,3, and 2. So, that’s mean, the program must do three times of loop. And the result is, terms[0] = 5, terms[1] = 3, terms[2] = 2.

    terms[0] [___5___] [___5___] [_______]
    terms[1] [_______] [___3___] [_______]
    terms[2] [_______] [_______] [_______]
    terms[3] [_______] [_______] [_______]
    terms[4] [_______] [_______] [_______]
    [terms] [terms] [terms]
    First-loop second-loop third-loop

    owh, it's just small misunderstanding. Actually that's not 2-dimensional array. i'm just assigned the first column as first-loop. Then, for second column, is second-loop, and so on. it's actually one single array only. i just make two and three for show you guys what happen for the next loop. the value will insert into next index in array..get it??
  3. In Topic: How to Insert value in array

    Posted 30 Nov 2012

    Get some value from foreach loop. Let’s say, the value is 5 and 3. Then I want these values insert in arrays named terms as below. For details, I want value 5 insert in terms 0. Then, for the second loop, value 3 insert in terms 1. See illustrations below…My purposes to do that because, I want compare the value in array later to find maximum value…the number of loop depends with number of value get from foreach loop. Let’s say, value from foreach loop is, 5,3, and 2. So, that’s mean, the program must do three times of loop. And the result is, terms[0] = 5, terms[1] = 3, terms[2] = 2.

    terms[0] [___5___] [___5___] [_______]
    terms[1] [_______] [___3___] [_______]
    terms[2] [_______] [_______] [_______]
    terms[3] [_______] [_______] [_______]
    terms[4] [_______] [_______] [_______]
    [terms] [terms] [terms]
    First-loop second-loop third-loop
  4. In Topic: How to Insert value in array

    Posted 30 Nov 2012

    here sample code that i be done but i cant find a best way

    foreach (string v in l)
                {
                    MessageBox.Show(v.Length.ToString(), "v");
                    double[] terms = new double[v.Length];
                    string a = v.Replace("\r\n", " ");
                    foreach (var s in a)
                    {
                        qq = s.ToString();
                        MessageBox.Show(qq, "q");
                        //qq = match with dictionary(dic_FrequentItemsL1) single set...example if 1 then 5 , meanwhile 2 then 3...
                        sqq = dic_FrequentItemsL1[qq];
                        
    
                        for (int index = 0; index < v.Length; index++)
                        {
                            terms[index] = sqq; // just to give it a unique value you can see
                            MessageBox.Show(terms[0].ToString(), "terms[0]");
                            MessageBox.Show(terms[1].ToString(), "terms[1]");
                           
                        }
    
                    }
                    getMaxValue(terms);
                }
    
    


    :gunsmilie:

My Information

Member Title:
New D.I.C Head
Age:
Age Unknown
Birthday:
Birthday Unknown
Gender:

Contact Information

E-mail:
Click here to e-mail me

Friends

paan hasn't added any friends yet.

Comments

paan has no profile comments yet. Why not say hello?