Jump to content

Sdot

Member
  • Posts

    275
  • Joined

  • Last visited

Awards

This user doesn't have any awards

Profile Information

  • Gender
    Not Telling

System

  • CPU
    I7 920
  • Motherboard
    Asus P6T Deluxe
  • RAM
    12GB
  • GPU
    R9 290
  • Case
    Antec 900
  • Storage
    1TB HDD
  • Display(s)
    LG 29" Ultra Widescreen
  • Keyboard
    Razer Blackwidow
  • Mouse
    Razer Naga
  • Operating System
    Windows 7

Recent Profile Visitors

1,042 profile views
  1. Hello everyone, does anyone know how to change the project name within Visual Studio 2017?
  2. Hello, I have a Seiren pro and a Focusrite 2i2, are these the only two devices I need to utilize an XLR connection?
  3. only successful calculations or both would be fine for the scope of this assignment.
  4. How would I then connect the entire equation to the list box in my calculators UI? So that every time the equals button is clicked, it adds to the ListBox that I named LBHistory. Ultimately everytime I press equals, I would like the list box to look something like this for example: 1 + 1 = 2 2 + 2 = 4 3 + 3 = 6
  5. so far this is what I put in void HistoryTextFormatter(string responseText) { string HistoryText = null; HistoryText = HistoryText = "[" + DateTime.Now.ToString() + "] " + responseText + Environment.NewLine; } I called the method but in the equals button click but it doesn't know what responseText is.
  6. Hello, below is an equals button method for a calculator that was made in Visual Studio 2017 that is in C#. Can anyone help me to append it and get the history.text, put it into a string variable, so that I can add the string to a ListBox to store the history. protected void ButtonEquals_Click(object sender, EventArgs e) { if (calc_result.Value == string.Empty) { // User must enter a value for the button to function correctly. Response.Write("<script>alert('No Value is given.')</script>"); } else { ViewState["Value2"] = calc_result.Value; calc_result.Value = string.Empty; try { if ((string)ViewState["Operation"] == "Addition") { calc_result.Value = _Calculate.Add(Convert.ToInt32(ViewState["Value1"]), Convert.ToInt32(ViewState["Value2"])).ToString(); } else if ((string)ViewState["Operation"] == "Subtraction") { calc_result.Value = _Calculate.Subtract(Convert.ToInt32(ViewState["Value1"]), Convert.ToInt32(ViewState["Value2"])).ToString(); } else if ((string)ViewState["Operation"] == "Multiplication") { calc_result.Value = _Calculate.Multiply(Convert.ToInt32(ViewState["Value1"]), Convert.ToInt32(ViewState["Value2"])).ToString(); } else if ((string)ViewState["Operation"] == "Division") { calc_result.Value = _Calculate.Divide(Convert.ToInt32(ViewState["Value1"]), Convert.ToInt32(ViewState["Value2"])).ToString(); } else if ((string)ViewState["Operation"] == "Percentage") { calc_result.Value = _Calculate.Percentage(Convert.ToInt32(ViewState["Value1"]), Convert.ToInt32(ViewState["Value2"])).ToString(); } else Response.Write("<script>alert('No Operation was recorded.')</script>"); } catch (FormatException) { Response.Write("<script>alert('Bad Input Format.')</script>"); } } }
  7. Hello, I'm currently working on a calculator for a programming class. I dragged and dropped the ListBox into my .aspx file but how do I set it up so that I can have the calculation history constantly added into list items?
  8. Got it! I want to thank you for walking through this with me. Couldn't have done it without you.
  9. Does this look correct? for i in range(100): print(x.__next__())
  10. I just added this and it finally printed the 1. Now once I figure out how to put the x.__next__() into a loop I should be good to go if __name__ == "__main__": main()
  11. Sorry, I put in x = Fib(20) but I am still getting the same result.
  12. def main(): x = Fib(max) x.__iter__() x.__next() This code added below the rest of it results in the following message in the shell. Nothing happens. >>>> %Run FibLab3.py >>>> Edit: I added print(x.__next__()) doesn't seem to print anything. Also, I'm understanding this a lot more now. The x becomes an object of the class that comes after the dot. Thank you, you are being very helpful. adding
  13. Do I have to put this in a def main():? Does x represent a number?
  14. Hey guys, I'm taking a Raspberry Pi course this semester and I'm looking for some assistance. We are using Python and were tasked with the Fibonacci Sequence. How do I call? How do I get this to work? Any help is appreciated. class Fib: def __init__(self, max): self.max = max def __iter__(self): self.a = 0 self.b = 1 return self def __next__(self): fib = self.a if fib > self.max: raise StopIteration self.a, self.b = self.b, self.a + self.b return fib
  15. Hey guys, I'm working on a java assignment for school. Anyone able to help get the initialization correct so that the game stars up? The project was done in netbeans. So the project files are in the .zip If you don't have netbeans you can just go into the src folder though and go to the main file which is EternalDungeon.java which is the main. edit: nvm
×