• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EST 21:10
CET 03:10
KST 11:10
  • Home
  • Forum
  • Calendar
  • Streams
  • Liquipedia
  • Features
  • Store
  • EPT
  • TL+
  • StarCraft 2
  • Brood War
  • Smash
  • Heroes
  • Counter-Strike
  • Overwatch
  • Liquibet
  • Fantasy StarCraft
  • TLPD
  • StarCraft 2
  • Brood War
  • Blogs
Forum Sidebar
Events/Features
News
Featured News
RSL Season 3 - Playoffs Preview0RSL Season 3 - RO16 Groups C & D Preview0RSL Season 3 - RO16 Groups A & B Preview2TL.net Map Contest #21: Winners12Intel X Team Liquid Seoul event: Showmatches and Meet the Pros10
Community News
Weekly Cups (Nov 24-30): MaxPax, Clem, herO win2BGE Stara Zagora 2026 announced15[BSL21] Ro.16 Group Stage (C->B->A->D)4Weekly Cups (Nov 17-23): Solar, MaxPax, Clem win3RSL Season 3: RO16 results & RO8 bracket13
StarCraft 2
General
BGE Stara Zagora 2026 announced Weekly Cups (Nov 24-30): MaxPax, Clem, herO win SC2 Proleague Discontinued; SKT, KT, SGK, CJ disband Information Request Regarding Chinese Ladder SC: Evo Complete - Ranked Ladder OPEN ALPHA
Tourneys
$5,000+ WardiTV 2025 Championship Constellation Cup - Main Event - Stellar Fest RSL Revival: Season 3 Tenacious Turtle Tussle [Alpha Pro Series] Nice vs Cure
Strategy
Custom Maps
Map Editor closed ?
External Content
Mutation # 502 Negative Reinforcement Mutation # 501 Price of Progress Mutation # 500 Fright night Mutation # 499 Chilling Adaptation
Brood War
General
Which season is the best in ASL? [ASL20] Ask the mapmakers — Drop your questions BW General Discussion FlaSh's Valkyrie Copium BGH Auto Balance -> http://bghmmr.eu/
Tourneys
[Megathread] Daily Proleagues [BSL21] RO16 Group B - Sunday 21:00 CET [BSL21] RO16 Group C - Saturday 21:00 CET Small VOD Thread 2.0
Strategy
Game Theory for Starcraft How to stay on top of macro? Current Meta PvZ map balance
Other Games
General Games
Stormgate/Frost Giant Megathread The Perfect Game Path of Exile Nintendo Switch Thread Should offensive tower rushing be viable in RTS games?
Dota 2
Official 'what is Dota anymore' discussion
League of Legends
Heroes of the Storm
Simple Questions, Simple Answers Heroes of the Storm 2.0
Hearthstone
Deck construction bug Heroes of StarCraft mini-set
TL Mafia
Mafia Game Mode Feedback/Ideas TL Mafia Community Thread
Community
General
Russo-Ukrainian War Thread Things Aren’t Peaceful in Palestine US Politics Mega-thread The Big Programming Thread Artificial Intelligence Thread
Fan Clubs
White-Ra Fan Club
Media & Entertainment
[Manga] One Piece Movie Discussion! Anime Discussion Thread
Sports
2024 - 2026 Football Thread Formula 1 Discussion NBA General Discussion
World Cup 2022
Tech Support
Computer Build, Upgrade & Buying Resource Thread
TL Community
Where to ask questions and add stream? The Automated Ban List
Blogs
James Bond movies ranking - pa…
Topin
Esports Earnings: Bigger Pri…
TrAiDoS
Thanks for the RSL
Hildegard
Saturation point
Uldridge
Customize Sidebar...

Website Feedback

Closed Threads



Active: 1400 users

The Big Programming Thread - Page 369

Forum Index > General Forum
Post a Reply
Prev 1 367 368 369 370 371 1032 Next
Thread Rules
1. This is not a "do my homework for me" thread. If you have specific questions, ask, but don't post an assignment or homework problem and expect an exact solution.
2. No recruiting for your cockamamie projects (you won't replace facebook with 3 dudes you found on the internet and $20)
3. If you can't articulate why a language is bad, don't start slinging shit about it. Just remember that nothing is worse than making CSS IE6 compatible.
4. Use [code] tags to format code blocks.
Abominous
Profile Joined March 2013
Croatia1625 Posts
October 07 2013 17:24 GMT
#7361
On October 07 2013 10:46 NB wrote:
hmmm, i signed up for the machine learning one of the Stanford prof. Are you sure its lighter bc thats the reason why i signed up . I dont think i will need knowledge from that field for my current project but I might as well try it out.

Professor Ng breaks it down for you very well so you won't be needing more than highschool mathematics, he might use some more "complicated" mathemathical symbols and methods (they really aren't complicated, you might find them so, I really don't know anything about your education level) but he stresses out very often that you shouldn't be afraid of such things and he always breaks them down very, very well, to a point where's its becoming a bit to tedious hehe.


I hope you find the course entertaining!
3FFA
Profile Blog Joined February 2010
United States3931 Posts
October 07 2013 20:26 GMT
#7362
Ok I've started CS 184.1x: Foundations of Computer Graphics. Under the username FFA. With C, Obj. C, and Java experience I should theoretically have no problem learning C++
"As long as it comes from a pure place and from a honest place, you know, you can write whatever you want."
NB
Profile Blog Joined February 2010
Netherlands12045 Posts
October 07 2013 20:27 GMT
#7363
On October 08 2013 02:24 Abominous wrote:
Show nested quote +
On October 07 2013 10:46 NB wrote:
hmmm, i signed up for the machine learning one of the Stanford prof. Are you sure its lighter bc thats the reason why i signed up . I dont think i will need knowledge from that field for my current project but I might as well try it out.

Professor Ng breaks it down for you very well so you won't be needing more than highschool mathematics, he might use some more "complicated" mathemathical symbols and methods (they really aren't complicated, you might find them so, I really don't know anything about your education level) but he stresses out very often that you shouldn't be afraid of such things and he always breaks them down very, very well, to a point where's its becoming a bit to tedious hehe.


I hope you find the course entertaining!

Oh im not worried bc i have pretty decent math cs background, Im just afraid the course load might be a bit too heavy for me to complete it with a good grade. Im taking a quick look at the Graphic homeworks in the other course so far and there will be a lot of code reading that ima have to goes through. Plus i dont wana rely on wolfram to do all my matrixes so I probably need like a week of concentrating review on 1st year algebra T_T

Unrelated note: spent my entire morning trying to make a basic input system for a simple test game. Turns out C++ doesnt support event handling I googled and people said i should try SFML or SDL. Anyone here experienced with both and tell me whats the differences between the 2?
Im daed. Follow me @TL_NB
Nesserev
Profile Blog Joined January 2011
Belgium2760 Posts
October 07 2013 20:45 GMT
#7364
--- Nuked ---
NB
Profile Blog Joined February 2010
Netherlands12045 Posts
Last Edited: 2013-10-07 21:38:30
October 07 2013 21:20 GMT
#7365
On October 07 2013 12:39 goody153 wrote:
hi everyone,

i am not really good and just an noob-to-okish programmer .. i wanted to try game development on android .. do you guys have any advice for me ?

and also what language should i be learning ? what are the most important topics i should focus on ? from what i know java is used in making android but thats all i know for now ..

i already made games out of applet using java and also a game web-based using javascript .. so i have a little bit of experience and idea how ..

oh dont quote me on this bc i dont have a lot of on hand experience in android app making.I looked into it in the past as well as having my roommate's gf working in Twitter's android apps department.

Here is a few things:
1/ Compatibility is a big issue for android. Each devices has their own attribute and you have to accommodate for all of them. It is advised that you should start with making apps for apple devices since they are more uniformed.

2/ For mobile devices in general, java, ruby on rails and basic knowledge about html/css and even a bit of SQL are needed. Most smartphone apps has interaction with web and database(loading ads or google store for example)....

3/ Experience android devices yourselves. Bluestack is a good emulator for android on window that im using. Nexus 4 and Nexus 7 are dirt cheap that you could get your hand on. The Android apps market is unexplored and dirt poor of good apps if you compare it to Apple's store. And there is a good reason for that: its easier to make apple apps and people who use apple devices are more likely to pay for apps.

4/ Lastly, for gaming in mobile device in general, just keep in mind that the input system sucks ass. Unless you are making a very simple game and expecting to make graphic your selling point, then you gona have to spend a lot of design time into the input interaction.

On October 08 2013 05:45 Nesserev wrote:
Don't have any direct experience with either one of them, but I've used the pygame library for python before, and if I remember correctly, pygame is an implementation of SDL as a Python library, and I must say that it was fun to work with. Of course it's not really the same, but if I were you, I'd just pick one and try it out.

like right now I have a text based command line minesweeper right? I just wana write a basic up-down-left-right cursor(not mouse) control instead of entering the coordinates manually. So that will involve a basic infinite loop do{}while(1) that constantly redraw the game. What i need is something that read the input value on keypress, not keypress+Enter and I really hate using additional library.

edit: gota it sorta work with sfml.... really rough though >.>
Im daed. Follow me @TL_NB
tec27
Profile Blog Joined June 2004
United States3702 Posts
October 08 2013 04:19 GMT
#7366
On October 08 2013 06:20 NB wrote:
Show nested quote +
On October 07 2013 12:39 goody153 wrote:
hi everyone,

i am not really good and just an noob-to-okish programmer .. i wanted to try game development on android .. do you guys have any advice for me ?

and also what language should i be learning ? what are the most important topics i should focus on ? from what i know java is used in making android but thats all i know for now ..

i already made games out of applet using java and also a game web-based using javascript .. so i have a little bit of experience and idea how ..

oh dont quote me on this bc i dont have a lot of on hand experience in android app making.I looked into it in the past as well as having my roommate's gf working in Twitter's android apps department.

Here is a few things:
1/ Compatibility is a big issue for android. Each devices has their own attribute and you have to accommodate for all of them. It is advised that you should start with making apps for apple devices since they are more uniformed.

2/ For mobile devices in general, java, ruby on rails and basic knowledge about html/css and even a bit of SQL are needed. Most smartphone apps has interaction with web and database(loading ads or google store for example)....

3/ Experience android devices yourselves. Bluestack is a good emulator for android on window that im using. Nexus 4 and Nexus 7 are dirt cheap that you could get your hand on. The Android apps market is unexplored and dirt poor of good apps if you compare it to Apple's store. And there is a good reason for that: its easier to make apple apps and people who use apple devices are more likely to pay for apps.

4/ Lastly, for gaming in mobile device in general, just keep in mind that the input system sucks ass. Unless you are making a very simple game and expecting to make graphic your selling point, then you gona have to spend a lot of design time into the input interaction.

Your advice is basically all bad.

1) Android devices are certainly less uniform than Apple devices, but its not that hard to make an app that looks decent across a large part of the population. While the market is fragmented, there are a few devices that take up the lion's share of the market. Namely, the Samsung flagships (S2, S3, S4, Note 2, Note 3) and Nexus devices. Android also has good mechanisms for scaling layouts and resources across device sizes and resolutions, so if you stick to best practices (like specifying sizes in DPs, etc.), its not a problem. Its certainly not a reason to avoid the platform altogether and work on iOS apps. The major pain point is working with Gingerbread and below, but if you're just developing apps as a hobby you can just choose a higher minimum version and sidestep the problem completely.

2) Ruby on Rails? What the fuck does that have to do with Android? Java is the only really necessary piece here. SQL knowledge can be a nice to have, depending on how much data you are going to be storing and what your persistence requirements are. Android has its own layout and style system that's written in XML. Its *somewhat* similar to HTML, but not really. Overall its fairly easy to get started with. Depending on what your app is doing, you may want to develop an API server that your app can talk to, but you can write this in whatever language you damn well please. Or you could use something like Parse to make your life easier.

3) Using something like Bluestacks is a bad idea if you're using it to develop your app and trying to test it on hardware that you don't actually have. That sort of software targets running apps on a PC, not simulating actual hardware interactions. Use the actual emulator that's provided with Android, it works fine and is actually targeted at developers. But overall, developing on an emulator will be mostly frustrating, so buy a cheap Android device or two and use those for your day-to-day work, only going to the emulator when you absolutely need to.

4) Completely game/application type dependent. Obviously you should design applications that work well on the devices they run on.

To reply to you directly, goody:
- Learn Java
- Learn OpenGL ES 2.0 (if you have more JS experience than Java, you could play around with WebGL in the browser, which has the same API)
- Check out the Android developers traininig site: http://developer.android.com/training/index.html
Can you jam with the console cowboys in cyberspace?
NB
Profile Blog Joined February 2010
Netherlands12045 Posts
October 08 2013 06:09 GMT
#7367
you are completely right. I might have got a lot of stuff confused and outdated information about the android field. There is one thing i notice though: a lot of "popular games" on android are actually web-based. The app is sole used to launch the URL and pass over some user data to the browser. I feel cheated whenever i download a game like that .

Im daed. Follow me @TL_NB
Tobberoth
Profile Joined August 2010
Sweden6375 Posts
October 08 2013 06:46 GMT
#7368
On October 08 2013 06:20 NB wrote:
like right now I have a text based command line minesweeper right? I just wana write a basic up-down-left-right cursor(not mouse) control instead of entering the coordinates manually. So that will involve a basic infinite loop do{}while(1) that constantly redraw the game. What i need is something that read the input value on keypress, not keypress+Enter and I really hate using additional library.

edit: gota it sorta work with sfml.... really rough though >.>

SFML is actually surprisingly easy to work with in my opinion. It's not quite as simple as SDL, but it's also far more powerful. Implementing keyboard input should be no problem at all, the Keyboard class is spot on.
sluggaslamoo
Profile Blog Joined November 2009
Australia4494 Posts
October 08 2013 07:55 GMT
#7369
On October 08 2013 13:19 tec27 wrote:
Show nested quote +
On October 08 2013 06:20 NB wrote:
On October 07 2013 12:39 goody153 wrote:
hi everyone,

i am not really good and just an noob-to-okish programmer .. i wanted to try game development on android .. do you guys have any advice for me ?

and also what language should i be learning ? what are the most important topics i should focus on ? from what i know java is used in making android but thats all i know for now ..

i already made games out of applet using java and also a game web-based using javascript .. so i have a little bit of experience and idea how ..

oh dont quote me on this bc i dont have a lot of on hand experience in android app making.I looked into it in the past as well as having my roommate's gf working in Twitter's android apps department.

Here is a few things:
1/ Compatibility is a big issue for android. Each devices has their own attribute and you have to accommodate for all of them. It is advised that you should start with making apps for apple devices since they are more uniformed.

2/ For mobile devices in general, java, ruby on rails and basic knowledge about html/css and even a bit of SQL are needed. Most smartphone apps has interaction with web and database(loading ads or google store for example)....

3/ Experience android devices yourselves. Bluestack is a good emulator for android on window that im using. Nexus 4 and Nexus 7 are dirt cheap that you could get your hand on. The Android apps market is unexplored and dirt poor of good apps if you compare it to Apple's store. And there is a good reason for that: its easier to make apple apps and people who use apple devices are more likely to pay for apps.

4/ Lastly, for gaming in mobile device in general, just keep in mind that the input system sucks ass. Unless you are making a very simple game and expecting to make graphic your selling point, then you gona have to spend a lot of design time into the input interaction.

Your advice is basically all bad.

1) Android devices are certainly less uniform than Apple devices, but its not that hard to make an app that looks decent across a large part of the population. While the market is fragmented, there are a few devices that take up the lion's share of the market. Namely, the Samsung flagships (S2, S3, S4, Note 2, Note 3) and Nexus devices. Android also has good mechanisms for scaling layouts and resources across device sizes and resolutions, so if you stick to best practices (like specifying sizes in DPs, etc.), its not a problem. Its certainly not a reason to avoid the platform altogether and work on iOS apps. The major pain point is working with Gingerbread and below, but if you're just developing apps as a hobby you can just choose a higher minimum version and sidestep the problem completely.

2) Ruby on Rails? What the fuck does that have to do with Android? Java is the only really necessary piece here. SQL knowledge can be a nice to have, depending on how much data you are going to be storing and what your persistence requirements are. Android has its own layout and style system that's written in XML. Its *somewhat* similar to HTML, but not really. Overall its fairly easy to get started with. Depending on what your app is doing, you may want to develop an API server that your app can talk to, but you can write this in whatever language you damn well please. Or you could use something like Parse to make your life easier.

3) Using something like Bluestacks is a bad idea if you're using it to develop your app and trying to test it on hardware that you don't actually have. That sort of software targets running apps on a PC, not simulating actual hardware interactions. Use the actual emulator that's provided with Android, it works fine and is actually targeted at developers. But overall, developing on an emulator will be mostly frustrating, so buy a cheap Android device or two and use those for your day-to-day work, only going to the emulator when you absolutely need to.

4) Completely game/application type dependent. Obviously you should design applications that work well on the devices they run on.

To reply to you directly, goody:
- Learn Java
- Learn OpenGL ES 2.0 (if you have more JS experience than Java, you could play around with WebGL in the browser, which has the same API)
- Check out the Android developers traininig site: http://developer.android.com/training/index.html


Ruby can be used with Android apps if you use Titanium, also a lot of mobile APIs use Rails so maybe that's where he got it from.
Come play Android Netrunner - http://www.teamliquid.net/forum/viewmessage.php?topic_id=409008
goody153
Profile Blog Joined April 2013
44236 Posts
October 08 2013 09:32 GMT
#7370
On October 08 2013 13:19 tec27 wrote:
Show nested quote +
On October 08 2013 06:20 NB wrote:
On October 07 2013 12:39 goody153 wrote:
hi everyone,

i am not really good and just an noob-to-okish programmer .. i wanted to try game development on android .. do you guys have any advice for me ?

and also what language should i be learning ? what are the most important topics i should focus on ? from what i know java is used in making android but thats all i know for now ..

i already made games out of applet using java and also a game web-based using javascript .. so i have a little bit of experience and idea how ..

oh dont quote me on this bc i dont have a lot of on hand experience in android app making.I looked into it in the past as well as having my roommate's gf working in Twitter's android apps department.

Here is a few things:
1/ Compatibility is a big issue for android. Each devices has their own attribute and you have to accommodate for all of them. It is advised that you should start with making apps for apple devices since they are more uniformed.

2/ For mobile devices in general, java, ruby on rails and basic knowledge about html/css and even a bit of SQL are needed. Most smartphone apps has interaction with web and database(loading ads or google store for example)....

3/ Experience android devices yourselves. Bluestack is a good emulator for android on window that im using. Nexus 4 and Nexus 7 are dirt cheap that you could get your hand on. The Android apps market is unexplored and dirt poor of good apps if you compare it to Apple's store. And there is a good reason for that: its easier to make apple apps and people who use apple devices are more likely to pay for apps.

4/ Lastly, for gaming in mobile device in general, just keep in mind that the input system sucks ass. Unless you are making a very simple game and expecting to make graphic your selling point, then you gona have to spend a lot of design time into the input interaction.

Your advice is basically all bad.

1) Android devices are certainly less uniform than Apple devices, but its not that hard to make an app that looks decent across a large part of the population. While the market is fragmented, there are a few devices that take up the lion's share of the market. Namely, the Samsung flagships (S2, S3, S4, Note 2, Note 3) and Nexus devices. Android also has good mechanisms for scaling layouts and resources across device sizes and resolutions, so if you stick to best practices (like specifying sizes in DPs, etc.), its not a problem. Its certainly not a reason to avoid the platform altogether and work on iOS apps. The major pain point is working with Gingerbread and below, but if you're just developing apps as a hobby you can just choose a higher minimum version and sidestep the problem completely.

2) Ruby on Rails? What the fuck does that have to do with Android? Java is the only really necessary piece here. SQL knowledge can be a nice to have, depending on how much data you are going to be storing and what your persistence requirements are. Android has its own layout and style system that's written in XML. Its *somewhat* similar to HTML, but not really. Overall its fairly easy to get started with. Depending on what your app is doing, you may want to develop an API server that your app can talk to, but you can write this in whatever language you damn well please. Or you could use something like Parse to make your life easier.

3) Using something like Bluestacks is a bad idea if you're using it to develop your app and trying to test it on hardware that you don't actually have. That sort of software targets running apps on a PC, not simulating actual hardware interactions. Use the actual emulator that's provided with Android, it works fine and is actually targeted at developers. But overall, developing on an emulator will be mostly frustrating, so buy a cheap Android device or two and use those for your day-to-day work, only going to the emulator when you absolutely need to.

4) Completely game/application type dependent. Obviously you should design applications that work well on the devices they run on.

To reply to you directly, goody:
- Learn Java
- Learn OpenGL ES 2.0 (if you have more JS experience than Java, you could play around with WebGL in the browser, which has the same API)
- Check out the Android developers traininig site: http://developer.android.com/training/index.html


i am more knowledgeable in java than in JS .. one more thing i wanted to ask .. aside from OpenGL ES 2.0 or WebGL ..any other library that is easier to use and integrate unto the android program later ? since i am just making a Tower Defense game its really emphasized on the graphics much ..

and also i have been doing sort of research .. what version of android should i work on ? some told me to work on lower versions like 2.0 to 2.5 ... somewhere around that

and in the database part of the development .. would my knowledge on php help on that matter ? or its a separate thing

anyways thanks for the great advice tec27
this is a quote
NB
Profile Blog Joined February 2010
Netherlands12045 Posts
October 08 2013 10:04 GMT
#7371
https://github.com/LaurentGomila/SFML/wiki/Tutorials

not rly android or java but it has really nice guides on basic game design.
Im daed. Follow me @TL_NB
goody153
Profile Blog Joined April 2013
44236 Posts
October 08 2013 10:46 GMT
#7372
On October 08 2013 19:04 NB wrote:
https://github.com/LaurentGomila/SFML/wiki/Tutorials

not rly android or java but it has really nice guides on basic game design.


thanks .. does this include graphics design for game development ? so far the games i created looked like shit with just the basics of the PL i used
this is a quote
Tobberoth
Profile Joined August 2010
Sweden6375 Posts
October 08 2013 12:35 GMT
#7373
On October 08 2013 19:46 goody153 wrote:
Show nested quote +
On October 08 2013 19:04 NB wrote:
https://github.com/LaurentGomila/SFML/wiki/Tutorials

not rly android or java but it has really nice guides on basic game design.


thanks .. does this include graphics design for game development ? so far the games i created looked like shit with just the basics of the PL i used

SFML is just a library for working with graphics, it doesn't teach you design. SFML lets you work with open GL directly, or through a simple interface, but this is all just about how to get vertices to the graphics card and let it print them to screen. It won't teach you how to make good looking particle effects, how to paint a texture and anything like that.
Fawkes
Profile Blog Joined May 2010
Canada1935 Posts
October 08 2013 13:55 GMT
#7374
Not to hijack your conversation or anything, but I've been stuck on this php/javascript issue for the past week and I haven't gotten anywhere. Wondered if anyone would have any ideas on what I could do.

+ Show Spoiler +
http://forums.devnetwork.net/viewtopic.php?f=1&t=138460&p=688348#p688348


I have my entire thought process for the week kinda written there, I could rewrite it if someone hates outside links to other forums.
Taeyeon ~ Jennie ~ Seulgi ~ Irene @Fawkes711
goody153
Profile Blog Joined April 2013
44236 Posts
October 08 2013 14:21 GMT
#7375
On October 08 2013 22:55 Fawkes wrote:
Not to hijack your conversation or anything, but I've been stuck on this php/javascript issue for the past week and I haven't gotten anywhere. Wondered if anyone would have any ideas on what I could do.

+ Show Spoiler +
http://forums.devnetwork.net/viewtopic.php?f=1&t=138460&p=688348#p688348


I have my entire thought process for the week kinda written there, I could rewrite it if someone hates outside links to other forums.

you could also post this here

www.stackoverflow.com

there are a LOT of people/programming-guru who kill time here to solve programming problems of all kinds .. even the most complex ones .. the site above is basically like a hotline for problems
this is a quote
goody153
Profile Blog Joined April 2013
44236 Posts
Last Edited: 2013-10-08 14:51:15
October 08 2013 14:30 GMT
#7376
On October 08 2013 22:55 Fawkes wrote:
Not to hijack your conversation or anything, but I've been stuck on this php/javascript issue for the past week and I haven't gotten anywhere. Wondered if anyone would have any ideas on what I could do.

+ Show Spoiler +
http://forums.devnetwork.net/viewtopic.php?f=1&t=138460&p=688348#p688348


I have my entire thought process for the week kinda written there, I could rewrite it if someone hates outside links to other forums.


3 buttons in one form ?

hmm i havent tried that .. i dont think its possible to utilize 3 kinds of different submit buttons inside a form at least in php side of perspective .. what i do is i create 3 separate forms per submit button .. that way i am sure it works .. you could put all processes into one .php file but i think you cannot put 3 submit buttons unto one form ..

i just started playing with php so forgive me sir
this is a quote
Chaosvuistje
Profile Joined April 2010
Netherlands2581 Posts
October 08 2013 14:40 GMT
#7377
On October 08 2013 22:55 Fawkes wrote:
Not to hijack your conversation or anything, but I've been stuck on this php/javascript issue for the past week and I haven't gotten anywhere. Wondered if anyone would have any ideas on what I could do.

+ Show Spoiler +
http://forums.devnetwork.net/viewtopic.php?f=1&t=138460&p=688348#p688348


I have my entire thought process for the week kinda written there, I could rewrite it if someone hates outside links to other forums.


There's two ways you can fix this. Either on the Javascript side of things or the PHP side of things.

If you want to fix it with javascript, I think adding another button element rather than an input with a submit type would work. That way you can listen to clicks of the button element rather than having one global submit function checking it.

If you want to fix it with php, you could alter the submit buttons to contain name attributes. If you have three submit buttons and you want to check which one is pressed on the server side, you could change your form to look like this.

<form>
<input type="submit" value="button one" name="submit" />
<input type="submit" value="button two" name="submit" />
</form>

Then, on the server side, check the $_POST variable 'submit'. if($_POST['submit'] === "button one") { //do something } else if ($_POST['submit'] === "button two") { // do another thing }
hifriend
Profile Blog Joined June 2009
China7935 Posts
Last Edited: 2013-10-08 14:59:06
October 08 2013 14:56 GMT
#7378
Is anyone good with matlab? Or computational science in general for that matter? I want to calculate an integral numerically (simpsons method, trapezoidal, whatever), but I want the user to be able to specify the acceptable margin of error in correct decimals, and have the program adjust the number of intervals accordingly. I could just do the calculation at interval i = 1 and estimate the error (I used richardson extrapolation), then increment i until error < 10^(-something). But there must be some better way.
supereddie
Profile Joined March 2011
Netherlands151 Posts
Last Edited: 2013-10-08 16:23:19
October 08 2013 16:18 GMT
#7379
On October 08 2013 22:55 Fawkes wrote:
Not to hijack your conversation or anything, but I've been stuck on this php/javascript issue for the past week and I haven't gotten anywhere. Wondered if anyone would have any ideas on what I could do.

+ Show Spoiler +
http://forums.devnetwork.net/viewtopic.php?f=1&t=138460&p=688348#p688348


I have my entire thought process for the week kinda written there, I could rewrite it if someone hates outside links to other forums.

Just use another form method for modify than for create?

That is, use method="post" for creating, and method="put" for updating/replacing.

In case you also want a delete, use method="delete"
"Do not try to make difficult things possible, but make simple things simple." - David Platt on Software Design
NB
Profile Blog Joined February 2010
Netherlands12045 Posts
October 08 2013 19:08 GMT
#7380
Im trying to make a simple snake game. Do i really need to make 3 threads (mainDisplay, snakeRun, input) for it or there is a way that i could get away with 2?
Im daed. Follow me @TL_NB
Prev 1 367 368 369 370 371 1032 Next
Please log in or register to reply.
Live Events Refresh
PiGosaur Monday
01:00
#60
PiGStarcraft600
SteadfastSC114
CranKy Ducklings82
rockletztv 18
Liquipedia
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
PiGStarcraft600
SteadfastSC 114
Nathanias 75
StarCraft: Brood War
Artosis 777
League of Legends
C9.Mang0337
Counter-Strike
minikerr34
Other Games
summit1g12638
Day[9].tv854
JimRising 467
taco 157
ViBE121
Mew2King39
CosmosSc2 31
Organizations
Other Games
gamesdonequick1109
StarCraft 2
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
sctven
[ Show 14 non-featured ]
StarCraft 2
• Hupsaiya 69
• AfreecaTV YouTube
• intothetv
• Kozan
• IndyKCrew
• LaughNgamezSOOP
• Migwel
• sooper7s
StarCraft: Brood War
• Azhi_Dahaki1
• BSLYoutube
• STPLYoutube
• ZZZeroYoutube
Other Games
• Scarra1561
• Day9tv854
Upcoming Events
Wardi Open
9h 50m
StarCraft2.fi
14h 50m
Replay Cast
21h 50m
The PondCast
1d 7h
OSC
1d 13h
Demi vs Mixu
Nicoract vs TBD
Babymarine vs MindelVK
ForJumy vs TBD
Shameless vs Percival
Replay Cast
1d 21h
Korean StarCraft League
3 days
CranKy Ducklings
3 days
SC Evo League
3 days
BSL 21
3 days
Sziky vs OyAji
Gypsy vs eOnzErG
[ Show More ]
OSC
3 days
Solar vs Creator
ByuN vs Gerald
Percival vs Babymarine
Moja vs Krystianer
EnDerr vs ForJumy
sebesdes vs Nicoract
Sparkling Tuna Cup
4 days
OSC
4 days
BSL 21
4 days
Bonyth vs StRyKeR
Tarson vs Dandy
Replay Cast
5 days
Wardi Open
5 days
StarCraft2.fi
5 days
Replay Cast
5 days
StarCraft2.fi
6 days
PiGosaur Monday
6 days
Liquipedia Results

Completed

Proleague 2025-11-30
RSL Revival: Season 3
Light HT

Ongoing

C-Race Season 1
IPSL Winter 2025-26
KCM Race Survival 2025 Season 4
YSL S2
BSL Season 21
CSCL: Masked Kings S3
Slon Tour Season 2
Acropolis #4 - TS3
META Madness #9
SL Budapest Major 2025
ESL Impact League Season 8
BLAST Rivals Fall 2025
IEM Chengdu 2025
PGL Masters Bucharest 2025
Thunderpick World Champ.
CS Asia Championships 2025
ESL Pro League S22
StarSeries Fall 2025
FISSURE Playground #2

Upcoming

BSL 21 Non-Korean Championship
Acropolis #4
IPSL Spring 2026
Bellum Gens Elite Stara Zagora 2026
HSC XXVIII
RSL Offline Finals
WardiTV 2025
Kuram Kup
PGL Cluj-Napoca 2026
IEM Kraków 2026
BLAST Bounty Winter 2026
BLAST Bounty Winter Qual
eXTREMESLAND 2025
TLPD

1. ByuN
2. TY
3. Dark
4. Solar
5. Stats
6. Nerchio
7. sOs
8. soO
9. INnoVation
10. Elazer
1. Rain
2. Flash
3. EffOrt
4. Last
5. Bisu
6. Soulkey
7. Mini
8. Sharp
Sidebar Settings...

Advertising | Privacy Policy | Terms Of Use | Contact Us

Original banner artwork: Jim Warren
The contents of this webpage are copyright © 2025 TLnet. All Rights Reserved.