Forum Replies Created

in reply to: Starting with C#?
Amit 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.

Also, don’t worry about the graphics too much. A good game doesn’t need good graphics, just good game play. The graphics can come later.

Amit Member

I’m not a fan of math. I’m currently in pre-calculus (level prior to the AP Calculus classes) and I’m getting a B in the class. However, I love computers with a passion that’s indescribable to me.

My dream is to become a programmer, but I’m unaware of what the challenges regarding math will be. I plan on taking AP Computer Science next year, which mainly focuses on Java. The summer homework for that class is asking questions such as what is the relation of software with hardware, or list and describe the necessary components for a working computer.

For those experienced/starting off, should I continue down this path for a possible future career? Should I begin to learn now?(if so, where should I begin?)

Amit Member

If we take a look at this line:

$masterContent = $masterElement->getElementsByTagName('users')->item(3);

You’re trying to fetch the third item of a list, a list which we just determined was empty. Thus it returns null, and it results in you trying to pass null to a method which expects an object.

How to solve it involves some basic logic, which I am sure you can figure out on your own if you just think about it. There are many ways to test for what you want, after all.

in reply to: Unix Inerview Help!
Amit Member

If you have a PC with Linux installed, open a bash window and start using the shell. If you only have Windows, install Cygwin and start playing with the shell. There are loads of sites with introductory information – one of these I thought was pretty good was:

http://tldp.org/HOWTO/Bash-Prog-Intro-HOWTO.html

Amit Member

I don’t understand your final question. Do you mean how would you get center of image (width and height)? Simple divide is by far the most usable option. You have to divide height and width by 2.

int x_c, y_c; // x_center and y_center
x_c = (spriteData.Width / 2);
y_c = (spriteData.Height / 2);
Amit Member

To do it in C++, use CreateFile() and give it the drive letter for the file name. When you have the handle, you can use DeviceIoControl() and use IOCTL_STORAGE_EJECT_MEDIA or IOCTL_STORAGE_LOAD_MEDIA. For a simple timer, you can use GetTickCount(). If you need something better, you can use QueryPerformanceCounter().

CreateFile

http://msdn.microsoft.com/en-us/library/windows/desktop/aa363858%28v=vs.85%29.aspx

DeviceIoControl

http://msdn.microsoft.com/en-us/library/windows/desktop/aa363216%28v=vs.85%29.aspx

GetTickCount

http://msdn.microsoft.com/en-us/library/windows/desktop/ms724408%28v=vs.85%29.aspx

QueryPerformanceCounter

http://msdn.microsoft.com/en-us/library/windows/desktop/ms644904%28v=vs.85%29.aspx

Below is a simple program that will open and close all your CD trays.

#include 
#include 

#define MAXBUFFER 512

int _tmain()
{
   HANDLE hDrive;
   TCHAR drives[MAXBUFFER];

   if (GetLogicalDriveStrings(MAXBUFFER - 1, drives))
   {
      DWORD temp;
      TCHAR * ptrDrives = drives;
      TCHAR strDrive[] = TEXT("\\\\.\\ :");

      do
      {
         if (GetDriveType(ptrDrives) == DRIVE_CDROM)
         {
            *(strDrive + 4) = *ptrDrives;

            hDrive = CreateFile(strDrive, GENERIC_READ, FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);

            if (hDrive == INVALID_HANDLE_VALUE)
               break;

            if (!DeviceIoControl(hDrive, IOCTL_STORAGE_EJECT_MEDIA, NULL, 0, NULL, 0, &temp, NULL))
            {
               CloseHandle(hDrive);
               break;
            }

            if (!DeviceIoControl(hDrive, IOCTL_STORAGE_LOAD_MEDIA, NULL, 0, NULL, 0, &temp, NULL))
            {
               CloseHandle(hDrive);
               break;
            }

            CloseHandle(hDrive);
         }
         while (*ptrDrives++);
      } while (*ptrDrives);
   }

   return 0;
}
Amit Member

Why don’t you use the property to set a database to the combo box from the smart tag?

Amit Member

I would recommend starting with

www.codeacademy.com.

It’s a free hands-on way to learn programming in several languages (including all the important web programming ones). Next, I would get the book “Programming for Mac OSX” by Aaron Hillegaas and Adam Preble which teaches you Objective C in a very nice and intuitive way.

To be honest, I wouldn’t start learning C, it’s a lot steeper learning curve than learning one of the more simpler and user-friendly languages (like python or even Java) and then learning C.

Another good book (this one deals with python), is Learning Python by Mark Lutz. Any book out of O’Reilly publishing is good IMHO. Good Luck!

Amit Member

I wouldn’t recommend to read any books at all, what I’d do is pick one language that interests you and start looking at existing scripts.
Of course you could read a book to learn basic syntax if you’ve never been in touch with any kind of programming at all.
However, there’s plenty of decent tutorials and guides out there so no need to spend money – especially since programming literature is usually not exactly cheap.

My approach would be to look at code samples and existing scripts to understand what exactly they do and then implement what you’ve learned into your own work.
You will quickly grow tired of programming when you just read dry literature rather than actually trying to code something yourself and books won’t teach you that.
It doesn’t matter if your code doesn’t work in the beginning, the feeling once you manage to fix all those bugs and start to figure out why things didn’t work will be even more rewarding.

The languages I’d recommend to beginners would be C# for Windows applications and PHP for web applications.

They utilize a considerably readable and organised syntax, which resembles many other languages, and after a while you’ll read and understand the code easily.

Of course which language you choose in the end will depend on what kind of applications you want to develop, but if you just want to get started on anything I’d recommend those.

Amit Member

You could Base64 Encode it and save the base64 string to the DB then read table and Base64 Decode to display

Amit Member

I am not sure how rapidgator premium works, but if it automatically starts the download as soon as you open the url then you should be able to use cURL or fopen, doing a quick search this should help you get started:

http://4rapiddev.com/php/download-image-or-file-from-url/

Amit Member

Learn the language, and read Apples developer policy very, very carefully. Every app goes through a testing phase and is required to not interfere with certain functions of the phone. Apple claims that those types of apps that perform a task better than their own may “cause confusion for the user”. I’ve seen a number of apps that made it to the app store and were later removed, or were denied altogether.

Amit Member

Easy way..
1 .Go here
http://developer.android.com/sdk/index.html
2. Download the bundle for your OS platform
3. Start programing through the eclipse editor with an existing template or do the “Hello world” tutorial.
4. Current Java version (jdk) which also includes (jre) may come in useful.
5. Have fun

Amit Member

http://forums.asp.net/t/1438332.aspx/1

Amit Member

Same thing, except instead of executing it, wrap it in a string:


This yields:


    
Viewing 15 posts - 16 through 30 (of 108 total)
en_USEnglish