coolcat50
-
Content Count
303 -
Joined
-
Last visited
Posts posted by coolcat50
-
-
ColdFusion is a Adobe Language and for version 8 it is about $1,399 USD. So it is very expensive. Also, a site programmed in ColdFusion would be MySpace. Just look at the file extension on one of the pages.
-
Now, I have absolutely no dating experience, but I do have some ideas that could help your situation. One way you can push her out your mind is to simply do things that please you. Take up a hobby, post on Trap more, make more websites. Do whatever makes you do into a "trance" and try to stop thinking of her. Talk with all of your other friends and try and be very sociable with them. A huge help could be to only see her when ABSOLUTELY REQUIRED. That will help your situation alot. Your situation is very puzzling and quite strange to me. (Of course I'm like 3 years younger than you) Yes, I am younger, but that doesn't mean I don't know what I'm talking about. Just do what I said and your situation could become much less awkward and just become a regular relationship.
-
yeah im gonna do it with javascript when i get my shoutbox set up. thanks alot!
-
In this tutorial I will show you how to create a program that will solve a equation with variables for you. There are some requirements though.
Requirements
A Ti-83 or better calculatorKnowledge of how to use the calculatorKnowledge of where to find the functionsA little Ti-BASIC knowledge will be helpfulWell lets get into it.Creating the Program
First, we need to create the program. Open up your program screen and create a new program. Name it something like EQSOLV.
Ok let's get started with the coding.
WARNING:
This program will use the following variables.
Str9Str0Y1XOk, first open up the edit screen. It should like like this.PROGRAM:EQSOLV
If it looks like then you did the creation of the program correctly.Ok, we need to add a ClrHome command. Your screen should like this.
PROGRAM:EQSOLV:ClrHome
Great! Time to start having user input screens. We will use the Input command and the Str0 and Str9 variables here.-> = STO
PROGRAM:EQSOLV:ClrHome:Input "EQUATION:",Str0:Input "ANSWER:",Str9
Now when the program is executed, it will ask for the equation. Then it will ask for the answer.Ok, we now need to create one big string for the equation. We will also add some other parts to the string for evaluating.
The reason for this is that we will use the solve() function. The synatx for solve() is:solve(equation-(answer),X,guess)
PROGRAM:EQSOLV:ClrHome:Input "EQUATION:",Str0:Input "ANSWER:",Str9:Str0+"-("+Str9+")"->Str0
We now have our equation ready for solving. First, we need to turn the equation into a function.We will use a function called String-to-Equ(). It is pictured with an arrow as "to". I will call it String-to-Equ though.
PROGRAM:EQSOLV:ClrHome:Input "EQUATION:",Str0:Input "ANSWER:",Str9:Str0+"-("+Str9+")"->Str0:String-to-Equ(Str0,Y1)
We now have our equation saved as a function for solving. Now let's solve the equation and display our answer.PROGRAM:EQSOLV:ClrHome:Input "EQUATION:",Str0:Input "ANSWER:",Str9:Str0+"-("+Str9+")"->Str0:String-to-Equ(Str0,Y1):solve(Y1,X,0)->X:Output(3,1,"X=:Output(3,3,X
That will solve the equation, store it in X and display it. Keep off the end quotation marks for memory management.You may think we are done. Well we are not quite finished. Now we need to clean up the program by erasing the variables we used. It will help memory management.
Our final code should look like this.
PROGRAM:EQSOLV:ClrHome:Input "EQUATION:",Str0:Input "ANSWER:",Str9:Str0+"-("+Str9+")"->Str0:String-to-Equ(Str0,Y1):solve(Y1,X,0)->X:Output(3,1,"X=:Output(3,3,X:DelVar X:DelVar Str0:DelVar Str9:DelVar Y1:Stop
There you go. A simple equation solver made in Ti-BASIC.Instructions on Use
To use the equation solver simply enter in the equation to be solved in the equation input. Enter in the answer to the equation in the answer input.
When typing in the variable use the [X,T,(theta)] button.
Example of use:
EQUATION:2+XANSWER:4X=2Done
That would be the results when you enter in that equation.Well thank you for reading. This is my third tutorial and I hope you like it.
-
Yeah, it seems really cool. I am wanting to create a chatbox with the ability to submit posts with a button combination. B + 1 or something.
-
Well, Frets on Fire + USB Keyboard + Laptop = WIRELESS GUITAR HERO CLONE
-
Well, I do not quite know how to use a div like that. The innerHTML object could work with PHP include. There probably are better ways though. And I would prefer CSS over using DOM.
-
Yeah, I checked out a video with this and it looks awesome. When, I get my laptop I am for sure getting this. There also is another similar game called Guitar Zero.
-
You probably are thinking at this moment why I am posting some tricks with variables. Well, there are many useful things a variable can do for us. For one they can actually be used to create simple games. They also can be used to produce a random result in a page. Another great use is shoutboxes.
Well here are some cool variable effects.
Adding Multiple Strings
We can use strings to create great effects.
Example:
<?php$var1="Hello person.";$var2=str_replace("person","world",$var1);echo $var1." ".$var2;?>
We used str_replace to show two sentences with strings.Neat huh.
Random Integers
This is one of the sweetest features of PHP. the rand() function. Here is a neat trick using this function.
Example
<?phpfunction exVar(){$num=rand(1,100);if ($num<100){echo "The number is less than 100.";}else{echo "The number is 100.";}}exVar()?>
That will run the function and tell you if it is 100 or less. Great for guessing games.MySQL Connect
With variables we make connecting to a MySQL database clean and simple
Most mysql connection codes are like this.
<?php$localhost="localhost";$name="username";$password="password";$database="db";$connect=mysql_connect($localhost,$name,$password) or die(mysql_error());mysql_db_select($database,$connect);?>
Simple huh! Variables make it look simpler and neater.Superglobals
This is another awesome feature of PHP and variables. The $_POST and $_GET variables. We can use these to receive user input. We also can use the $_GET global to host a small website in ONE FILE.
$_POST is very widely used in registration scripts and chatboxes.
Example of $_GET
<?phpif ($_GET['var'] == 'var'){//Post some html/php stuff here}else{//post the main page code here}?>
Example of $_POST<?php$name=$_POST['var'];echo $name;?><form action="page.php" method="post"><input type="text" name="var" /><input type="submit" value="Submit" /></form>
The first code gives us a one file site using the $_GET variable and If statements.Our second code processes the form and prints the user input.
Thank you for reading my tutorial.
-
I need an Iframe that appears when a link is pressed like.Chat Here Iframe When Link is PressedLink Link Link
-
There are several economic events that could happen with Microsoft as well as computer standards being changed significantly.
The economic standpoint of Vista will probably cause Microsoft to lose money.
Most games do not work on Vista, but on XP. This causes Microsoft to lose a huge crowd.A lot of RAM is required to run Vista and it can bug up your system. Again, gamers will stay away from Vista. This also affects developers and programmers. Other Economic Factors Toward Microsoft in GeneralOpen Source programs becoming abundant. We are seeing that most Microsoft products are becoming replaced by Open Source applications. Firefox, PHP, and C++ are a few examples. I do not know if C++ is open source, but it sure is free. This will cause Microsoft to heavily invest in it's operating system. If the system fails, Microsoft is dead.Linux and Macs becoming more abundant. I have noticed that a lot of people use Macs and Linux now. My school has Macs as the main computers when before they had PCs.Bill Gates being stupid. Yes, the lawsuit against Bill Gates certainly isn't helping Vista. Stupid move in my opinion.Some computer standards are also ruining Microsoft. PHP, Apache, and MySQL are the most popular webservers and are extremely portable. ASP and VBScript are horrible because they really only work in Internet Explorer. This is very annoying.Yes, I am dissing some of Microsoft's products, but they did have some cool stuff. I am a fan of XP and would choose it over most operating systems. Microsoft Word is great for projects. I can't say much for Notepad because I could make a better web application (Soon to be normal)
Well there are some of my thoughts on Microsoft.
-
I found on Nintendo.com a while back some new javascript objects dealing with the Wii Remote.
I have decided to post a link to these new Javascript objects here.
Wii javascript
These new Javascripts can detect whether or not a Wii Remote is enabled, the position of the pointer, and even the tilt of the remote. It also has an object that determines the keypress of the Wii.
These can be very useful for Wii sites. Maybe have a menu load with AJAX when the remote is tilted. Add button functionality such as when the A and B button are pressed, the form is submitted. Just wanted to let you guys and gals know. -
Sorry Liam, I use my Nintendo Wii for Internet at the moment, and I can't put stufff up for download or anything like that. You could always copy & paste it, but with that I would want some credit.
-
Hmm, very interesting. I might be able to use this when I get my laptop.Also, Liam you could always try it.
-
You could also always use the $_GET variables. With $_GET you can create a whole website within a single file.
EDIT: Providing Example
How you would use the If statements is like this.<?phpif ($_GET['page'] == 'put_name_here'){?><!-- HTML Code --><?php}elseif ($_GET['page'] == 'another_page'){?><!-- HTML Here --><?php}else{?><!-- Main Page Here --><?php}?>
This is how you would do links.<a href="page.php?page=page">Name</a>
To include do this<?phpinclude("page.php?page=page");?>
-
Thank you. You also can use the mighty power of loops and timing to just have random pop-ups appear on his screen. The loop will make it so that it can be stopped, but it would be hilarious.
-
Here is one. I haven't tried it but it could work.
1.Take a screenshot of their desktop.
2.Open note pad and create a simple webpage with the background being the desktop.
3.Use Javascript to make it so that when the click on the body and alert comes up saying they have a virus.
Sample Code
<script type="text/javascript">function fakeVirus(){t=setTimeout('alert("You have a virus!")',5000)}function clickVirus(){alert("You have a virus!")}</script><body onload="fakeVirus()" onclick="clickVirus()">
4.Save the file.5.Open up the file.
6.Turn off EVERYTHING from the browser until it just shows the background picture.
7.Leave the computer alone.
When he comes to his computer pop in there and ask him whats wrong.
Next, ask him if he wants you to get rid of it.
If he says yes then tell him to leave the room and clean up all your dirtywork.
If he says no laugh extremely loudly and tell him what you did.
There ya go.
-
Ok, I will teach you how to create a simple HTML editor that runs online with buttons that add HTML tags. Before we start:
You should have basic knowledge of these languages.
HTML/XHTMLJavascriptPHP You will needAbility to use filesystem functions.Chmodding abilities Features of EditorOnlinePHP safeFull HTML support A Few Bad FeaturesCan only create new documents or overwriteFairly unsafeNow we are ready to begin.The PHP Script
This will be our PHP script that we will use to make the file.
Make a file called save.php
Here is the code
<?php//First we need to create a function to take out phpfunction clearPHP(){//First we must get the content from the form.$data=$_POST['contents'];//Ok we have a variable containing the contents.//Now we need to replace all php tags$data=str_replace("<?php","<!--",$data);//We are going to package all php as html comments$data=str_replace("?>","-->",$data);//Our main function is finished}//Ok we need to start our file creator$fName=$_POST['file'];$fContents=clearPHP();//We have our information ready to be implanted$file=fopen($fName,'w+');//We have created the file//Now we need to write to the filechmod($file,0777);fwrite($file,$fContents);//Ok close the filefclose($file);?>
That would be about it for our file creating system.The Form
The Javascript
Create a new file called editor.php
This is our Javascript we need in the head tag of our editor. I am just going to demonstrate the bold, italic, underline, and anchor tags.
<script type="text/javascript">//We need to start our bold functionfunction addBold(){var current=document.editor.contents.value//Next add a bold tagdocument.editor.contents.value=current+"<b></b>"}//Now add our italic functionfunction addItalic(){var current=document.editor.contents.valuedocument.editor.contents.value=current+"<i></i>"}//Now our underline functionfunction addUnder(){var current=document.editor.contents.valuedocument.editor.contents.value=current+"<u></u>"}//Now our anchor tag//This is more complex than the othersfunction addLink(){var link=prompt("URL of Link","http://")var title=prompt("Name of Link",link)//We have the values for our tag//Lets add the tagvar current=document.editor.contents.valuedocument.editor.contents.value=current+'<a href="'+link+'">'+title+'</a>'}//That ends the javascript</script>
That is our javascript that will add the tags.Now we need the form.
The Form
Here is the code for our form. We will use buttons to add the Javascript functions.
<form name="editor" action="save.php" method="post"><input type="button" value="Bold" onclick="addBold()" /><input type="button" value="Italic" onclick="addItalic()" /><input type="button" value="Underline" onclick="addUnderline()" /><input type="button" value="Link" onclick="addLink()" /><br /><textarea name="contents" wrap="false" rows="25" columns="20"></textarea><br /><input type="submit" value="Save" /></form>
That gives us our form and now we are done. Style it and you have yourself a simple HTML editor.I hope this tutorial helped you and thank you for reading.
-
You should have also provided a few other tricks with echo. Such as random numbers or something like that.
Look at this code.<?php$var1="Hello people!";$var2=str_replace("people","world",$var1);echo $var1." and ".$var2;?>
The above code should display.Hello people! and Hello world!
So echo can actually be used for several purposes.
-
Well, it doesn't require PHP, but it does require extra files that can clog up my file manager. With the PHP $_GET global I can create the same effect with one file. That could even decrease load times.(I think.)
-
Well, my style is new spaces for me to read easier due to my using my Nintendo Wii for management. Also, I don't want the iframe constantly being one part but change. So, I just used toolbar to show that the variable is part of the url and it changes. I probably need to add a base tag though for the links right? AJAX would probably be better anyway or just plain Javascript. And yes that was an example code.
-
Thanks! That is exactly what I am wanting
-
Well, I don't really understand AJAX and I can't copy and paste code so the XML object will be annoying to use and with a link the page would automatically refresh. Maybe a Javascript pop-up could work, but I want it to show up inside the page. Maybe Javascript style changes could do it. Or something.Also, with an iframe I can have it load with a different file. That would probably be required. Also, I could always use AJAX with PHP to do it. I just gotta learn how to lol.
-
Hello! I am wondering whether or not it is possible to have a dynamic iframe that changes when a link is pressed. I believe I know a way for this to be done with the php $_GET variable and only using a certain part of the url. I am wondering if this would maybe work. I want this for a chatbox that will have a little side menu for BBCode reference and a notepad.
<?phpif($_GET['toolbar'] == 'bbcode'){//display my bbcode reference page here}if($_GET['toolbar'] == 'notepad'){//display my notepad page here}if($_GET['toolbar'] == 'smilie')//display my smilie page here}else{?><!-- Display my chatbox here --><!-- IFRAME code --><iframe src="thispage.php?toolbar"></iframe><?php}?>
Php Word Filter Have you accidently sworn on your site? Or do you want to keep visitor
in General Discussion
Posted · Report reply
This will not work at all. There is no origin of content to replace from and no variable to actually echo. This would be more correct. This will be a chatbox example.
That would be the correct form. Your example will simply provide an error. If it were to work it would still display the curse word due to no variable being stored.