Jump to content

aspnetguy

Members
  • Posts

    6,787
  • Joined

  • Last visited

Posts posted by aspnetguy

  1. That's C#, is it not?[Moving the topic to .NET]You'll need to lock the file as you modify it with each thread. That's how the concept of "critical resources" (and to be more precise, "mutex"-es) works. Lock right before opening the config file, and unlock right after saving it. Prepare yourself before the lock, and do the modifications you want during the lock, including the load and save, with as least statements as possible.During a lock, if another thread reaches a point where it too needs to lock the same resource, it will wait until the resource is unlocked. As soon as that happens, it will take the lock, and the same thing would repeat in case a third thread (or the former first) needs the same lock.The issues you're experiencing are exactly due to the lack of synchronization (otherwise achieved with mutexes over critical resources). Even if your app seems to work currently, it's fragile, i.e. there will be some cases, maybe only on some computers, where it won't work.
    I recently experienced a problem like this. I had a proxy server running as a Windows Service that receives requests from multiple users on a machine and from other machines. I couldn't solve the problem of writing log files from multiple threads even with using mutexes or using the Synchronized TextWriters.I ended up writing a Queue that a write job would get added to and then the queue would iterate over it's jobs and write the logs every so often.
  2. We in America know that just because something has more votes doesn't necessarily make it the best choice.Everything has its place. Tables have their place like everything else, and sometimes the situation calls for a table layout. It doesn't automatically make you a bad developer. Like anything else, over-using tables creates a problem.
    Well said. Makes you wish Gore had won in the recount. http://en.wikipedia.org/wiki/Florida_election_recount
  3. cool, thanks for the advice! what about PHP, is that like ASP.net or something completely different?
    ASP.Net and PHP are very different.ASP.Net is...1) mainly a framework and runtime that compiles to a common language (CLR)2) a compiled (optional) language3) statically typed (by default unless you use something like F#)4) allows you to use the language you prefer like C#, VB, IronPython, IronRuby, F#, etc5) completely object oriented6) Windows and IIS only (unless you use the Mono Project [open source port of .Net by Novell] but it has limitations and some issues)7) hosting is generally more expensivePHP is...1) an interpretted language2) dynamically typed3) traditionally a procedural language but PHP5 gave it a huge boost when it comes to OO4) open source5) platform independant6) hosting is generally cheaper and easier to find
  4. Hello, W3Schools Forum. I am BlueDigit.I started programming two years ago, but since then, my skills have become less than useful. [>_>;]So, I'm re-learning everything, starting with JavaScript. It's going well, so far.So, ermm… Hi.
    Welcome to the forums. Just as a suggestion, forget about ASP...it is no longer supported by Microsoft and development stopped around 2000. IMO it is not worth your time as it really has no future except if you need to support legacy code.
  5. I think it is a misconception that Python is faster than PHP. Python has been optimized for mathematical algorithms so in that respect it will blow PHP out of the water but if you compare which language can server more web pages in a period of time you find that PHP is noticeably faster.

  6. My opinion is that it's not as hard as C++ and not as easy as PHP. I have been reading the Python documentation lately and it has some nice syntax. Python is a functional programming language. Lambdas are a good example of the syntax sugar that Pytho has. Django is a nice MVC framework for Python and IMO is a better choice than RoR.

  7. well I have a book on ASP and its a few years old, so it seemed logical to start with that, but I'm willing to learn anything to increase my skills and knowledge. I'll probably end up getting books on most of those langauges as I progress, but I was just interested in hearing what people had to say about each of them and what they use them for.
    Unless you really have your heart set on ASP it is probably a waste of time as it is dying out. There are very few companies/websites using ASP and the some of the ones that do (that I have noticed) are slowly transitioning to ASP.Net.
  8. There is no BEST language to use. You need to evaluate what is best for you based on current knowledge, hosting limitations, possible customer requirements, and the application itself.PHP is extremely popular. I use both PHP and ASP.Net. Both langages are about as far apart as you can get. There are many things I like and dislike about both. PHP is probably one of the easiest languages to get started with as just about very host supports it (including alot of free hosts).CF is not used a lot but there are still many that love it, just ask Skemcin if you are interested in knowing more about CF.I only suggested ASP.Net because you mentioned you wanted to learn ASP.

  9. I heard that MS will be forcing IE7 in another automatic update. Although there is an opt-out and some don't have updates turned on this should help get rid of some more IE6. I can't wait for IE6 to be gone forever!

  10. I have previously said that I liked Notepad2. This is no longer the case. Notepad2 starts chugging when files get big. This may not become and issue for HTML or PHP, etc but it is unusable when opening large configuration files.

  11. Well, firstly I would put as much as possible in the CSS but for things out side the CSS I think a seesion variable would be best for keeping track. Or possibly a cookie that way every visit to the site loads the last theme they chose. I like when sites remember what I like and load it for me :)

  12. is there an special reason you guys are not including your stylesheets like this?

    <link rel="stylesheet" media="print" href="/css/print.css" type="text/css" />

    What is the benefit of using import url()? Seems like just a bunuch of needless code on each page.

×
×
  • Create New...