Click here to Skip to main content
15,888,579 members
Home / Discussions / C#
   

C#

 
QuestionRe: Hello how to display images with the title from a file (in ListVeiw C #)? helpe please Pin
Richard MacCutchan30-Apr-16 20:47
mveRichard MacCutchan30-Apr-16 20:47 
AnswerRe: Hello how to display images with the title from a file (in ListVeiw C #)? helpe please Pin
OriginalGriff30-Apr-16 20:51
mveOriginalGriff30-Apr-16 20:51 
QuestionUse report Wizard or FastReport to generate report from outcome Pin
wilcoten29-Apr-16 9:29
wilcoten29-Apr-16 9:29 
QuestionGet Instance Of Class By Name Pin
Kevin Marois29-Apr-16 7:50
professionalKevin Marois29-Apr-16 7:50 
AnswerRe: Get Instance Of Class By Name Pin
Gerry Schmitz29-Apr-16 13:02
mveGerry Schmitz29-Apr-16 13:02 
AnswerRe: Get Instance Of Class By Name Pin
Afzaal Ahmad Zeeshan30-Apr-16 10:08
professionalAfzaal Ahmad Zeeshan30-Apr-16 10:08 
AnswerRe: Get Instance Of Class By Name Pin
Richard Deeming4-May-16 2:08
mveRichard Deeming4-May-16 2:08 
QuestionHelp please, I have a error in this script, when I follow the suggestion their are more errors Pin
wilcoten29-Apr-16 3:51
wilcoten29-Apr-16 3:51 
When Itry to fix this I got more errors what is going wrong in this code, to automate numerology. I'm a newby, please help.Inspired greetings, Rijk

C#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;


abstract class MY_service
{

    //LifePath Number
    public static int getLifePathNumber(DateTime birthday)
    {
        //First, we reduce each unit (month/day/year) of the birth date to a single-digit or a (masternumber?).
        int d = simplify(birthday.Day);
        int m = simplify(birthday.Month);
        int y = simplify(birthday.Year);

        //Next we add each of the resulting digits (or Master numbers) together and reduce the total again to a single-digit.
        return simplify(d + m + y);
    }


    
    //Expression Number
    public static int getExpressionNumber(string first_name, string middle_name, string last_name)
    {
        // First, we reduce each unit (First, Middle, and Lastname) of the Full Name at Birth to a single-digit or a (masternumber?).
        int y1 = 0;
        if (first_name != "")
        {
            y1 += simplify(ZetOm(first_name));
        }
        int y2 = 0;
        if (middle_name != "")
        {
            y2 += simplify(ZetOm(middle_name));
        }
        int y3 = 0;
        if (last_name != "")
        {
            y3 += simplify(ZetOm(last_name));
        }

        if (y3 != 0)
        {
            //Next we add each of the resulting digits (or Master numbers) together and reduce the total again to a single-digit.
            return simplify(y1 + y2 + y3);
        }
        else
        {
            System.Windows.Forms.MessageBox.Show("U dient minstens twee velden in te vullen.");
            return 0;
        }
    }

    
        
    //Minor Expression Number
    public static int getMinorExpressionNumber(string First_daily_name_1, string Last_daily_names_1)
    {
        // First, we reduce each unit (First, and Lastname) of the Daily Name to a single-digit or a (masternumber?).
        int y4 = 0;
        if (First_daily_name_1 != "")
        {
            y4 += simplify(ZetOm(First_daily_name_1));
        }
        int y5 = 0;
        if (Last_daily_names_1 != "")
        {
            y5 += simplify(ZetOm(Last_daily_names_1));
        }

        if (y5 != 0)
        {
            //Next we add each of the resulting digits (or Master numbers) together and reduce the total again to a single-digit.
            return simplify(y4 + y5);
        }
        else
        {
            System.Windows.Forms.MessageBox.Show("U dient minstens tween velden in te vullen.");
            return 0;
        }
    }



    //Birthday Number
    public static int getBirthdayNumber(DateTime birthday)
    {
        //First, we reduce each unit (day) of the birth date to a single-digit or a (masternumber?).
        int d = (birthday.Day);

        //Next we add each of the resulting digits (or Master numbers) together and reduce the total again to a single-digit.
        return (d);
    }



    //L/E Number (LifePath/Expression Bridge Number).
    public static int getLEBridgeNumber(string Life_path_outcome, string Expression_outcome)
    {
         // first we take the outcome of the LifePathNumber, and the outcome of the Expression Number.
        var convertedLifePathOutcome = (Life_path_outcome);
        var L = simplify(convertedLifePathOutcome);
        var convertedExpressionOutcome = (Expression_outcome);
        var E = simplify(convertedExpressionOutcome);

        var combined = L - E;

        //Next we count each of the resulting digits (or Master numbers) together and reduce the total again to a single-digit.
        var result = simplify(combined);
        //return simplify(L - E);

        return result;

    }
    


    //Maturity Number.
    public static int getMaturityNumber (string Life_path_outcome, string Expression_outcome)
    {
        // first we take the outcome of the LifePathNumber, and the outcome of the Expression Number.
        var convertedLifePathOutcome = (Life_path_outcome);
        var L = simplify(convertedLifePathOutcome);
        var convertedExpressionOutcome = (Expression_outcome);
        var E = simplify(convertedExpressionOutcome);

        var combined = L + E;

        //Next we count each of the resulting digits (or Master numbers) together and reduce the total again to a single-digit.
        var result = simplify(combined);
        //return simplify(L + E);

        return result;

    }


    
    

   //Rational Thought Number 
  // public static int getRationalThoughtNumber(string first_name_1, DateTime birthday) 
     public static int RTN = getRationalThoughtNumber("", new DateTime(23,8,2014)) ;
textBox1.Text = RTN.ToString() + "\" + simplify(RTN).ToString();
   { 
      // First, we reduce each unit (First) of the Full Name at Birth to a single-digit or a (masternumber?). 
       int y1 = 0; 
       if (first_name_1 != "") 
       { 
       y1 += simplify(ZetOm(first_name_1)); 

       //First, we reduce each unit (month/day/year) of the birth date to a single-digit or a (masternumber?). 
       int d = simplify(birthday.Day); 
       int m = simplify(birthday.Month); 
       int y = simplify(birthday.Year); 
          

       //Next we add each of the resulting digits (or Master numbers) together and reduce the total again to a single-digit. 
       return y1 + d + m + y; 
       }else{
           return 0;
//De uitkomst uit deze formule zou eigenlijk 43/7  (dit is niet vereenvoudigd 43 em vereenvoudigd 7 moeten zijn)
//zie hier hoe het met getallen werkt:
//Totaal 1e Geboortenaam + Geboortedatum en vereenvoudigen																								
//4	1	+	0	2	0	7	1	9	6	3	=	4	+	1	+	2	+	7	+	1	+	9	+	6	+	3	=	4	3	=	7



       }
   } 
   




        //Deze functie houdt rekening met masternumbers 11, 22, en 33
    private static int simplify(string input)
    {
        //Spaties weghalen?
        input = input.Replace("0", "");

        //te grote waarde opsplitsen
        if (input.Length > 7)
        {
            input = (simplify(input.Substring(0, 6)) + simplify(input.Substring(6, input.Length - 6))).ToString();
        }

        while (input.Length > 1 && input != "11" && input != "22" && input != "33")
        {
            int t = 0;
            foreach (char c in input)
            {
                if (char.IsNumber(c))
                {
                    t += int.Parse(c.ToString());
                }
                input = t.ToString();
            }
        }

        return input!= "" ? int.Parse(input) : 0;
    }

    private static int simplify(int input)
    {
        return simplify(input.ToString());
    }


    public static int ZetOm(string input)
    {
        Dictionary<char, int> lijst = new Dictionary<char, int>()
            {
            {'a',1},
            {'j',1},
            {'s',1},

            {'b',2},
            {'k',2},
            {'t',2},

            {'c',3},
            {'l',3},
            {'u',3},

            {'d',4},
            {'m',4},
            {'v',4},

            {'e',5},
            {'n',5},
            {'w',5},

            {'f',6},
            {'o',6},
            {'x',6},

            {'g',7},
            {'p',7},
            {'y',7},

            {'h',8},
            {'q',8},
            {'z',8},

            {'i',9},
            {'r',9},
        };
        string retVal = "";
        foreach (char c in input)
        {
            int i;
            lijst.TryGetValue(char.ToLower(c), out i);
            retVal += i.ToString();
        }
        return simplify(retVal);
    }
}

AnswerRe: Help please, I have a error in this script, when I follow the suggestion their are more errors Pin
OriginalGriff29-Apr-16 3:57
mveOriginalGriff29-Apr-16 3:57 
AnswerRe: Help please, I have a error in this script, when I follow the suggestion their are more errors Pin
ZurdoDev29-Apr-16 4:35
professionalZurdoDev29-Apr-16 4:35 
GeneralRe: Help please, I have a error in this script, when I follow the suggestion their are more errors Pin
wilcoten29-Apr-16 6:10
wilcoten29-Apr-16 6:10 
GeneralRe: Help please, I have a error in this script, when I follow the suggestion their are more errors Pin
OriginalGriff29-Apr-16 6:20
mveOriginalGriff29-Apr-16 6:20 
GeneralRe: Help please, I have a error in this script, when I follow the suggestion their are more errors Pin
wilcoten29-Apr-16 20:36
wilcoten29-Apr-16 20:36 
GeneralRe: Help please, I have a error in this script, when I follow the suggestion their are more errors Pin
OriginalGriff29-Apr-16 21:15
mveOriginalGriff29-Apr-16 21:15 
GeneralRe: Help please, I have a error in this script, when I follow the suggestion their are more errors Pin
wilcoten29-Apr-16 23:17
wilcoten29-Apr-16 23:17 
GeneralRe: Help please, I have a error in this script, when I follow the suggestion their are more errors Pin
OriginalGriff29-Apr-16 23:50
mveOriginalGriff29-Apr-16 23:50 
GeneralRe: Help please, I have a error in this script, when I follow the suggestion their are more errors Pin
wilcoten30-Apr-16 4:05
wilcoten30-Apr-16 4:05 
GeneralRe: Help please, I have a error in this script, when I follow the suggestion their are more errors Pin
OriginalGriff30-Apr-16 4:30
mveOriginalGriff30-Apr-16 4:30 
GeneralRe: Help please, I have a error in this script, when I follow the suggestion their are more errors Pin
wilcoten30-Apr-16 4:46
wilcoten30-Apr-16 4:46 
GeneralRe: Help please, I have a error in this script, when I follow the suggestion their are more errors Pin
OriginalGriff30-Apr-16 5:06
mveOriginalGriff30-Apr-16 5:06 
GeneralRe: Help please, I have a error in this script, when I follow the suggestion their are more errors Pin
wilcoten30-Apr-16 5:37
wilcoten30-Apr-16 5:37 
GeneralRe: Help please, I have a error in this script, when I follow the suggestion their are more errors Pin
OriginalGriff30-Apr-16 5:59
mveOriginalGriff30-Apr-16 5:59 
AnswerRe: Help please, I have a error in this script, when I follow the suggestion their are more errors Pin
ZurdoDev29-Apr-16 6:32
professionalZurdoDev29-Apr-16 6:32 
GeneralRe: Help please, I have a error in this script, when I follow the suggestion their are more errors Pin
wilcoten29-Apr-16 8:33
wilcoten29-Apr-16 8:33 
GeneralRe: Help please, I have a error in this script, when I follow the suggestion their are more errors Pin
ZurdoDev29-Apr-16 8:52
professionalZurdoDev29-Apr-16 8:52 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.