Forum Replies Created

SapnaVishwas Member

To see the limit you’ll need access to the mod_security configuration file. Since the hosting company told you to make it smaller than 1000 characters, my guess it’s 1024.

In this case query_string points to the url after the PHP file and the question mark, and not the SQL query. For example /XXX/index.php?'key1=value1&key2=value2'. Where the part in quotes is the query string.

You are sending to much information using GET. You should try shortening it, or find another way to save information to the database. You could try creating a database class, or function which you use to save the information from the file where you do the rest of your stuff. This saves you a number of requests, and hence bandwith.

in reply to: C# and XAMAL
SapnaVishwas Member

The above code is one of the ways you can do it, but for a starters that looks like VB.NET not C#. Once you have your XAML though, if you double click the control in Visual Studio it’ll automatically create the method for you to put your code in.

However, the preferred way to do it in WPF is through the Model-View-View-Model (MVVM) pattern, which uses the concept of bindings. Basically, your View is the XAML and the View Model contains properties to store things like commands, text in text fields and selected values, which are binded to the controls in your XAML. The Model is basically the logic of the program and the classes that contain the functionality of your program.

Check out the following link. I found the video at “Jason Dolinger’s presentation on the Model-View-ViewModel” extremely useful personally, but I learn better from videos.

http://stackoverflow.com/questions/1405739/mvvm-tutorial-from-start-to-finish

SapnaVishwas Member

Good news is that any tutorial labelled OOP java is the same thing to one labelled just java.

Java is an object oriented programming language (OOP), there is no such thing as java without the OOP, they just chose to stick the OOP bit in the title that’s all.

I am currently studying Java at the open university in UK at degree level.

I would recommend you get hold of one of the well recognised Java books that are out there.

e.g. 'Head First Java'

Also check this out for some free java books that help get you started…..

https://safelinking.net/p/245f89dfa5

SapnaVishwas Member

IT’s hard to say , but seems that you point a some wrong area memory , try to implement some flag or reference count , and check the result …

I would to see all the code … to know exactly what happen..

SapnaVishwas Member

First of all, OP, computer programming won’t be a dead job any time soon. Programmers will die out when one of two things occur:-
1. Computers are no longer being used
2. Computers acquire legitimate AI and have the ability to learn.

I’ve personally have been working with computers since the age of about seven, I was doing a little VB.net and PHP back then. That continued on to C# and Java, at that point, if I’m honest, I kind of ‘cheaped out’ and stopped. I really want to get back into the game and continue off with C or a C derivative (I tried once, sockets were a Female Dog and google just kept telling me I had to use ASM, so, I kind of stopped).

Currently, aged fifteen, I feel like I’m on a good track with computing. I understand intermediate cryptographic functions, I’m able to get the gist of code relatively easy without really a language barrier (Assuming it’s a structured programming language).

SapnaVishwas Member

f you’re looking for a sort of GUI framework for your simulation system (regardless of whether you want actual graphics simulations or not) then you could perhaps use something like Netbeans Platform?

https://netbeans.org/features/platform/index.html

Please elaborate on your requirements?

SapnaVishwas Member

If you were doing Assembly language then you have most of the weenies that program beat. I used to be a crack Assembly programmer. I would grab Peter Norton’s books and figure out how to beat his routines. That being said, programming is like riding a bike.

The new languages that are available to day are just different syntax! The root of programming, which you have already mastered to some degree, is solving problems and then coding some solution.

Don’t give up on your dream. There’s no shame, when putting a solution together to use whatever tools are available. Study up and look at WordPress.org. You might be surprised at the fact that it might just do what you need it to do. Then you can get a hosting company, install it and cobble it together.

Talk to the folks at your company and tell them, that right now, the best solution is to use the cloud hosted solution, but you are working on an alternative that can be implemented later on down the line.

SapnaVishwas Member

Start with c but when you move to c++ there is difference between c and c++. c is structured programming language if i remember correct and c++ is object oriented language. JAVA is object oriented as well. it not complicated but its huge in ints libraries and other stuff. i love java more than c and believe me java is fun language u just have to do practice in that .

SapnaVishwas Member
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace AOS
{
    class Program
    {
        public struct Student
        {
            public int StudentID;
            public String StudentName;
            public String CourseName;
            public DateTime DOB;
        }
        static void Main(string[] args)
        {
            Student[] StudArr = new Student[0];
            Console.WriteLine("How many students are there?");
            Array.Resize(ref StudArr, int.Parse(Console.ReadLine()));
            for (int i = 0; i < StudArr.Length; i++)
            {
                StudArr[i] = Get();
            }
            for (int i = 0; i < StudArr.Length; i++)
            {
                Display(StudArr[i]);
            }
            Console.WriteLine("We're done!");
            Console.ReadLine();

        }
        static public Student Get()
        {
            Console.WriteLine("New student entry");
            Student std = new Student();
            Console.WriteLine("Please enter the student's ID");
            std.StudentID = int.Parse(Console.ReadLine());
            Console.WriteLine("Please enter the student's name");
            std.StudentName = Console.ReadLine();
            Console.WriteLine("Please enter the course's name");
            std.CourseName = Console.ReadLine();
            Console.WriteLine("Please enter the student's DOB");
            std.DOB = DateTime.Parse(Console.ReadLine());
            Console.WriteLine("Thanks!");
            Console.WriteLine();
            return std;

        }
        static public void Display(Student std)
        {
            Console.WriteLine("ID: " + std.StudentID);
            Console.WriteLine("Name: " + std.StudentName);
            Console.WriteLine("Course name: " + std.CourseName);
            Console.WriteLine("DOB: " + std.DOB.ToString());
        }

    }
}
SapnaVishwas Member
#include 
#include 
using namespace std;

int main()
{
    float amount_due, amount_received, difference;
    int cents,q,d,n,p;
    cout << "Amount due: ";
    cin >> amount_due;
    cout << "Amount received: ";
    cin >> amount_received;
    if(amount_received

It's not complete, because it doesn't handle dollar bills, $5 bills, etc, but you can use the same math above to get those numbers (just put them above the q=cents/25; line).

SapnaVishwas Member

Id say you will have to make your own function using the equations and then plot it. You could write a function that solves it for any input or just the ones you were asked for in the assignment

SapnaVishwas Member

A very easy fix would be to add LIMIT 0, 1 to your query. This makes sure you only retrieve one item from the database.

$sql = 'SELECT number_of_items FROM '.DB_PREFIX.'item_blocks LIMIT 1'; 
SapnaVishwas Member
long startMillis = System.currentTimeMillis();

while(true)
{
    long diff = System.currentTimeMillis() - startMillis;
    if( diff > 1000)
   {
        //Here goes your database code
       
         //When done, set the new millis value
         startMillis = System.currentTimeMillis();
    }
}

This should not be used, as this continuously executes the while loop, so it leaves no threads (or better, CPU capacity) for other running programs and services.
I’ve posted it, because it show how NOT to do things, but also how it CAN be done, but only if there’s no way around.

SapnaVishwas Member

First of all I second this, it is very good advice. And also make sure that you do a fun project when you start out. I know my first project was to build a simple forum and a friend of mine started out with building a simple textbased game (games might not be the best for startup projects thou because they can be quite tricky to code)

Since you prefer video tutorials I can recommend you check out Bucky over at the new boston. He has a lot of good videos on programming that are very beginner friendly. I have never watched his PHP tutorials but I am sure they are just as good as everything else.
You can find his PHP videos here

http://thenewboston.org/list.php?cat=11

SapnaVishwas Member

You’ll like C# much more than Visual Basic. With that learned you can got into web dev with ASP.NET (recomment MVC), Windows 8 development, Windows Phone development etc Smile
Learning resources are everywhere. There is bunch of books, tutorials. Pluralsight has some good stuff that you’d probably like so go for it Smile
http://www.codeproject.com
is a good place to see other people’s projects and when u get a problem that you cannot solve there is
http://stackoverflow.com/

Viewing 15 posts - 76 through 90 (of 156 total)
en_USEnglish