Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

So I guess what I was trying to get at is this. Why are you trying to build the whole thing 2 dimensionally? Why not build your 'ruler' in one step and use the magic of Z-Axis to place the square wherever you'd like over top of it?

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

I'm somewhat curious why you wouldn't do something along the lines of the following:

1) determine the width of your primary rectangular div
2) determine the width of your central piece
3) deduct half the width of the central piece from half the width of your rectangular div
4) divide the remaining space by the number of increments you require
5) use float: left to place your fixed-width div containers with tick image (I find divs more cooperative than spans) from the left side in to the central piece and float: right to place your fixed width div containers with tick image from the right side in to the central piece and absolute position your central piece over top of the works in the middle.

Just a thought, but once you've done the maths to determine the width of your 'tick' divs it's just a matter of putting 4 floated left and 4 floated right and you're done with your ticks.

Feel free to ignore me though. I'm just tossing random thoughts out to try to help based on my interpretation of the required end result.

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

Essentially you're asking it to send a variable that for all intents and purposes does not exist. One option is to try what flexibleres suggested and set a default value so that it is going to send at least NULL to the stored proc. If you want to get more complicated you can set some basic error handling in your page-side script that checks for a value in the middle name and if there is none, THEN sends NULL to the stored proc. Either way, as long as at least NULL is sent (as opposed to nothing, which is vastly different) you shouldn't get this error.

The only catch here being that you cannot have a Not Null qualifier on your table column or it will REQUIRE a value no matter what, and NULL will not suffice.

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

So... my first question is... is this website hosted on a domain somewhere or is it hosted on your local computer?

The reason I ask this is because your connection string seems to be pointing at an access database on a local drive as such:
C:\Program Files\Common Files\Microsoft Shared\DevServer\10.0\CitiesDatabase.accdb

So... if it's hosted online one might want to double-check the connection string to ensure it's properly pointing to the .accdb file location. One may also want to make sure that the perms on that file are set correctly in such a way that the code can actually reach the file (i.e.: readable/writable).

It's somewhat difficult to tell as the code you provided doesn't seem to fully encompass the connection string other than to reference a connection type and a .mdb file and doesn't indicate anywhere within where it would be referencing CitiesDatabase.accdb.

My thought is that, if it's not related to the code above... you may have data connections hard coded into the front end of your page in datatables or dropdowns or the likes which are pointing at local files instead of site resources.

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

Um... I guess first off the main question is do you know what pseudocode is?

In case you don't it's the written process of working out the logic for a given code problem. I.e.: The steps that will be required to reach a required conclusion. It doesn't involve actually writing the code itself, just the logical steps you'd take to get the job done.

Having said that... Are you really asking people here to do this for you?

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

Logout issue seems resolved for me (I didn't do anything on my end it just stopped logging me out as of some time after I went to bed last night).

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

Wow... Let me start by saying I love the new look. And I'm sure once it's all smoothed out it'll work great too :D

That being said...
1) I keep getting logged out every couple of minutes and I don't think it's my browser as I have zero issue with staying logged into any other site I'm on, my cookies are active, etc etc etc (insert list of common website connectivity reasons here).
2) I would have liked to have kept my "Practically a Posting Shark" title but when I went to modify something else found that my old (read: provided by DaniWeb prior to the change) title was longer than 20 characters.
3) I kinda liked/had grown attached to my old avatar but I'm guessing as it was stock from the old bb it had to go /pout

Edit:If it helps I'm using Firefox 11.0 btw and am on Win7 64 bit on a PC whose specs I'll leave out of it as they have nothing to do with this issue (and have been known to make my friends a bit green with envy)

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

Oh snap! I forgot to close this.

Yeah the issue was me being out of practice and completely forgetting that, while a C# program will carry forward variables from state to state, a web-based asp.net script will not carry said variables to the next page state without storing them in some way between states.

Being lazy, I'll just store the "answer" in an invisible field on the page as it's only a "Human Verification" deal and not of any grave security concern.

Thanks again for the help folks :D

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

I might point out, from a quick browse of your recent posts that the reason for the most recent down vote was most likely as a result of posting in a solved thread with a new question.

Generally, if you have a new and unique question it gets a new thread, if your question is "solved" by someone else's post's resolution then it gets no thread at all. Resurrecting someone else's solved thread to start your own question is generally looked down upon.

As mentioned above, however, if you didn't get reputation loss from it, it really doesn't affect you other than as a reminder that you perhaps didn't do something in the accepted way, which is kind of the point of the voting system around here last I checked :)

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

You know... I never thought about that... the thing I've been doing is generating (for testing sake) the answer into the hAnswer.Text at the point it's generated. It never occurred to me that during the postback of the page it might clear the variable...

I always kind of figured the point of a locally stored variable was to store info between states lol

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

Depending how you plan to go about it, it seems like a simple matter of assigning different functionality based on different access and ownership permissions.

You're going to need a database table of some sort for general authority levels (Admin, user, advertiser). You're going to need another table in that database to keep track of listings and who owns which ones (advertisers) to allow them owner specific permissions (review, modify, delete) once added. This additional DB table could also track the bidding or you could have a 3rd table for this purpose.

Beyond that, the "how" is really dependent on the media... It would be somewhat pointless for me to start throwing c# ASP.Net script at you if you prefer to work in VB for example. And likewise pointless for me to throw MS SQL database structures and/or queries at you if you're going to use some other method to store the data.

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

Well, as I said, if I insert a line that says hAnswer.Text = hAns it then places the value into hAnswer... following that, the comparison of hAnswer.Text to hAns should match but it still doesn't for some reason.

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

It's been a long while since I've last been here but I've spent the last 2 hours pulling my hair out trying to figure this out and I'm hoping for a bit of help with this one.

I have a question/response check (a human verification check) on my page and it refuses to work... I've written the code such that it generates the question and answer on Page_Load only on the first (non postback) load. I've generated a label which has it's text property pulled from the Question as generated on Page_Load and I'm trying to validate the answer from the generated answer from Page_Load. For some reason it always validates as false even if I put the answer straight from the expected answer into the text box I'm validating from.

Question/Answer Generation:

private string hQuest;
    private string hAns;

    protected void Page_Load(object sender, EventArgs e)
    {
        if (IsPostBack == false)
        {
            humQChange();
        }
    }

    private void humQChange()
    {
        humScript regHum = new humScript();
        hQuest = regHum.getHQuestion();
        hAns = regHum.getHAnswer();
        hQuestionLabel.Text = hQuest;
    }

Validation:

private bool checkHumResp()
    {
        if (hAnswer.Text == hAns)
        {
            return true;
        }
        else
        {
            testLabel.Text = "Failed";
            return false;
        }
    }

Even if I put a line of code in that tells it to fill hAnswer.Text with the value from hAns I still get a failure when validating one against the other. Both are string based variables so this isn't making any kind of sense to me.

Any suggestions?

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

Lack of
sqlConn.BeginTransaction();

Not sure if this is currently a standards requirement for TSQL or not but at the time that I wrote the snippets it wasn't absolutely required in order to make the code work.

My intention was to show the basic usage as *required* to complete the tasks as at the time it was a very commonly asked question and the snippets are sufficient to allow someone a working ability to fulfill the functions stated (with the exception of the above corrected typos of course).

I'm sure that the code could benefit from a plethora of refinements but still functions as stated :)

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

oh, my God, above what is written in the recovery are not in line with the meaning of

Sorry if this seems rude but... um... huh? This post made no sense at all to me. What were you trying to say here?

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

on line 7 what does "feedbackAdapt" as i think its a parameter or sumthing....

Was actually a typo

feedbackadapt and feedbackconn should be sqladapt and sqlconn

Sorry for the confusion

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

Good Morning and welcome to DaniWeb.

Your thread is important to us and has been placed in a priority queue.

In order to expedite your thread please have the following ready:

  1. An example of the work you've done to solve this problem yourself
  2. An indication of any effort whatsoever
  3. Anything that indicates that you didn't just come here to have code spoon fed to you without any work on your part

Thank you for holding, the next available member will be with you shortly. While you are waiting, please feel free to review the following information as it may help with your current needs.

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

1) it might help to share the specifics of the warning/error you are receiving as most people aren't going to be able to magically read your mind and determine the error you're receiving in order to help you solve it.

2) it might also help to share some of the code involved in the page that is generating the error... see point 1.

Other than that, I honestly don't know what's causing the error for you... my crystal ball has been in the shop for weeks now :twisted:

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

For return values use return...

ie:
if @count=0
insert into Author values (@authorname)
return 1
else
return 0

if 1 is returned then it succeeded, if 0 is returned then it failed.

At that point you simply check the returned value as it is received from the SQL server on completion of the stored proc and act accordingly in your C# program.

That being said, you can also be a bit more expansive with your returns and do an additional checking step to confirm successful insertion of the new record. This would require an additional return value however such that you have one for the name already in use (fail), one for name not in use but insert failed (for whatever unforseen reason) and one for successful insertion.

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

I threw this together to illustrate what I was trying to convey with my pseudocode before. Please note that the reason I used .ToLower() on my inputs is to ensure that all characters being compared are in the same case as upper and lower case characters count as different when doing a straight comparison. In order to get the same result with the second compared to first (instead of just first compared to second) simply add another pair of loops with the reverse order for the comparison and you're set.

static void Main(string[] args)
        {
            string unmatched = ""; // Define output string
            string word1 = Console.ReadLine().ToLower(); // Read input of word 1
            string word2 = Console.ReadLine().ToLower(); // Read input of word 2
            char[] word1charArray = word1.ToCharArray(); // Convert word 1 into character array
            char[] word2charArray = word2.ToCharArray(); // Convert word 2 into character array
            bool match = false; // Matched character condition set

            for (int a = 0; a < word1charArray.Length; a++) // Iterate through characters in word 1 array
            {
                for (int b = 0; b < word2charArray.Length; b++) // Iterate through characters in word 2 array
                {
                    if (word1charArray[a] == word2charArray[b]) // Check if current character in word 1 array matches current character in word 2 array and set flag if matched
                    {
                        match = true;
                    }
                }
                if (match != true) // If no match through all characters in word 2 with current character in word 1 add word 1 character to output string
                { …
Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

It's not that it cannot be done without stored procedures, it's more that it's not as secure to do so without stored procedures.

When dealing with login procedures it's safest to keep user and password variables from being passed around from place to place.

Using stored procedures keeps the entire process on the SQL server with no data being passed other than confirmation of valid or invalid results.

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

reemhatim;

While I'm not about to go ahead and do your code for you I will do what I can to put you in the right direction.

Using the following method you should be able to determine the letters that are not repeated between the two.

  1. Input user selected words as character arrays
  2. Loop all characters in array 1
  3. ForEach character in array 1 check each character in array 2 for equality
  4. if character from array 1 matches 0 characters in array 2 then append to string variable for output
  5. as additional step you can loop all characters in array 2 and compare them to array 1 as well so that you get all characters from 2nd word that don't match first word as well
  6. output string with unmatched characters

Based on your original example "Computer Program" output for option 1 would be "Cute" output for option 2 would be "CutePga"

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

Well there's an option where you can pull the UN/PW from the DB based on a query which checks against the UN only and confirm the PW against the associated PW for the UN you pulled.

In doing this, even if the PW is incorrect you still verify that the UN exists.

However, if you're not careful with the coding then you've now pulled the PW into the code-behind as a variable which is potentially accessible.

What you could do is have both functions as stored procedures on the SQL server however. Benefit of this is that the checks are all done on the SQL server and do not ever come across to the code-behind.

Basically... SP#1 = check if UN exists in SB
if SP#1 returns records == 1 then execute SP#2
SP#2 check if PW matches record for associated UN
if SP#2 returns records == 1 then execute login
else execute failedLogin

Dunno if that makes sense but hope it helps.

AngelicOne commented: good logic +1
Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

Well...

"Rabbit, how and when are these deaths to occur in either case? You make a vague statement implying that I will kill myself by killing you or kill my family by not killing you, however you do not state how either party dies or when. Is it not possible that I can kill you, eat you, sew your hide into a nice hat and live to a ripe old age but still 'die' eventually based on what you say? Is it not further possible that I may spare you, find my way home, eat a nice big meal with my family and watch them grow old around me, eventually dying of natural causes based on what you say? Please define the terms of your statement more clearly."

:twisted:

EDIT: And when he's busy paying attention to me, the bear eats him... I shoot the bear and end up with a bigger meal, more hide to make clothes with, and food to bring home to my family as well...

Sulley's Boo commented: LOL +7
Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

AngelicOne;

For shame... I thought I'd trained you better in the art of posting questions :twisted:

No code examples, no real details of any sort. You're breakin' my heart here man!

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

Besides, the family dying is likely a result of him going off the deep end due to starvation induced madness when he doesn't shoot the rabbit and eat it. And him dying is likely the result of the fact that the rabbit is running around with some unfortunate disease that's given it the ability to talk while being deathly toxic to eat...

((Now I'm just being silly so disregard this part))

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

The thing that gets me about this 'scenario' is that there are no timeframes set for either statement.

"If you shoot me you will die" Well, if you don't shoot it you will still die, some day.

"If you don't shoot me your family will die" Again, eventually, everyone dies.

Personally, I'd take the chance and shoot the damn rabbit. I'm hungry, he's food, and the latter threat involves potentially killing my loved ones where the former threat involves my own death. I have no place to make a decision on behalf of others for their lives so... *shrug*

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

just use the [color=red] ... [/color] color tags.

One thing I'm curious about here is whether your example requires the noparse tags you used in order to work. If so, that may be why I had no idea you could do this because I don't recall coming across something in the past which says "if you want to use special formatting within the CODE tag formatting segments, use this additional step to surround the formatting tags or they won't work.

EDIT: I'm obviously not awake yet this morning as the noparse portion was likely just to ensure that the tags you were giving as example would show up without the parser converting them... duh...

In either event, it's interesting to know that color formatting will work in some situations while failing in others. It would be nice to have the ability to use the additional formatting options in all cases instead of a little bit here and a little bit there.

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

I find myself curious what language(s) if any you used prior to learning C#.

The reason I ask this is because I notice that you don't use any braces with your if/else statements. While they 'technically' can be omitted (as is evident from the fact that your code works without them) I've found that people whose first language is C# usually use them like so:

if (number % 2 == 0)
{
    type = "even";
}
else
{
    type = "odd";
}

Whereas people who started with a language such as python let the indents do the work for them mostly. The only reason this came up is that it can make it easier to sort the conditions relating to each state within the if/else structure and ensure that code is being placed/executed in the correct places. Potentially, if not careful, the statement:

else if (number % 2 == 0)
    type = "even";
Console.WriteLine(type);

Could be misinterpreted as having the writeline only occurring during the 'else if' portion.

Again, just a curiosity was all :)

Relating to your question, I would definitely have to agree with ddanbe about simplifying your statements. For a multiple possibility if/else there is a definite use for 'else if' but for something where there are only ever 2 possibilities a straight up if/else is enough.

The one thing that concerns me is that, based on your original code, you should never have an unassigned value as there is only …

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

Actually, to be honest I've found that it would be nice to be able to apply colour tags to lines of code that I'm trying to accentuate when posting code example responses or quoting the original code segment provided by the OP.

Unfortunately, the way the system currently reads the tags, it doesn't seem to read the colour formatting when it's within the code formatting tags.

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

The second it started playing royal fanfare music I closed the damn page :twisted:

If he is for real I'm amazed if he has gotten anything other than relatives and non-internet-literate friends as customers.

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

My question is, what input are you providing?

Is it at all possible that the original input has an extra character following the one you are replacing which is being shown in your result?

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster
FileStream f = File.Open(@"D:\TestData.txt", FileMode.Create);
f.Close();

Momerath's method will do what you require if all you need is the file to be emptied.

Essentially what it accomplishes is that it will open the file in create mode which makes any existing file with the same name be deleted and replaced with the new file. Further, the code closes the stream without adding to the new file leaving you with an empty new file.

If, on the other hand, you require some of the details of the file to remain then you will need to first read the details into a variable, prune off the unnecessary bits, then create the new same-name file and insert the trimmed contents.

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

Easily enough using left-margin: auto; and right-margin: auto; in the CSS for the containing DIV.

There's a lot of information on DIV and CSS configuration available if you do a search in Google for tutorials. w3schools is a good site for them in particular.

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

To be honest the above were just examples.

Many sites these days are fluidly laid out. Percentage placement and relative placement of DIV elements ensure the site looks "the same" in varying resolutions and browsers provided they're done correctly.

Similarly, em and % font sizes perform the same function on the display of the textual elements of your site to ensure the sizing appears uniform no matter the resolution it's being viewed in.

The difficulty with absolute positioning is that it generally starts from the top left of the screen and works down and across from there so... wide-screen vs standard screen may appear differently if not handled correctly.

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

See, now that makes much more sense to me than the looping that you were attempting before :) Glad it worked out.

Don't forget to mark your thread solved now that you've resolved your issue.

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

What would probably help here is to see the full content of your web.config file as it is likely that there is a duplicate definition present there.

Alternately, a definition may exist within the web.config that is previously defined within a superceding definition in the server configuration of your web-host.

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

Small addition:
In my country, the comma is the decimal separator.
In other counrtries it is the point.

Good point :) My statement was more towards the way the program looks at it however.

Int = whole numeral = no denomination of decimal or comma

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

Let me put it in a different perspective then.

Good
Person A gives an example of their work and is stuck in a particular place where their code isn't working. They've tried a few alternatives and it's apparent that they have the right general idea but are making a mistake or just misunderstood how something worked.
Person B gives a working example showing how it corrects the problem Person A encountered and Person A sees the reasoning and the mistake and corrects their work

Bad
Person A posts a question asking for a handout of code because they haven't bothered to look into or try to solve the issue themselves. They show no effort in their work and show no understanding of the key concepts in coding.
Person B gives a handout with no serious explanation of the concepts behind it.
Person A takes the handout, uses it, completes their project but comes back a week later with the same question (or a variant) because they didn't learn anything.

Not saying 100% that this falls into either category, just stating the logic behind my earlier statement.

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

ddanbe has the nail on the head there.

You are parsing text into integers. Any value other than a whole number (no commas) will be unable to be parsed in such a way and will terminate the process.

As a note, comma notation for numerals is not a computational or mathematical representation but a visual addition that, in fact, is rarely in common use any longer. The system doesn't understand 120,000 but would understand 120000. You would need to go into much more depth with your parsing if you want it to be able to handle comma-notation in your input.

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

Just a brief note here in relation to answering threads.

Person A asks question
Person B gives general answer with conceptual method
Person C gives spoon-fed answer complete with code
Person D gives spoon-fed answer complete with code
Person A takes spoon-fed answers, doesn't bother to look into conceptual method or learn how it works and learns nothing

Just a thought is all :twisted: carry on.

ddanbe commented: Good remark. +7
Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

Your issue seems to be related to the DataColumn and not the Global from what I'm reading of the error. Your error is contained within the following segment ... dc[1].ToString(); ... It reads to me that you are saying the following:

// Create DataSet ds from db.GetDataSet(Co)
ds = db.GetDataSet(Co);
// Create DataTable dt from the first table of ds
DataTable dt = ds.Tables[0];
            else
            {
                // Change the definition of Co
                Co = new Password('K', "").SetSql();
                // Re-create the dataset ds with new definition
                ds = db.GetDataSet(Co);
                // Create DataRow dr from dt which has not been reinitialized since
                // it's original values were pulled
                DataRow dr = dt.Rows[0];
                // Create DataColumn dc from dt which has not been reinitialized since
                // it's original values were pulled
                DataColumn dc = dt.Columns[0];
                
                // Cycle through the DataRows (you've only made one DataRow definition
                // which is the equivalent of row 0 of your table) within all rows of
                // the datatable
                foreach (DataRow row in dt.Rows)
                {
                    // Cycle through the DataColumns (you've only made one DataColumn
                    // which is the equivalent of column 0 of your table) for the table
                    // based on the dr DataRow
                    foreach (DataColumn column in dr.Table.Columns)
                    {
                        // Change GlobalVar2 to equal array position "1" of dc (which =
                        // dt.Columns[0])
                        Global.GlobalVar2 = dc[1].ToString();
                        // Change GlobalVar3 to equal array position "1" of dc (which =
                        // dt.Columns[0])
                        Global.GlobalVar3 = dc[1].ToString();
                    }
                }
                this.Close();
            }
        }

To be quite honest... between the DataRow …

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

I'm using the negative rep button for what it's intended for

My statement about the improper use of the reputation feature of this site was note solely directed at yourself.

If you scroll through the posts in this thread you will see that MANY of them have been unnecessarily hit with multiple negatives for no better reason than personal disagreement with opinion.

Ironically, while my post was as non-threatening as they come, someone still came along and anonymously down-voted it which makes me chuckle as it more or less proves my point.

The use of the reputation feature, to the best of my knowledge, was designed in order to show the perceived quality or lack thereof of a post in relation to the thread it was posted in. As an example... If someone asked for help in how to connect to SQL server via ASP.Net/C# and someone came along and tossed a completely incorrect answer in an unrelated programming language, that would likely deserve a down vote as it was non-helpful and unrelated. Alternately, if someone's viewpoint is different from your own, or you disagree with their stance or the way they say something and you're dealing with an 'opinion' related thread... voting them down simply because you don't agree with their mindset is not appropriate.

I can personally see that this topic (and ones like it) are definitely going to have a lot of people on either side of the line and many of them …

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

After reading through a few days of rather intense conversation on this matter I figured I'd toss in my 2 cents worth here for any who care to read it.

1) A recurring point that seems to be coming up is whether or not the U.S. Military has the right to ban the sale of a product within establishments that fall within their jurisdiction on their property. First, it's U.S. Military property, they have the right to say that bars of soap are not allowed to be sold there if they want to. Second, contrary to popular belief, the U.S. Military does not answer to or have to abide by civil legal or constitutional standards. They have their own legal code and rights standards in place and are a separate entity from the rest of the country in that regard.

2) Another point that seems to be at issue is whether or not it is right to play as the bad-guy in a military video game. This argument is particularly strengthened by the fact that it just so happens to be a recent bad-guy in our world's history. While I can admit to a level of distaste in the idea of playing as a 'terrorist' even in a fictional sense, can you honestly say it's any different from playing the Russians or N.O.D. or any other bad-guy in any other military style game that's come out where cross-faction play has been possible?

3) People have made a …

jon.kiparsky commented: Well put. +1
Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

I'm sure it's entirely related to the same issue that you're already debugging but news stories seem to be amongst the only types of threads that when I click on the name of the person who posted last in the threads list of whichever forum they're in brings me consistently to the first post only. (ie: it's not just the links within the thread but the one outside of the thread as well)... Just thougt I'd mention it.

As example, currently Ardav was the most recent person to post in the story about the US military bases banning medal of honor but if I click his name from the thread list it'll bring me to the top of the thread instead of his post.

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

My one question relates to the following segment:

if (ctrControl.Controls.Count > 0)
{
    ClearForm(ctrControl);
}

I'm confused as to what you're attempting to achieve here. Essentially, if I'm reading it correctly... You're creating a foreach statement at the top of your code that will cycle through (presumeably) all the controls within your form. You're creating IF checks for each type of control to handle different requirements in 'clearing' them.

Now, if I read it right, you're then saying "If the current control has subcontrols, recursively call this same procedure on the subcontrols."

I can see how this might cause a bit of an issue, particularly as you're creating a loop within a loop and utilizing the same variables for both loops which also act as controlling variables on both loops.

As indicated by rohand, however, it would be much easier to pinpoint specific issues in the code if the actual error was provided from the debugger for us to see :)

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

Form1 frm1=new form1;
frm1.show();
this.hid();

very useful Try it

So, I take it you didn't read any of the discussion that accompanied this snippet as it was explained that it goes beyond the simple process you provided here.

S'all good though, I can understand how spending an extra 1-2 minutes of reading can be a horrible waste of one's day :twisted:

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

I know that Housecall costs money

I use housecall regularly for free so not sure what you mean there :)

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

An example of where a DIV can do what a table cannot do would be the following:

Person wants to have a graphic centered inside a group of text with the text wrapped around the graphic. (ok, table CAN do this...).
Person further wants to have some text placed directly over top of the graphic, separate from the text that's wrapped around it (Uh oh, table can't do this).
Person wants a segment of their page to persistantly appear in the exact same location every time the page is shown, regardless of other page content (Absolute positioning of DIVs can do this).

Elihu5991 commented: Now you really have me wanting to learn DIVs. I've always wanted to though but this is a really good point. +0
Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

I might recommend that you try http://housecall.trendmicro.com/

It does have a small install component and if that doesn't install then you're pretty much not going to be able to use it.

Alternately, what you might need to do is find an anti-virus that runs off it's own bootable CD so that it can scan prior to windows loading. Odds are you probably have a rootkit virus (read: boot sector) in place that also has been programmed to 'block' the install of most common AV softwares.

The problem with rootkit viruses is that even with a reinstall of your operating system, many still persist. There are specialized tools out there to remove these but they can sometimes cause more damage than they fix depending on the source.