Forum Replies Created

SapnaVishwas Member

The mysql_fetch_assoc is handy if you extract your data and want access to them by the row-name. eg. Say result is the returned result of your query on a table containing name and age
data=mysql_fetch_rowresult; will be an array on which your data can be accessed as data0 and data1

data=mysql_fetch_assocresult; will be an array on which your data can be accessed as dataname and dataage

I hope this will help you solve the problem.

SapnaVishwas Member

Well first things first if you don’t want to or don’t feel like becoming a game programmer and like the game industry – you can always focus on game design. Without designers (and community) the balance of the games would easily fail (as it still happens here and there).

Next, the effort and the prize depend on your personality. For example, I’ve never finished the games I had passion for when I started learning things about game development, but I’ve encountered number of problems and learned from each of them. If it’s about the destination in your case, I reckon you’ll die before getting there, if it’s about the journey then by all means, go for it.

Back to your concept

something like Angry Birds, for example

Since it’s a 2D game that would shorten the time and decrease the number of potential bugs by a lot. I can’t recommend you anything for PSV because I’ve never tried developing for that platform, however I do have quite the list when it comes to C# OOP or C# Game development.

For finale – in order to ignite the spark inside you and show you the easier and happier side of development, I advise you to give XNA studios a try. It’s Microsoft-developed plugin for .NET and it features support for Windows and Xbox games development. It’s by far the easiest IDE for starters.

Let me draw your attention to this website:

http://www.riemers.net

These tutorials are understandable and take around 2 hours to finish (certainly less than a day), but the greatest thing – YOU GET A FINISHED PLAYABLE GAME when you finish each of them! These games are probably not what you imagined but they show you the process of developing.

NOTE: Bear in mind that the development in Riemers’ tutorials isn’t developing from scratch, as you use finished models, HLSL, and pre-built functions

SapnaVishwas Member

Question 1:

Play around with the “location” on the Form 1’s properties:
(it’s 0,0 by default)

Question 3:

I would imagine you’d have to create a method that does something like this:

record initial position in the x axis and in the y axis

record final position in both the x and y axis

then do:

final position – initial position (for both axis)

then

use the initial position and then add the difference of the final position – initial position

and that’s the distance you’ll crop for your image

Question 4:

I only know how to do this with open forms and it’s in the “KeyPress” event of the form

SapnaVishwas Member

In C++ and C# we just put the name of the variable like this:

var x;
switch(x)
{
case 1: //in case the user has assigned the value 1 to the X variable
//code goes here

break;

case 2: ....

}

(you change the “case ______” and add whatever you’d like, as long as it’s the same type of the variable declared)

SapnaVishwas Member

I don’t know of any books, but I can give other advice.

Find a cheap host that supports PHP and MySQL.

Test out PHP software on there. Set things up, back them up, download the backups, delete them off the server, restore.
Try different ways of backing different software up.

As for learning to program, there are a bunch of resources out there, and even in this forum.

Really, the best way I’ve found to learn how to administrate servers, is to actually administrate a server. Even if it’s your own linux box that you have nginx running on, that’s totally fine. Apache isn’t the only web server software out there.

SapnaVishwas Member

Why do people always suggest the same website time and time again – yes, it’s useful as a reference, but that’s it. You certainly should not consider using it as your learning foundation. w3fools provides a pretty good explanation as to why.

Also, please note W3Schools has IS NOT related to W3C! This is a common misconception!!!

If you’re starting from scratch the best bet is to give yourself a task, you can read ebooks and watch youtube tutorials all day long, the only thing that happens is this “gibberish” will translate to nothing after a few weeks as it’ll be committed to short term memory only; programming is not something you pickup instantly.

I would suggest setting yourself a task by pretending you’re a client:

“I would like a website with a gradient background of your choice, with a nice rounded-border navigation menu with a basic content area and a twitter feed to show latest tweets”.

That way, you can relate to it as a real-world problem, and as you try to figure these things out, you’ll find yourself naturally asking Google “hey – how do I do this?” and yes, you may come across W3schools which is okay, but try to consult other resources too and not just “the first link” you find that Google provides.

For php, create the design and set yourself another task: “also, I would like to be able to create/delete blog posts on a separate page for my readers to view and comment on”.

After this project is complete, you should leave with a better skill set than before you started – good luck!

in reply to: Starting with C#?
SapnaVishwas Member

Like I said in your other post you should give XNA and Riemers’ tutorials a try. They’re quite easy and you get a playable game at the end which is probably the most interesting to you.

http://www.riemers.net

SapnaVishwas Member

Actually, this can be counter-effective. If you think of some specific project, it often tends to be a lot more complex than you anticipate at first. This means that you won’t be able to achieve your goal in the first few months, maybe not even in a year. Or maybe you finish something but it doesn’t turn out so well since you didn’t have much experience. That usually makes people give up. For me the effective method of learning has always been: “That language/SDK/approach/subject is cool/fun! I’ll try messing with that a bit.”. This causes you to feel more like you moved forward, rather than the distance to your goal reduced from 10^10 to (10^10)-1.

Unless your initials goal are small. That’ll work. But people who think like “I want to make a new GTA!” usually burn out in a few days.

SapnaVishwas Member

I quit using Dreamweaver 2 years ago. To be honest, Notepad++ is far enough for almost everything. It has plugins which can extend the functionality of Notepad++.

For working with PHP you should look into NuSphere PHP IDE. It is in the class of its own.
Working with dual or even quad screen will almost always increase your productivity.

*assumption*
But since you are talking about learning and what tools to use – I would also recommend, that one of the best and most important thing when it comes to learning is discipline. Schedule x number of hours on daily basis at fixed time – that will work better than random schedule.

SapnaVishwas Member

I’m not sure if you understand what you are asking, but here you go:

int fahr = 0;

do
{
    cels = (double) (5.0 / 9 * (fahr - 32));
    System.out.println("Fahrenheit: " + Math.round(fahr) + " to " + "Celsius: " + df.format(cels));

    fahr += 20;
}
while (fahr <= 300);

You don't need a do/while loop here, a while loop or your current loop would work just fine. A do/while loop is a loop that executes ONCE no matter if the condition is false or true. In your case, your while condition will remain true for quite a time.

A better explanation would be that a While loop checks the condition before looping, a do while loop checks the condition after looping

SapnaVishwas Member

I found the solution but there’s something else that is bugging me now

load( 'res/leaders.xml' );

$masterElement = $retriever->documentElement;

$masterContent = $masterElement->getElementsByTagName('user')->item(0);

$oldContent = $masterElement->removeChild($masterContent );

echo $retriever->saveXML();
echo $retriever->save( 'res/leaders.xml' );
?>

This delete each record as I refresh it each time, isn’t there a way to delete all at once or create a table where I can tick off to delete each record? and after I deleted all the records isn’t there a way to tell me there are no more records and link me back to the index? in place of getting the error

SapnaVishwas Member

ou put that php code as a function but you never actually call that function. Unless there is more code you didn’t post here. Try this:

if(isset($_POST['submit']))
{
$array[counter] = $_POST['random'];
$counter+=1;
}
else // resetting array
{
$counter = 0;
$array = array();
}

And make sure you clean anything that comes from user input. Although I have no clue what you will do with the data from the input, but it`s best to get the habit of closing security issues right away.

SapnaVishwas Member

You can go with Visual Studio – .NET with a database.

in reply to: Unix Inerview Help!
SapnaVishwas Member

You can grab a copy of virtualbox and download the CentOS ISO and install it on there to play around with it on a virtual machine. They probably won’t expect you to know everything right off the bat because if they did, they would have interviewed you on all of that to see if you have knowledge of it. It’s not too hard to learn though. Good luck!

in reply to: How to Start with C#?
SapnaVishwas Member

C# is a pretty good starting language for game development.
Look into OpenTK:
http://www.opentk.com/
If you decide that you don’t like it, give Python a try.

Viewing 15 posts - 31 through 45 (of 156 total)
en_USEnglish