Nice and neat solution Mikey

Suggest to him an RSS feed reader or an online meeting tool like skype, I did those for my final year.

I suggest you do a little googling first, if you type in your article title in the search bar a million pages will come up.
But before you start here is a check list
1) Do you have SQL Server installed?
2) Visual studio working properly?
3) Do you have a database with a table of users?

It can be an advantage if designers want to customize functionallity in the child class. Say a class has a particular behaviour for "Cars" in general, but if you want to call a certain function when the car is say for instance a convertible or something else then polymorphism helps.

Hello guys, I have a problem convrting to an int in xslt.

My xslt is:

<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"  xmlns:tem="http://tempuri.org/">
          <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/>
          <xsl:template match="/">
          <xsl:call-template name="ConnectConsumer"/>
          </xsl:template>
          <xsl:template name="ConnectConsumer">
          <tem:callRule>
          <xsl:for-each select="/">
          <xsl:for-each select="ConsumerDetails">
          <xsl:for-each select="Score">
              <xsl:element name="tem:arg0">
               <xsl:value-of select='format-number(Score,"#" )'/>
              </xsl:element>
          </xsl:for-each>
          </xsl:for-each>
          </xsl:for-each>
          </tem:callRule>
          </xsl:template>
          </xsl:stylesheet>

My xml is:

<ConsumerDetails>
        <BirthDate>1981-05-22</BirthDate>
        <Gender>Male</Gender>
        <AgeOfOldestOpenAccount>8</AgeOfOldestOpenAccount>
        <AgeOfYoungesttOpenAccount>2</AgeOfYoungesttOpenAccount>
        <TotalAccBalance24Months>50000.0</TotalAccBalance24Months>
        <AccountsWorthStatus3in24Months>4</AccountsWorthStatus3in24Months>
        <Score>849.0000</Score>
        <Age>31</Age>
        <City>MILNERTON</City>
</ConsumerDetails>

when I transform it does not work, it returns the following result:

<?xml version="1.0" encoding="UTF-8"?>
<tem:callRule xmlns:tem="http://tempuri.org/">
   <tem:arg0>NaN</tem:arg0>
</tem:callRule>

I want the number instead of NaN

I am also new to xslt but I think I can help, its been a while since you posted, did you manage to solve your problem?

Try using pictureBox1.Image = Image.FromFile("c:\filename.jpg"); try this link: Click Here

Are you using xaml or normal windows forms?

Hello guys I have an xslt file I want to extract data from.

I am new to xslt but at the moment I can perform basic operations like looping through the nodes and creating element and attributes.

My problem is that I want to select a particular value from a particular node(from a list of nodes), here is an example.

<PersonsList>

        <person>
                <id>1233</id>
                <name>john</name>
                </person>

                        <person>
                <id>444</id>
                <name>peter</name>
                </person>

                        <person>
                <id>677</id>
                <name>Amanda</name>
                </person>

        </PersonsList>

I want to get for example the name value say amanda if it matches the id. like in C# one would say: if (id==677) select name, Now I want the xslt equivalent.

Hello I have a problem with customizing my menu, I created a new mvc web application. Visual studio has created a default menu but I wanna add a background image like an image with "Home" or About instead of the default one. here is my code.

<body>
    <div class="page">

        <div id="header">
            <div id="title">
                <h1 style="font-family:verdana;"></h1>

            </div>

           <div id="logindisplay">
                <% Html.RenderPartial("LogOnUserControl"); %>
            </div>

            <div id="menucontainer" >

                <ul id="menu" >
                    <li><%: Html.ActionLink("Home", "Index", "Home")%></li>
                    <li><%: Html.ActionLink("Contact", "Index", "Contact")%></li>
                    <li><%: Html.ActionLink("About", "About", "Home")%></li>
                </ul>

            </div>
        </div>

        <div id="main">
            <asp:ContentPlaceHolder ID="MainContent" runat="server" />

            <div id="footer">
            </div>
        </div>
    </div>
</body>

the css file

#menucontainer
{
    margin-top:40px;
}.menuStyle{background-image: url("~/images/home.png");}

xslt

Hello guys, I hope everyone is well.

I didnt know where to post this particular problem so I just put it under general, I apologize if its the wrong place.

this is one of my first few attempts to get the xml data to a specific xml format.

Its not returning the format I want

Heres my xslt

      <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format"
      xmlns:n1="http://www.web.xds.co.za/XDSConnectWS" xmlns:tns="http://schemas.xmlsoap.org/soap/envelope/" >
      <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/>
      <xsl:template match="/">
      <xsl:element name="Gender"><xsl:call-template name="ConnectGetCreditReport"/></xsl:element>
      </xsl:template>
      <xsl:template name="ConnectGetCreditReport">
      <xsl:for-each select="/">
      <xsl:for-each select="tns:Envelope">
      <xsl:for-each select="Body">
      <xsl:for-each select="n1:ConnectGetCreditReportResponse">
      <xsl:for-each select="ConnectGetCreditReportResult">
      <xsl:for-each select="Consumer">
      <xsl:for-each select="ConsumerDetail">
      <xsl:for-each select="Gender">
      </xsl:for-each>
      </xsl:for-each>
      </xsl:for-each>
      </xsl:for-each>
      </xsl:for-each>
      </xsl:for-each>
      </xsl:for-each>
      </xsl:for-each>
      </xsl:template>
      </xsl:stylesheet>

I am tryin to create a “Gender” element and get the value from the xml below.

<?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<soap:Body>

<ConnectGetCreditReportResponse xmlns="http://www.web.xds.co.za/XDSConnectWS">

<ConnectGetCreditReportResult>

<Consumer>

<ReportInformation>

  <ReportID>tt</ReportID>

  <ReportName>ree</ReportName>

</ReportInformation>

<ConsumerDetail>

<DisplayText>eew</DisplayText>

<ConsumerID>www</ConsumerID>

<Initials>www</Initials>

<FirstName>wwq</FirstName>

<SecondName>wwe</SecondName>

<ThirdName />

<Surname>wwq</Surname>

<IDNo>8</IDNo>

<PassportNo />

<BirthDate>dww</BirthDate>

<Gender>ddd</Gender>

…….Incomple

Hello guys, I just deployed my site and when I try to view through the browser I get

"403 - Forbidden: Access is denied." error.

this does not happen when I replace index.aspx in the wwwroot folder with index.html.

I would really appreciate any advice on this thank you.

Internal Server Error

12 minutes ago|LINK

Hello Guys,

I need help deploying my little website I am designing.

I have my index.html file in the wwwroot folder and my web.config file is there too. the contents of the web.config file are:

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
  <system.webServer>
    <defaultDocument>
      <files>
        <add value="index.html" />
      </files>
    </defaultDocument>
  </system.webServer>
</configuration>

when I go to my url it retuens:

500 - Internal server error.
There is a problem with the resource you are looking for, and it cannot be displayed.

My html file is a simple one btw its just hello world

  <html>
        <head><title>My First Web Page - HTML is simple!</title>
        </head>
        <body bgcolor="#FFFFFF" text="#FF0000">

        <h2>Hello, world. HTML is easy!</h2>

        </body>
        </html>

I agree with Momerath on this one, If you want to keep using arrays instead of a List as Momerath suggests I suggest you initialize all the values first. something like :

for (int i = 0; i<courseNames.length();i++)
 {
  courseNames[i] = new CourseName("");
 }
 //This will make empty string values but now you have used the "new" keyword to initiallize.

But I hope I have been of great help.

Well I give up...I indented five times and it didn't work.

Sorry How do I Post code, I dont get the new editor. I tried putting it in blocks but it didn't work.
int dec_num;
int remainder;
int result;
int n = 0;
int[] Storage = new int[10];
Console.WriteLine("Unesite broj koji zelite pretvoriti");
dec_num = int.Parse(Console.ReadLine());
int num = dec_num;
int size = 0;

        //GET THE SIZE OFD THE ARRAY THE SIZE WILL BE AS BIG AS THE NUMBER OF DIVISIONS
        while(num>0)
        {
            num = num/ 2;
            size++;
        }

        //SET THE SIZE
        int [] binaryarray = new int[size];

            while (dec_num > 0)
            {
               /* result = dec_num / 2;
                remainder = dec_num % 2;
                Storage[n] = remainder;
                dec_num = dec_num / 2;
                Console.WriteLine("The Result is " + result + "" + " and the remainder " + remainder);*/

                //Get the remainder of dividing dec_num by 2
                remainder = dec_num % 2;
                //Divide dec_num and reduce it
                dec_num = dec_num / 2;

                binaryarray[n] = remainder;
                n++;
            }

            for (int i = binaryarray.Length - 1; i >= 0; i--)
                Console.WriteLine(binaryarray[i]);
        Console.ReadLine();

Dude(castajiz) I think I fixed you problem...I did a quick fix for you because you put in the effort.
You were close.
Your mistakes were:
-In the last forloop you gave 'i' the wrong value, it was supposed to be Storage.Length the you decrement until zero.
-You did not increment n.

Heres your fixed code.

        int dec_num;
        int remainder;
        int result;
        int n = 0;
        int[] Storage = new int[10];
        Console.WriteLine("Unesite broj koji zelite pretvoriti");
        dec_num = int.Parse(Console.ReadLine());
        int num = dec_num;
        int size = 0;

        //GET THE SIZE OFD THE ARRAY THE SIZE WILL BE AS BIG AS THE NUMBER OF DIVISIONS
        while(num>0)
        {
            num = num/ 2;
            size++;
        }

        //SET THE SIZE
        int [] binaryarray = new int[size];

            while (dec_num > 0)
            {
               /* result = dec_num / 2;
                remainder = dec_num % 2;
                Storage[n] = remainder;
                dec_num = dec_num / 2;
                Console.WriteLine("The Result is " + result + "" + " and the remainder " + remainder);*/

                //Get the remainder of dividing dec_num by 2
                remainder = dec_num % 2;
                //Divide dec_num and reduce it
                dec_num = dec_num / 2;

                binaryarray[n] = remainder;
                n++;
            }

            for (int i = binaryarray.Length - 1; i >= 0; i--)
                Console.WriteLine(binaryarray[i]);
        Console.ReadLine();

Becha your code looks ok so what is your problem?

skp03 are asking how u can get the date?

Arsheena.alam Try getting the list of processes(CTRL+ALT+DEL) see how much memory and CPU your sql is consuming.

Lol here is a start for Task 2 [CODE]class BankAccount[/CODE] hope it helps;)

Hello Guys, I hope you are all doing fine. I have a Linq to SQL problem.
My entity class is as follows;
[CODE]using System;
using System.Data.Linq;
using System.Data.Linq.Mapping;
namespace SilverlightGrid.Web.TableMappings
{

[Table(Name = "Travel_Meal")]
public class Travel_MealDetails
{
    [Column(IsPrimaryKey = true)]
    public Guid MealID { get; set; }

    [Column(Name = "Meal_Desc")]
    public String MealType { get; set; }

}

}[/CODE]

It works fine but I get an error when I query data like so:
[CODE] public List<Travel_MealDetails> getMeals()
{
Settings db3 = new Settings();
// DataClasses1DataContext db = new DataClasses1DataContext("NucleusConnectionString");
DataContext db2 = new DataContext(db3.DBConnect);
Table<Travel_MealDetails> meals = db2.GetTable<Travel_MealDetails>();

        var persons = (from c in meals
                       select new Travel_MealDetails
                       {
                           MealType = c.MealType,
                           MealID = c.MealID
                       }).ToList();

        return persons.ToList();
    }[/CODE] 

It throws an error saying:
Explicit construction of entity type 'SilverlightGrid.Web.TableMappings.Travel_MealDetails' in query is not allowed.
I hope someone can help me TIA.

Does anyone know if silverlight supports making a menubar like in windows forms?

Its a Multi-Tier app so I am connecting to the database using the Linq to SQL layer.

Hello people,I hope everyone is well. I am having problems with my connection string.
It seems its not detected at all. I am designing a Silverligtht app with a Linq to SQL connection for the data.
Here is my code.[CODE] ConnectionStringSettings settings = ConfigurationManager.ConnectionStrings["DataConnect"];
string connection = settings.ConnectionString;

    DataContext dataContext = new DataContext(connection);[/CODE]

and code in web.config file:

[CODE]
<configuration>
<configSections>
</configSections>
<connectionStrings>
<add name="NucleusConnectionString" connectionString="Data Source=ServerName;Initial Catalog=Nucleus;Integrated Security=True"
providerName="System.Data.SqlClient" />
<add name="TravelPlannerProject.Web.Properties.Settings.DataConnect"
connectionString="Data Source=ServerName;Initial Catalog=Nucleus;Integrated Security=True"
providerName="System.Data.SqlClient" />
</connectionStrings>
<system.web>
<compilation debug="true" targetFramework="4.0" />
</system.web>

<system.serviceModel>
    <behaviors>
        <serviceBehaviors>
            <behavior name="">
                <serviceMetadata httpGetEnabled="true" />
                <serviceDebug includeExceptionDetailInFaults="false" />
            </behavior>
        </serviceBehaviors>
    </behaviors>
    <serviceHostingEnvironment multipleSiteBindingsEnabled="true" />
</system.serviceModel>

</configuration>[/CODE]

Hello people,I hope everyone is well. I am having problems with my connection string.
It seems its not detected at all. I am designing a Silverligtht app with a Linq to SQL connection for the data.
Here is my code.[CODE] ConnectionStringSettings settings = ConfigurationManager.ConnectionStrings["DataConnect"];
string connection = settings.ConnectionString;

    DataContext dataContext = new DataContext(connection);[/CODE]

and code in web.config file:

[CODE]
<configuration>
<configSections>
</configSections>
<connectionStrings>
<add name="NucleusConnectionString" connectionString="Data Source=ServerName;Initial Catalog=Nucleus;Integrated Security=True"
providerName="System.Data.SqlClient" />
<add name="TravelPlannerProject.Web.Properties.Settings.DataConnect"
connectionString="Data Source=ServerName;Initial Catalog=Nucleus;Integrated Security=True"
providerName="System.Data.SqlClient" />
</connectionStrings>
<system.web>
<compilation debug="true" targetFramework="4.0" />
</system.web>

<system.serviceModel>
    <behaviors>
        <serviceBehaviors>
            <behavior name="">
                <serviceMetadata httpGetEnabled="true" />
                <serviceDebug includeExceptionDetailInFaults="false" />
            </behavior>
        </serviceBehaviors>
    </behaviors>
    <serviceHostingEnvironment multipleSiteBindingsEnabled="true" />
</system.serviceModel>

</configuration>[/CODE]

Ohk I get you buddy, so you think its better I create a property? There are properties that are auto generated, do I put it in the same file? (I am new to C# btw)

Thanx thines and ket, I am now trying to get more than two columns i.e the name and surname...this is what I have resorted to
[CODE] public List<String> getFirstNames()
{

        DataClassesDataContext db = new DataClassesDataContext();

        var result = (from persons in db.Contacts

                      select
                        persons.FirstName +", "+ persons.LastName).ToList();

        return result.ToList();
    }[/CODE]

But this just returns them as one string...When I use generic list like below I get an error:
[CODE] public IEnumerable<String> getFirstNames()
{

        DataClassesDataContext db = new DataClassesDataContext();

        var result = (from persons in db.Contacts

                      select new{
                        persons.FirstName ,persons.LastName}).ToList();

        return result.ToList();
    }[/CODE]

It says it cant convert anonymous type to string.

Also Linq to SQL would be appreciated.