Search Results

Search found 12 results on 1 pages for 'cynthia'.

Page 1/1 | 1 

  • Xml failing to deserialise

    - by Carnotaurus
    I call a method to get my pages [see GetPages(String xmlFullFilePath)]. The FromXElement method is supposed to deserialise the LitePropertyData elements to strongly type LitePropertyData objects. Instead it fails on the following line: return (T)xmlSerializer.Deserialize(memoryStream); and gives the following error: <LitePropertyData xmlns=''> was not expected. What am I doing wrong? I have included the methods that I call and the xml data: public static T FromXElement<T>(this XElement xElement) { using (var memoryStream = new MemoryStream(Encoding.ASCII.GetBytes(xElement.ToString()))) { var xmlSerializer = new XmlSerializer(typeof(T)); return (T)xmlSerializer.Deserialize(memoryStream); } } public static List<LitePageData> GetPages(String xmlFullFilePath) { XDocument document = XDocument.Load(xmlFullFilePath); List<LitePageData> results = (from record in document.Descendants("row") select new LitePageData { Guid = IsValid(record, "Guid") ? record.Element("Guid").Value : null, ParentID = IsValid(record, "ParentID") ? Convert.ToInt32(record.Element("ParentID").Value) : (Int32?)null, Created = Convert.ToDateTime(record.Element("Created").Value), Changed = Convert.ToDateTime(record.Element("Changed").Value), Name = record.Element("Name").Value, ID = Convert.ToInt32(record.Element("ID").Value), LitePageTypeID = IsValid(record, "ParentID") ? Convert.ToInt32(record.Element("ParentID").Value) : (Int32?)null, Html = record.Element("Html").Value, FriendlyName = record.Element("FriendlyName").Value, Properties = record.Element("Properties") != null ? record.Element("Properties").Element("LitePropertyData").FromXElement<List<LitePropertyData>>() : new List<LitePropertyData>() }).ToList(); return results; } Here is the xml: <?xml version="1.0" encoding="utf-8"?> <root> <rows> <row> <ID>1</ID> <ImageUrl></ImageUrl> <Html>Home page</Html> <Created>01-01-2012</Created> <Changed>01-01-2012</Changed> <Name>Home page</Name> <FriendlyName>home-page</FriendlyName> </row> <row xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <Guid>edeaf468-f490-4271-bf4d-be145bc6a1fd</Guid> <ID>8</ID> <Name>Unused</Name> <ParentID>1</ParentID> <Created>2006-03-25T10:57:17</Created> <Changed>2012-07-17T12:24:30.0984747+01:00</Changed> <ChangedBy /> <LitePageTypeID xsi:nil="true" /> <Html> What is the purpose of this option? This option checks the current document for accessibility issues. It uses Bobby to provide details of whether the current web page conforms to W3C's WCAG criteria for web content accessibility. Issues with Bobby and Cynthia Bobby and Cynthia are free services that supposedly allow a user to expose web page accessibility barriers. It is something of a guide but perhaps a blunt instrument. I tested a few of the webpages that I have designed. Sure enough, my pages fall short and for good reason. I am not about to claim that Bobby and Cynthia are useless. Although it is useful and commendable tool, it project appears to be overly ambitious. Nevertheless, let me explain my issues with Bobby and Cynthia: First, certain W3C standards for designing web documents are often too strict and unworkable. For instance, in some versions W3C standards for HTML, certain tags should not include a particular attribute, whereas in others they are requisite if the document is to be ???well-formed???. The standard that a designer chooses is determined usually by the requirements specification document. This specifies which browsers and versions of those browsers that the web page is expected to correctly display. Forcing a hypertext document to conform strictly to a specific W3C standard for HTML is often no simple task. In the worst case, it cannot conform without losing some aesthetics or accessibility functionality. Second, the case of HTML documents is not an isolated case. Standards for XML, XSL, JavaScript, VBScript, are analogous. Therefore, you might imagine the problems when you begin to combine these languages and formats in an HTML document. Third, there is always more than one way to skin a cat. For example, Bobby and Cynthia may flag those IMG tags that do not contain a TITLE attribute. There might be good reason that a web developer chooses not to include the title attribute. The title attribute has a limited numbers of characters and does not support carriage returns. This is a major defect in the design of this tag. In fact, before the TITLE attribute was supported, there was the ALT attribute. Most browsers support both, yet they both perform a similar function. However, both attributes share the same deficiencies. In practice, there are instances where neither attribute would be used. Instead, for example, the developer would write some JavaScript or VBScript to circumvent these deficiencies. The concern is that Bobby and Cynthia would not notice this because it does not ???understand??? what the JavaScript does. </Html> <FriendlyName>unused</FriendlyName> <IsDeleted>false</IsDeleted> <Properties> <LitePropertyData> <Description>Image for the page</Description> <DisplayEditUI>true</DisplayEditUI> <OwnerTab>1</OwnerTab> <DisplayName>Image Url</DisplayName> <FieldOrder>1</FieldOrder> <IsRequired>false</IsRequired> <Name>ImageUrl</Name> <IsModified>false</IsModified> <ParentPageID>3</ParentPageID> <Type>String</Type> <Value xsi:type="xsd:string">smarter.jpg</Value> </LitePropertyData> <LitePropertyData> <Description>WebItemApplicationEnum</Description> <DisplayEditUI>true</DisplayEditUI> <OwnerTab>1</OwnerTab> <DisplayName>WebItemApplicationEnum</DisplayName> <FieldOrder>1</FieldOrder> <IsRequired>false</IsRequired> <Name>WebItemApplicationEnum</Name> <IsModified>false</IsModified> <ParentPageID>3</ParentPageID> <Type>Number</Type> <Value xsi:type="xsd:string">1</Value> </LitePropertyData> </Properties> <Seo> <Author>Phil Carney</Author> <Classification /> <Copyright>Carnotaurus</Copyright> <Description> What is the purpose of this option? This option checks the current document for accessibility issues. It uses Bobby to provide details of whether the current web page conforms to W3C's WCAG criteria for web content accessibility. Issues with Bobby and Cynthia Bobby and Cynthia are free services that supposedly allow a user to expose web page accessibility barriers. It is something of a guide but perhaps a blunt instrument. I tested a few of the webpages that I have designed. Sure enough, my pages fall short and for good reason. I am not about to claim that Bobby and Cynthia are useless. Although it is useful and commendable tool, it project appears to be overly ambitious. Nevertheless, let me explain my issues with Bobby and Cynthia: First, certain W3C standards for designing web documents are often too strict and unworkable. For instance, in some versions W3C standards for HTML, certain tags should not include a particular attribute, whereas in others they are requisite if the document is to be ???well-formed???. The standard that a designer chooses is determined usually by the requirements specification document. This specifies which browsers and versions of those browsers that the web page is expected to correctly display. Forcing a hypertext document to conform strictly to a specific W3C standard for HTML is often no simple task. In the worst case, it cannot conform without losing some aesthetics or accessibility functionality. Second, the case of HTML documents is not an isolated case. Standards for XML, XSL, JavaScript, VBScript, are analogous. Therefore, you might imagine the problems when you begin to combine these languages and formats in an HTML document. Third, there is always more than one way to skin a cat. For example, Bobby and Cynthia may flag those IMG tags that do not contain a TITLE attribute. There might be good reason that a web developer chooses not to include the title attribute. The title attribute has a limited numbers of characters and does not support carriage returns. This is a major defect in the design of this tag. In fact, before the TITLE attribute was supported, there was the ALT attribute. Most browsers support both, yet they both perform a similar function. However, both attributes share the same deficiencies. In practice, there are instances where neither attribute would be used. Instead, for example, the developer would write some JavaScript or VBScript to circumvent these deficiencies. The concern is that Bobby and Cynthia would not notice this because it does not ???understand??? what the JavaScript does. </Description> <Keywords>unused</Keywords> <Title>unused</Title> </Seo> </row> </rows> </root> EDIT Here are my entities: public class LitePropertyData { public virtual string Description { get; set; } public virtual bool DisplayEditUI { get; set; } public int OwnerTab { get; set; } public virtual string DisplayName { get; set; } public int FieldOrder { get; set; } public bool IsRequired { get; set; } public string Name { get; set; } public virtual bool IsModified { get; set; } public virtual int ParentPageID { get; set; } public LiteDataType Type { get; set; } public object Value { get; set; } } [Serializable] public class LitePageData { public String Guid { get; set; } public Int32 ID { get; set; } public String Name { get; set; } public Int32? ParentID { get; set; } public DateTime Created { get; set; } public String CreatedBy { get; set; } public DateTime Changed { get; set; } public String ChangedBy { get; set; } public Int32? LitePageTypeID { get; set; } public String Html { get; set; } public String FriendlyName { get; set; } public Boolean IsDeleted { get; set; } public List<LitePropertyData> Properties { get; set; } public LiteSeoPageData Seo { get; set; } /// <summary> /// Saves the specified XML full file path. /// </summary> /// <param name="xmlFullFilePath">The XML full file path.</param> public void Save(String xmlFullFilePath) { XDocument doc = XDocument.Load(xmlFullFilePath); XElement demoNode = this.ToXElement<LitePageData>(); demoNode.Name = "row"; doc.Descendants("rows").Single().Add(demoNode); doc.Save(xmlFullFilePath); } }

    Read the article

  • Feedburner is Displaying an Inactive Email Address When Logged In

    - by Cynthia
    I have set up a Feedburner subscription through my Google account login. For some reason Feedburner displays an old inactive email address in the top right when logged into Feedburner. I'm concerned since I don't have access to this email account. If for any reason I need to move my Feedburner Feed I'm concerned I'll need to access this email account which is impossible. My email address is correct in every other Google account, profile etc. and has been updated to a working and correct email address. How can I change this? Do I need to be concerned?

    Read the article

  • Report: 50 Open Source Security Tools

    The Free/Open Source software world offers great thundering herds of excellent security software; Cynthia Harvey presents a sampling of 50 FOSS applications for everything from anti-malware to forensics to Internet gateways to networking monitoring, and then some.

    Read the article

  • MVC Html.textbox/dropdown/whatever won't refresh on postback

    - by Cynthia
    OK, let's start with the Html.Textbox. It is supposed to contain text read from a file. The file read is based on what the user picks from a dropdown list. The first time it is fine. The user picks a value from the dropdown list. The controller uses that value to read some text from a file, and returns that text to the view via the view model. Everything is fine. THen the user picks another value from the dropdown list. The controller reads a new value from a file and returns it via the view model. Debugging to the LINE BEFORE THE HTML.TEXTBOX is set in the view shows that the model contains the correct value. However, the textbox itself still shows the PREVIOUS value when the page displays! If I switch from Html.Textbox to a plain input, type="text" html control, everything works fine. That's not so hard, but the same thing happens with my dropdown list -- I can't set the selected value in code. It always reverts to whatever was chosen last. Rendering a "select" tag with a dynamically-generated option list is a pain. I would love to be able to use Html.Dropdown. What am I missing here?? This is such a simple thing in webforms!

    Read the article

  • How to modify by loading and saving the same xml file

    - by cynthia hong
    I have a problem with modifying xml file when i first load and then save it with same file path and name. Below is my code. The error is "Access to the path C:\MyApp\Web.config is denied. If i change the path of the xdoc.Save to be different from xdoc.Load, then it will be ok. What is your recommandation to solve this problem? If possible, i need to modify the existing xml file(meaning xml file for loading and saving is the same path). XmlDocument xdoc = new XmlDocument(); xdoc.Load(@"C:\\MyApp\\Web.config"); XmlNode xn = xdoc.SelectSingleNode("//configuration/MyProvider"); XmlElement el = (XmlElement)xn; el.SetAttribute("defaultProvider", "MyCustomValue"); xdoc.Save(@"C:\\MyApp\\Web.config"); Thanks in advance.

    Read the article

  • HABTM and belongsTo at the same join, cakePhp

    - by Cynthia
    Hello everyone. I have a model Fix with a relationship HABTM Device model. Device model has a belongsTo to Device_type model, like this, for only getting the device type name: var $belongsTo = array('Device_type'=>array('fields'=>'name')); So, I need every Fix, its devices and its Device_types. When I make a Fix->find('all', array('recursive' => 2)) I expect to get every Device related to Fix (this works ok) and ALSO for every device, its Device_type.name (which is not working). This is what I get instead for every Device in the result (an empty array): ["Device_type"]=> array(0) { } Besides this, when I make this query for testing: Fix->Device->find('all'), it returns the current Device_type.names for every device related to fixes, which means models are related propertly. Any help? Thanks.

    Read the article

  • ReturnUrl = Default.aspx for MVC?

    - by Cynthia
    I'm trying to secure my entire MVC site, so before the Home controller, I added an [Authorize] attribute. Now if you run it from Visual Studio or navigate using the root URL (e.g. http://localhost:2897) it does redirect to the login page, as expected. However the URL in the address bar after redirection looks like this: http://localhost:2897/Account/LogOn?ReturnUrl=%2fdefault.aspx%3f I haven't tested this out, seeing as I have not implemented my authentication code. However, this looks like a big problem to me, since I do not have a default.aspx in my project! My authentication tag in the web.config looks like this: <authentication mode="Forms"> <forms loginUrl="~/Account/LogOn" defaultUrl="~/Home/Index" timeout="2880"/> </authentication> Why doesn't it pick up this route as the default ReturnUrl instead of default.aspx?

    Read the article

  • Is an object still connected to a list after FirstOrDefault?

    - by Cynthia
    Here's my code: Event thisEvent = (from i in list where (i.eventID == eventID) select i).FirstOrDefault(); if (thisEvent != null) { thisEvent.eventResolved = resolved; thisEvent.eventSequence.Add(item); } "list" is a collection of IEnumerable, i.e. IEnumerable<Event> list; What I'm wondering is: after creating thisEvent using FirstOrDefault, is thisEvent still connected to list? In other words, when I change the two properties, eventResolved and eventSequence, is "list" actually changed, or is thisEvent just some totally disconnected copy of an item in "list"?

    Read the article

  • How to add a 3rd level to my CSS drop down menu?

    - by Cynthia
    I have a 2-level drop down menu that looks great in all browsers. Now I want to add a 3rd level. How do I do that? Here is my HTML for the menu: <div class="nav"> <div class="navbar"> <ul class="menu"> <li><a href="#">Home</a></li> <li><a href="#">About JoyFactory</a> <ul class="sub-menu"> <li><a href="#">Who We Are</a></li> <li><a href="#">Our Education Concept</a></li> <li><a href="#">References</a></li> </ul> </li> <li><a href="#">JoyFactory Kinderkrippe</a> <ul class="sub-menu"> <li><a href="#">JoyFactory Kinderkrippe Oerlikon</a> <ul> <li><a href="#">item 1</a></li> <li><a href="#">item 2</a></li> <li><a href="#">item 3</a></li> <li><a href="#">item 4</a></li> </ul> </li> <li><a href="#">JoyFactory Kinderkrippe Seebach</a></li> </ul> </li> </ul> </div> </div> and here is my CSS: .nav { clear:both ; width:1020px ; height:55px ; background:url("images/nav-bg.png") no-repeat ; position:absolute ; top:125px ; left:-10px ; } .navbar { width:1000px ; height:50px ; margin:auto ; } ul.menu { margin-left:0 ; padding-left:0 ; list-style-type:none ; } .menu li { display:inline ; float:left ; height:50px ; margin:0 6px ; } .menu li a { font-family:'MyriadPro-SemiboldCond' ; font-size:24px ; color:#ffffff ; text-decoration:none ; height:50px ; line-height:50px ; padding:0px 10px ; } .menu li:hover, .menu li:hover a { background:#ffd322 ; color:#e32a0e ; } .sub-menu { position:absolute ; float:none ; padding:0 ; top:50px ; z-index:9999 ; background:#ffd322 ; margin-left:0 ; padding-left:0 ; } .sub-menu li { display:none ; min-width:175px !important ; margin: 0 !important; padding: 0 !important; } .sub-menu li a, .current-menu-parent .sub-menu li a { display:block ; background:#ffd322 ; font-family:arial,helvetica,sans-serif ; font-size:16px ; padding:0 10px ; border-top:1px solid #f37f10 ; border-left:none ; } .sub-menu li a:hover, .menu li.current-menu-parent .sub-menu li.current-menu-item a { background:#f37f10 } .menu li:hover li { float: none; display:block; clear: both; } Any help would be most appreciated! Many thanks :)

    Read the article

  • Why does one column seem to load first in Wordpress?

    - by Cynthia
    I have a Wordpress site that is doing something very bizarre. If you go to: http://digitaldemo.net/joy/krippen-a-b-c/ When it loads, the main content div loads on the right hand side of the page and then once the sidebar loads, THEN it gets pushed over to where it ought to be. It's only really noticable in Firefox, but I'd like to find out what is causing it and fix the issue. Any ideas? Many thanks!

    Read the article

1