Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

First, is the above block of code EXACTLY repeated in every textchanged event?

If so, the first step you can make towards reducing your code overhead is to take the above code block and place it into a separate function like so:

private void updRTB()
{
    string l_text = "";

    l_text = textBox1.Text;
    l_text += textBox2.Text;
    l_text += textBox3.Text;
    l_text += textBox4.Text;
    ...
    richTextBox1.Text = l_text;
}

and simply call that component from each textchanged event instead of having it appear separately in each one.

Second, unless you need a "real time" update of the RTB contents each time one of the 170 textboxes is changed you really don't need to fire it for every single textchanged event. However as this seems to be what you're going for I would further simplify by creating a collection out of the textboxes and cycling through that collection with the newline inserted every 10th cycle of the loop. Something like:

for (int a = 0; a < textBoxCollection.Count; a++)
{
    l_text += textBoxCollection[a].ToString();
    if ((a % 10) == 0)
    {
        l_text += "\n";
    }
}

But I leave it up to you to figure out the collection process :twisted:

Hope that helps :) Please remember to mark as solved once your issue is resolved.

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

By the way, as indicated here you can use the following method to read the MDF file without attaching it to your installed SQL Server:

Data Source='.\SQLExpress'; Initial Catalog=; Integrated Security=true; AttachDBFileName='...\Db.mdf'

Where your path in Data Source matches the installation path (generally a default path) for SQLExpress and the path in AttachDBFileName matches the installed location of your mdf file at time of your program being run.

Of course you need to ensure that other details are a match to your particular DB file like the catalogue and such.

Hope that helps :)

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

Huh.. be serious man. This is not easy.

Nobody said "this will be easy"... All Omol did was outline the base steps involved in response to a single (partial) sentence request for information.

In all actuality, if you're in a position to be asking "i want to make my own search engine as google what should i do" you don't currently have the skillset to do so. At least that's my opinion :twisted:

No faulting a person for being ambitious though.

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

Welcome :) Won't see me much in the php forum but glad to hear you're willing to help those who need it.

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

Welcome :) Won't see much of me in the forum sections you mentioned but hope you like it here.

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

Welcome to the forums and good on you for ignoring the "too old to start" rubbish :)

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

Welcome Quinn.

I might suggest that when pursuing your post-secondary education you include some 3d graphics design, Direct3d/OpenGL, CompSci, and even marketing in your list of things to study.

I mention the above because if your goal is to work within the gaming industry and particularly with Ubisoft a strong background in 3d graphics will be beneficial. The marketing is simply to give you the ability to best market yourself when it comes time to hunt for work :)

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

Welcome to the forums starlight, hope you enjoy your stay and glad to hear you've been finding it useful so far :)

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

If you have any knowledge of ASP.Net coding at all you might look into having different tables in different <asp:panel> and simply making the appropriate panel(s) visible/invisible as needed based on combination of drop-down and button click.

However, this does require a bit of coding knowledge in ASP.Net and a web-server capable of supporting .Net applications.

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

See, I agree with ardav about the fact that people do need to put some effort into trying to find their solution prior to posting a new thread... However, if people did that... 90% of the new questions posted wouldn't be and my post count would be around 100 instead of where it is now since I wouldn't have anyone to help :twisted:

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

To start this line is redundant:

c = System.Convert.ToInt32(Console.ReadLine());

As it has no bearing on the result of the codeand prompts an extra readline.

Secondly, as you already have:

using System;

You don't need to preface everything with System.

Third, prior to the end of your Main procedure you have an extra pair of braces that have no purpose and can be removed.

How I would have written it is as follows (however, I'm getting a nasty little glitch which I've seen before and can't explain where it doubles up the 2 input requests and only accepts the 2nd input):

static void Main(string[] args)
        {
            string name;
            Console.WriteLine("What is your name:");
            name = System.Console.ReadLine();
            Console.WriteLine("the name is " + name + "!!!!!!");
            Console.Read();
            Console.Clear();
            Console.WriteLine("wait there's more! ");
            Console.Read();
            Console.WriteLine("Simple Test ");
            Console.Read();
            Console.Clear();

            string a = "";
            string b = "";
            int c = 0;
            Console.WriteLine("Give me your first input: ");
            a = Console.ReadLine();
            System.Console.WriteLine("Give me your Second input: ");
            b = Console.ReadLine();
            c = Convert.ToInt16(a) + Convert.ToInt16(b);

            Console.WriteLine("ang sagot sa " + a + "at saka sa " + b + "ay...." + c.ToString() + "!!");
            Console.Read();
        }

For some reason the compiler is reading the whole segment for the first and second input together and only accepting input towards 'b' but I'm sure that's a glitch in the compiler and not related to the code as there's no logical reason for it from what I can see :twisted:

What I …

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

Couple of reference points related to this topic:

Now I could be wrong here but it looks more and more likely that even though you are able to detatch and distribute your mdf file with your application it will still only be able to read the mdf if sql server (express, or whichever) is on your target machine as well. At least one of the above links does have a connection string sample of connecting to a local mdf file however.

Hope that helps :)

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

That works too, and as indicated in that "Note that sometimes it is easier to use the DataSource directly" which in it's own way can be accomplished in the way I said with an "AS" modifier in the select string. As for the width, you simply did it the 'front-end' way while I was doing it the 'back-end' way :twisted: Glad you got it sorted though.

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

One method for changing the column header is to change the name of the column as it's pulled from the DB with the "AS" modifier.

As for the width it can be dynamically set with the equivalent of:

dataGridView1.Columns[0].Width

Hope that helps :)

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

If anyone know of any programs that have the p.code and the actual code, where i can study it so that i'll understand exactly what i need to do to learn how to write p.code, and adapt to writting the p.code before my program......

While I don't have any side-by-side examples to provide I'll try to give a bit more detailed explanation of the process from my own understanding with a generalized example.

Let's assume you have a lemonade stand (ya, like one of those needs a software designed for it but we'll go with it anyway cus I'm not feeling very creatively inspired).

For each glass of lemonade sold you charge $0.50, there are 10 glasses in a pitcher and a pitcher costs $2.00 to make. You've purchased enough ingredients to make 40 pitchers and you want to track your sales but also have the software tell you when you've 'broken even' on your costs.

P.Code:
--Initial Setup--

  1. Prompt user for total investment in ingredients (in this scenario input will be $80.00)
  2. Prompt user for cost per glass (in this scenario input will be $0.50)
  3. Determine break-even point (investment/cost)

--Start Program--

  1. Prompt for number of glasses sold for each transaction (request 'Enter # of glasses sold')
  2. Calculate cost of current sale (number * cost)
  3. Add to running total (totalCost += cost)
  4. Display running total (output totalCost)
  5. Check if running total is equal or greater than target (if (totalCost >= investment))
  6. If …
Geekitygeek commented: very well written example :) +1
Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

One example of pseudocode would be this.

Another would be this.

Basically a step by step breakdown of the steps required to achieve the task you're working on from which you can build your actual code. It can also be achieved through diagrams and flowcharts, whatever helps you illustrate the steps and logic required.

Hope that helps :)

Edit: nick's post above has a couple of decent resource links for learning about pseudocode as well if you care to look at them.

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

It's really all subjective based on the types of information being presented and what needs to be done with them. Basically just use your best judgement and you should be fine.

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

Short answer... No...

Long answer... Depends on who registered the domain and hosting for the site.

If the domain information is registered under the client's information then they can make a (good luck) request to the registrar and attempt to re-take control of the damain name itself. Provided that the client has enough information to do so. One catch to that, however, is that most (good) registrars will also email the contact on-file to advise them of this and the webdesigner could potentially block them.

If they are successful in obtaining control over the domain name they would then be able to point it to any alternate hosting platform of their choice. However, without having access to your current hosting platform site contents you would be in a position of having to completely re-build the site.

Unfortunately some designers are so protective of their content and design that they turn to these types of tactics to prevent someone else from 'picking up where they left off' and stealing their business. What many don't realize is, if they were doing a good job in the first place for a market-reasonable price they wouldn't need to worry about this. I speak from some personal experience as, in the past, I have done some site management and web design work for people and they have always had the option of buying out the content I had custom made for them at a reasonable price should they decide to take …

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

It all depends on how each element of the table needs to be seen by the end-user and what abilities they need to have related to managing that information.

If the end user just needs to be able to SEE the information (at a given point) then you can get away with just about any presentation method (from repeaters to tables and so on). If the end user needs to be able to modify information dynamically then you will be limited by presentation methods that allow for this (or have the ability to be programatically enhanced to provide dynamic update).

My personal 'rule of thumb' is... What ever looks best from the list of things that work :twisted: ie: find out what works for what your end user needs THEN worry about how it'll look.

Hope that helps :) Please remember to mark solved once your issue is resolved.

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

I would like you to check the C forum page now(and next pages also), you will surely find more than 7-8 threads falling in the slot.

What you are talking about is a word I coined a few months back and that is Necroposting...

Y'see, there's your problem right there :twisted: out-of-date dead language promotes "necroposting" ((just kidding, really!)) I guess I just didn't see it as an issue because I haven't been seeing it happen much in the forums I regularly hit ((C#, ASP.Net, Web Development)). Admitedly I don't spend much time on the other forums so I can't speak for the 'site-wide' point of view.

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

I can see your point, really, but I still say it'd be more hassle to code than it'd be worth for the amount of times I've seen the scenario occur. Granted you've been here longer than I have but I honestly don't see that many threads being needlessly bumped.

As for an indication about posting new threads, if the thread is marked solved then there IS a statement that says the thread is solved and recommends creating a new thread. The problem there is that it only shows up on solved threads (leading back to my edited point in my last post :twisted: ).

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

I'm confused here... you have actual code and you want to convert it to pseudocode?

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

Well that's not quite what I meant by ratio but...

If your width was 800 and you increase it by 200 then your new ratio is 10:8 of the original or 5:4 <--> (800+200):800.

Edit: That's an increase of 1.25x the original image if you don't like the 5:4 way :twisted:

Hope that helps :) Don't forget to mark solved once your issue is resolved.

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

I can't attest to whether there's anything that ASP.Net can do that php can't... What I can say is that for web development ASP.Net is a very powerful language with a lot of built in functionality.

If your focus is web development, it never hurts to have more languages under your belt and more and more companies are looking for people who have ASP.Net skills.

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

Personally I'm curious as to why it's such an issue if an "old" thread is bumped to the top of the list. It only takes a moment to open, look at, and decide that a post is 'out of date' and it's not something I see happening all that often (in the forums I'm reading anyway).

The only situations where I've seen an "old" thread pop back up are:

  • Someone with a similar/same question decides to add to old thread instead of creating a new one
  • Spammer/miscreant posts an unrelated post in an old thread just to propagate their link/BS/whatever and gets promptly deleted by a moderator after a member like me sees it and reports the posts

In the former situation it's no biggie, someone usually answers the new question or the thread gets ignored as "out of date" and disappears back into obscurity again... In the latter situation, no biggie, once the offending post is deleted the thread drops back to where it was in the first place.

Either way, is there a reason to go through the hassle of coding the back end of DaniWeb to make a new marker just because someone bumped a thread? Not trying to shoot the idea down just not seeing the point :twisted:

Edit: As a side note, what would be nice would be the ability to 'vote to mark solved' for threads that are obviously resolved but the original poster never 'solved' it (never …

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

Well, as I said, I don't know foxpro, which is why I included a link to a resource I found related to foxpro.

Sorry I can't be more help but I was more or less being speculative based on a general knowledge of DBs since I don't know the specific workings of the DB you're using.

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

Unfortunately I don't have a sample script on-hand to provide you right this moment but...

1) you have no action defined... this would generally be where the form calls either a server side or client side script to process the submitted information and perform the tasks you require of it. Currently, from what I can tell, it'll just perform a page postback with no action.
2) you can utilize (in most cases) your web-server's built in mail functionality (with the use of a script as outlined above) to deliver the mail while simultaneously providing the on-screen feedback result you're looking for. There are a number of pre-written scripts in languages varying from javascript to php to server-side ASP.Net scripts but again I don't have any on-hand to provide you with at this time.

What I might recommend would be a quick google search for "form mail" scripts and see what you can find (unless someone else here feels up to writing or providing one for you).

Hope this helps somewhat :) Please remember to mark threads solved once your issue is resolved.

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

Welcome to the forums Balinda and hope you enjoy your stay :)

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

so databinding it fixed my issue, thanks for the help again.

I got diverted by other threads but I was also going to say that the issue may have simply been a matter of setting a 'default' selected item in the drop-down at time of binding as the issue you mentioned before seemed as though it was trying to use a selected item when none were "selected".

But I'm glad you got it sorted :)

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

More or less same thing applies, " can be written as '\"' or @'"' or if presented in it's alternate form @"&quot;".

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

Stephen;

Members are always happy to assist (from what I've seen) when others are in need with their coding, all that's usually asked in return is that you show some effort towards finding answers yourself before posting in the appropriate forums. That, and a brief perusal of the forum rules to keep people from jumping on those little mistakes here and there :twisted:

Welcome to DaniWeb and I hope to be able to answer some of your questions in the future (assuming they're in areas where my knowledge can come into play).

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

Thanks again folks :) Dutifully adding links as they come in.

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

You're too quick for me nick :P

I had just finished editing out that portion of my reply and as the page reloaded here was your reply about it :twisted:

Ah well, note to self, don't skim the forums here until the first half of the Red Bull has kicked in!

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

Not so familiar with foxpro myself but I would assume that if you have the ability to read deleted and non-deleted table entries there must be a bool value somewhere that is associated with the deleted state?

In that case, would it not be possible just to use the equivalent of "WHERE !isDeleted" or whatever the equivalent format in that DB type would be?

From what I'm reading here you should be only receiving deleted rows if you've got "Set Deleted Off" command as part of your connection to the foxpro db in the first place.

Hope this helps :) Please remember to mark as solved once your issue is resolved.

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

Well, from first glance 1 of 2 things is happening here:

  1. You don't have rights set up correctly to access that directory via your webserver
  2. A file already exists by that name in that directory and the rights haven't been set correctly to allow an overwrite of the file

One way to test the 2nd possibility is to try uploading a different file name after confirming that it doesn't already exist in the target directory and see if you get the same error.

Alternately, check your IIS settings on the remote host to confirm that a) the working directory you intended is properly set and b) the permissions are set in such a way as to allow access (read/write/modify) to the required directory in the method you're using.

Hope this helps :) Please remember to mark the thread solved once your issue is resolved.

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

As nick indicated (but I'll expand on a bit) if you're trying to match the character '\' you need to write it as '\\'. This is because '\' is considered part of an escape sequence when identifying characters that are otherwise reserved for use within your coding.

For more information on escape sequences check here.

Hope this helps :) Please remember to mark as solved once your issue is resolved.

Edit: Darn you Ryshad you beat me to the edit :P was about to include the @"\'" option then saw your post haha

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

AngelicOne;

  1. What is the date/time format of the picker producing? (ie: what is the order of the date/time value)
  2. What error are you getting when you say it "doesn't work"

In theory the date/time generated by the picker should match an accepted date/time format in use by SQL server, however, if it doesn't then you would receive an error from SQL Server indicating an invalid date/time format. If this is the case then you need to change the format output of the picker to match an accepted format for date/time before submitting the result to the database.

Hope this helps :) Please remember to mark the thread solved once your issue is resolved.

Edit: removed portion of my reply that was a result of not enough caffeine and having just woken up :twisted:

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

:twisted: My method was more of a "theory-in-practice" method but ryshad's got the point of it and I like his method as more simplistic to implement.

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster
string eventOccurrenceUrl = --determined at time of eventOccurrenceDrp population as first value in the dropdown--;

protected void eventOccurrenceDrp_SelectedIndexChanged(object sender, EventArgs e)
{
    eventOccurrenceUrl = eventOccurrenceDrp.SelectedValue;
}

overLoadEventHyper.NavigateUrl = "~/SignupForAnEventOccurrence.aspx?eventAuid=" + Request.QueryString["eventAuid"] + "&eventOccurrencesAuid=" + eventOccurrenceURL;

I would leave it up to you to figure out where in your code each part of that needs to go but the concept is simple enough... at the time that eventOccurrenceDrp is populated the initial value of eventOccurrenceUrl is populated as well. Any time the drop down selection is changed it changes the string value to correspond.

Hope this helps :)

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

Care to share the code driving your extender (specifically any areas you modified) so we can see if there's anything there to explain what you're saying is happening?

((And on that note, good people, good night :zzz: ))

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

This reference might help. :twisted: Looks like it addresses exactly what you're asking for here with about 2 lines of code.

Hope this helps :) Please remember to mark this thread solved once your issue is resolved.

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

As I mentioned before, some 'custom controls' are available that will perform multi-select functionality (and much more) for you.

Unfortunately, many of the more advanced ones also cost money to get a license to use.

Some examples are at this link however and maybe you can find one to match your needs.

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

Short answer, no...

Long answer, noooooooooooooooo :twisted:

Each calendar can select only one date (if you're using the default asp:calendar as indicated) though I'm sure there are some Spry or AJAX modules that you can install that will allow selection of ranges or multiples.

If you require multiple dates using the default calendar, however, you will require multiple inputs and multiple calendars.

Hope this helps :) Please mark the thread solved if your issue is resolved.

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

You can always un-solve the thread if you want to continue the discussion :twisted:

On that note, I don't have an answer for you at the moment, sorry.

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

If the computers are all part of the same network you could theoretically tap into the host (server/host computer) of the network and derive all of it's client IPs...

As a side note, perhaps this thread (go go Google) might help you out a bit since you seem to be asking the same question.

Hope this helps :) Please remember to mark as solved once your issue is resolved.

Edit: Look what else Google popped up :twisted:

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

your application willnot able to check creadantioal

This is dependant on browser as well as postback properties of the pages. Even if the browser is pulling the page content from it's cache, if the page code requires a check of credentials at page_load it should still technically be performing this check whether it's cached or live.

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

Now that brings back memories... the movie HACKERS was one of my all-time favorites, despite the drastically unrealistic graphics and the insanely hillarious attempts at tech-talk :twisted:

Welcome to the forums.

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

I'm not much of an IRC person myself.

Between the hours I put in scanning the forums for questions I can answer and the hours I put into my job search and the hours I put into continued development on my website and the hours I put into trying to learn new development languages.....

IRC would be just a bit too much distraction :twisted:

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

Glad you got it sorted :) Was the problem based on what was suggested above or something else? I'm just curious.

Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster

Should be able to use this to do what you want...

string path;
   path = System.IO.Path.GetDirectoryName( 
      System.Reflection.Assembly.GetExecutingAssembly().GetName().CodeBase );

Got that from this source. There's also a VB method there as well.

Hope this helps :) Please mark as solved once your issue is resolved.

0xCMD commented: Thanks I'll try the suggestion and reply back. +0