Mike Askew 131 Veteran Poster Featured Poster

Forgive me for only skim reading the code quotes as a ton of them, how are you trying to apply the XSL? what language etc? As I see no reference to it in what I skimmed of your above code.

Mike Askew 131 Veteran Poster Featured Poster

"The Microsoft Jet database engine cannot find the input table or query 'tblCustRecords'. Make sure it exists and that its name is spelled correctly."

Check your spelling your database table name correctly to solve that one, and that it is pointing to the correct database.

Mike Askew 131 Veteran Poster Featured Poster
Mike Askew 131 Veteran Poster Featured Poster

So what have you achieved so far?

Mike Askew 131 Veteran Poster Featured Poster

a good candidate is an expert in their field

Oops, there goes my chances ;)

Mike Askew 131 Veteran Poster Featured Poster
        private void UpdateXML(string ElementValue, string NewValue)
        {
            XDocument XDoc = XDocument.Load(XmlFileLocation);
            IEnumerable<XElement> Results = XDoc.Descendants("bookID").Where(node => node.Value == ElementValue);
            foreach (XElement Node in Results)
            {
                Node.SetValue(NewValue);
            }
            XmlWriterSettings XmlSettings = new XmlWriterSettings();
            XmlSettings.Indent = true;
            XmlWriter XmlOut = XmlWriter.Create(XmlFileLocation, XmlSettings);
            XDoc.WriteTo(XmlOut);
            XmlOut.Flush();
            XmlOut.Close();
            MessageBox.Show("Done");
        }

The following you pass an element value (as your example does, it does not pass an element name) and then the method will find all of that value and replace.

With your example data passing '1111' and '2223' as the new value returns the document:

<?xml version="1.0" encoding="utf-8"?>
<data>
  <book>
    <bookID>2223</bookID>
    <bookName>English</bookName>
    <bookPrice>2$</bookPrice>
  </book>
  <book>
    <bookID>222</bookID>
    <bookName>USA</bookName>
    <bookPrice>3$</bookPrice>
  </book>
  <book>
    <bookID>3333</bookID>
    <bookName>Singapore</bookName>
    <bookPrice>4$</bookPrice>
  </book>
</data>
Mike Askew 131 Veteran Poster Featured Poster
articleRichTextBox.SelectAll();
articleRichTextBox.SelectionBackColor = this.BackColor;
articleRichTextBox.DeselectAll();

Is how I've cleared selections in the past.

Raju Hasan commented: I also try this logic.But its not work still.I think i am faching problem to put code at the right position of my program +0
Mike Askew 131 Veteran Poster Featured Poster

Lol they provide some amusement :D Don't have to stop completely :p

Mike Askew 131 Veteran Poster Featured Poster

Hmm I'm afraid I've got no clue as to why that is occuring.

Mike Askew 131 Veteran Poster Featured Poster

Doing that requires knowing the proxies, off the top of my head I know we have at least three that I could be going through, and I don't know the addresses on those proxies

Mike Askew 131 Veteran Poster Featured Poster

Hmm seems my proxy servers are going to interfere with any desktop client :(

Mike Askew 131 Veteran Poster Featured Poster

Hmm it is a weird behaviour indeed. Im going to have to say im stumped at present as to why it does it? Not enough room on form maybe? But that would be silly as should be able to layer items etc.

Mike Askew 131 Veteran Poster Featured Poster

I can't recreate this behaviour. Ensure the Tab2 is selected first before adding into the TabControl and it should work. Else could you provide a screen shot of what is happening.

Mike Askew 131 Veteran Poster Featured Poster

Whats the best method to connect to this out of interest / some alternative methods? The original link I found in the old thread to an online client is blocked at work.

Mike Askew 131 Veteran Poster Featured Poster

Nothing wrong with bunnies, I prefer cats though, cats and pandas. Your bunnies just seem to be in every thread I read :p

Mike Askew 131 Veteran Poster Featured Poster

Ah fair enough, sounds far too much hassle for what it is worth :)

Mike Askew 131 Veteran Poster Featured Poster

As much as I love watching (most definately not stalking -shakes head-) this when I have spare time at work.

Would it be possible to add a drop down at the top which could isolate different sections of the website, for example only see activity occuring in the C# forum? Would be useful for monitoring the forums you can actually respond too :)

Alternatively an array of checkboxes listing all available sections would allow you to customise the feed slightly to be personal to your interests :) (Althought would look quite messy unless theres methods of doing this im not thinking about until writing this such as the ability to hide them when not wanting to change options).

ChrisHunter commented: Good idea +0
Mike Askew 131 Veteran Poster Featured Poster

Just watched the above linked video.

Looks rather similar to World of Warcraft, my old main game, spent far too long playing it.

Another game im seeing more and more time on currently is one called WarZ. It is currently in Alpha testing however is looking decent for a game at that stage. It is similar to DayZ in terms of it is a Zombie MMO Survival style feature. Run around a world collecting items you find and trying to survive, need food and drink, avoid zombies and other players, or kill them.

Mike Askew 131 Veteran Poster Featured Poster

My cat, Millie, never fails to make me smile.

@Michael, cats generally win that fight anyway I believe, they have a far more aggresive nature when they want to your average Dog.

The above statement excludes my cat, she hides from nearly everything :D

Mike Askew 131 Veteran Poster Featured Poster

Sadly your suggestion did not resolve the issue :(

RTBSelectBegin is declared at the top with a value of 0.
RTBSelectLength is also declared at the top with a value of 1.

The call is used within the following:

private void FormKeyPress(object sender, KeyPressEventArgs e)
        {
            if (rtbText.SelectedText == e.KeyChar.ToString())
            {
                rtbText.SelectAll();
                rtbText.SelectionBackColor = this.BackColor;
                rtbText.DeselectAll();

                RTBSelectBegin++;

                rtbText.SelectionStart = RTBSelectBegin;
                rtbText.SelectionLength = RTBSelectLength;
                rtbText.SelectionBackColor = Color.Red;
                rtbText.SelectionStart = RTBSelectBegin;
                rtbText.SelectionLength = RTBSelectLength;
                rtbText.SelectionBackColor = Color.Red;
            }
            if (rtbText.SelectedText == "\n" && e.KeyChar.ToString() == "/r")
            {
                rtbText.SelectAll();
                rtbText.SelectionBackColor = this.BackColor;
                rtbText.DeselectAll();

                RTBSelectBegin++;

                rtbText.SelectionStart = RTBSelectBegin;
                rtbText.SelectionLength = RTBSelectLength;
                rtbText.SelectionBackColor = Color.Red;
                rtbText.SelectionStart = RTBSelectBegin;
                rtbText.SelectionLength = RTBSelectLength;
                rtbText.SelectionBackColor = Color.Red;
            }
        }

This fires everytime a key is pressed within the form, checks if the key matches the currently highlighted letter in the richtextbox and then moves the highlight along by one character.

Mike Askew 131 Veteran Poster Featured Poster

Michael you and your damn bunnies are taking over! Welcome back Pamcakes. I do believe I've heard of AoC but never looked into it further!

 ,--^----------,--------,-----,-------^--,
 | |||||||||   `--------'     |          O
 `+---------------------------^----------|
   `\_,-------, _________________________|
     / XXXXXX /`|     /
    / XXXXXX /  `\   /
   / XXXXXX /\______(
  / XXXXXX /
 / XXXXXX /
(________(
 `------'

Theres a gun to kill all the bunnies with.

ChrisHunter commented: Well i guess his rabbits are going at it like... rabbits +0
Mike Askew 131 Veteran Poster Featured Poster

So after seeing the typing test Dani so kindly made the other day and put on the site I decided to kill some time writing a simple application to practice my typing on.

I have a RTB containing the text which I'm highlighting as I go type letters to show the next one. However using the code:

rtbText.SelectionBackColor = Color.Red;
rtbText.SelectionStart = RTBSelectBegin;
rtbText.SelectionLength = RTBSelectLength;

For some reason I have to call this twice to see any response? The letter does not highlight on first call, but an immediate second call of the same highlight method containing these three lines creates the desired result.

Any ideas as to why this behaviour occurs?

Mike Askew 131 Veteran Poster Featured Poster

Riahc3, it was mentioned earlier you can quote using the '>' character at the start of the quoted sentence. No need for writing out lots of quote tags :)

Demonstration this line is the following. "> Demonstration this line is the following."

Mike Askew 131 Veteran Poster Featured Poster

@Dani, Checked last night on my mac and Chrome works correctly there. Let me try IE shudders on the work laptop. See if it is browser related or my network.

Edit: IE8 fails also. My network must be blocking it somehow. Does it download any file like data? As all our downloads are parsed by an external gateway and this is known to block online installers etc that try to download the entire program through themselves as they dont redirect through this gateway.

Mike Askew 131 Veteran Poster Featured Poster

Hmm Dani, would my work proxy server have any possibility of stopping the results returning?

Mike Askew 131 Veteran Poster Featured Poster

+1

Mike Askew 131 Veteran Poster Featured Poster

Haha no issue whatsoever :) that would be the best approach from a WinForms point of view and is definately still worth knowing for the OP in their future practices.

Mike Askew 131 Veteran Poster Featured Poster

As far as I am concerned, since you can't post unless you are logged in then you should not be able to enter text.

I do agree here.

Mike Askew 131 Veteran Poster Featured Poster

Technically I could do select all off paper with a scanner though ;)?

Mike Askew 131 Veteran Poster Featured Poster

@Chris - Only issue with a combo box is looking at the provided code would lead me to the assumption this is a Console application and thus isn't applicable. (WriteLine calls etc, and the namespace, and the using clauses) ;p

Mike Askew 131 Veteran Poster Featured Poster

Huh? How can you do select all from a piece of paper???

AD, it was meant to be read sarcastically. Apparently I didn't make it unachievable enough to easily be spotted as sarcastic :(

Mike Askew 131 Veteran Poster Featured Poster
Problem One

We could firstly here use a switch statement in the Program class, here is some sudo code for it:

output "Which wood would you like?"
output "1) Mahogany - £160"
output "2) Oak - £110"
output "Choice: "
switch statement using the read input of number 1 or 2
option 1
    set deskWood accordingly
option 2
    set deskwood accordingly

Once you've done this your then left with two guarenteed string values, one for Mahogany and one for Oak. You can then check which one of these it is and apply the appropriate cost.

Problem Two

Make a method in the Desk class that is public (allowing Program class to call it) and returns a double (allows decimal point for currency). This will then return the value of the total of all costs to the program class allowing you to output them.

-

I will happily provide help fixing any code you write from the sudo code above, just didn't want to directly provide answers as it is homework.

ChrisHunter commented: Beat me to it, switch statement would be better in... case too. +4
Mike Askew 131 Veteran Poster Featured Poster

A great example just happened to me of the shitty posting system here.....
I typed up a long post and for some reason, Daniweb logged me out. First, why does Daniweb allow me to write a post if I cant post unless Im logged it? Flaw. Anyways....
I noticed this and I tried to "Select All.........Copy" the textbox. ITS IMPOSSIBLE TO DO. Keyboard shortcuts, select with mouse and right click select/copy, edit select all copy, etc. IT DOESNT SELECT IT AND/OR COPY. And now I have to rewrite the entire post again.
And now a new bug is happening, when I post code, if I click on a certain area in the reply box, text Ive typed before, moves around to the bottom. Its just horrible.....
Let's try this again. What OS and browser are you using and what versions? You've said you're having problems with Chrome, Firefox, and IE, but there's definitely something else going on because nobody can seem to reproduce the issues to the severity that you suggest.

Surely you don't think that we'd release something as bad as the above and claim that it's not broken. :rolleyes:

Its worth noting the select all functionality doesn't work when you print the website out on a piece of paper and try do it. Why doesn't this work Deceptikon :( I want printable functionality.

In other news..

Ctrl+A, Right-Click + Select All, work as intended.

Mike Askew 131 Veteran Poster Featured Poster

@Ange1 and there was me thinking hello world was first :(

with regards to tutorials, I have a sticky post at the top of this forum which you have failed to read stating exactly what your after.

Mike Askew 131 Veteran Poster Featured Poster

Have tried and still get the attached result. It might be worth noting I am on a corporate build of Windows 7 and sat behind a proxy server, not sure if that would affect what I presume is a client side script though. Error4
With regards to the attached image I was sat at around 70WPM (first thing I did when getting into office, need to wake up) and more than one error before the timer hit 0.

Mike Askew 131 Veteran Poster Featured Poster

I never have issues, literally post my code into the code input window after pressing the code snippet button and it is easy as that

Mike Askew 131 Veteran Poster Featured Poster

Chrome and windows 7

Mike Askew 131 Veteran Poster Featured Poster

It does seem to break for me when the timer hits 0 though. the WPM display halves or so and the popup states 'no data to show'

Mike Askew 131 Veteran Poster Featured Poster

Every forum uses your regular [code][/code] but no, not Daniweb. You have to tab your code.

I spend forever tabbing code on StackOverflow.... DaniWeb isn't the only one.

Mike Askew 131 Veteran Poster Featured Poster

I keep instinctively hitting the backspace button when I know I've missed a key :(

Mike Askew 131 Veteran Poster Featured Poster

No worries, we all started somewhere :)

Mike Askew 131 Veteran Poster Featured Poster

No worries :)

Mike Askew 131 Veteran Poster Featured Poster

Run it in debugging and find out what line the exception occurs on.

Mike Askew 131 Veteran Poster Featured Poster

Radio buttons only allow one to be selected, they are designed for this purpose.

Mike Askew 131 Veteran Poster Featured Poster

So what exactly are you blithering on about?

Mike Askew 131 Veteran Poster Featured Poster

Good to hear, mark as solved if nothing further is required.

Mike Askew 131 Veteran Poster Featured Poster

It wouldn't too much, just where the result came from and how the code was written to select such values.

XPath would return results directly through programming while XSLT creates a whole new XML/TXT/HTML file to which it outputs/reorders information

Mike Askew 131 Veteran Poster Featured Poster
            List<string> Names = new List<string>();
            List<string> SortedRefinedNames = new List<string>();
            StreamReader sr = new StreamReader(@"C:\Users\maskew\Desktop\Names.txt");
            string NameEntry;
            while ((NameEntry = sr.ReadLine()) != null)
            {
                Names.Add(NameEntry);
            }
            sr.Close();

            Console.Write("First letter of name to search: ");
            string Letter = Console.ReadLine();

            foreach (string Name in Names)
            {
                if (Name.Substring(0, 1).ToUpper() == Letter.ToUpper())
                    SortedRefinedNames.Add(Name);

            }

            SortedRefinedNames.Sort();

            foreach (string Name in SortedRefinedNames)
            {
                Console.WriteLine(Name);
            }

            Console.ReadLine();
Mike Askew 131 Veteran Poster Featured Poster

So say I had this as my list

Steve A
Steve B
John C
Scott A
Dani T

and wanted the letter S, your output should be:

Scott A
Steve A
Steve B

Correct?

Mike Askew 131 Veteran Poster Featured Poster

I don't find what your trying to do clear. Nor is the example data any good. Do Bla Bla count as an individual? or information relating to Someone else? Please consider re-doing the explanation with clarified requirements.