Old 05-11-2010, 11:13 AM #1
Junior Member
 
Join Date: Apr 2010
Posts: 24
Rep Power: 0
flagpole is just really niceflagpole is just really niceflagpole is just really niceflagpole is just really niceflagpole is just really nice
flagpole flagpole is offline
Junior Member
 
Join Date: Apr 2010
Posts: 24
Rep Power: 0
flagpole is just really niceflagpole is just really niceflagpole is just really niceflagpole is just really niceflagpole is just really nice
Default Learning PHP - first app Laser divergence calculator

I decided yesterday afternoon to learn PHP

if anyone has ever learned a language on of the hardest things is to think if programs to test what you've learned so far.

having just bought a laser i thought i'd try a quick laser pointer divergence calculator.

Laser Divergence Calculator

what you think?

if there is anything you think it should do then it might help me learn more PHP, i've only been learning for and hour and a half so be gentle


flagpole is offline   Reply With Quote


















Old 05-11-2010, 12:23 PM #2
Grix's Avatar
Class 3R Laser
 
Join Date: Dec 2008
Location: Norway
Posts: 2,204
Rep Power: 21897
Grix has a reputation beyond reputeGrix has a reputation beyond reputeGrix has a reputation beyond reputeGrix has a reputation beyond reputeGrix has a reputation beyond reputeGrix has a reputation beyond reputeGrix has a reputation beyond reputeGrix has a reputation beyond reputeGrix has a reputation beyond reputeGrix has a reputation beyond reputeGrix has a reputation beyond repute
Grix Grix is offline
Class 3R Laser
Grix's Avatar
 
Join Date: Dec 2008
Location: Norway
Posts: 2,204
Rep Power: 21897
Grix has a reputation beyond reputeGrix has a reputation beyond reputeGrix has a reputation beyond reputeGrix has a reputation beyond reputeGrix has a reputation beyond reputeGrix has a reputation beyond reputeGrix has a reputation beyond reputeGrix has a reputation beyond reputeGrix has a reputation beyond reputeGrix has a reputation beyond reputeGrix has a reputation beyond repute
Default Re: Learning PHP - first app Laser divergence calculator

Seems to work fine! Clean and easy app!
__________________
LasershowGen: Freemium laser show editor: http://pages.bitlasers.com/lasershowgen/
2nd place in ILDA Fenning Awards 2015

Helios - Open source, low cost Laser Projector DAC:
http://pages.bitlasers.com/helios/
Grix is offline   Reply With Quote
Old 05-11-2010, 12:37 PM #3
Benm's Avatar
Class 4 Laser
 
Join Date: Aug 2007
Location: Netherlands
Posts: 7,623
Rep Power: 210024
Benm has a reputation beyond reputeBenm has a reputation beyond reputeBenm has a reputation beyond reputeBenm has a reputation beyond reputeBenm has a reputation beyond reputeBenm has a reputation beyond reputeBenm has a reputation beyond reputeBenm has a reputation beyond reputeBenm has a reputation beyond reputeBenm has a reputation beyond reputeBenm has a reputation beyond repute
Benm Benm is offline
Class 4 Laser
Benm's Avatar
 
Join Date: Aug 2007
Location: Netherlands
Posts: 7,623
Rep Power: 210024
Benm has a reputation beyond reputeBenm has a reputation beyond reputeBenm has a reputation beyond reputeBenm has a reputation beyond reputeBenm has a reputation beyond reputeBenm has a reputation beyond reputeBenm has a reputation beyond reputeBenm has a reputation beyond reputeBenm has a reputation beyond reputeBenm has a reputation beyond reputeBenm has a reputation beyond repute
Default Re: Learning PHP - first app Laser divergence calculator

Looks fine to me. Starting out with simple little applications like this one is a good way to learn php, although you'll probably want to go towards using databases soon enough
Benm is offline   Reply With Quote
Old 05-11-2010, 12:43 PM #4
Junior Member
 
Join Date: Apr 2010
Posts: 24
Rep Power: 0
flagpole is just really niceflagpole is just really niceflagpole is just really niceflagpole is just really niceflagpole is just really nice
flagpole flagpole is offline
Junior Member
 
Join Date: Apr 2010
Posts: 24
Rep Power: 0
flagpole is just really niceflagpole is just really niceflagpole is just really niceflagpole is just really niceflagpole is just really nice
Default Re: Learning PHP - first app Laser divergence calculator

i'm struggling to think of problems to solve that only require the things that i've already learned.
flagpole is offline   Reply With Quote
Old 05-11-2010, 02:03 PM #5
Benm's Avatar
Class 4 Laser
 
Join Date: Aug 2007
Location: Netherlands
Posts: 7,623
Rep Power: 210024
Benm has a reputation beyond reputeBenm has a reputation beyond reputeBenm has a reputation beyond reputeBenm has a reputation beyond reputeBenm has a reputation beyond reputeBenm has a reputation beyond reputeBenm has a reputation beyond reputeBenm has a reputation beyond reputeBenm has a reputation beyond reputeBenm has a reputation beyond reputeBenm has a reputation beyond repute
Benm Benm is offline
Class 4 Laser
Benm's Avatar
 
Join Date: Aug 2007
Location: Netherlands
Posts: 7,623
Rep Power: 210024
Benm has a reputation beyond reputeBenm has a reputation beyond reputeBenm has a reputation beyond reputeBenm has a reputation beyond reputeBenm has a reputation beyond reputeBenm has a reputation beyond reputeBenm has a reputation beyond reputeBenm has a reputation beyond reputeBenm has a reputation beyond reputeBenm has a reputation beyond reputeBenm has a reputation beyond repute
Default Re: Learning PHP - first app Laser divergence calculator

I suppose you could do calculators for all kinds of things, like the proper resistors in laser drivers and such.
Benm is offline   Reply With Quote
Old 05-11-2010, 02:43 PM #6
Trevor's Avatar
Class 3B Laser
 
Join Date: Jul 2009
Location: Boulder, CO
Posts: 4,510
Rep Power: 19710
Trevor has a reputation beyond reputeTrevor has a reputation beyond reputeTrevor has a reputation beyond reputeTrevor has a reputation beyond reputeTrevor has a reputation beyond reputeTrevor has a reputation beyond reputeTrevor has a reputation beyond reputeTrevor has a reputation beyond reputeTrevor has a reputation beyond reputeTrevor has a reputation beyond reputeTrevor has a reputation beyond repute
Trevor Trevor is offline
Class 3B Laser
Trevor's Avatar
 
Join Date: Jul 2009
Location: Boulder, CO
Posts: 4,510
Rep Power: 19710
Trevor has a reputation beyond reputeTrevor has a reputation beyond reputeTrevor has a reputation beyond reputeTrevor has a reputation beyond reputeTrevor has a reputation beyond reputeTrevor has a reputation beyond reputeTrevor has a reputation beyond reputeTrevor has a reputation beyond reputeTrevor has a reputation beyond reputeTrevor has a reputation beyond reputeTrevor has a reputation beyond repute
Default Re: Learning PHP - first app Laser divergence calculator

You could build a label generator. I can help you out; let me know.

Laser Warning Label Generator

-Trevor
__________________
Code:
23:10 <ARG>    nothing has blown up yet :)
23:10 <Trevor> that is a distressingly low standard for success
Trevor is offline   Reply With Quote
Old 05-11-2010, 02:48 PM #7
Junior Member
 
Join Date: Apr 2010
Posts: 24
Rep Power: 0
flagpole is just really niceflagpole is just really niceflagpole is just really niceflagpole is just really niceflagpole is just really nice
flagpole flagpole is offline
Junior Member
 
Join Date: Apr 2010
Posts: 24
Rep Power: 0
flagpole is just really niceflagpole is just really niceflagpole is just really niceflagpole is just really niceflagpole is just really nice
Default Re: Learning PHP - first app Laser divergence calculator

interesting, i'm a long way off graphics i'm just doing files.
flagpole is offline   Reply With Quote
Old 05-11-2010, 07:44 PM #8
Rafa's Avatar
Class 2 Laser
 
Join Date: Feb 2010
Location: Madrid, Spain
Posts: 437
Rep Power: 1774
Rafa has a reputation beyond reputeRafa has a reputation beyond reputeRafa has a reputation beyond reputeRafa has a reputation beyond reputeRafa has a reputation beyond reputeRafa has a reputation beyond reputeRafa has a reputation beyond reputeRafa has a reputation beyond reputeRafa has a reputation beyond reputeRafa has a reputation beyond reputeRafa has a reputation beyond repute
Send a message via MSN to Rafa
Rafa Rafa is offline
Class 2 Laser
Rafa's Avatar
 
Join Date: Feb 2010
Location: Madrid, Spain
Posts: 437
Rep Power: 1774
Rafa has a reputation beyond reputeRafa has a reputation beyond reputeRafa has a reputation beyond reputeRafa has a reputation beyond reputeRafa has a reputation beyond reputeRafa has a reputation beyond reputeRafa has a reputation beyond reputeRafa has a reputation beyond reputeRafa has a reputation beyond reputeRafa has a reputation beyond reputeRafa has a reputation beyond repute
Send a message via MSN to Rafa
Default Re: Learning PHP - first app Laser divergence calculator

Graphics are no that hard with GD and libs like that.
__________________
Lasers:
~100mW 405nm from Erdabyz (L) akshakj <- Died once, working again. vid 1 vid 2(repaired)
~980mW 445nm in Ehgemus RPL style host, thanks to MR. DAGUIN vid
~25mW 532nm (potmoded) from DX (dead now, switch died and repair failed...)not moded vid
~50mW 532nm "star cap" style found in the bus. Yeah, lol.
~6mW 635nm diode laser pic 1 pic 2
~250mW 650nm extracted from 20x DVD burner. <- dead vid 1 vid 2
~130mW 650nm extracted from 16X DVD burner. <$15 to make! LPF thread

~100mW 780mn extracted from 52x CD burner. <- dead cremation vid

My Youtube channel
Rafa is offline   Reply With Quote
Old 05-11-2010, 07:50 PM #9
Class 4 Laser
 
Join Date: Nov 2008
Posts: 5,728
Rep Power: 3030
ElektroFreak has a reputation beyond reputeElektroFreak has a reputation beyond reputeElektroFreak has a reputation beyond reputeElektroFreak has a reputation beyond reputeElektroFreak has a reputation beyond reputeElektroFreak has a reputation beyond reputeElektroFreak has a reputation beyond reputeElektroFreak has a reputation beyond reputeElektroFreak has a reputation beyond reputeElektroFreak has a reputation beyond reputeElektroFreak has a reputation beyond repute
ElektroFreak ElektroFreak is offline
Class 4 Laser
 
Join Date: Nov 2008
Posts: 5,728
Rep Power: 3030
ElektroFreak has a reputation beyond reputeElektroFreak has a reputation beyond reputeElektroFreak has a reputation beyond reputeElektroFreak has a reputation beyond reputeElektroFreak has a reputation beyond reputeElektroFreak has a reputation beyond reputeElektroFreak has a reputation beyond reputeElektroFreak has a reputation beyond reputeElektroFreak has a reputation beyond reputeElektroFreak has a reputation beyond reputeElektroFreak has a reputation beyond repute
Default Re: Learning PHP - first app Laser divergence calculator

Nice work!!
__________________
Laser Resources (for n00bs and veterans alike!)

Sam's Laser FAQ (The Laser Bible)

http://www.repairfaq.org/sam/laserfaq.htm

RP Photonics Encyclopedia of Laser Physics and Technology

http://www.rp-photonics.com/encyclopedia.html

ULTIMATE DIY PROJECTOR REFERENCE

http://nqlasers.com/scannerreference...itle=Main_Page

SUCCESS is the best revenge.
ElektroFreak is offline   Reply With Quote
Old 05-30-2010, 04:01 PM #10
Junior Member
 
Join Date: Apr 2010
Posts: 24
Rep Power: 0
flagpole is just really niceflagpole is just really niceflagpole is just really niceflagpole is just really niceflagpole is just really nice
flagpole flagpole is offline
Junior Member
 
Join Date: Apr 2010
Posts: 24
Rep Power: 0
flagpole is just really niceflagpole is just really niceflagpole is just really niceflagpole is just really niceflagpole is just really nice
Default Re: Learning PHP - first app Laser divergence calculator

Quote:
Originally Posted by Rafa View Post
Graphics are no that hard with GD and libs like that.
you're right - i've been playing with images

http://nigelcoldwell.co.uk/phtest/0030.php
flagpole is offline   Reply With Quote
Old 05-30-2010, 04:25 PM #11
billg519's Avatar
Class 3R Laser
 
Join Date: Feb 2008
Location: London, Ontario, CANADA
Posts: 1,056
Rep Power: 130
billg519 has a reputation beyond reputebillg519 has a reputation beyond reputebillg519 has a reputation beyond reputebillg519 has a reputation beyond reputebillg519 has a reputation beyond reputebillg519 has a reputation beyond reputebillg519 has a reputation beyond reputebillg519 has a reputation beyond reputebillg519 has a reputation beyond reputebillg519 has a reputation beyond reputebillg519 has a reputation beyond repute
billg519 billg519 is offline
Class 3R Laser
billg519's Avatar
 
Join Date: Feb 2008
Location: London, Ontario, CANADA
Posts: 1,056
Rep Power: 130
billg519 has a reputation beyond reputebillg519 has a reputation beyond reputebillg519 has a reputation beyond reputebillg519 has a reputation beyond reputebillg519 has a reputation beyond reputebillg519 has a reputation beyond reputebillg519 has a reputation beyond reputebillg519 has a reputation beyond reputebillg519 has a reputation beyond reputebillg519 has a reputation beyond reputebillg519 has a reputation beyond repute
Default Re: Learning PHP - first app Laser divergence calculator

Nice job on this calculator! Thank you.
__________________
I have a few lasers ... (62 handhelds, 11 labbies, 7 gas lasers, and 6 LPM's) I need more ... I have lots of goggles too! Eye safety comes first!
billg519 is offline   Reply With Quote
Old 05-30-2010, 04:42 PM #12
bobhaha's Avatar
Class 3B Laser
 
Join Date: May 2009
Location: Sydney, Australia
Posts: 3,256
Rep Power: 3264
bobhaha has a reputation beyond reputebobhaha has a reputation beyond reputebobhaha has a reputation beyond reputebobhaha has a reputation beyond reputebobhaha has a reputation beyond reputebobhaha has a reputation beyond reputebobhaha has a reputation beyond reputebobhaha has a reputation beyond reputebobhaha has a reputation beyond reputebobhaha has a reputation beyond reputebobhaha has a reputation beyond repute
bobhaha bobhaha is online now
Class 3B Laser
bobhaha's Avatar
 
Join Date: May 2009
Location: Sydney, Australia
Posts: 3,256
Rep Power: 3264
bobhaha has a reputation beyond reputebobhaha has a reputation beyond reputebobhaha has a reputation beyond reputebobhaha has a reputation beyond reputebobhaha has a reputation beyond reputebobhaha has a reputation beyond reputebobhaha has a reputation beyond reputebobhaha has a reputation beyond reputebobhaha has a reputation beyond reputebobhaha has a reputation beyond reputebobhaha has a reputation beyond repute
Default Re: Learning PHP - first app Laser divergence calculator

Looks good.... only thing was the clear button... does that refresh the page? From my tests all I can see is refreshing the page. Wouldn't it be better if it was to only clear the form not refresh the browser? I think that would be an issue in a much larger program.

Just food for thought.... but over all great job!
__________________
Lasers!
10.6um - >40W CO2 Laser - 25W RF excited CO2 Laser*
685nm - Being built!
660nm - 250mW LOC PowerLight B50 Host - 100mW WL pulsar
635nm - 430mW C6 Host*
632.8nm - Red He-Ne laser ~1mW
593.5nm - Regal 5
542.8nm - Green He-Ne laser ~2.5mW
532nm - 620mW+ lasersman Firedragon III* - 100mW PGL-III-M from JETLASERS* - 70mW Rayfoss Host*
~~~ - 175mW Rayfoss Host - <5mW WL Core - 55mW DinoDirect review laser*

488nm - On the hoist
473nm - 2x CNI lab lasers ~40mW
445nm - 3W Big Boyz Laser - >1.1W Cree C6 Host - 650mW WL Arctic
405nm - 65mW GLP-405 Aquarius host - 160mW 6x Blu-ray MXDL Host
Total: 71,868.5 mW

Goggles!
Laser glow LSG-532-Sport protective eye goggles OD 7+ 190-532nm HIGHLY RECOMMENDED!!
Jetlasers wrap around 190-540nm OD4+ goggles*
Eagle Pair Red OD4+ goggles
Scopeguy20 Blublockers for 405nm lasers!

* indicates a review has been done, on this item.

Check out my How to Build a Selectable Dummy Load Thread!
bobhaha is online now   Reply With Quote
Old 06-03-2010, 09:55 AM #13
Junior Member
 
Join Date: Apr 2010
Posts: 24
Rep Power: 0
flagpole is just really niceflagpole is just really niceflagpole is just really niceflagpole is just really niceflagpole is just really nice
flagpole flagpole is offline
Junior Member
 
Join Date: Apr 2010
Posts: 24
Rep Power: 0
flagpole is just really niceflagpole is just really niceflagpole is just really niceflagpole is just really niceflagpole is just really nice
Default Re: Learning PHP - first app Laser divergence calculator

Quote:
Originally Posted by bobhaha View Post
Looks good.... only thing was the clear button... does that refresh the page? From my tests all I can see is refreshing the page. Wouldn't it be better if it was to only clear the form not refresh the browser? I think that would be an issue in a much larger program.

Just food for thought.... but over all great job!
yeah that is sort of what it does yes. the effect of the clear button is to post the form, to itself and then it renders as if it were the first time.

there may well be a much easier way of clearing a form, just nobody told me what it is.
flagpole is offline   Reply With Quote
Old 06-03-2010, 10:05 AM #14
bobhaha's Avatar
Class 3B Laser
 
Join Date: May 2009
Location: Sydney, Australia
Posts: 3,256
Rep Power: 3264
bobhaha has a reputation beyond reputebobhaha has a reputation beyond reputebobhaha has a reputation beyond reputebobhaha has a reputation beyond reputebobhaha has a reputation beyond reputebobhaha has a reputation beyond reputebobhaha has a reputation beyond reputebobhaha has a reputation beyond reputebobhaha has a reputation beyond reputebobhaha has a reputation beyond reputebobhaha has a reputation beyond repute
bobhaha bobhaha is online now
Class 3B Laser
bobhaha's Avatar
 
Join Date: May 2009
Location: Sydney, Australia
Posts: 3,256
Rep Power: 3264
bobhaha has a reputation beyond reputebobhaha has a reputation beyond reputebobhaha has a reputation beyond reputebobhaha has a reputation beyond reputebobhaha has a reputation beyond reputebobhaha has a reputation beyond reputebobhaha has a reputation beyond reputebobhaha has a reputation beyond reputebobhaha has a reputation beyond reputebobhaha has a reputation beyond reputebobhaha has a reputation beyond repute
Default Re: Learning PHP - first app Laser divergence calculator

Can't you just clear input field? I know in c++ there's a function called system("clrscr") and that clears the screen... there has to be one for clearing the input values...
__________________
Lasers!
10.6um - >40W CO2 Laser - 25W RF excited CO2 Laser*
685nm - Being built!
660nm - 250mW LOC PowerLight B50 Host - 100mW WL pulsar
635nm - 430mW C6 Host*
632.8nm - Red He-Ne laser ~1mW
593.5nm - Regal 5
542.8nm - Green He-Ne laser ~2.5mW
532nm - 620mW+ lasersman Firedragon III* - 100mW PGL-III-M from JETLASERS* - 70mW Rayfoss Host*
~~~ - 175mW Rayfoss Host - <5mW WL Core - 55mW DinoDirect review laser*

488nm - On the hoist
473nm - 2x CNI lab lasers ~40mW
445nm - 3W Big Boyz Laser - >1.1W Cree C6 Host - 650mW WL Arctic
405nm - 65mW GLP-405 Aquarius host - 160mW 6x Blu-ray MXDL Host
Total: 71,868.5 mW

Goggles!
Laser glow LSG-532-Sport protective eye goggles OD 7+ 190-532nm HIGHLY RECOMMENDED!!
Jetlasers wrap around 190-540nm OD4+ goggles*
Eagle Pair Red OD4+ goggles
Scopeguy20 Blublockers for 405nm lasers!

* indicates a review has been done, on this item.

Check out my How to Build a Selectable Dummy Load Thread!
bobhaha is online now   Reply With Quote
Old 06-03-2010, 05:43 PM #15
Trevor's Avatar
Class 3B Laser
 
Join Date: Jul 2009
Location: Boulder, CO
Posts: 4,510
Rep Power: 19710
Trevor has a reputation beyond reputeTrevor has a reputation beyond reputeTrevor has a reputation beyond reputeTrevor has a reputation beyond reputeTrevor has a reputation beyond reputeTrevor has a reputation beyond reputeTrevor has a reputation beyond reputeTrevor has a reputation beyond reputeTrevor has a reputation beyond reputeTrevor has a reputation beyond reputeTrevor has a reputation beyond repute
Trevor Trevor is offline
Class 3B Laser
Trevor's Avatar
 
Join Date: Jul 2009
Location: Boulder, CO
Posts: 4,510
Rep Power: 19710
Trevor has a reputation beyond reputeTrevor has a reputation beyond reputeTrevor has a reputation beyond reputeTrevor has a reputation beyond reputeTrevor has a reputation beyond reputeTrevor has a reputation beyond reputeTrevor has a reputation beyond reputeTrevor has a reputation beyond reputeTrevor has a reputation beyond reputeTrevor has a reputation beyond reputeTrevor has a reputation beyond repute
Default Re: Learning PHP - first app Laser divergence calculator

If you want to clear the boxes without reloading the page, you could take a look at Javascript.

Code:
document.getElementById('id').value = "";
-Trevor
__________________
Code:
23:10 <ARG>    nothing has blown up yet :)
23:10 <Trevor> that is a distressingly low standard for success
Trevor is offline   Reply With Quote
Old 06-04-2010, 10:22 AM #16
Junior Member
 
Join Date: Apr 2010
Posts: 24
Rep Power: 0
flagpole is just really niceflagpole is just really niceflagpole is just really niceflagpole is just really niceflagpole is just really nice
flagpole flagpole is offline
Junior Member
 
Join Date: Apr 2010
Posts: 24
Rep Power: 0
flagpole is just really niceflagpole is just really niceflagpole is just really niceflagpole is just really niceflagpole is just really nice
Default Re: Learning PHP - first app Laser divergence calculator

the form is just a regular HTML form that posts to the page itself. php then checks if the calculate button is set and displays the form with the values and does the calculation, if it hasn't, or the clear button is set then it just displays the form empty.

i will come back to it if i learn anything i think i can use.
flagpole is offline   Reply With Quote
Reply





Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

























Privacy Policy | Advertising Disclaimer | Terms of Use


 


All times are GMT. The time now is 04:23 PM.


Powered by: vBulletin
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO
Privacy Policy | Advertising Disclaimer | Terms of Use
Copyright (C) 2017 Laser Pointer Forums, LLC