Example #1
0
        static void Main(string[] args)
        {
            one o = new one();

            o.a = 90;
            two B = new two();
        }
Example #2
0
        public async Task <IActionResult> Edit(int id, [Bind("Bid,Btitle,Category,Price,AuthorName,Publisher,Releasedate")] one one)
        {
            if (id != one.Bid)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(one);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!oneExists(one.Bid))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(one));
        }
Example #3
0
    /// <summary>
    /// 解析Json类型1
    /// </summary>
    private void AnysicsOne()
    {
        m_TestJsonClass = JsonMapper.ToObject <one>(m_RecvMsg);
        //唯一ID
        string id = m_TestJsonClass.ID;

        if (ClickItemManager.Instance.AllClickItem.ContainsKey(id))
        {
            ClickItemInfo clickite = ClickItemManager.Instance.AllClickItem[id];
            clickite.MoveTo();
        }
        else
        {
            Debug.LogError("未配置");
        }
        //是否报警
        int isAlram = m_TestJsonClass.isAlram;

        if (AlramItemManager.Instance.AllAlramItem.ContainsKey(id))
        {
            AlarmEffect clickite = AlramItemManager.Instance.AllAlramItem[id];
            clickite.SetIsOn(isAlram);
        }
        else
        {
            Debug.LogError("未配置");
        }
    }
Example #4
0
        public static string getCapture(string username, string key, string proxy)
        {
            try
            {
                main main = new main();
                one  one  = new one();
                two  two  = new two();

                one.Line1 = "65b708073fc0480ea92a077233ca87bd";
                one.Line2 = "S-1-5-21-3906878023-3586315189-2161068791";

                two.Line1 = username;
                two.Line2 = key;

                main.one = one;
                main.two = two;
                var stream = new MemoryStream();

                Serializer.Serialize <main>(stream, main);
                HttpRequest  request  = new HttpRequest();
                var          stream2  = new MemoryStream(request.Post("https://login5.spotify.com/v3/login", stream.ToArray(), "application/x-protobuf").ToBytes());
                Responsemain response = Serializer.Deserialize <Responsemain>(stream2);

                request.UserAgent =
                    "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3000.145 Safari/537.36";
                request.Post("https://www.spotify.com/token-bounce/?url=/redirect/account-page", "oauth_token=" + response.one.Line2,
                             "application/x-www-form-urlencoded");
                JObject obj = JObject.Parse(request.Get("https://www.spotify.com/us/home-hub/api/v1/family/home/").ToString());
                return(obj.ToString());
            }
            catch (Exception ex)
            {
                return(null);
            }
        }
Example #5
0
        public async Task <IActionResult> Create([Bind("Bid,Btitle,Category,Price,AuthorName,Publisher,Releasedate")] one one)
        {
            if (ModelState.IsValid)
            {
                _context.Add(one);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(one));
        }
Example #6
0
    public static void Main()
    {
        one   o = new two();
        three t = new three();

        o.func();
        o.func1();
        t.func();
        t.func1();

        o = t;
        o.func();
        o.func1();

        one a = new one();

        a.func();
        a.func1();
    }
Example #7
0
        private void Form1_Load(object sender, EventArgs e)
        {
            CultureInfo inf = new CultureInfo(System.Threading.Thread.CurrentThread.CurrentCulture.Name);

            System.Threading.Thread.CurrentThread.CurrentCulture = inf;
            inf.NumberFormat.NumberDecimalSeparator = ".";

            listBox1.Items.Add("x*x + 8*x - 5");
            listBox1.Items.Add("Math.Exp(-x * x) - (x - 1) * (x - 1)");
            listBox1.Items.Add("x*x- Math.Cos(x)");

            comboBox1.Items.Add("Метод дихотомии");
            comboBox1.Items.Add("Метод касательных");

            delegates.Add(it);
            it = functions.func2;
            delegates.Add(it);
            it = functions.func3;
            delegates.Add(it);
            comboBox1.SelectedIndex = 0;
            button1.Click          += Calculate;
            Calculate(this, e);
        }
Example #8
0
        void Calculate(object sender, EventArgs e)
        {
            output.Text = "";
            try {
                clarity = Convert.ToDouble(textBox2.Text);
                string[] gr = textBox1.Text.Split(',');
                glob_a = Convert.ToDouble(gr[0]);
                glob_b = Convert.ToDouble(gr[1]);
            }
            catch (FormatException)
            {
                MessageBox.Show("Введите числовые значения");
            }
            switch (listBox1.SelectedIndex)
            {
            case 0: f = 0; break;

            case 1: f = 1; break;

            case 2: f = 2; break;
            }
            it = (one)delegates[f];
            switch (comboBox1.SelectedIndex)
            {
            case 0: dihotom(); break;

            case 1: Newton(); break;
            }
            draw();

            output.Text = "Численный ответ:" + "\n";
            for (int i = 0; i < solutions.Count; i++)
            {
                output.Text += Convert.ToString(solutions[i]) + "\n";
            }
        }
Example #9
0
 TrySingle(source, zero, one, many, ValueTuple.Create);
Example #10
0
        void Button3Click(object sender, EventArgs e)
        {
            one o = new one();

            o.Show();
        }
Example #11
0
 DescriptionThis is a simple utility class for generating basic obj files from a mesh object.The obj file format was gleaned from various sites found through google like this one
     Usage Either call ObjExporter.MeshToString() to generate a text string containing the obj file or ObjExporter.MeshToFile() to save it directly to a file.
Example #12
0
 foreach (var(key, value) in GetSeekData(one, two))
 {