iDeveloper 21 Light Poster

That's a good question. I wonder... given that it would run on different sessions how that would affect anything.

iDeveloper 21 Light Poster

I have a C++ bible laying around somewhere. Probably around 2000/3000 pages which explain everything you'd ever need to know with great ease and simple examples. I still use it as a reference. If you need it, PM and i'll send the title and author.

iDeveloper 21 Light Poster

Have you considered creating a web service for this? You could create one in PHP and simply automate these steps in the web service. All you'd have to do in C# is submit any files or any other data to the service and let it do the rest. I'm not sure how well it's going to play out with users being able to edit posts though. I'm sure you could integrate that in it.

iDeveloper 21 Light Poster

The problem is exactly what the error says. The compiler cannot find Microsoft.Web.UI.WebControls in your project. I'm assuming this is the library for IE controls because i don't recognize it as part of the standard libraries. Hence, you probably need to download it, locate it on your machine and reference it in your project.

iDeveloper 21 Light Poster

what problems are you having?

iDeveloper 21 Light Poster

Codding Horror is by far the most interesting blog for software developers :) Full of good info indeed.

iDeveloper 21 Light Poster

Have you done any normalization to your database? If so, this may be a way to make your process better structured. Instead of including Fileowner in your File table, create a 1:N (Many) relationship between File and Account. So you would simply include AccountId in table File. This will be a reference back to the account that is currently logged in.

iDeveloper 21 Light Poster

Keep in mind, your company name will not be the only thing looked at, but as well as your mission statement. And based on your mission statement, your company name will be found.

Absolutely. If you can give the sky to your customers, then go for it :)

iDeveloper 21 Light Poster

That's a weird way you're using to designing an application heh. Here is how i would go about it if it's a fairly small project. First thing you need to do is layout your requirements. Write down what you're trying to achieve and what features you'd like to create. Go for the essential things only at this point. Than look at limitations and different ways of implementation. How you would organize data. How you would store data. What you will use to validate data. What database to use and etc. I would than draw a high level overview of the database with short explanations for each database entity. Than elaborate on it until you create a pretty decent model. You'd obviously want to have account details (i suggest you use aspnet membership features as this is already done for you). You obviously wouldn't be storing data in your database. However what you will be storing is location to files and possibly some validation data such as checksums for each file. Then go from here. Should be a little bit easier to see the whole picture from this point.

For your final year project, i would imagine you'd be required to write full-blown documentation, requirements, development strategy, development roles, scheduling, unit tests and all of that. As boring as it is, that's how projects get done :)

iDeveloper 21 Light Poster

I don't understand your problem. You're trying to make your program 'sleep' without pausing the main thread? That's not really a sleep because sleep would be a blocking call. If what you need is a timer, then use the Timer class. Here is how it looks in short:

Timer mTimer = new Timer(TIMEOUT_VALUE);
mTimer.Elapsed += new ElapsedEventHandler(TIMEOUT_METHOD);
mTimer.Start();

Here is the signature for TIMEOUT_METHOD

public void MyMethod(object source, ElapsedEventArgs e)
{ }

This method will execute when your timer ends. The timer will then restart automatically when the call to this method completes.

iDeveloper 21 Light Poster

It's a problem with the way ViewState is configured on the machine. Have a look at this: http://www.codinghorror.com/blog/archives/000132.html

csharplearner commented: thnx a bunch +1
iDeveloper 21 Light Poster

You're going to need a library of some sort to be able to parse a PDF file. Either that, or you'll have to look at the structure of a PDF and try to locate the content you're trying to read. I'd go with option 1. There are a good selection of commercial and free products.
Here is the ADOBE PDF format reference http://www.adobe.com/devnet/pdf/pdf_reference.html
And here is a sample project working with PDFs: http://www.codeproject.com/KB/recipes/mgpdfreader.aspx

iDeveloper 21 Light Poster

Simply put your current thread in sleep mode. Fairly easy to do with 1 line of code.

System.Threading.Thread.Sleep(int milliseconds);
iDeveloper 21 Light Poster

These people end up getting jobs too. How scary...

iDeveloper 21 Light Poster

What do you mean by 'table tools'? Are you referring to the table control of asp.net framework?

iDeveloper 21 Light Poster

create your Excel and simply stream it through the browser as a download.

iDeveloper 21 Light Poster

Initialize your character pointer.

char *ptr = new char[len + 1];

Note that +1 is used to accommodate for the terminating null.

Make sure you deallocate your pointer too.

And finally read this: http://publications.gbdirect.co.uk/c_book/chapter5/character_handling.html
to learn how to handle character arrays.

iDeveloper 21 Light Poster

See the 'Header Files' group in your Solution Explorer? That's where the header files go. So, drag and drop your RXMatrix.hpp header file into that group. Also, use some sort of standards. Use either .h or .hpp extension for header files.

iDeveloper 21 Light Poster

use char arrays instead of char pointers.

Salem commented: Yes indeed! +26
Narue commented: Fixes the problem but teaches nothing in the process. -6
iDeveloper 21 Light Poster

Alright, that cleans things up a bit. The proper way to do this would be to create a static method GetSessionInstance() to return an instance of ClassName from session cache. This behavior is not instance-specific, meaning it doesn't and shouldn't rely on an existing instance of ClassName hence it should be static.
As far as overwriting the current class instance. For one thing you really cannot do this. Well, what you CAN do is retrieve your class from session cache and then simply assign every property of your current class instance to the one returned from session. This is ugly and most would tell you not to do this for the sake of software engineering practices.
Hope that helps.

iDeveloper 21 Light Poster

Draw the cube on a piece of paper. Determine x,y,z for each vertex and write them all down. Then using open GL create your viewing volume and using triangles or another primitive shape map your points in clock-wise direction. This will require some knowledge about OpenGL. You can do all of this with XNA in about 10 lines of code.

iDeveloper 21 Light Poster

Check out 'class factory' design pattern. You might find it useful for this type of problem.
Also, what does GetSessionObject() do? Does it initialize a private instance of that session object in Class Name?

iDeveloper 21 Light Poster

Have you considered using triggers?

iDeveloper 21 Light Poster

A rule of thumb is, if you have an Access app that does anything beyond simple data entry - use SQL Server, Oracle or something similar.

Here is a couple of things you could do:
1. If both DBs are on a local servers, you could link both of them to a shared database in SQL Server. You can have a query run in on Access table which would populate SQL Server table. You could have another one retrieve the data from the same table.
2. If both DBs are on local servers, you could try creating a table in your main DB (the one you're reading from) to contain any required data and then simply link it in to the other DB. So once you update one, the other has your data.
3. Create a query in your main DB (where you're reading data from) to select your data and then export it in some sort of format (XLS?) Then simply send it over some medium (depends on data sensitivity) and import.

They're all pretty ugly ways huh? :)

iDeveloper 21 Light Poster

Check this out:

http://support.microsoft.com/kb/323752/EN-US/

This may be a security limitation in IE.

iDeveloper 21 Light Poster

When you created each user did you approve their account? Make sure each user is in the 'approved' status, otherwise they won't validate.

iDeveloper 21 Light Poster

Ok I put some breakpoints at:
if (FileUpload.PostedFile != null)
and
int nFileLen = myFile.ContentLength;
And when i move the curser over:
int nFileLen = myFile.ContentLength;
it writes: myFile.ContentLength 0

does that meen that it thinks that the file doesn't fill more than 0?
and how do I change that?

Open your web.config. Look at the <authentication> tag and check the mode. Is it set to "Forms"? If so, change it to "Windows". This *should* work. Note, however, that anybody running that page will run as aspnet user. You can use impersonation to impersonate an account with less privileges. Now, don't judge me on this but this probably makes sense since you're uploading data to the server, i'd imagine you have to be able to do this as a privileged user, hence the windows authentication mode. Hope that helps.

iDeveloper 21 Light Poster

Okay, i just saw a reference to Update Panel in your page code, but your upload control is declared outside of it. Use breakpoints and run your page in debug mode. Set break points inside of the first if statement and see what you're getting in FileUpload.PostedFile. Check for any internal errors and property values.

Also, don't use system.io to save the file. You can do so with FileUpload.PostedFile.SaveAs();

iDeveloper 21 Light Poster

Well, you could create a 2D array to resemble the grid. When someone clicks on the mouse, you could take the mouse pointer (relative to the window not the screen) and convert it to the position in your array. You could even create a nice little collection class to store the grid and then simply serialize it when you need to store the grid.

iDeveloper 21 Light Poster

It converts an integer value in column 0 to a 32 bit integer and adds 1 to it. Then it converts it to a string in order to assign it to a text box. If column 0 doesn't have a value it assigns a 1 to the textbox.

iDeveloper 21 Light Poster

FileUploader control does not work in the upload panel. In other words, it isn't Ajax compatible control. You need to do a regular postback through a trigger. It's a security constraint in the design of the component. You can look it up on msdn.

iDeveloper 21 Light Poster

C# used for developing OS and it succeeds, Will it lacks in developing professional game?! I think you may be wrong! so please if you want us to argue what C# can do and can't, let's start new thread in geek forum

I'm not even going to argue with you on this. Managed code comes with stability along with an overhead coming out of providing that stability. If you don't believe me, go back and look at your Compiler Theory and Computer Language Design books.
There are differences in game development and an OS development. That's like comparing apples and oranges.

iDeveloper 21 Light Poster

That's not true, you can write unmanaged code in C#.
Why should you?
It's one of the aspects of C# I like the most! I am tired of destructors who destruct something that's already destructed and tired off difficult to trace pointer and handle errors.
You said it yourself It's more stable, better structured but slower.
Btw : slower? With the fast computers of today that becomes an issue of lesser importance.

It's designed for a managed platform. That doesn't mean you can't write unmanaged code. You can still write your assembler and use pointers, but that isn't the aim of the .net platform.
As far as speed, like someone said games are heavy on performance and speed. I probably wouldn't write a professional game in XNA. Why? Memory and Framerate. You don't know when you garbage will be collected meaning you don't know your CPU usage. Since garbage may not be allocated right away, it stays in memory which is an overhead. This'll dramatically screw with your FPS. This is just one of the easiest examples.

iDeveloper 21 Light Poster

C# is the microsoft's version of Java and C++ mix. It's designed for a managed platform. It's more stable, better structured but slower. I think there is managed C++ nowdays, but i've never used it.

iDeveloper 21 Light Poster

When you call BeginAccept() you're passing the master socket to it as the socket that will get the new connection request. You're essentially overwriting your master socket after the first connection. Create a slave socket for every connection. That may solve your problem.
Could also be that the other end is closing the connection.

iDeveloper 21 Light Poster

Use System.Data.Common.DbCommand instead.

iDeveloper 21 Light Poster

The easiest way is encapsulate all of the VB6 logic into DLLs and then load it up in the .NET project. The platform will migrate your VB6 code into the .NET platform using its built-in COM interoperability features. All you'd have to do is redesign you GUI and use the interop libraries generated to access your application logic. For database connectivity, check out CodeSmith (Code generator) and Net-Tiers (Code generator templates). These are probably some of the best code generator tools for .NET. The templates will generate code for any database. You'll have your business layer, data layer, web service layer (allowing you to create your web APIs in 5 minutes), a website featuring all of this, NUnit test cases and much more. Very easy to use as well.

iDeveloper 21 Light Poster

I just spent an hour trying to figure out why i cannot change the CssClass property of <asp:TextBox> Whatever i enter in the property defaults to class = "textbox" when i render the page. What's going on??? Does anybody know a solution? I have 2 different input types i have to render separately. Is this a bug of some sort?

EDIT: I just ran a test on 2.0 and everything worked like a charm. I wonder how this went unnoticed in 3.5

iDeveloper 21 Light Poster

That doesn't even make sense. You're talking about a function, not a module, and you're talking about finding a sum when only one argument has been passed.

It's the sum of the squares of a number. You do not need the second number. But yeah, the term module doesn't make sense.
nova2177, modular programming, at least in reference to the old VB, refers to a collections of functions. Generally, a collection of related functions grouped into modules. But it seems like in your case your professor's referring to a function. But i'm not sure and this is why i asked you what language you're using.

iDeveloper 21 Light Poster

Nope.

'Nope' is your argument against what i said? Can you be more rude?
What exactly do you not agree with? At high level, all programming languages are similar to each other (not including Brainfuck and similar garbage with no potential for any kind of productive use). If you're an experienced programmer in one, your skills will transfer to another language with little effort. At a practical level you would still need to get familiar with certain techniques used by a language or ways of expressing logic of course.

How can you discount the .NET platform while supporting Java?

You may be right here. I've used Java for mobile application development while interning at Sprint. I haven't used it outside of its mobility environment. Perhaps it is as encapsulated as .NET languages. It certainly isn't on the mobility side.

iDeveloper 21 Light Poster

www.codeproject.com would be a great source for you to look at. They have a lot of tutorials on this topic. All it is, is an application which keeps running on the server where you database resides. It provides a collection of public methods which provide some sort of 'service' such as updating or deleting information in the database.

iDeveloper 21 Light Poster

Alright, perhaps what you're trying to create is a reusable class which utilizes this algorithm. What languages is this going to be done in? You could probably start looking at object oriented programming. I think that's what you're looking for.

iDeveloper 21 Light Poster

Not that i've heard of. Well, there is a framework for PHP that i remember messing with a long time ago. It actually allows you to create a PHP project in Visual Studio. However, it was so buggy, i never reallly got anything good out of it.

iDeveloper 21 Light Poster

I think the most practical language would be C++. It's not about how many languages you know. Believe it or not, if you know 1 fairly well, you'll be fluent with about 90% of the languages out there in about 2 hours. C++ is a great language to start with because it exposes you to real software engineering topics such as object oriented design and memory management. Java would also be a good one here. So these are my 2 picks.
I would really stay away from the .NET platform (for now). .NET language encapsulate a lot of important details of daily programming. You'll just never be able to understand/learn things as well as you would with other higher level languages.

iDeveloper 21 Light Poster

Anything counts. If you work on anything on your own time, it could be a great addition to your resume. In fact, some employers actually ask you to bring code samples of your these projects and literally go through the code with you pointing out possible flaws, memory leaks and asking for potential solutions. (That is, if you're a college graduate.) But yes, like the person above me mentioned, you need to be knowledgeable about everything you put on your resume. Employers will drill you about the stuff you put on there.

iDeveloper 21 Light Poster

Time management application, where you'd be able to enter some task, add assignees and charge time as you work on it.

iDeveloper 21 Light Poster

What exactly are you refering to, when you say 'modular'? You mean how to write a function/procedure based on an algorithm? Or are you trying to write a pseudo-code using some sort or algorithm? Pseudo-code isn't really dependent on any language. I think there is a standardized way of writing pseudo-code, but it's generally written in a form that is the the easiest to understand. Have a look at some examples: http://en.wikipedia.org/wiki/Pseudocode

iDeveloper 21 Light Poster

MIS is similar to Computer Science, but is more heavier on the business side and IT systems (servers, routers and etc) rather than the actual software engineering. A lot of things you'd learn as an MIS major is how to run an IT business. Computer Science is mostly about software design/planning/engineering and computer architecture such as gates, adders, multiplexers, decoders, caches, etc and how they're used in computer components.
CS is also heavy on math. You're looking at 3 calc classes, discrete math, differential equations, some probability for computer networks and applications, numerical analysis and some physics. I'm not entirely sure, but i think MIS only covers half of that. Finally, you'll be dealing with a bunch of programming classes in CS. MIS only covers a few, to get your feet wet. The rest would be business classes.
Hopefully you haven't changed your mind about CS, in case you wanted to take this diection :) It's not as difficult as it may seem but you'll need to be ready for some heavy studying. MIS is like a shortcut to the IT world. You'll probably be able to land a job as a developer after getting you degree. However, lot of people do technical support or Quality Assurance (they're software testers, documentation and project planning guys.)

iDeveloper 21 Light Poster

Hey guys, i thought this would be a good place to ask my question.
I'm a student, graduating this winter with BS in CS and going back for my Master degree. I also have an internship for 2 years now, which involves software troubleshooting and engineering. To be honest, i love programming and have no regrets about my career path, but i absolutely cannot stand my job.
I don't know if it's just me or not, but as i got into doing some software development at this place i found out that there is really no development cycle here whatsoever. Everyone does their own thing, the tester pops up every once in a while and starts arguing about the requirements. In fact, i've worked on a couple of minor projects and didn't get requirements until i actually finished the damn project. Management is a terrible show stopper. Can't move without management approving something, which takes days. Every once in a while some manager's report or application breaks and literally takes priority over every single project that you'd be working on. So you just drop whatever the heck you're doing with complete disregard of its priority. Everything just seems inside out and upside down.
Some projects requests coming in with project description of literally 1 sentence, describing what needs to be done. So you spend weeks in meeting with people who are completely unaware of the actual project request and who tell me that the process is complex …