Search Results

Search found 8467 results on 339 pages for 'alternate elements'.

Page 8/339 | < Previous Page | 4 5 6 7 8 9 10 11 12 13 14 15  | Next Page >

  • WPF4 Unleashed - how does converting child elements work?

    - by Kapol
    In chapter 2 of the book WPF4 Unleashed the author shows an example of how XAML processes type conversion. He states that <SolidColorBrush>White</SolidColorBrush> is equivalent to <SolidColorBrush Color="White"/> , because a string can be converted into a SolidColorBrush object. But how is that enough? It doesn't make sense to me. How does XAML know to which property should the value White be assigned?

    Read the article

  • Easy Method to Change Color on UI Elements

    - by A13X
    This isn't a language-specific thing as far as I'm concerned. I was wondering what may be a quick way to change the COLOR of a certain on-screen element such as a button and its associated text. I would assume there is a trick to making a graphics engine so maybe individuals pixels or groups of sprites can have their colors easily shifted. A lot of game interface buttons and such have this so you know when an event like a click has occurred. Any pseudo code would be helpful and I am working in Android (not XML fluff), but again, this probably is not a very specific question, just an inquiry on how to go about this.

    Read the article

  • What 3 Elements Make Up SEO?

    Search engine optimisation (SEO) is the natural or organic method of getting your website placed higher in the search engines, as opposed to paying for online advertising. As a result it is a task that is never ending, always requiring you to be one step ahead of your competitors, and any successes tend to be short lived, as Google responds to all new material that is posted online, and it is always the latest contributions that are indexed at the top.

    Read the article

  • Stairway to Database Design - STEP 1: Data Elements

    Before you start to think about your database schema or tables, you need to consider your data: The type of data it is, the scale you use for values. It needs to be unique, precise and unambiguous. Then you need to name it in such a way that it can be generally understood. Joe Celko explains...

    Read the article

  • jquery selector for elements beside one another? [migrated]

    - by PaulHanak
    this SHOULD be simple, but I have been through the Jquery Selector help for about an hour now and nothing seems to be working. Help! I am basically trying to pull the text (an address) of a SPAN after a user clicks on the link next to it. Please note though, I will have about 10 on a page, so I cannot set a static address. It must be pulled when the user clicks. The html code: <a href="3" class="clicky">Click to Show Map</a> <span style="display: none" class="theaddy">123 Fake Street, Somewhere Else, 12341</span> So really, my question is, how do I grab the text from .theaddy when a user clicks on .clicky? As I said, I cannot use var propertyaddy = $(.theaddy).text(); because there are 10 of these addy's on the same page. I need some sort of "THIS" Next To kinda thing. I also tossed around the idea of placing the SPAN inside the A, but my efforts on that weren't working either. Thank you in advance for any help!

    Read the article

  • Missing elements of collection

    - by Neir0
    I have a collection ObservableCollection<string> outoverList And i have a function which call collection outoverList.Add("out:"+element.tagName); Function call collection a few times, but sometimes collection lost elements. We call a function - function adds element - collection has 9 elements(for example) - in the next function calling collection has only 8 elements. One elements be missing. Here Resharpers Find usages log: Search target FindElementHandler.outoverList:ObservableCollection<string> Found 3 usages in solution <FindElementExperiments> (3 items) FindElementHandler.cs (3 items) (50,13) outoverList = new ObservableCollection<string>(); (94,13) outoverList.Add("out:"+element.tagName); (118,13) outoverList.Add("over:" + element.tagName); As you can see i just add elements to collection everywhere. i havent remove elements code. Maybe i did something wrong you can look at screen capture: http://www.youtube.com/watch?v=Ei6dQnHCMIc I am newbie and often encounter with various problems but this bug looks mystic for me. P/S/ Sorry for english

    Read the article

  • C# Recursion SumOfOnlyNeg Elements

    - by Chris
    Hello, A array gets filled up with random elements (negative and positive). Now i want to calculate the sum of ONLY the postive elements. Iterative there is no problem, but in the recursion version i can only get the sum of both negative and postive. How can i "check" in the recursive version that it only sums up the Postive elements? Best Regards. Iterative version: public int IterSomPosElem(int[] tabel, int n) { n = 0; for (int i = 0; i < tabel.Length; i++) { if (tabel[i] >= 0) { n += tabel[i]; } } return n; } Recursive version atm (sums up all the elements insteed, of only the positive) public int RecuSomPosElem(int[] tabel, int n) { if(n == 1) return tabel[0]; //stopCriterium else { return (tabel[n - 1] + RecuSomPosElem(tabel, n - 1)); // how to check, so it only sums up the postive elements and "ignores" the negative elements. } }

    Read the article

  • Interview Q: sorting an almost sorted array (elements misplaced by no more than k)

    - by polygenelubricants
    I was asked this interview question recently: You're given an array that is almost sorted, in that each of the N elements may be misplaced by no more than k positions from the correct sorted order. Find a space-and-time efficient algorithm to sort the array. I have an O(N log k) solution as follows. Let's denote arr[0..n) to mean the elements of the array from index 0 (inclusive) to N (exclusive). Sort arr[0..2k) Now we know that arr[0..k) are in their final sorted positions... ...but arr[k..2k) may still be misplaced by k! Sort arr[k..3k) Now we know that arr[k..2k) are in their final sorted positions... ...but arr[2k..3k) may still be misplaced by k Sort arr[2k..4k) .... Until you sort arr[ik..N), then you're done! This final step may be cheaper than the other steps when you have less than 2k elements left In each step, you sort at most 2k elements in O(k log k), putting at least k elements in their final sorted positions at the end of each step. There are O(N/k) steps, so the overall complexity is O(N log k). My questions are: Is O(N log k) optimal? Can this be improved upon? Can you do this without (partially) re-sorting the same elements?

    Read the article

  • How do you get the width of an element without a defined width?

    - by Moak
    How would you find out the width of a element that is wrapped by 20 odd other elements, but the only fixed width I know is the main wrapper's which is 800px. All child elements are generally blocks, floating or not, with different paddings and margins. I don't really need the answer to a specific case, I'm just wondering if there are tools or tricks to quickly calculate such things. Thanks

    Read the article

  • Element Content Versus Attribute for Simple XML Value

    - by MB
    I know the elements versus attributes debate has come up many times here and elsewhere (e.g. here, here, here, here, and here) but I haven't seen much discussion of elements versus attributes for simple property values. So which of the following approaches do you think is better for storing a simple value? A: Value in Element Content: <TotalCount>553</TotalCount> <CelsiusTemperature>23.5</CelsiusTemperature> <SingleDayPeriod>2010-05-29</SingleDayPeriod> <ZipCodeLocation>12203</ZipCodeLocation> or B: Value in Attribute: <TotalCount value="553"/> <CelsiusTemperature value="23.5"/> <SingleDayPeriod day="2010-05-29"/> <ZipCodeLocation code="12203"/> I suspect that putting the value in the element content (A) might look a little more familiar to most folks (though I'm not sure about that). Putting the value in an attribute (B) might use less characters, but that depends on the length of the element and attribute names. Putting the value in an attribute (B) might be more extensible, because you could potentially include all sorts of extra information as nested elements. Whereas, by putting the value inside the element content (A), you're restricting extensibility to adding more attributes. But then extensibility often isn't a concern for really simple properties - sometimes you know that you'll never need to add additional data. Bottom line might be that it simply doesn't matter, but it would still be great to hear some thoughts and see some votes for the two options.

    Read the article

  • ScatterViewItems Containing Surface Interactive Elements

    - by James Hay
    This is an age old problem of interactive elements inside interactive elements, but I want a ScatterViewItem to contain other surface interactive elements such as a SurfaceButton or SurfaceCheckBox. I've got all my elements in there and they react to taps etc. The problem is that I only get the normal ScatterView behavior once I click on an area that does not contain a control. Is there an elegant solution to allow dragging even when the contact is on a SurfaceButton or SurfaceCheckbox? e.g. <s:ScatterView > <Grid Width="200" Height="200"> <s:SurfaceButton /> </Grid> </s:ScatterView>

    Read the article

  • FBML elements rendering delay

    - by jeffreyveon
    I am using FBML for rendering certain elements on the page such as the name of the user, profil pic, etc. However when there are many FBML elements on page, there is a slight delay which occurs before they are rendered - that's fine since AJAX calls are made to the server to fetch the data by the JS FB library. However, I want to hide the container DIV holding these element till the elements have finished loading, so is there any way to specify a JS callback function which gets fired when the FBML data has finished loading?

    Read the article

  • Command line tool to query HTML elements (linux)

    - by ipsec
    I am looking for a (linux) command line tool to parse HTML files and extract some elements, ideally with some XPath-like syntax. I have the following requirements: It must be able to parse arbitrary HTML files (which may contain errors) in a robust manner It must be able to extract text of elements and attributes What I have tried so far: xmlstarlet: would be perfect, but mostly reports errors in files (e.g. entity not defined), even xml fo or htmltidy does not help. xmllint: the best I have found so far, but is not able to extract attribute texts. Something like //a/@href reports <a href="foo">, what I need is just foo. string(//a/@href) works, but queries only the first entry. data is not supported. hxextract: works, but cannot extract attributes. XQilla: would support XPath 2.0 and thus data. It also support xqilla:parse-html, but I have had no luck making this work. Can you recommend me another tool?

    Read the article

  • javascript - catch SyntaxError and run alternate function

    - by ludicco
    Hello there, I'm trying to build something on javascript that I can have an input that can be everything like string, xml, javascript and (non-javascript string without quotes) as follows: //strings eval("'hello I am a string'"); /* note the following proper quote marks */ //xml eval(<p>Hello I am a XML doc</p>); //javascript eval("var hello = 2+2;"); So this first 3 are working well since they are simple javascript native formats but when I try use this inside javascript //plain-text without quotes eval("hello I am a plain text without quotes"); //--SyntaxError: missing ; before statement:--// Obviously javascript interprets this as syntax error because it thinks its javascript throwing a SyntaxError. So what I would like to do it to catch this error and perform the adjustment method if this occurs. I've already tried with try catch but it doesn't work since it keeps returning the Syntax error as soon as it tries to execute the code. Any help would be much appreciated Cheers :) Additional Information: Imagine an external file that javascript would read, using spidermonkey, so it's a non-browser stuff(I can't use HttpRequest, DOM, etc...)..not sure if this matters, but there it is. :)

    Read the article

  • change font-size of nested elements in list

    - by John
    Hi, I have a nested list of ul elements. I would like to decrease the font size by a couple of pixels for each level down. So for example the first li elements would have font size 18px, then nested elements of that would have font size 16px and any nested elements of that would have font size 14px etc. However once the font size gets to a certain size e.g. 8px I would like to stop making them any smaller. These lists are generated on the fly so I have no way of knowing how deep they are going to be so can't just hard code the css to a certain level. Is there a way in css or JQuery where I could apply this type of formatting?

    Read the article

  • Probability of failure with larger number of network elements

    - by MikeKulls
    I'm having a discussion with a work colleague. I'm saying that a network with 100 elements will have pretty much 10 times as many failures as a network with 10 elements, ie a tech will need to replace faulty hardware 10 times more often. He suggests that the failure rate doesn't go up in a linear fashion and the failure rate will be significantly less than 10x, in fact only slightly more failures. This is not the probability of an outage etc, we are just talking in relation to the amount of parts that a tech would need to swap out in a given time frame.

    Read the article

  • Changing Opacity of All Elements but One Div

    - by waiwai933
    I'm trying to fade all elements on a webpage except for one div. I've been able to fade all the elements with the following jQuery: $('*').css('opacity', .3); However, it seems as if opacity is a property that inherits from parent elements, even if I explicitly set the opacity of the div to 1. I'm drawing a blank as to any solutions right now, so can I have some help here?

    Read the article

  • Adjust spacing between list elements in Word 2010

    - by Steve
    Is there a way to adjust the spacing between list elements in Word 2010? I can apply a style to the list, and then edit the style, and edit the spacing before and after the element, but this applies to the list, not the list element. There are no styles I can see which can be applied to a list element allowing the spacing between list elements to be adjusted. If I select 1 list element, and then adjust the spacing before or after in the Page Layout tab, this applies to the whole list, not the list element, which defeats the purpose.

    Read the article

  • Alternate cause of BadImageFormatException in .NET Assembly?

    - by Phillip Knauss
    I'm working on a .NET 3.5 console application in C# which uses a VC++ unmanaged DLL. It ran without a problem when I worked on it a few weeks ago, but I'm coming back to it today and am now getting a BadImageFormatException ("An attempt was made to load a program with an incorrect format. (Exception from HRESULT: 0x8007000B)). My development workstation is running 64bit Windows 7, and I do a fair amount of work with unmanaged code, so I immediately checked that the .NET assembly and the VC++ library both had x86 targets. They did. Just to be sure, I cleaned and rebuilt the VC++ library and the .NET assembly, to no avail. Neither system is doing anything particularly unusual. The VC++ library loads a binary data file and does some mathematical processing on its contents. The .NET assembly has the DllImports for the library and some code to wire it up. This all worked a few weeks ago. So now I'm left wondering if there's some other cause of BadImageFormatException that's less common than an x86/x64 conflict that I might be running into. Thanks.

    Read the article

  • Find elements based on xsd type with lxml

    - by joet3ch
    I am trying to get a list of elements with a specific xsd type with lxml 2.x and I can't figure out how to traverse the xsd for specific types. Example of schema: <xsd:element name="ServerOwner" type="srvrs:string90" minOccurs="0"> <xsd:element name="HostName" type="srvrs:string35" minOccurs="0"> Example xml data: <srvrs:ServerOwner>John Doe</srvrs:ServerOwner> <srvrs:HostName>box01.example.com</srvrs:HostName> The ideal function would look like: elements = getElems(xml_doc, 'string90') def getElems(xml_doc, xsd_type): ** xpath or something to find the elements and build a dict return elements

    Read the article

  • Is it possible to alternate between two types in an XML Schema

    - by lief79
    I'm wondering if I am missing something obvious. I have a list of numbers, possibly including ranges (think of the print page option of a print dialog). Ideally I'd like to have the final XML output look like this, with page and pageRange in an order. <pages> <page> 1</page> <pageRange><start>3</start><end>6</end></pageRange> <page> 34</page> </pages> What would I have to put into a schema to allow this? From what I saw: Sequence with multiple page and page Range allowed doesn't permit alternation. Choice only allows one or the other. I tried messing with all, but I wasn't getting it to validate properly. My short term solution is to have a sequence of ranges, and to force single numbers into the range, but it seems potentially cumbersome. So am I missing something?

    Read the article

  • Hide Non-Displayed ASP Elements in Design View

    - by Steven
    Is there a way to prevent non-displayed elements from appearing in the ASPX Design View editor? By "non-displayed elements", I mean the background elements (Managers, DataSources, Validators, etc) that show up as grey boxes containing the type and id. If I have several of those at the top of the page, I can't see much of the preview of my page.

    Read the article

< Previous Page | 4 5 6 7 8 9 10 11 12 13 14 15  | Next Page >