Author |
Message |
|
ztrumpet
Active Member

Joined: 06 May 2009 Posts: 555
|
Posted: 23 Nov 2009 08:43:23 pm Post subject: |
|
|
[quote name='TI-newb' post='138914' date='Nov 23 2009, 07:23 PM']!!!- BTW!! When you RUN THE PRGM and get to the Input part that asks.. X,Y,X,Y:... You have to type down "{" (Because this prgm uses the List to store the coordinates, the input has to start off as "{".. So for example.. X,Y,X,Y:{5,3,10,13)
:Input "X,Y,X,Y:",L1[/quote]
Do this instead and you don't need the {
:Input "X,Y,X,Y:",Str1
:expr("{"+Str1->L1
Last edited by Guest on 23 Nov 2009 08:43:39 pm; edited 1 time in total |
|
Back to top |
|
|
TI-newb
Member

Joined: 24 Dec 2008 Posts: 158
|
Posted: 23 Nov 2009 08:52:27 pm Post subject: |
|
|
!!!!!!!!! OMG THANK YOU SO MUCHH!!!! LOLLLLLL Ive actually been trying to get Input"whatever" into a List without having to type { in the Input section since like 7 months ago.. =DDDDD
You are now one of my calc heroes LOL!! |
|
Back to top |
|
|
ztrumpet
Active Member

Joined: 06 May 2009 Posts: 555
|
Posted: 23 Nov 2009 10:03:08 pm Post subject: |
|
|
Thanks. I learned it from TIBD. 
Last edited by Guest on 23 Nov 2009 10:03:39 pm; edited 1 time in total |
|
Back to top |
|
|
TI-newb
Member

Joined: 24 Dec 2008 Posts: 158
|
Posted: 23 Nov 2009 10:08:44 pm Post subject: |
|
|
EDIT: Graph Point Info!!!
Put two points down.. X,Y and X,Y and this will tell u the Slope,MidPoint and Length .. (if thers anything wrong with this plz tellme)
I Will post up the Newer Program on this post soon. I got some bugs to fix such as the Divide By 0 thingy =D. and maybe even more userfriendly.
EDIT: But other then that, i think its pretty small and optimized already, If u do have any optimizations, dont hesitate to tell me.
:ClrHome
:Input "X,Y,X,Y:",Str1
:expr("{"+Str1->L1
:ClrHome
:Disp L1 //Just to remind you about the coordinates you put down, and for me to see if the prgm is working correctly..
:Output(2,1,"GRAPH INFO:(5 Spaces)SLOPE:(10 Spaces)MIDPOINT:X=(14spaces)Y=(5 Spaces)LENGTH:"
:Output(4,13,(L1(1)+L1(3))/2
:Output(5,13,(L1(2)+L1(4))/2
:Output(3,13,(L1(4)-L1(2))/L1(3)-L1(1))
:L1(3)-L1(1)->L2(1
:L1(4)-L1(2)->L2(2
:If L2(1)<0:-1*L2(1)->L2(1)
:If L2(2)<0:-1*L2(2)->L2(2)
:Output(6,12,L1(1)^2+L2(2)^2
For those who cant get the number of spaces right because i wrote it confusing X_X.. Heres a file
Last edited by Guest on 24 Nov 2009 12:50:31 am; edited 1 time in total |
|
Back to top |
|
|
Ed H
Member

Joined: 30 Nov 2007 Posts: 138
|
Posted: 05 Dec 2009 06:56:50 pm Post subject: |
|
|
This is a clever little program that... well, you can figure out what it does.
Code: :Prompt N
:"_→Str0
:For(X,0,log(N
:10fPart(.1N→Z
:While Z
:sum({4.1,4.1,9.2}(Z={4,5,9→T
:sub("IVXLCDMvxlcdmni",2X+10fPart(T)+1,1)+Str0→Str0
:abs(Z-1-int(T→Z
:End
:int(.1N→N
:End
:Str0
|
|
Back to top |
|
|
GloryMXE7 Puzzleman 3000
Active Member

Joined: 02 Nov 2008 Posts: 604
|
Posted: 05 Dec 2009 09:01:51 pm Post subject: |
|
|
ah a number to roman numeral converter
I'm not familiar with the lower case letters but i guess they are for decimals
as for your program TI-newb
I spotted quite a few optimizations
end of line quotation marks can be removed
you can also remove end parentheses that come before "->"
:Output(4,13,(L1(1)+L1(3))/2
:Output(5,13,(L1(2)+L1(4))/2
can be modified to
:Output(4,13,.5(L1(1)+L1(3
:Output(5,13,.5(L1(2)+L1(4 |
|
Back to top |
|
|
Weregoose Authentic INTJ
Super Elite (Last Title)

Joined: 25 Nov 2004 Posts: 3976
|
Posted: 06 Dec 2009 01:21:28 am Post subject: |
|
|
TI-newb wrote: Put two points down.. X,Y and X,Y and this will tell u the Slope,MidPoint and Length .. (if thers anything wrong with this plz tellme)
I Will post up the Newer Program on this post soon. I got some bugs to fix such as the Divide By 0 thingy =D. and maybe even more userfriendly.
EDIT: But other then that, i think its pretty small and optimized already, If u do have any optimizations, dont hesitate to tell me. Why is the distance from (a,b) to (c,d) different from that of (c,d) to (a,b)?
Blah blah missing parentheses on line nine, blah blah L2 (not L1) on the last line, blah blah sum(L2[font="verdana"]²...
Also, note that squaring negative numbers yields positive, so you can easily remove four lines from your code.
But, if all you care about are the numbers—not necessarily how they were obtained—then this should suffice:
{A,C→L1
{B,D→L2
2-Var Stats
LinReg(ax+b)
Disp "Slope",a,"Midpoint",x-mean,y-mean,"Length^2 // [VARS] [5] [►] [►] [2], [VARS] [5] [2], [VARS] [5] [5]
R►Pr(A-C,B-D)[font="verdana"]²
As an aside, there's a website called Purplemath that you may enjoy from a math programmer's perspective.
(Just click on the Lessons index.)
Last edited by Guest on 01 Jul 2010 10:02:58 am; edited 1 time in total |
|
Back to top |
|
|
Bhaliar
Member

Joined: 16 Nov 2009 Posts: 221
|
Posted: 06 Dec 2009 01:57:33 am Post subject: |
|
|
Ummmm, I just wanted to post so I remind myself to post my guessing game in this box. It's easy to use and enter, basically theres two circls, and you have to coose one. A star appears over the right one, but appears for less and less time, make it almost a blur that you miss if blinking. Sorry but its late so I'd mess typing it up somehow. |
|
Back to top |
|
|
kinkoa
Member

Joined: 28 Jul 2009 Posts: 103
|
Posted: 07 Dec 2009 09:51:17 am Post subject: |
|
|
this can be put at the beginning of any program to password protect it
ClrHome
Input "PASSWORD: ",Str1
If Str1=PASSWORD:Then
"program code here"
Else
ClrHome
Disp "WRONG
Pause
ClrHome
End
"
EDIT: i know this doesnt look secure but make a good password then lock it with celtic 3
Last edited by Guest on 01 Jul 2010 10:04:05 am; edited 1 time in total |
|
Back to top |
|
|
Ed H
Member

Joined: 30 Nov 2007 Posts: 138
|
Posted: 07 Dec 2009 04:43:59 pm Post subject: |
|
|
shadowking wrote: this can be put at the beginning of any program to password protect it
ClrHome
Input "PASSWORD: ",Str1
If Str1=PASSWORD:Then
"program code here"
Else
ClrHome
Disp "WRONG
Pause
ClrHome
End
"
The problem with this is that any user could easily open up the source code and read off the password.
You could write a password-protection routine where the user can't pull the password from the source, using rand. However, even then, any competent user could simply open up the code, delete a few lines, and use the program without the password.
Last edited by Guest on 01 Jul 2010 10:04:27 am; edited 1 time in total |
|
Back to top |
|
|
calcdude84se
Member

Joined: 09 Aug 2009 Posts: 207
|
Posted: 07 Dec 2009 07:48:48 pm Post subject: |
|
|
You could try to inextricably entangle the program with the password protection.
Of course, such a program would be virtually impossible to maintain.
If you can write a pure basic program that is password-protected such that I can't run the code without the password, then I would like to know. :biggrin: |
|
Back to top |
|
|
Bhaliar
Member

Joined: 16 Nov 2009 Posts: 221
|
Posted: 08 Dec 2009 01:08:14 am Post subject: |
|
|
calcdude84se wrote: You could try to inextricably entangle the program with the password protection.
Of course, such a program would be virtually impossible to maintain.
If you can write a pure basic program that is password-protected such that I can't run the code without the password, then I would like to know. :biggrin:
Well using vraiables you could cause certain reactions. Like peppered throughout the game, say when you enter your password, 1->A Well in the code, put if A=/1 Then stop and all thats jazz. And most users wouldn't guess the string, or know how to access it. Maybe a 3 digit code, with each letter changing a way you want, so it can't be read the same. |
|
Back to top |
|
|
IAmACalculator In a state of quasi-hiatus
Know-It-All

Joined: 21 Oct 2005 Posts: 1571
|
Posted: 08 Dec 2009 10:03:08 pm Post subject: |
|
|
On an 89, the best way to stop people from viewing your source code is to insert an illegal token in the first line of the program – the compiler ignores it, resulting in a working program, but the program editor can't deal with it and just displays an empty file. |
|
Back to top |
|
|
nitacku
Advanced Member

Joined: 23 Aug 2005 Posts: 408
|
Posted: 11 Dec 2009 01:22:52 am Post subject: |
|
|
Updated the list: link for the lazy :P
Let me know if I missed your program so I can include it.
On a side note, I had to modify all the old links. I guess the forums were updated?
Last edited by Guest on 11 Dec 2009 01:25:10 am; edited 1 time in total |
|
Back to top |
|
|
calcdude84se
Member

Joined: 09 Aug 2009 Posts: 207
|
Posted: 11 Dec 2009 09:22:10 pm Post subject: |
|
|
Yes. I think that is the most recent news item... |
|
Back to top |
|
|
kinkoa
Member

Joined: 28 Jul 2009 Posts: 103
|
Posted: 15 Dec 2009 09:28:02 am Post subject: |
|
|
calcdude84se wrote: You could try to inextricably entangle the program with the password protection.
Of course, such a program would be virtually impossible to maintain.
If you can write a pure basic program that is password-protected such that I can't run the code without the password, then I would like to know. :biggrin:
you can by using celtic 3 and my routine for it then lock it so they cant edit it and no one will be able to get into it but make sure its debugged and finished before you lock it or you will have to completely redo it |
|
Back to top |
|
|
ztrumpet
Active Member

Joined: 06 May 2009 Posts: 555
|
Posted: 15 Dec 2009 05:11:59 pm Post subject: |
|
|
shadowking wrote: calcdude84se wrote: You could try to inextricably entangle the program with the password protection.
Of course, such a program would be virtually impossible to maintain.
If you can write a pure basic program that is password-protected such that I can't run the code without the password, then I would like to know. :biggrin:
you can by using celtic 3 and my routine for it then lock it so they cant edit it and no one will be able to get into it but make sure its debugged and finished before you lock it or you will have to completely redo it
Or you could just unlock it.
(Once something is locked, unlocking is just as simple.)
Last edited by Guest on 15 Dec 2009 05:12:29 pm; edited 1 time in total |
|
Back to top |
|
|
TI-newb
Member

Joined: 24 Dec 2008 Posts: 158
|
Posted: 16 Dec 2009 12:34:12 am Post subject: |
|
|
kkx I can't quote the entangling the passcode into ur prgm, but here's an idea to do it. Ur whole prgm will rely on a number.. Like for everything it will be multiplied by ur passcode or something. So if ur passcode was wrong, the prgm would simplily not work and crash. You could simply just make it determine how many elements are on a list. Or how many for( loops.. So say For(A,passcode/10(or something),passcode/5..
For more of an example. Say u had some menu routine that only had like 3 options. Say.. Your pass code is 9 or even.. Something more complicated like 963(just find something that works) and you want ur For( loop to loop three times..(9 will be our pass and it will be inserted into Str1) For(A,expr(Str1)/9,expr(Str1)/3. Tadaa. If they put some random pass in, the menu (depending on how Its made.. Like not the Menu( command, but say your own menu.. , it will create an errorr)
Last edited by Guest on 16 Dec 2009 12:40:58 am; edited 1 time in total |
|
Back to top |
|
|
IAmACalculator In a state of quasi-hiatus
Know-It-All

Joined: 21 Oct 2005 Posts: 1571
|
Posted: 16 Dec 2009 07:15:05 pm Post subject: |
|
|
The difficulty there is that a passcode consisting of a single small number is not very secure, and the more passcodes you have, the more hideously convoluted and bloated your code becomes. Heck, even one would probably double the program's size. |
|
Back to top |
|
|
Bhaliar
Member

Joined: 16 Nov 2009 Posts: 221
|
Posted: 16 Dec 2009 11:32:08 pm Post subject: |
|
|
Hey I tried to run the racer program, but I get Err:DOMAIN on the line :Output(8,Ans,"*"
Last edited by Guest on 03 Feb 2010 08:07:46 pm; edited 1 time in total |
|
Back to top |
|
|
|