mike.mclennan 29 Light Poster

I have created a new XML file and schema that is used to run sql scripts but I am having a problem doing a few things. below is an example of what I am hoping to create.

XML file.

<root>

  <script>
    <name> Script for Upgrading </name>
    <file> C:\Files\Scripts\Upgrade.sql </file>
    <SCHEMA> Schema Owner </SCHEMA>
  </script>
  <script>
    <name> Script for Removing Geometeries </name>
    <file> C:\Files\Scripts\replaceGeoms.sql </file>
    <SCHEMA> Schema Owner </SCHEMA>
     <USERNAME> Username </USERNAME>
     <PASSWORD> Password </PASSWORD>
  </script>

  <parameter_type>USERNAME</parameter_type>
  <parameter_type>SCHEMA</parameter_type>
  <parameter_type>PASSWORD</parameter_type>
  <parameter_type>NUMBER</parameter_type>
  <parameter_type>STRING</parameter_type>

</root>

XML schema

<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="sqlscripts"
            xmlns="sqlscripts" elementFormDefault="qualified">

    <xsd:element name="root">
      <xsd:complexType>
        <xsd:sequence>
          <xsd:element name="script" type="script_type" maxOccurs="unbounded" />
          <xsd:element name="parameter_type" type="xsd:string" 
                                                                                maxOccurs="unbounded" />    
        </xsd:sequence>
      </xsd:complexType>
     </xsd:element>

    <xsd:complexType name="script_type">
        <xsd:sequence>
            <xsd:element name="name" type="xsd:string" />
            <xsd:element name="file" type="xsd:string" />                    
            [B]<xsd:element type="parameter_type" maxOccurs="unbounded" />[/B]
        </xsd:sequence>
    </xsd:complexType>  

</xsd:schema>

The main problem I am having is I want the element that surrounds the parameter to
be parameter type name. So if the element is USERNAME and the value is pparker then I know that ppparker is a username and not a PAssword or string or whatever. But I have not been able to find how to do this with the xml schema.

I also would like to create the name field as a key or a unique, I have found a few examples of that but nothing that has worked for me. (I am validating the XML with C# validationReader)

Any help would be greatly appreciated.

mike.mclennan 29 Light Poster

Mac. :( bleh!

lol... a man of few words.

Everyone will tell you that the OS they use is the best and everything else is crap. Why not go with what works for you?

I dont see that as true, for instance i use windows but I would be the first one in a group of people to tell them how Linux is a better OS. Don't get me wrong I use windows because it works for me, but I know it is crap. I am just saying that moving to the MAC OS doesn't fix the crappyness, it is just trading one piece of crap for another.... wow, I can be very diplomatic when i need to. 8-D

And I wouldn't say this debate is pointless, it is just a hard one to debate, but that sometimes makes it worth debating. If one side of the issue was more weighted then the other, then why bother to debate it. Example (Al Gore arguing that Global warming is bad and Amy Poelher Arguing her personal view that global warming is Awesome) <- funny but pointless.

mike.mclennan 29 Light Poster

Vista is a huge jump from XP. It is like the huge step to XP. Microsoft completely reprogrammed their OS (all previous versions of Windows still had programs and components from other Windows versions even if they were no longer used). However, people are happy with XP, and not many people will switch to Vista for a while..

agreed, also a new OS is alot like any new Gaming System it needs alittle bit of time to work the bugs out. Like any programmer will tell you there is no way Q&A can test for everything, sometimes things need to be discovered when people start using the system. I am not ready to move to vista yet, i figure i can easily wait a year or 2 for them to make it better and more stable. Remember 98SE, god i loved that operating system. If i wasn't a corporate whore i would still be using 98SE.

That and aside from visual aspects and some security issues have the really done anything? (seriously is a question i have not heard of anything else they have done)

I like my idea of a Unix based Windows.

really? cause that kind of sounds scary to me. Kind of like the fountain of youth wrapped in a volcano. You keep thinking "i could just reach in there and be young forever" then you do and your hand gets melted off because of the molten lava...

...... so bored at work, must …

mike.mclennan 29 Light Poster

I agree with Jbennet completely, very well put; And I also second the "calm down" statement, this is suppose to be a discussion, and i think it might be getting a bit to heated. There is really not a need to fall back onto the Message board habit of "counter attack through 2 words" which I am sure we are all aware of.

but Vista is catching up with OSX on that front

ha, Vista makes me angry, I never understood why they came out with that. It was like here, people seem to like MAC OSX and we added a bunch for security features that should have been released in patches for XP; now give me $200 bucks.

mike.mclennan 29 Light Poster

If you've already made your decision (and it's obvious you have), why did you waste our time by asking to be convinced?

I don't feel like that is a fair statement, just because I was not convinced by your argument (or lack there of) does not mean that I have made up my mind on the subject. There is a great deal of difference between the two. For instance I read what you wrote, i thought about it and I replied to why I did not feel that you made a valid point that was strong enough to convince me that switching to a MAC OS is not a giant waste of time.

Now If you had come and said " I feel that the MAC OS is a much better system then windows because it is faster, cleaner, less buggy and can cure cancer." Then I might have replied with "MACS CAN CURE CANCER?!!? I had no Idea that was possible, I will have to research this alittle more"

Not to say that the only reason i would switch to another OS is the fact that is offering me some miracle cure that is can not possible provide; But what I am saying is you did not make any argument that I have not heard before.

mike.mclennan 29 Light Poster

Why would I want to go out and buy a MAC so I can run windows? That does not seem to make much sense to me, I understand why they put it out there. I mean it would make the transition easier for Windows to make if you had a virtual machine to run, but still. If I am going to run windows anyways why not just buy a PC and leave Mac out of the whole equation.

And I never said there was anything wring with Linux (I had a Linux box that i used regularly). Linux is an amazing OS that is quick and I find the new fedora is great and simple to use. I plan on getting Fedora and a new machine soon and previously when I was running it (once i had set it all up) my Family and friends did not have much trouble doing what they normally do on Windows with Fedora OS. I currently still run Knoppix off a DVD from time to time.

Narue.

I would not say that I am convinced of anything. I have heard numerous MAC lover make the same comment about the ability to run high end programs and visual blah, blah. And i agree for the most part, MAC is better if you a processing large images, videos, music, etc... But that does not make it perfect (far from it)
At one of my last job they use to process and edit …

mike.mclennan 29 Light Poster

Windows VS Mac - The War No One Cares About

Ok, first I want to make one thing clear; I am and have always been a PC user, that is just what has always been available to me. But this does not mean that I have not used any other OS. I had (and plan on having again soon) a Linux box that i used regularly. I do not think that Windows is an amazing OS, or that it is even the best OS available, but I also do not think that moving to the Mac OS is going to make things better either.

Now I know we have all seen the Mac vs PC commercials on tv, and to be honest, I love those commercials, they are really funny and well done. But for the most part that mislead alot of people, and because of that there is an increase in the sales of MAC PC's. For god sakes my brother (who know nothing about computers) was talking about purchasing a Mac machine soon. So far I have heard 2 parts to this argument, One is that Mac is a better system for creating video, pictures, music, blah blah blah and the other is basically a "grass is greener" type argument; and for the most part I disagree with both.

I am a programmer by Trade, and a artist by hobby (I draw, animate, ect...) And I have been told my many people (friends and Sales …

mike.mclennan 29 Light Poster

wow, ok i was apperently searching for the wring thing. i spent 2 dad looking for this and i found it under 2 minutes with javascript tooltips. thank you very much that was very helpful.

mike.mclennan 29 Light Poster

I don't think i am explaining this very well. Here is a idea of what i want to create but am having trouble creating. I currently am using a layer to create something very similar, but i was hoping to us something that would work faster and better and respond to do all the work on mouse over instead on onClick. (the layer i am using you have to open and close, if i set to to mouseOver it is terrible when you are just moving to an item. again any help would be greatly appreciated

here is the idea i wish to create:
[IMG]http://i167.photobucket.com/albums/u122/mike-mclennan/webdev/idea.gif[/IMG]

mike.mclennan 29 Light Poster

To clear it might not be the best way to go, but there are others ways to get a desired result. try using

Me.PictureBox.Hide()

or

Me.PictureBox.Visible = False

those both would do the trick. Hope that helps.

mike.mclennan 29 Light Poster

the easiest way to do this would be to create a new fill method for the DataTable that controls your datagrid. In this fill method set a user defined variable. Then you can use the selected Value from your ComboBox to select that defined variable. Then it is just a matter of refreshing and you are set.

hope this helps but in case it doesn't it is probably a good idea to post a sample of the code so it might be easier to help you.

mike.mclennan 29 Light Poster

There could be a few problems. the best idea is to use the debugger to see what value the if statement is actually comparing. use F9 to create a break point and then just move through the code. The debugger is the most powerful tool available to any programmer.

but you also might want to try

type.SelectedValue.ToString() = "Income"

hope that helps 8-|

mike.mclennan 29 Light Poster

We are on page 8, but to be fair we have been mostly talking about Pearl Habor, Ben Affleck and Monster Inc for the majority of it. But still, yeah there is alot to read through.

300 kicked!
and 40 year old virgin i saw 4 times in theater. I think i was the only one to laugh for 20 minutes because of the scene were Steve Carell is talking to the girl in the book store. Oh, and everything Cal said was comedic gold. (Evan Almighty looks like it is going to suck)

mike.mclennan 29 Light Poster

1) Pirates of Silicon Valley
2) Army of Darkness
3) Evil Dead 1
4) Evil Dead 2
5) Stand and Deliver

WHOOOOOOOOOO Bruce Campell and Sam Raimi, good taste my friend.

mike.mclennan 29 Light Poster

I never noticed that Topher Grace was faking a british accent.. huh. Maybe i will have to watch it again.

And, from what I can remember it was more of an accident then anything else. Sand man did not mean to kill his uncle the gun went off, and he tried to help him. But yeah, the dark spiderman was bad ass, when he was walking down the street with his collars up and snapping his finger at all the pretty women that walked by, genious!

mike.mclennan 29 Light Poster

To mike.mclennan:
I am sooo sorry! I didn't mean to give you a bad rep, I accidentally pressed that button I guess! :( It was supposed to be good rep.

Horrible! Sure I did not like Pearl Harbor but did I deserve that?

Nah, no worries. I am sure I can make the rep up, I am a very likable person.

And arjunsasidharan.

I like your taste in movies, though Shrek would not be on my top 5; but i stilled liked them. But as far as 3D animated or Pixar Movies go my fav would have to be Monsters Inc.

christina>you commented: here ya go! sorry for accidentally pressing the disapprove button. ;) +12
mike.mclennan 29 Light Poster

I don't mind Nick Cage, but ghost rider was a terrible movie. The graphics were decent but i had nooooo idea what was going on at all. Who he was fighting, what they were after, why he was fighting them, who or what those guys were. It was just horribly done. And I don't think it helped much that I had just finished watching the Wickerman remake about 5 minutes before Ghost rider, Wickerman sucked.

mike.mclennan 29 Light Poster

im a boy and not the kind of boy that likes other boys. All i said was that he was a craptastic actor

first of all, the above quote, is the most adorable thing I have ever read.

And to follow up, I also am a heterosexual male, but i am so secure in my straightness that I can tell you this. Ben Affleck is a attractive man, but NO WHERE near as attractive as Johnny Depp, that guy is like 50 and he looks younger and hotter then me (I am 21).

christina>you commented: ;) -2
jbennet commented: ;) +16
arjunsasidharan commented: ehhh!!! +3
mike.mclennan 29 Light Poster

I don't know. I did not care much for that movie either. But the site of the tiny, awkward man dancing was just hilarious to me; Don't ask me why. John Header is pretty funny though, at least he did a good job on SNL last year.

mike.mclennan 29 Light Poster

I have not found Ben Affleck to be a bad actor. He was the shit in phantom's.

Pearl harbor i just found to be boring. I don't know maybe i could not get into it.

The fantastic four movie was terrible because it was wayyyyyyy to campy. And the Human Torch, I found to be the worst Character in the movie. The guy was basically a walking punchline. They could have done so well with that movie. Sad thing is I will most likely go see the next one. God i hope Galactis is in it.

I did not think Dare Devil was that bad of a movie. Though DD has always been kind of a B Comic Book character so i did not have high hopes for it. Michael Duncan as the King Pin pissed me off to no end.

mike.mclennan 29 Light Poster

yeah, something along those line. like a alt tag that i could alter to make it look like a table cell. so basically like the thread popup on daniweb yeah.

mike.mclennan 29 Light Poster

what your asking is a pretty easily completed task. what you need to do make a new select statement with a user defined variable. see below

Select MovieId, MovieTitle, MovieDesc
From Movies
Where MovieTitle = [B]@myTitle[/B]

that @myTitle tells the TableAdapter that the value of @myTitle will be sent in, meaning it can be the text value of the text box. once you have created this new query you can then create a grid view from it, during the creation of the grid view it will ask you to assign any user defined parameters. select control as the type, and then the name of the text box as the value. should work easy enough.

hope that helps.

mike.mclennan 29 Light Poster

returns. oh god returns. I liked the rest.

mike.mclennan 29 Light Poster

Hey, I have created a searcher on my companies website that displays products that we sell. It displays the code, price, blah blah blah. basic stuff. but anyways i want to display some information for the product not on the page but on a tooltip like screen. I know a few ways i can do this: using layers, pop up screens, etc... etc.. but i was hoping someone would know of a better way that i could try (something new to do, i am alittle bored) I am not looking for the code, just a push in the right direction.

Anyways help would be greatly appreciated.

mike.mclennan 29 Light Poster

I am still not 100% on what you are trying to do. sorry I am really trying to understand but i found something that caught my eye. Maybe it will help

SelectCommand="SELECT UserName, LoginId, Email, MobileNo, UserAccess FROM Login_Tab WHERE (UserDeleted = 'False')" UpdateCommand="UPDATE Login_Tab SET UserDeleted = 'False' WHERE (LoginId = LoginId)">
    </asp: sqlDataSource>
  
</asp:Content>

<script runat=server >
    Dim constr As String
    Dim cmd As SqlCommand
    Dim con As SqlConnection
    Dim sql As String
    Dim re As SqlDataReader
    
Protected Sub select_click(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewSelectEventArgs)
       
        
         sql = "update Login_Tab set UserDeleted='True' where LoginId= @LoginId "

If you notice you have 2 update commands which are doing the opposite of each other, one is setting the value to true, the other is setting the value to false. Maybe that is what it is suppose to do, but it does not seem to fit. Hope this helps.

mike.mclennan 29 Light Poster

if people will spend money to see them then they will make them. Works out well for any geek who wants to see there favorite comic hero on the big screen. And I don't know I thought they did a decent job of Batman begins, though Christian Bale and Liam Neson just make any movie. If we are going to talk about the worst comic book movies of all time lets label the big 3

1. Ghostrider
2. The Hulk
3. Superman

those are the biggest and worst comic book movies to be made, mostly because they could have been good and they were just ruined.

mike.mclennan 29 Light Poster

again. I am not to clear about what exactly you are saying. But if you create a DataGrid it usually create its won functions for Add, Update and Delete (the DataGrid CRUD methods). you can do one of 2 things:

1. remove the ability to delete using the datagrid controls
2. edit the control methods themselves to do what you want them to do.

If that was your problem I hope it helps. But usually if you post code it makes things alot easier to help you out with your problem.

8-D

mike.mclennan 29 Light Poster
Me.CustomersDataGridView.Rows(1).Cells(3).Selected() = True

this is used to selected a row or a cell in the DataGrid

Me.CustomersDataGridView.SelectedCells(0).Style.ForeColor = Color.Coral

This can used to to change the Style (backcolor, font color, etc....) of the now selected cells.

I am sure you can do the work to figure out which of the ages is the highest.... but this will highlight, or bold or whatever you want to do to that row or cell.

Hope this helps 8-D

mike.mclennan 29 Light Poster

you can;t get rid of the dancing. it was like the scene from Napoleon Dynamite where he just danced forever and i could not stop laughing. it was hilarious. Honestly i think Sam Raimi just wants to see what he can get out of Toby.

mike.mclennan 29 Light Poster

put a try catch block around it and create a message box to display the incoming errors

MessageBoc.Show(e.Message)

and then run through it with break points. use the F9 key to create a break point and then run through the program with the debugger. The debugger is the most powerful tool in your arsenal. use it as often as you can.

mike.mclennan 29 Light Poster

1. The Notebook <3
2. Pearl Harbor
3. Star Wars :o)
4. Lord of the Rings
5. Pirates of the Caribbean (Johnny Depp ;))

:) Ahh, I love movies!

the last 3 were collections, but i would have to agree. And even the notebook i liked (i have been unable to hate a Ryan Gosslen movie since "the Believer") but i could not ever watch Pearl Harbor again, i fell asleep.

mike.mclennan 29 Light Poster

I am bored so here is my post. List your top 5 favorite movies, your pleasure movies, the ones you can watch over and over again. The movies you watch when your drinking or bored. But just 5, keep the list small.

1. Layer Cake
2. Donny Darko
3. Fear and loathing in Los Vegas
4. Fight Club
5. Snatch

mike.mclennan 29 Light Poster

i realize that no one posted on this, but i figured it out anyways.... ummm, thanks?

mike.mclennan 29 Light Poster

ok, i am not 100% sure on what you are trying to do but I think you might want to add the second set to the first loop and the 4th set to the second loop. Or you might want to have 4 sets of loops there. I am not sure, but you are looping through the elements of a, but you are only doing the i element once... seems odd. but again I am not sure what you are trying to so. i see slope.... slope is math.

mike.mclennan 29 Light Poster
for(a=1;a<i;a++)
{
  yyy = (y[a-1]- y[a]);
  xxx = (x[a-1]- x[a]);
  slope[a-1]=yyy/xxx;
}

yyy = (y[i-1]- y[0]);
xxx = (x[i-1]- x[0]);
slope[i-1]=yyy/xxx;

for(b=1;b<i;b++)
{
  yyy = (slope[b-1]+slope[b]);
  xxx = (1-slope[b-1]*slope[b]);
  angle = yyy/xxx;
  res = acos(angle) * (180/3.14);

  printf("%d. Angle %f\n",b,res);
}

yyy = (slope[i-1]+slope[0]);
xxx = (1-slope[i-1]*slope[0]);
lastangle = yyy/xxx;
res = acos(lastangle) * (180/3.14);

printf("%d. Angle %f\n",b,res);

yeah now i can read it.

mike.mclennan 29 Light Poster

obviously this is an ASP.NET message board if i am not mistaken. But it seem that you are sending the Update Method a string ("me"), if you set your update command as default it should except strings, integers, bool as default values for each item in the table. maybe you should be doing something more like

da.Update(txtFirstName.text, txtLastName.Text)

Anyways when you open the method, opening it would be putting the "(" after the method name, it should display a tool tip with what the method needs sent it. It should look like (string FirstName,string LastName) and you have to match each item with what value you want sent it..... just take a look.

Hope that helps in some way.

mike.mclennan 29 Light Poster

Mostly because i have to use what my company uses. They have the software for SQL 2005 and Visual Studios 2005 so that is what I am using. If i had my choice I would be using Asynchronous, but i do not... bah.

Anyways i found a work around, I am still curious about this problem, but for now I am making this one as solved.

mike.mclennan 29 Light Poster

Yeah, i heard the game was a waste of cash altogether.

And Sturm Harry Osborn actually became the second green goblin. The HobGoblin and the DemoGoblin were both different people not related to the Osborn Family. And I don't know i thought Haden Christian Church (i think thats his name) did a good job and his character was really easy to identify with.
But Topher Grace was not scary at all. Vemon was a bitch in that movie.

mike.mclennan 29 Light Poster
var ie4 = (document.all) ? true : false;
var ns4 = (document.layers) ? true : false;
var ns6 = (document.getElementById && !document.all) ? true : false;

function openDesc(text) 
{
    if (ie4) 
    { 
        document.all["Description"].style.visibility = "visible";
        document.all["TitleClose"].style.visibility = "visible"; 
    }
    if (ns4) 
    { 
        document.layers["Description"].visibility = "show"; 
        document.layers["TitleClose"].visibility = "show"; 
    }
    if (ns6) 
    { 
        document.getElementById(["Description"]).style.display = "block"; 
        document.getElementById(["TitleClose"]).style.display = "block";
    }
    
    writeToLayer("Description", text);
}


<a href="javascript:openDesc('<%# Eval("cDescriptionLong") %>');"> Long Desc</a>

-------------------------------------------------------------------------------

Basically what i am trying to do is when ever you press the Long Desc link it will display a div layer that shows the long description of that item. I am sending it a string with the description.

The problem is that in IE (not Firefox) the ASP bound combo boxes are displayed over top the div layer. I tried changing the z-index and using the display properties but nothing worked. any help would be greatly appreciated.

mike.mclennan 29 Light Poster

I always found that as long as you have a good base design. title, body, menubar, header, footer, blah, blah, blah any design can go over top of it smoothly and easily. Is that not what CSS was made for. I mean just look at http://www.csszengarden.com/. Recently I have been working with layers which I have found to be one of the most powerful and amazing tool for web design

mike.mclennan 29 Light Poster

I was wondering if anyone has taken the time to go see Spiderman 3 yet. I have seen it twice already. In my opinion it was a decent movie, Sandman was cool, The New Goblin was really well done, but Venom... VENOM. The ultimate Spiderman villain was terrible done and a waste of time, probably the worst element of the movie itself. And it is a shame because Venom could have been amazing.

... agree?

mike.mclennan 29 Light Poster

I am really not sure what you are asking but the "I have a project about some stupid math calculations" caught my eye. If you are working on a Programming Project I can assume you are taking a programming course. Programming is math (basically) so saying some stupid match calculation seems a little odd to me. But that is just my opinion.

mike.mclennan 29 Light Poster

I am unsure what you are looking for but in VB.net you have the ability to ad a Bind to a table in your Database to a Combo Box and then you can set a Display member and Value from that table. So for instance if you had a table called TblAnimals that contained a pk field called AniID (autonumber) and a char field that contained a Animal Description (AniDesc):

1 Dog
2 Cat
3 Lion
4 Shark

then you could bind that TblAnimals to the combobox and display AniDesc, and set the matching value to be AniID. so the combo boc would display, Dog, Cat, Lion, Shark as each item of the list and the Selected Value would be 1, 2, 3, 4

Hope this helps you in some way. 8-D

mike.mclennan 29 Light Poster

the problem is most likely you are using AutoPostBack on the ASP button object which will reload the page you are on and reset it to the default, which is the first page. The way I usually work around this is my creating my own form button object and use it to complete the task. you might want to think about creating a Refresh button along side the Select, or removing the Select altogether and replacing it with a Form button instead of a ASP object. this may or way not work with what you are trying to do, but it is all I can think of. Hope it helps.

mike.mclennan 29 Light Poster

I am working with ASP.NET, C# and SQL Server.

What I am trying to do seems simple enough, but is causing me alot of problems. I am trying to set up my DataGrid so that is updates only when i press the Update button. It is pulling information from 5 different locations right now. 4 Combo boxes that contain a Category, Family, Sub Family and a Specific ID. It is also getting information from a text box that simple uses the word(s) typed in to search for the matching content in the items description field. I have basically created a detailed item searcher. But the problem is each combo box has to contain auto post back, because of the relationships. (each Category has specific Families that can belong to it, each Family has specific Sub Families that can belong to it, etc, etc...) so each time i select a new category, family what have you, the datagrid refreshes and this takes alittle time because the database itself contain 1500+ items.

Right now i am using paging, but i want to find a way so that the DataGrid will only refresh when the user preses the Search button.
Any help would be greatly appreciated.