new

What's the best way to explain parsing to a new programmer?

I am a college student getting my Computer Science degree. A lot of my fellow students really haven't done a lot of programming. They've done their class assignments, but let's be honest here those questions don't really teach you how to program. I have had several other students ask me questions about how to parse things, and I'm n...

Confused about "override" vs. "new" in C#

I'm having the following classes: class Base { public virtual void Print() { Console.WriteLine("Base"); } } class Der1 : Base { public new virtual void Print() { Console.WriteLine("Der1"); } } class Der2 : Der1 { public override void Print() { Console.WriteLine("Der2"); } } ...

essential reading for php coding (including databases)?

Hello. I'm more of a SU and SF but now I'm after some help from the SO community. I'm dabbling in a bit of php coding with databases and am getting a bit stuck with relationships and the like. Can anybody reccomend some books, online or real, that would be a good start for someone new(ish) to php and mysql databases? Cheers! ...

The C++ 'new' keyword and C

Possible Duplicate: Use the keyword class as a variable name in C++ In a C header file of a library I'm using one of the variables is named 'new'. Unfortunately, I'm using this library in a C++ project and the occurence of 'new' as a variable names freaks out the compiler. I'm already using extern "C" { #include<...> }, but th...

c++ new & delete and functions

This is a bit unclear to me... So, i if i have a function: char *test(int ran){ char *ret = new char[ran]; // process... return ret; } and then call it multiple times: for(int i = 0; i < 100000000; i++){ char *str = test(rand()%10000000+10000000); // process... // delete[] str; // do i have to delete it here? } ...

c++ new & delete and string & functions

Okay the previous question was answered clearly, but i found out another problem. What if i do: char *test(int ran){ char *ret = new char[ran]; // process... return ret; } And then run it: for(int i = 0; i < 100000000; i++){ string str = test(rand()%10000000+10000000); // process... // no need to delete...

IM brand-spanking new, i've used HTML randomly, where next?

as I said,i've loosely applied HTML in some instances, but i'm looking for a more techy, but easy to learn language.Can anyone help? ...

Call out to script to stop with attribute in wWWHomePage

...

Using new to allocate an array of class elements with an overloaded constructor in C++.

As an example say I have a class foo that does not have a default constructor but one that looks like this foo:foo(int _varA,int _varB) { m_VarA = _varA; m_VarB = _varB; } How would I allocate an array of these. I seem to remember trying somthing like this unsuccessfully. foo* MyArray = new foo[100](25,14). I don't think thi...

"Add to Source Control" option when making a new C# project in VS 2010

When I go to make a new C# Windows application in VS 2010, there is an option at the bottom right area with a check box saying add to source. I want to know what happens, if I check it and create the new C# file. ...

What is a good approach to preloading data?

Are there best practices out there for loading data into a database, to be used with a new installation of an application? For example, for application foo to run, it needs some basic data before it can even be started. I've used a couple options in the past: TSQL for every row that needs to be preloaded: IF NOT EXISTS (SELECT * FROM M...

Would Lisp be extremely difficult for a new(ish) programmer to learn?

I've got a little experience with Python (enough to where I can do if/else/elif and some random number generation), but I've always had a weird fascination with the Lisp languages. I downloaded some scheme source code to look at the syntax but it was pretty much gibberish to me. For a programmer with only a little programming experience...

multiple redirect??

Ok, i won't go into the full details (too much to explain) but here is what i am trying to do. I have a button on a webpage (we'll call page-1) that links to a page (we'll call it page-2). This page opens in the same window. However, i need the page (page-2) that opens to open up a new window with another page (we'll call this one pag...

New web-scipting language named OPA.

I found this website some times ago. They are proposing much innovations in scripting, but I feel like something is missing. Had anyone tried it out already? ...

The new operator in C# isn't overriding base class member

I am confused as to why the new operator isn't working as I expected it to. Note: All classes below are defined in the same namespace, and in the same file. This class allows you to prefix any content written to the console with some provided text. public class ConsoleWriter { private string prefix; public ConsoleWriter(strin...

Crash with new/delete, but not with malloc/free in C++ code

My developement environment is [Windows 7; visual studio 2010; x86]. I have a dll that was built for server 2003 long time back. When I use it in my project and follow new/delete sequence to use a class, application crashes during delete call. I verified the same even without any other call between new and delete. When I replace new/del...

Storing a derived object inside another object as a base pointer (C++)

So here's the deal: I have a concrete class Window, representing an operating system window which will be be used for drawing. Window can take on many types, such as fullscreen, fixed window, resizable window, borderless window etc. This is implemented using an interface IWindowType, in which the specific types derive from (classes are ...

How do Object() and new Object() differ in JavaScript?

In JavaScript, what's the difference between var x = Object(); and var x = new Object(); ? ...

C++: Strange behaviour of `new`

Hi, SDL provides me this struct: typedef struct SDL_Rect { Sint16 x, y; Uint16 w, h; } SDL_Rect; I want to create a new SDL_Rect on the heap as class variable: // Forward declaration private: SDL_Rect *m_pcScreenRect; And in the constructor I do this: /* Screen Rectangle (for clearing) */ m_pcScreenRect = new SDL_Rect...

what features do you want in asp.net mvc 3?

Hi Guys, Just rounding up what features should be made available for the next release of ASP.net MVC 3. There is no news on the next version. But I really want opinion for people using ASP.net MVC to make feature judgments. As for starters I would like following features to be included Support of Visual Designers. Currently HTMl helper...