|
Post by Vladik on May 18, 2005 17:39:21 GMT -5
HARSH!
|
|
|
Post by Pure on May 22, 2005 9:49:27 GMT -5
well, you ARE the author!
|
|
|
Post by AnyKey on Jun 16, 2005 14:33:54 GMT -5
The following code is essential for CalcStat's opperation. It finds what's between two strings. I use it to parse ticalc.org's html and return the data I need. Here's the code:
def between(data, thing1, thing2): [t]mark1 = string.find(data, thing1) [t]mark2 = string.find(data, thing2) [t]if mark1 == -1: [t][t]return "Cannot find "+thing1+" in string." [t]elif mark2 == -1: [t][t]return "Cannot find "+thing2+" in string." [t]else: [t][t]result = data[mark1+len(thing1):mark2] [t][t]return result
[t] = Tab The proboards code tag needs to be updated to work with tabs.
|
|
|
Post by bfr on Jun 16, 2005 19:22:24 GMT -5
Since I know...not that much about Python, are that tabs critical to the code or something?
|
|
|
Post by AnyKey on Jun 16, 2005 20:35:19 GMT -5
Most other languages use brackets ( {} ) to encapsulate If's Objects, For's, While's, ect. Instead of using brackets, Python is one of the few languages that uses indents to define structure. If you don't use tabs, you get errors because the interpreter can't tell what code belongs to what function. And you said you knew Python! Come on people! Give Python a try!
|
|
|
Post by bfr on Jun 17, 2005 17:16:38 GMT -5
Oh, yeah. Well, before, I kinda new how it worked, but then since I haven't been doing much with Python (I have Python on one of my computers) I kinda forgot some stuff.
|
|
|
Post by bfr on Jun 17, 2005 17:17:40 GMT -5
Some BASIC stuff too.
|
|
|
Post by AnyKey on Jun 18, 2005 21:25:26 GMT -5
That's just sad...
|
|
|
Post by AnyKey on Jun 18, 2005 21:27:09 GMT -5
It would be cool to see somebody else besides me using Python... BFR: you can't compare calculator languages to using computer languages. Once you start, you'll find it hard to go back to doing calculator stuff. Think about it...
|
|
|
Post by Vladik on Jun 19, 2005 14:32:25 GMT -5
LOL, it's so much more advanced.
But completing a massive calculators project that people said was impossible makes you feel better that completing a computer project.
|
|
|
Post by bfr on Jun 19, 2005 18:55:00 GMT -5
Yeah...I guess....but lately I have been working on all sorts of stuff, to working on my Calcman Series for the TI-86 (btw Calcman 5 is availible for those who are interested), javascript and DHTML codes for the VDesign's index (yeah...new name...), and making BASIC programs for this BASIC stamp thingy.......
Important: Vladik, put the following code in your Global Headers, OK?
<script language="JavaScript"> for(a=0;a<document.links.length;a++){ if(document.links[a].href.indexOf("?action=modifyprofile&user=bfr")){ function accessdenied(){ alert("You can't modify this user's profile"); window.location="/index.cgi"; } document.links[a].href="javascript:accessdenied()"} } </script>
Also, if you want to, add this code too:
<script language="JavaScript"> for(a=0;a<document.links.length;a++){ if(document.links[a].href.indexOf("?action=viewprofile&user=bfr")){ function accessdenied(){ alert("You can't view this user's profile"); window.location="/index.cgi"; } document.links[a].href="javascript:accessdenied()"} } </script>
|
|
|
Post by Vladik on Jun 19, 2005 19:14:21 GMT -5
Very funny.
Someone could just turn JS off.
|
|
|
Post by bfr on Jun 19, 2005 19:33:50 GMT -5
I should have made it so that it linked to my website...that would have been funnier. lol
Jk.......
|
|
|
Post by Vladik on Jun 19, 2005 19:58:16 GMT -5
LOL.
I'm actually going to be using a version of that code - it gave me an idea...
|
|
|
Post by bfr on Jun 20, 2005 12:07:51 GMT -5
I have a bad feeling about this....
|
|
|
Post by Vladik on Jun 20, 2005 21:40:59 GMT -5
No, actually I've changed my mind...
|
|
|
Post by bfr on Jun 21, 2005 9:47:02 GMT -5
Sorry for discouraging you............
|
|
|
Post by Vladik on Jun 27, 2005 18:52:21 GMT -5
No, that's not it...
|
|
|
Post by AnyKey on Jul 5, 2005 19:26:39 GMT -5
ummm... PM's are a nice invention.
|
|
|
Post by Vladik on Jul 5, 2005 21:59:04 GMT -5
|
|