j1979c 0 Light Poster

You seems to be annoying a lot in your problem... Here is a link. There is a detailed PFF format. That article tells in a clear cut manner about streaming video files with ASP.NET.
Hope this solves your probs.
cheers ... :)

He/She is not annoying.. just askin' a question and errrrr...your link is not workin'. :p

j1979c 0 Light Poster

Well... just post this up in case you guys are having the same problem that I did for a couple of weeks.

I've been experiencing this everytime I shutdown my com.

aspnet_state.exe. Application Error.

The instruction at 0x6a2a2fec referenced memory

at 0x0000000c could not be "read".

Click "OK" to end program

Click "Cancel" to debug.

To get rid of this... just start your visual studio .net command prompt and do the following:
1) type "aspnet_regiis -lv" (without the quotes), which tells you whatever asp.net versions you have in your com. The one with the (root) is the one you're using.
2) type "aspnet_regiis -ua" (without the quotes), this completely removes your asp.net in your com.
3) type "aspnet_regiis -i" (without the quotes), this reinstalls the asp.net.

So now... technically if you shutdown your com...you shouldn't get the aspnet_state.exe.Application Error. again.

I don't really know what causes this problem. But one thing's for sure is that this kinda gets in the way when I'm making delphi programs, whereby I get access violations because this address was not freed by asp, and my program happens to be accessing it. :mad:

If anyone does know the source of this problem, do post it. I would like to know.

Anyway... hope some of you find this useful. :mrgreen:

j1979c 0 Light Poster

Unless you've got a windows 2003 server then you can use the windows media services.

j1979c 0 Light Poster

I see..... so the "password" is a jet reserved word. No wonder I don't get errors during creation time but do get them when trying to access it through ole db via the jet engine. :p

Thanks Paladine for sharing the list. :mrgreen:

j1979c 0 Light Poster

Has anyone noticed that...if you create a ms access database with "Password" as one of the table's column name....

You can't make a data insertion through sql statements via oledb (no rows are affected)?

like : insert into employees(password) values('asd32f1asdf')

wasted me 1 1/2 hours trying to debug the thing in visual studio...

when I named the column to "Pwd" instead.... everything works.... :lol:

weird.....:confused:

it's just the same like when you create a new folder ... naming it "con" won't work... lol

j1979c 0 Light Poster

Oh ok ... stupid me...

$24 means a value of 36

just a hexadecimal thing like $10 is the same as A in Hex.

Got confused it with compiler directives.... :mrgreen:

Thanks to myself...:cheesy:

j1979c 0 Light Poster

Errr... anyone knows what this means in Delphi language?
:sad:

i : integer; 

i := i - $24;

It's actually in a function that completes a WAV file header something similar to the Microsoft's RIFF specification for WAV. The code goes something like this.

procedure TForm1.StopRecording;
var
	i: integer;
begin
	BASS_ChannelStop(rchan);
	bRecord.Caption := 'Record';
	WaveStream.Position := 4;
	i := WaveStream.Size - 8;
	WaveStream.Write(i, 4);
	i := i - $24;
	WaveStream.Position := 40;
	WaveStream.Write(i, 4);
	WaveStream.Position := 0;
	// create a stream from the recorded data
	chan := BASS_StreamCreateFile(True, WaveStream.Memory, 0, WaveStream.Size, 0);
	if chan <> 0 then
    begin
		// enable "Play" & "Save" buttons
        bPlay.Enabled := True;
        bSave.Enabled := True;
	end
    else
		MessageDlg('Error creating stream from recorded data!', mtError, [mbOk], 0);
end;

I could understand what the rest are doing but I kinda puzzled with the $24 thing...any clues?

Thanks in advance.

j1979c 0 Light Poster

Would like to get suggestions of any tutorials/websites/vcl downloads for visual wave editiing with delphi 7.

An example is what you can do in audacity where you can view the recorded wave graphically and edit it.

Trying to program that kinda program. So far I finished a drum machine, basic effect processings and equalizers as part of the program.

Anyway, thanks in advance. :cheesy:

j1979c 0 Light Poster

Still not working.... same thing happening whether you put the -ns in the properties>target or the run command. Anyway... screw that.. I'll take the extra 1-2 seconds of loading time? If I can program something faster than that then I should be worried bout the loading time.... hehe :twisted:

j1979c 0 Light Poster

Thanks for the reply...

Anyway.. got the thing working in New > Project too...

Just downloaded a Web Application Project Startup from ASP .NET's homepage and a file called VS80-KB915364-X86-ENU as well. Installed them.. and the ASP thing was in the project templates as well.

Now.. time to get my hands dirty with ASP stuff... :lol:

Thanks again.

j1979c 0 Light Poster

Well first of all I'm a guy... see the pic up there? It's me. Chinese dude wanna be programmer.

Second... I've solved the problem that I had with a completely different logic, which is a totally different topic than the one posted here.

I think I should give you an idea what I was trying to achieve during this posts by giving a simple C++ example here.

int main()
{
    int number = 5;
    
    cout << "The original value : " << number; // number value is 5
    
    changeValue(&number);

    cout << "The new value : " << number; // number value is 10
}

void changeValue(int *nPtr)
{
    *nPtr = 10; 
}

As you can see from this code example, I'm only passing in the variable to a method that does not return (no return statement) any values to change the number value in main. And no assignment operator '=' in the main has been used. And I did not want a copy of the number variable to be passed into the method (passing by reference).

Java:

public class One { 
    private int pumpNum;
    public One()
    {
        pumpNum = 0;
    }
    
    public void passPumpNum(int p)
    {
        p = pumpNum; 
    }
}

public class Two { 
    public static void main(String[] args)
    {
        int x = 0; 
        System.out.println("\nOld value : " + x);
        One o = new One();
        o.passPumpNum(x);
        System.out.println("\nNew value : " + x);
    }
}

init:
deps-jar:
compile:
run:

[B]Old value : 0

New value …
j1979c 0 Light Poster

Hello all....

Just learnt VB .NET yesterday and would like to continue to the ASP .NET book using the VB .NET IDE to program.

The thing is... when I start a new project in VB .NET there are no templates for ASP .NET Web Application. Do I need to download something (like ASP .NET 2.0) and install it before being able to use it in the VS Studio .NET IDE?

The ebook that I have just jumps straight to programming a Hello World example with ASP .NET using the VS Studio .NET IDE but did not say that what softwares are needed to do it... :sad:

Thanks in advance.

j1979c 0 Light Poster

Any tools out there for Delphi 7 that's good for making computer music softwares (MIDI, multitrack wav recording)?

Currently trying out BASS dlls.

Thanks.:cheesy:

j1979c 0 Light Poster

The -ns or /ns doesn't work for me too... used to work on version 6 though...

j1979c 0 Light Poster

What I meant was instead of using let's say...

public class One {
   private int pumpNum = 3; 
   
   public int getPumpNum()
  {
      return pumpNum; 
   }
 
}

public class Two { 
   public static void main(String[] args)
   {
       int pumpId = 0; 
       One o = new One(); 
       pumpId = o.getPumpNum(); 
    }
}

to set the value for class Two's pumpId variable....

Are there any ways where instead... I pass in the Two's pumpId into a method in class One and change the value.. without using any assignment statement, which can be done in C++ but was wondering if it's possible in Java.

The class One cannot be static and the variable cannot be constant... cause it too changes as the threads in the program runs. A bit tricky in a way.

The only way to solve it at that point was to find a way to pass the variable by reference... which in Java is quite impossible to do with primitive types. Which is quite confusing for someone who came from a C background.... just like things such as Generics in Java would most likely be mistaken by a C programmer as a Template-like thing.

The real program was really complicated and involved a lot of threads.... anyway.. I did the logic in a completely different way producing the results that I wanted on approximately the 24th of May.

Anyway.... thanks a lot to everyone for replying and I should probably notify anyone who's reading this …

j1979c 0 Light Poster

hi mate
do read on the concept of freind functions
it is a straight forward thing using friend functions
as regards to u r inability to return mulitples values in a function
iam sorry c, c++ and java dont suppor them altough
c# supports this feature :)

Hmm...this topic was months ago though....and it was not about returning multiple values....

Errr...do know bout the friend function thing, but it's not a solution to the problem I had in "Java".... and it's not really a good solution when it's like... you can do this and that with this language but too bad the language you're using does not support this? :-|

anyway "C++" do have friend functions and class..... it's not a new thing that came up with "C#" :rolleyes:

j1979c 0 Light Poster

Ok, I think I see what you're saying. Objects are passed by reference. So as long as you're not trying to do this with any primitives (int, float) then anything you do the passed variable has immediate affect on it.

Yeah just found out this from the web:

O'Reilly's Java in a Nutshell by David Flanagan puts it best: "Java manipulates objects 'by reference,' but it passes object references to methods 'by value.'"

Forgot that JAVA behaves like that cause there are no * and & to use.....still in the C++ mindset....hehe :cheesy:

Guess I have to pass the object to change the value of the class's variable instead of passing just the variable.:idea:

Thanks a lot! This is refreshing....;):o

j1979c 0 Light Poster

Why not just put the set method in class 2? class 1 wont be able to see the variable anyway.

Well, I am looking for a way to pass a variable from one class as a parameter, to another class's method and set it there, without using a return statement from the other class's method.

Or is there any way to return more than one value from a method.

Hmm....maybe the scenario i put up earlier is unclear and ambiguous. Sorry :sad:

It has to be between two classes though. MultiThreading's kinda tough with JAVA :mad: , put 4 petrol pumps and 20 customers and the system's crawling like a snail...:sad: :cry: :-| :eek: ...wish I could do it in Delphi...:twisted:

Thanks for the reply anyway. ;)

j1979c 0 Light Poster

Just want to confirm if it is possible to set in this case (Example 1) class Two's pumpId variable by sending it as a parameter to class One's setPumpId method without using the usual return method assignment like :

pumpId = o.getPumpNum()

I think in C++ we can do that, but just ain't too sure with JAVA and I'm having problem returning more than one value from a method with just a return statement in the end which I think is impossible. :-|


Example 1:

public Class One {

   private int pumpNum = 3;

   public void setPumpId(int pumpId)
   {
       pumpId = pumpNum; 
   }

}

public Class Two { 

   private int pumpId = 0;
   private One o = new One();
   
   o.setPumpId(pumpId); 

}

Thanks in advance for any replies. Really need this for my petrol station simulation project. :mrgreen:

j1979c 0 Light Poster

Is there any way to make an .exe file with VS C++ 6.0, that runs on any
machine that has/does not have MS VS?:sad:

Just want to make a single .cpp file for computer graphics using GLUT into an executable where anyone, especially my examiners to run it by double clicking and without opening up MS VS...etc:confused: .

I kinda suck when it comes to this :sad:. Too used to Delphi and Java where I don't need to scratch my head in making .exe or .JAR that can be run anywhere since it's automated.;)

Thanks in advance to anyone who gives a helping hand electronically..:mrgreen:

j1979c 0 Light Poster

It depends on the situation I guess.

For mine it works just fine. No performance drop compared to StringTokenizer, plus it works better... since there's no more need to create an array or arraylist to store the stuff and it ignores the spaces in between data...plus you get to specify how many tokens you want from each line as a second argument. Also you get to save quite a number of lines.

Was having problems with StringTokenizer cause it detects the spaces as delimeters as well though I specified that the delimeter is only "|".

As for the link, I think it's full of crap. Some people just can't switch to something new where they're already comfortable with the old one. Getting memory leaks in Java is quite impossible, cause that's what a garbage collector is for. You should see how memory leaks are like in Delphi...your com doesn't hang but it moves very very very slow till you reboot...if not it'll hang indefinitely. Looping a 100,000,000 times oh my... :cheesy:

j1979c 0 Light Poster

Yup.... I'm using the

line.split("|",5)

Found that in the Sun Java forum. I can forget bout StringTokenizer now,
cause the split method is definitely much more cooler...:mrgreen:

And the StringTokenizer is not recommended as of 5.0 I think...:-|

Well...forced to do my project in Java... if it were in Delphi I can finish it with 1/3 of the time I spent using Java.:twisted:

Thanks for the replies guys...really helped:)

j1979c 0 Light Poster

Hello,

I'm currently having some problems with the StringTokenizer from
java util.

I've declared a StringTokenizer like:

StringTokenizer token = new StringTokenizer(line,"|");

to token out a string read from a txt file such as:

Diablo|RPG|PG|PS2|20

and it works fine(detects all the "|" as delimeters) :)


The problem now is, if I have lines with spaces like:

C&C Generals|Real Time Strategy|PG|PS2|20

it detects the spaces as well and the tokenizing is out. :sad:

So, I'm wondering if anyone out there can help me solve this problem. I just want the tokenizer to recognize "|" as a delimiter and not anything else.

Thanks in advance.

j1979c 0 Light Poster

Hello all,

Just want to know if you guys can recommend me some good links where I can learn how to make a robot with keyboard interactivity using OpenGL GLUT.

Thanks in advance... :cool:

j1979c 0 Light Poster

If you set the paths to the image files, such as:

c:/myfolder/smile.gif

-put the image file here!

Then your jar file should pick them up from wherever you execute it from.

I see... hmm... I'll check it out.

By the way, are there any ways to like include the image file into the JAR file and read it from there, so that the end product is just one file. Easier for distribution I guess and it eliminates the need to change the codes everytime.

A newbie here, but I think I saw some other files that are in the JAR file, like some kinda resources that are included in it. So, I'm wondering if the images can be included in as well.

Kinda hard when you're switching from something as easy as Delphi where you concentrate more on the programming aspect rather than the GUI....hehe :o

j1979c 0 Light Poster

Hello....

I'm currently using Netbean 5.0 and I just want to add some GIF files to my program when it builds. I'm using the files as icons for some of the GUI buttons and labels. But when I select clean and build main project or build main project and execute the JAR file outside the IDE, the icons are missing. :sad:

I put the image files into my project folder and basically just add this kinda code in.

Icon smile = new ImageIcon("smile.gif");
label2 = new JLabel("Label with text and smiley icon", smile,
SwingConstants.LEFT);
label2.setToolTipText("This is label2");
container.add(label2);

So..I'm wondering if anyone can help me with this....

Thanks in advance.

j1979c 0 Light Poster

Wow....quite a debate in here....hehehe :lol:

Just scan anything that you're unsure of you'll be fine....

Or if you're crazy/paranoid enough and have a lots of patience... just scan your whole com everyday....

Can't say which is good or not..unless you know the techniques of making an antivirus program...

Everything's got it's pros and cons...it's just that whether you can live with the cons..

Not having a virus for 2 decades is quite possible.....for anything's possible.....there are 40 year old virgins out there...now that's a possibility.....:lol:

End of story... :idea:

Cheer up guyz! :mrgreen:

j1979c 0 Light Poster

k....just found out that the 2005 is the latest. The .NET thing in the title confused me, cause in 2005 they don't put .NET, title wise.

Got a bunch of books stating .NET, so was confused quite a bit with Visual Studio 2005. All the things I've learned is VS6 in 2004 and it all outdates so quickly. Guess I graduate at the wrong time.

In addition to that, all the stores in my place sells only VS 2005, so I was wondering if it is the latest. What to do right?....I'm in a country where piracy rules....and no one's gonna buy ori for >RM10,000.00 as opposed to RM15.00 :rolleyes:...so you'll end up with a bunch of stuff and not knowing what goes where etc, etc and the lecturers in college can't help, cause they are outdated themselves.

Guess this place helps a lot, minus the sarcasm :rolleyes: on certain occasions.

j1979c 0 Light Poster

Oh...found the VS 2003.NET....

Which one is the latest actually? Visual Studio 2005 or Visual Studio .NET 2003?

j1979c 0 Light Poster

Is there a difference between Visual Studio 2005 and Visual Studio .NET? I've surfed the MS website and I can't find any VS.NET, it just kept showing VS 2005. Or is VS2005 = VS.NET?

j1979c 0 Light Poster

Just want to know the latest visual studio available right now.

I'm currently using visual studio version 6.0.

What I can see from MS website is version 2005 right now. Does that include the .NET thing?

Cause I'm kinda curious what this .NET thing is all about..and recently there are lots of job requirements that needs .NET. Guess I have to learn this feature as well. :-|

It seems that jobs in my country nowadays need the knowledge of C++/C#, VB.NET, and Java. Just mastering C++ alone took me quite a lot of time, and all I can do is console programs. What I can see in job requirements these days is I need to know quite a lot of stuff, usually the 3 languages above and some database (oracle, sql) and some knowledge on networking or programming for mobile devices. Any advice out there on at what levels do I actually need to attain, just to get a programming job as a freshie? Just graduated with a diploma and currently seeking a entry level job. :cry:

Hope you guyz can gimme some light on this situation. :o

Thanks in advance.

j1979c 0 Light Poster


Hmmm....I see...

Getting kinda cleared right now. I was thinking of the same thing too...Windows Programming then to MFC and others.
Read the intro for the books that I have, where they state roughly what you need to know.

Did a basic calculator using MFC wiz before. The thing is with MFC, lots of stuff are added automatically as WolfPack has pointed out and it's kinda hard to look for something and modify.

Guess I have a go with Windows Programming first, and get used to the loop message and the hungarian notations... :lol: since it's useful for apps and games.. :eek:

Guess C won't be much of a problem. Read around a little and the main difference seems to be the output/input syntax (printf and others), there's no templates in C, and struct is used instead of classes....I think.

Well bout Java, I did find a difference in execution time...just with a Hello World program. One using an applet and the other a win32 dialog box. The win version executed a bit faster. Guess it's because with Java you need to go through another layer for intepretation, which is the JRE? If it's a big program then I might see a bigger difference I guess.

Anyway, I guess I'll use Java if I'm planning to make a program that's platform independent or solely for the web, and C++ if it's something specificaly on windows.

Well, thanks to you guyz …

j1979c 0 Light Poster

This is an ongoing question going through my head....

I've been doing C++ programming for about 4 months now. Been using Deitel's C++ How to program book. Learned from the basics till data structures like link lists, queues, stacks, trees..all using templates, vectors, pointers. File processing (sequential and random). Well, practically >90% of the book. Had to cram all these into my head, cause my college assigned an Advanced C++ class for me though I didn't know any C++ at all. The end result was pretty satisfying though.

The question is...where do I go after this? These are some of the things I have in mind and happen to have the books for it:
1) Windows 32 API (MS Press, Programming Windows, 5th edition)
2) Windows with MFC (MS Press, Programming Visual C++, 5th edition)
3) Adding C to my knowledge besides C++?

Been programming console programs all these while, and I am interested in making applications with GUI and eventually some simple games (2D maybe). What I know is that, it is probably easier to write apps with VB or Java....but I don't want to waste my effort that I've put into C++. Plus Java programs kinda work much slower than C++ and I've been pretty amazed with the speed of C++ though it is much harder than anything I've learned.

So...anyone out there who's gone through a similar phase got any advice for me? Hope you guyz can help me out..

j1979c 0 Light Poster

McAfee's freebie called stinger and Grisoft's AVG is the BEST.

Agree agree. Works best for me too. :mrgreen: and your com runs faster..... and even faster with Daschund Hare.....saves my cash on subscriptions and buying RAMs..... :twisted:

j1979c 0 Light Poster

I guess whatever anti virus one may use is all the same. It's just a matter of what you download and your surfing habits, if it's good or bad. I've never got a single virus since 2002. For me, just using AVG is pretty safe....nothing beats free stuff...

j1979c 0 Light Poster

Been using AVG scanner... works well for me and does not suck system performance like the commercial ones. Plus it's free....

http://free.grisoft.com/doc/1

j1979c 0 Light Poster

Yes, there is an issue with vs 6 where it complains about templates that generate identifiers longer than 246 characters. I think you simply put:
#pragma warning(disable: 4786) at the top of code. See #4 here: http://www.mip.sdu.dk/ipl98/unofficial/visualc/tips_and_tricks.htm

Yeah, found that out today....that I need to put the

#pragma warning(disable: 4786)

before include statements that are usually declared at the top.
I wonder if that still happens if I install the latest service pack 6....I'll check it out then.

Anyway...thanks to you guyz for being so helpful. This is the best forum I've ever been in......guyz/gals in here just know their stuff....beats having bad lecturers in college. Daniweb and MSDN is the best guide! :mrgreen:

j1979c 0 Light Poster

DEV C++ doesn't give these warnings.....but what does these warning signify??

Ooops, one thing I missed in the posting. I'm using Visual Studio 6.0. Sorry guyz. Thanks for replying though.. :)

j1979c 0 Light Poster

You must be using visual studio 6. You can disable the warning with a pragma statement.

Yup, I'm using visual studio 6.0. Just downloaded the service pack 6. Browsed through the error listing in MSDN, where they show some errors solved by including pragma statements. But in their example is something to do with indentifiers being too long. Guess I need to learn how to use pragma statements in my c++.
Anyway, thanks for the reply and help. :cheesy:

j1979c 0 Light Poster

I have some kinda problem each time i create a vector of strings. There is no error if I create vectors of other data types such as int, double, etc. Though there's no error...but there's warnings...and sometimes the program hangs if i do sortings. Here's an (without sorting but still getting warnings) example:

#include <iostream>
#include <vector>
#include <string>
using namespace std;

int main() 
{
	vector<string> values(5);
	values.push_back("dog");
	values.push_back("cat");
	values.push_back("bag");
	values.push_back("box");
	values.push_back("boy");
	
	for(int i = 0; i < values.size(); i++ )
	{
		cout << values[i] << " ";
	}

	return 0; 
}

This is the message in the build tab:

Compiling...
testSortString.cpp
C:\Documents and Settings\Jason\Desktop\testSortString\testSortString.cpp(24) : warning C4786: 'std::reverse_iterator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const *,std::basic_string<char,std::char_traits<char>,std::all
ocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> > const &,std::basic_string<char,std::char_traits<char>,std::allocator<char> > const *,int>' : identifier was truncated to '255' characters in the debug information
C:\Documents and Settings\Jason\Desktop\testSortString\testSortString.cpp(24) : warning C4786: 'std::reverse_iterator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > *,std::basic_string<char,std::char_traits<char>,std::allocator
<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> > &,std::basic_string<char,std::char_traits<char>,std::allocator<char> > *,int>' : identifier was truncated to '255' characters in the debug information
i:\microsoft visual studio\vc98\include\vector(47) : warning C4786: 'std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >::vector<std
::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >' : identifier was truncated to '255' characters in the debug information
i:\microsoft visual studio\vc98\include\vector(60) : warning C4786: 'std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >::~vector<st
d::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >' : identifier was truncated to '255' characters in the debug information
Linking...

testSortString.exe - 0 error(s), 4 warning(s)

Hope you guys enlighten me....thanks in advance....

j1979c 0 Light Poster

Hi :o ,
I would like to know if it is possible to write a console program in
MS Visual C++ 6.0 (ATM transaction program), that stores data to a
database such as MS Access 2002 or Oracle 9i, through ODBC :?:

I've searched all over the net and I seem to find ODBC with MFC tutorials, but not console programs with ODBC. :cry:

I have a 32-bit ODBC Data Source Administrator which I think is installed when I did the installation for MS Access. For Oracle 9i, I guess I have to download something....ODBC driver I guess.

Anyway, I wonder if any of you guys can recommend me some sites providing these kinda tutorials. Or perhaps, showing me some tips how these are done. ;)

I think it's easier in VB using ADO but I have to do these in C++ though..... :cry:

Thanks in advance to anyone that's willing to help....a million thanks!!

j1979c 0 Light Poster

err....... is there any command line in Dos to make it full screen, so that i can put it into a system(" ") line in my c++ console program? Thanks in advance.