Welcome, Guest
Welcome to Makestation! We are a creative arts/indie discussion community — Your center for creative arts discussion, unleashed!

Please note that you must log in to participate in discussions on the forum. If you do not have an account, you can create one here. We hope you enjoy the forum!

Status Updates
Avatar of User
tc4me December 17th, 2024
Blablablabla
Avatar of User
tc4me December 17th, 2024
Blablablabla
Avatar of User
tc4me December 17th, 2024
Blablablabla
Avatar of User
tc4me December 17th, 2024
Blablablabla
Avatar of User
tc4me December 17th, 2024
Blablablabla
View all updates

Search Forums

(Advanced Search)

Forum Statistics
» Members: 939
» Latest member: krishna64
» Forum threads: 4,282
» Forum posts: 28,518

Full Statistics

Online Users
There are currently 341 online users.
» 0 Member(s) | 340 Guest(s)
Google

Latest Threads
Portugal ➤Temu Coupon Cod...
Forum: Community Related
Last Post: sidiseo
1 hour ago
» Replies: 0
» Views: 3
Ireland ➤Temu Coupon Code...
Forum: Announcements
Last Post: sidiseo
1 hour ago
» Replies: 0
» Views: 3
Temu Coupon $100 Off [Acs...
Forum: Poll Booth
Last Post: _khushii_x_01
1 hour ago
» Replies: 0
» Views: 3
Hungary ➤Temu Coupon Code...
Forum: Announcements
Last Post: sidiseo
1 hour ago
» Replies: 0
» Views: 3
France ➤Temu Coupon Code ...
Forum: Announcements
Last Post: sidiseo
1 hour ago
» Replies: 0
» Views: 3
Finland ➤Temu Coupon Code...
Forum: The Others
Last Post: sidiseo
1 hour ago
» Replies: 0
» Views: 3
Denmark ➤Temu Coupon Code...
Forum: Roleplaying
Last Post: sidiseo
1 hour ago
» Replies: 0
» Views: 4

 
  PHP - Part 6
Posted by: Darth-Apple - November 8th, 2013 at 2:33 AM - Forum: Software - Replies (2)

How to Program PHP
Tutorial, Part 6

Welcome to part 6 of this series of tutorials! In the last tutorial, we finally introduced some concepts that allowed you to interact with a PHP script on the server. (That was a lot of tutorials to get to something so simple, eh? ) In this tutorial, we will introduce the concept of the loop, which will be an extremely useful concept that we will use in later tutorials. These concepts will become especially important when we start using databases. We're still a good way off from that, but this is nevertheless a very important concept.

Basically, a loop does two very simple things. 1) It executes a block of code over and over again, and 2) it checks some sort of condition each time before it executes. The condition is very important because otherwise, without a condition, a loop would literally execute forever. In PHP, we aren't quite as worried about crashing a server because typically a PHP script is cut off after about 30 seconds of execution time (unless your webhost has an unconventional PHP configuration), but in other programming languages, the implications of "bad loops" could be a lot worse. Tongue

The first "loop" that will be demonstrated is the "while" loop, which looks like this:

Code:
<?php
$count = 0;

while ($count < 11)
{
echo $count. "<br>";
$count = $count + 1;
}

?>

The above code is actually very simple. A "while" loop simply executes a block of code over and over again, as long as a specific condition is met each time. If you run this script, you will see the script count from 0 to 10 in your browser. What makes it stop at 10?

Notice how the condition of the while statement is "($count < 11)". Basically, the condition is that the $count variable is less than 11. If it is equal to 11 or more, this "while" statement will not execute. If it is less than 11, the while statement will execute, and will continue to execute as long as $count remains less than 11. Now of course it won't increment count by itself, so we'll have to make sure that we do that in our loop to prevent an "endless loop" that runs eternally. Tongue

Notice these lines:

Code:
echo $count. "<br>";
$count = $count + 1;

The second line is what actually increments $count by 1. Every time this while loop executes, it will increment $count by 1 because this line is "in" the loop. The line before it simply echoes the value of the $count variable, so you will see it in your browser. It also adds a <br> tag so that each number is on each line, so don't be confused by that part of the statement. What you'll end up seeing in your browser when you run this script will be:

Quote:0
1
2
3
4
5
6
7
8
9
10

As you can see, the while loop is pretty simple. It is an extremely useful loop in PHP, and it will be important to have a solid understanding of how it works. Of course the while loop isn't the only kind of loop that PHP has to work with. There are several variants, including the do-while loop, which is a variant of the while loop where first the block of code will be executed once, and then it will check against a condition before it runs the loop any additional times. What's different about the do-while loop is that a do-while loop will always execute at least once. A while loop won't even execute at all if the condition is never met, but a do-while loop is guaranteed to run at least once, even if no conditions are ever met.

The do-while loop isn't as common as the while loop, so I won't cover it specifically in this tutorial, but if you would like to learn more about how it works, click here for the official explanation from the online PHP manual.

There are of course several other loops in PHP, but none of them are as essential. One loop that I will cover later on is the for loop. The for loop is like the while loop, but it increments the variable automatically instead of requiring you to make a statement to increment a variable. (this sounds useful, but all it really does is save you one extra line of code. ) There is nothing that can be done with a for loop that cannot be done with a while loop, so this isn't very essential for us to glance over yet. If you would like to gain a better understanding of a for loop now, feel free to look at this page from w3schools.

This has been a fairly short tutorial. In my post below, I will give a more "interactive" example of the while loop, and in future tutorials, we'll continue to dive into more complex concepts. Big Grin

Print this item

  Cloud Hosting - NShadow CDN
Posted by: NightShadow - November 7th, 2013 at 6:58 PM - Forum: Technology & Hardware - Replies (3)

So, to compliment the release of ShadowPost (my social network software) in March, I had an idea (soon to be project if funding is secured) to start up a small cloud host with affordable prices. It will mainly host ShadowPost communities but can aim at sponsoring established open source projects.

The three locations I had in mind for servers were:

Chicago Area (Continuum DC in Lombard, IL)
Dallas (CoreXchange in Dallas, TX)
Denver (Handy Networks in Denver, CO - COMING SOON)

Here is a map of the locations also:
http://nshadowcode.net/serverloc.png

It will be a KVM/CloudStack powered cloud with a custom panel (though with Solus at the start possibly?), and price at a flat rate instead of per hour, and have fair overages if needed, such as $2.50 monthly for 10GB of space, etc.

All bandwidth would be unlimited on a shared 100Mbps line, in which the user can upgrade to 1Gbps for $25/mo. Hard drive space is RAID 5 protected with SSD caching coming soon.

Open source project sponsoring would equal free or low-price hosting for mid-to-large sized open source projects, that may have outgrown SourceForge or GitHub for example. It would all depend on what the project managers need, for example, we could offer a site for free, and a mirror for software downloads possibly for $5-20/mo.

What do you think?

Print this item

  Abi's Doodle & Design Space
Posted by: Abi - November 6th, 2013 at 4:23 AM - Forum: Digital Journals - Replies (8)

Here are the most recent stuff i did :q been quite lazy lately and havent completed...a bunch of... stuff

Art:
Knight:
http://i63.photobucket.com/albums/h132/b...cabfb7.jpg
Robot:
http://i63.photobucket.com/albums/h132/b...52c4a7.jpg

Designs:
5-Page, Fictional Company Webpage Mock Up i had to do for class (illustrator sorta derped but actual webpage will be fully developed in the coming weeks)
http://i63.photobucket.com/albums/h132/b...4f3799.png
http://i63.photobucket.com/albums/h132/b...0466b9.png

3D:
Just started learning 3DS Max at school and made a playground as an assignment
http://i63.photobucket.com/albums/h132/b...a54ee1.jpg

Print this item

  Chat Window
Posted by: Abi - November 6th, 2013 at 3:26 AM - Forum: Community Related - Replies (3)

It'd be cool to have a live chat window somewhere on here (if possible) Smile

Print this item

  Ello :>
Posted by: Abi - November 6th, 2013 at 3:04 AM - Forum: Introductions - Replies (4)

Hello,

My name is Stephanie and im from Canada.
Im currently just a 2nd year student at SAIT Polytechnic studying new media production and design. I can be quite shy at times, but i tend to be quite talkative if we have something in common.

Im mainly a traditional/digital artist but i've taken quite an interest in graphic design and web development.
Besides that i like to play video games, read and of course; doodle. My interests are fantasy, sci-fic (robots specifically), and crafts.

Thats it i guess, cya around :]

Print this item

  If you had to decide on the three greatest rock bands of all time...
Posted by: Darth-Apple - November 6th, 2013 at 2:00 AM - Forum: Media & Entertainment - Replies (4)

If you had to decide which three rock bands were the greatest of all time, which bands would they be? (Deep question, I know. Tongue )

Personally, I would have to say Led Zeppelin, Pink Floyd, and Queen. I feel like all three had enough of an influence in music to really inspire a lot of other bands, and they also had great music, making them great contenders.

What would your lineup look like?

Print this item

  Fonts?
Posted by: Darth-Apple - November 6th, 2013 at 1:58 AM - Forum: Photography & Graphics - Replies (40)

Fonts can make a surprisingly big difference on the overall appearance and feel of any logo, signature, ad, or anything else of that nature. I personally will easily spend a lot of time trying out different fonts and looking with different contexts to see which ones I prefer to use in my designs.

Right now, Verdana and Lucida Handwriting are my favorites. As for the others that are available, I usually just "feel them out" and try whatever looks nice.

What are the fonts that you find yourself using frequently in graphics design?

Print this item

  Hello everyone!
Posted by: Phillip - November 5th, 2013 at 7:27 PM - Forum: Introductions - Replies (6)

Hey guys, my name is Phillip and I am 24 years old.

Print this item

  How many forums are you active on?
Posted by: Darth-Apple - November 2nd, 2013 at 4:02 AM - Forum: Web Design & Internet - Replies (63)

Currently, I'm active on around five or six forums. I've seen some who have been able to actively participate on 20+ forums, and I just don't have the time to be quite that dedicated these days. Tongue

How many forums are you active on?

Print this item

  The sidebar
Posted by: Darth-Apple - November 2nd, 2013 at 3:02 AM - Forum: Announcements - Replies (5)

Personally, I've had some mixed feelings about it. I like sidebars when they are done right, but I'm not quite sure it really "fits" here quite yet. It also looks terrible on smaller monitors, so there is that to consider as well. Tongue

Anyway, I've decided to put it to a vote. What is your opinion on it? Be sure to vote in the poll!

Print this item


Dark/Light Theme Selector

Contact Us | Makestation | Return to Top | Lite (Archive) Mode | RSS Syndication 
Proudly powered by MyBB 1.8, © 2002-2024
Forum design by Makestation Team © 2013-2024