Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - sammyMaX

Pages: 1 ... 7 8 [9] 10 11 ... 14
121
Calculator C / Re: Nspire: Keypad Input
« on: September 15, 2011, 05:39:56 pm »
I wanted such a method because it would save some code (not really that important). Right now I have ten if statements (for buttons for the numbers 0 to 9) and each calls the same function with its keycode as an argument, that then adds the character to a string for output. It would be cool if all these if statements could be grouped together since they call the same thing.

122
Calculator C / Re: Nspire: Keypad Input
« on: September 14, 2011, 08:05:53 pm »
Thanks, ExtendeD. If I use something like any_key_pressed(), is there any way to see which key was pressed when it returns true? (Without using a lot of if statements?)

123
Forum Arcade Games / Re: Tetris
« on: September 11, 2011, 11:41:44 am »
Now second. I'm coming after you, phenomist...

124
Forum Arcade Games / Re: Tetris
« on: September 11, 2011, 11:09:02 am »
Hello :) I am number three at time of posting and am hoping to move up. :)

125
TI-Nspire / Re: [Ndless] BigNumNum Cruncher
« on: September 11, 2011, 10:40:21 am »
School has started, but the work hasn't piled up yet :) I finished multiplication, and it's bug free, as far as I can tell. I'm quite proud of my algorithm - it's slightly better than how a person would multiply numbers on paper, in that their is no buffer made for the product of the top multiplicand and one of the digits in the bottom. This should prove very useful and increase capacity by a lot (maybe double the length possible) for operations like 2^5000. My program stores numbers with one digit per byte, so numbers with millions of digits should be computable, with speed permitting.

Time to move on to the heart of the program - large number functions such as factorials and powers! After that, I will write the all-important large number interface so one could actually do useful things with the number, like see the nth digit of it (when there are so many digits the screen can't fit them all).

126
Calculator C / Re: Nspire: Keypad Input
« on: September 10, 2011, 05:13:56 pm »
Yes, I get it now :) Thanks.

127
Miscellaneous / Re: Lowered participation
« on: September 09, 2011, 08:10:35 pm »
I might also be on Omnimaga less now (and with less updates to my project too). I'm in 9th grade now, but taking all accelerated classes (+2x accelerated math), and 10th grade English/Social Studies are really difficult. The good thing is though, that all their assignments are long term, so by the end of the year, I should learn time management and anti-procrastination :)

128
Calculator C / Re: Nspire: Keypad Input
« on: September 09, 2011, 06:15:30 pm »
Edit: I deleted my old silly response for something more useful.
I don't understand your code; specifically, I don't get block_value, VALUE_A, and VALUE_B. I'll just state my opinions on the most comfortable "key holding", though: (this is oriented for typing, not games) it shouldn't be like "add another character every second held" or anything like that; there should be a pretty long pause between the first character typed and when the holding begins happening. For example, it should be like "after two seconds of the key being held, add another character every half second."

129
Calculator C / Re: Nspire: Keypad Input
« on: September 07, 2011, 05:31:29 pm »
I really like your solution, Shrear. What it does is basically start the actual function when the key is released, right? I will probably implement that in my program, or perhaps expand that to allow "holding." (I would do this by adding a character every 15 or so times through the inner loop)

130
Calculator C / Re: Nspire: Keypad Input
« on: September 06, 2011, 04:28:46 pm »
It's actually C :)

I don't know if there is something for key release, because that would be an event. It's hard to turn an event into a function some program calls. I have browsed the source of many Ndless programs, and all of them seem to be using isKeyPressed().

131
Calculator C / Nspire: Keypad Input
« on: September 06, 2011, 04:11:06 pm »
Since the Nspire is so fast, it is hard to program responsive, but not oversensitive keyboard input. I have a solution to this! (Hopefully you can help improve it too)

From what I've seen in most Ndless programs, the bulk of the main function is in something like this:
Code: [Select]
while(!isKeyPressed(NSPIRE_KEY_ESC))
{
// Code
}
If one just inserts things like if(isKeyPressed(KEY_NSPIRE_ENTER)), a single tap of the enter button may register 10 times, which is really bad if you're trying to type in numbers or words. However, if one does:
Code: [Select]
// Insert whatever value of x below
sleep(x);
if(isKeyPressed(someKey))
{
}
Then low values of x will result in input registering twice or three times, and high values of x resulting in the Nspire detecting nothing at all. I have tried this many times and couldn't find a "magic value" between the two. My new method uses a counter to see how many iterations it has gone through the while loop since the previous key press, and uses idle() instead of sleep(). A key will only register if it has been at least x iterations. In code:
Code: [Select]
// I used 5 as the minimum number of iterations here
int numIterations = 5;
while(!isKeyPressed(NSPIRE_KEY_ESC))
{
  // Optional, but saves power
  idle();
  if(isKeyPressed(someKey) && numIterations == 5)
  {
    numIterations = 0;
    // Stuff
  }
  // Prevents numIterations from going above 5
  if (numIterations < 5)
    numIterations++;
}
Does anyone have any other ideas? What do you do in your Ndless programs?

132
Miscellaneous / Re: Post your desktop
« on: September 06, 2011, 03:52:18 pm »
No, see, the way that the site is set up, only around half of the direct link is visible, and the box is greyed out and unselectable. So, using the source, I found the full address :) I didn't make an account at all.

133
Miscellaneous / Re: Post your desktop
« on: September 06, 2011, 11:00:02 am »
I dual boot Ubuntu and Windows. Here's my Ubuntu side, with Compiz Desktop Cube. I have two monitors: the one included on my laptop, which is 1600x900, and one I inherited from my brother after he left for college, that is 1680x1050. My specs are: i7-620M, 2 cores, 4 threads @ 2.67Ghz, 4 GB of DDR3 RAM, and a crappy Nvidia Quadro NVS 3100M (some business-oriented card, since the laptop is a Thinkpad)
Spoiler For Spoiler:

Edit: in order to obtain the direct link that is required for embedding the photo, the site told me to sign up for an account. I just viewed the page source and stole it :)

134
Miscellaneous / Re: Types of Cell Phones
« on: September 05, 2011, 03:51:51 pm »
My contract ends March, and I'm hoping to get an Android phone. My parents don't have any problem paying for the phone, but since they all require data plans, they don't want to pay like $70 a month for that. So my choices are to buy an unlocked (really expensive up front) or to switch to a cheaper network (I'm currently on AT&T)

135
Miscellaneous / Re: Types of Cell Phones
« on: September 05, 2011, 02:46:29 pm »
I would love the HTC Sensation. It has great build quality and a DUAL CORE PROCESSOR!!! But I see that your budget is limited to $150, so that might not be possible.

BTW, I have a Samsung Sensation, just like z80man. I got tetris on it using this special file transfer software. It doesn't support apps natively, though.

Pages: 1 ... 7 8 [9] 10 11 ... 14