Search Results

Search found 10804 results on 433 pages for 'attribute keys'.

Page 156/433 | < Previous Page | 152 153 154 155 156 157 158 159 160 161 162 163  | Next Page >

  • How to print the Control identifiers of a window to a document in Pywinauto.

    - by Swetha
    Hi All, I am trying to automate installation of an application using Pywinauto.During the installation the last window shows some warning or error messages in few cases and later the system begins to restart.My objective is to capture the the Warning messages which is possible by app.top_window_()._ctrl_identifiers() np.Notepad.Edit.TypeKeys(a,with_spaces=True, with_tabs=True, with_newlines=True) This is returning a list which contains all the messages of the screen. Second line is where i am trying to print the list object in the notepad.But its throwing some exceptions Traceback (most recent call last): File "", line 1, in np.Notepad.Edit.TypeKeys(a,with_spaces=True, with_tabs=True, with_newlines=True) File "C:\Python26\pywinauto\controls\HwndWrapper.py", line 950, in TypeKeys turn_off_numlock) File "C:\Python26\pywinauto\SendKeysCtypes.py", line 629, in SendKeys keys = parse_keys(keys, with_spaces, with_tabs, with_newlines) File "C:\Python26\pywinauto\SendKeysCtypes.py", line 538, in parse_keys c = string[index] KeyError: 0 Could anyone let me know how to do this or if there is other way in which this can be handled with an example. Thanks a lot in advance. Swetha

    Read the article

  • How to effectively clip the amount of entries in a dictionary?

    - by reinier
    I had a List<myClass> myList for storing a list of items. When I had to clip this (discard any amount of items above some threshold) I used: myList.RemoveRange(threshold, myList.Count - threshold); where threshold is the max amount of things the list can contain Now I've upgraded the datatype to a Dictionary<key, myClass> myDictionary How can I basically do the same: Discard all entries above some threshold. (It doesn't matter which ones are discarded) I guess I could foreach through the keys collection and manually delete all keys/value pairs. But I was hoping there was a more elegant solution.

    Read the article

  • Semicolon in object variable name

    - by milkfilk
    There's a common LDAP attribute called userCertificate;binary. It actually has a semi-colon in the attribute name. In ruby, I turn an LDAP entry into a OpenStruct object called 'struct'. struct.class = OpenStruct But of course ruby thinks it's an end-of-line character. ? struct.userCertificate;binary NameError: undefined local variable or method `binary' for main:Object from (irb):52 from :0 IRB knows that the local variable is there, because it gives me struct.userCertificate;binary from the tab auto-completion. I can also see the class variable when calling struct.methods on it. struct.methods = ... "send", "methods", "userCertificate;binary=", "hash", ... It's definitely there, I can see the contents if I print the whole variable to_s(). But how can I access the local variable when it has a semicolon in it? I have workarounds for this but I thought it was an interesting problem to post.

    Read the article

  • What Can A 'TreeDict' (Or Treemap) Be Used For In Practice?

    - by Seun Osewa
    I'm developing a 'TreeDict' class in Python. This is a basically a dict that allows you to retrieve its key-value pairs in sorted order, just like the Treemap collection class in Java. I've implemented some functionality based on the way unique indexes in relational databases can be used, e.g. functions to let you retrieve values corresponding to a range of keys, keys greater than, less than or equal to a particular value in sorted order, strings or tuples that have a specific prefix in sorted order, etc. Unfortunately, I can't think of any real life problem that will require a class like this. I suspect that the reason we don't have sorted dicts in Python is that in practice they aren't required often enough to be worth it, but I want to be proved wrong. Can you think of any specific applications of a 'TreeDict'? Any real life problem that would be best solved by this data structure? I just want to know for sure whether this is worth it.

    Read the article

  • building a pairwise matrix in scipy/numpy in Python from dictionaries

    - by user248237
    I have a dictionary whose keys are strings and values are numpy arrays, e.g.: data = {'a': array([1,2,3]), 'b': array([4,5,6]), 'c': array([7,8,9])} I want to compute a statistic between all pairs of values in 'data' and build an n by x matrix that stores the result. Assume that I know the order of the keys, i.e. I have a list of "labels": labels = ['a', 'b', 'c'] What's the most efficient way to compute this matrix? I can compute the statistic for all pairs like this: result = [] for elt1, elt2 in itertools.product(labels, labels): result.append(compute_statistic(data[elt1], data[elt2])) But I want result to be a n by n matrix, corresponding to "labels" by "labels". How can I record the results as this matrix? thanks.

    Read the article

  • Changing stylesheet href with jQuery doesn't quite work

    - by Michael Itzoe
    I'm creating a web app that user will be accessing in the field, so they'd like to be able to manually toggle the styles from light to dark depending on the ambient lighting. I'm using jQuery. I added an id attribute to my stylesheet, then created a button using the toggle() event, in which I change the href attribute to the CSS file I want. The CSS file has several @import directives as I split the styles into several files for maintainability. My problem is only the main CSS file is being applied. I tried using the absolute path in the @import directives, but no luck. Is there a fix here I'm missing, or do I have to inlcude everything in a single CSS file? Edit: Apprently this is only a problem in IE8, works fine in Chrome and Firefox. Unfortunately, my client wants only IE8. Looks like this is a duplicate of this question.

    Read the article

  • Facebook Like button - comment box with breif description and image

    - by Dave Smith
    On my website when the user selects the facebook like button they have the option to enter comments. This popup window to enter comments only contains the users avatar and place to enter comments. How can i include my pic and a brief description of the site directly below the comment??? At first I thought it was from the HTML title attribute or meta property="og:title" ... but populating these have no affect I have another site that contains both pic and a desc below the comment but the pic seems to be grabed at random -but always the same- from the site and the short desc I thought from the -title- attribute but its not - I changed the -title- and it still shows the same desc, its like its cached??? Any ideas how to control or populate a brief description and image within the comment section of a like button???

    Read the article

  • How can I launch an application as Administrator after a WiX MSI has completed?

    - by ray dey
    Hi there I want to launch an application with admin rights after I have completed an installation using a WiX based MSI. I can launch the application just fine, on XP but with Windows 7, it's an issue. The application has a manifest embedded in it that says it should run as administrator and I've changed the impersonate attribute in the Custom Action to "no". I can't change the execute attribute to deferred, as this only works before the InstallFinalize action and I need it after the user has clicked Finish in the MSI. This is my Custom Action: <CustomAction Id="LaunchApp" FileKey="App" ExeCommand="[Command Line Args]" Execute="immediate" Impersonate="no" Return="asyncNoWait" /> Any help on this would be appreciated. Thanks

    Read the article

  • How do I load multiple FLV files, with the same COMPLETE event handler?

    - by Josamoto
    When loading files with the Loader in ActionScript 3, I am able to inspect the event attribute on the complete event handler to determine what the URL is for the file that has completed downloading. Loader exposes a variable in the event handler attribute: event.target.url which I means that when the handler returns, I can easily determine which file is loading. However, my client has sent numerous FLV files built in After Effects that constitute the UI elements of a Flash application built for them. Loading FLV files require the use of URLLoader, and this does not appear to expose the name of the file being loaded. So I either need to convert the FLV's to SWF, so I can load them as normal. Is there a way to determine the URL inside the onComplete event handler fired by URLLoader?

    Read the article

  • Display xml data in silverlight datagrid, vb.net

    - by Aishwarya
    I want to display an xml file data in silverlight datagrid. im using the below code but it doesnt work.Please help. My vb.net code: Imports System Imports System.Collections.Generic Imports System.Linq Imports System.Windows Imports System.Windows.Controls Imports System.Xml.Linq Namespace SilverlightApplication1 Public Partial Class Page Inherits UserControl Public Sub New() InitializeComponent() End Sub Private Sub Page_Loaded(ByVal sender As Object, ByVal e As RoutedEventArgs) DataGrid1.ItemsSource = GetPunchReport() End Sub Public Function GetStatusReport() As List(Of Table) Dim statusReport As New List(Of Table)() Dim doc As XElement = XElement.Load("Data/PunchReport.xml") report = (From row In doc.Elements() _ Select GetStatus(row)).ToList() Return statusReport End Function Private Function GetReport(ByVal row As XElement) As Table Dim s As New Table() s.JobID= row.Attribute("JobID").Value s.VenueName= row.Attribute("VenueName").Value) Return s End Function End Class End Namespace

    Read the article

  • Custom Error mode in Web.Config File

    - by Zerotoinfinite
    Hi All, I have deployed my application on server and Now I am getting this error: To enable the details of this specific error message to be viewable on remote machines, please create a tag within a "web.config" configuration file located in the root directory of the current web application. This tag should then have its "mode" attribute set to "Off". Notes: The current error page you are seeing can be replaced by a custom error page by modifying the "defaultRedirect" attribute of the application's configuration tag to point to a custom error page URL. ~~~ I have defined custom error pages for my applicatio. Please help me, how to rectify this issue. Thanks in advance.

    Read the article

  • Using DataPager Control with AJAX and SEO

    - by Jonathan Wood
    I've just taken my first stab at making a ListView, ObjectDataSource, and DataPager run in an AJAX panel. I had trouble getting it to work until I removed the QueryStringField="page" attribute from the DataPager. This attribute causes the current page to be passed as a query argument in the URL. For obvious reasons, I guess that won't work when posting back using AJAX. Now my question is if this hurts my SEO. When I used QueryStringField, the page links appeared as regular links with various query arguments. But now the links are just javascript. Haven't I hurt a search engine's ability to scan related pages? Or is there another approach to this?

    Read the article

  • How to override the attr_protected?

    - by KandadaBoggu
    I have STI implementation as follows: class Automobile < ActiveRecord::Base end class Car < Automobile end class Truck < Automobile end class User < ActiveRecord::Base has_many :automobiles accepts_nested_attributes_for :automobiles end I am creating a list of automobiles for a user. For each automobile, the UI sets the type field and the properties associated with the automobile.While form submission, the type field is ignored as it is a protected attribute. How do I work around this issue? Is there a declarative way to unprotect a protected attribute?

    Read the article

  • Why this button doesn't cause triple postback?

    - by focus
    We have developed a page with a asp.net and debugging it accidentally we have discovered on our page button with the next code on onclik attribute onclick="__doPostBack('ctl00$FormPlace$m_userTaskMarkAsUnreadButton',''); __doPostBack('ctl00$FormPlace$m_userTaskMarkAsUnreadButton','');WebForm_DoPostBackWithOptions(new WebForm_PostBackOptions("ctl00$FormPlace$m_userTaskMarkAsUnreadButton", "", true, "", "", false, false))" It seems that the button do three postbacks but when we click it only cause on postback. With this code seems that de button will cause three postbacks!! We have try it with Internet Explorer and Firefox and the button only cause on postback always. Are browsers who avoid that the button do three postback ? Or Is Asp.net server who avoid the three postback? We don't understand why the button behaves correctly if onclick attribute has three call to do Postbacks. Thanks

    Read the article

  • ucommerce: how to change category template

    - by autonomatt
    Using uCommerce 2, umbraco 4.7. I have a category side nav showing the categories using: <a> <xsl:attribute name="href"> <xsl:value-of select="CommerceLibrary:GetNiceUrlForCategory($catalogueName, @id)"/> </xsl:attribute> <xsl:value-of select="@displayName"/> </a> First of all, when hovering over the links it still shows an old catalogue name, even though I've renamed the catalogue and also hardcoded the catalogue name into: <xsl:variable name="catalogueName" select="'MyCatalogue'"/> When I click on the link generated by GetNiceUrlForCategory I get the standard template that comes with uCommerce started site. I've tried deleting the whole started site, but I just can't get it to link to a template I did for the category. I still don't quite understand how ucommerce knows which template to use for a category link. Soren? :) Cheers, Matt

    Read the article

  • using javascript replace() to match the last occurance of a string

    - by Dave
    I'm building an 'add new row' function for product variations, and I'm struggling with the regex required to match the form attribute keys. So, I'm basically cloning rows, then incrementing the keys, like this (coffeescript): newrow = oldrow.find('select, input, textarea').each -> this.name = this.name.replace(/\[(\d+)\]/, (str, p1) -> "[" + (parseInt(p1, 10) + 1) + "]" ) this.id = this.id.replace(/\_(\d+)\_/, (str, p1) -> "_" + (parseInt(p1, 10) + 1) + "_" ) .end() This correctly increments a field with a name of product[variations][1][name], turning it into product[variations][2][name] BUT Each variation can have multiple options (eg, color can be red, blue, green), so I need to be able turn this product[variations][1][options][2][name] into product[variations][1][options][3][name], leaving the variation key alone. What regex do I need to match only the last occurrence of a key (the options key)?

    Read the article

  • Storing XML in SQL 2005 XMLNS issue

    - by Mike Mengell
    I'm trying to store XML in SQL 2005. I have a very simple table with an Id and a XML column. When the XML contains the attribute xmlns my searching doesn't work. This is my XML; insert into XMLTest (ItemXML) values ( '<MessageType> <ItemId id="ABC" xmlns="ss" /> <Subject>sub</Subject> </MessageType> ') And this is my Query; select itemid, ItemXML.query('(/MessageType/ItemId)') from XMLTest order by ItemId desc If I change the attribute xmlns to anything else my query works. I don't think I know enough about XML to understand what SQL is doing with the namespace. But it must be processing it and storing it differently maybe? Anyone had this issue?

    Read the article

  • Disable Primary Key and Re-Enable After SQL Bulk Insert

    - by Jon
    I am about to run a massive data insert into my DB. I have managed to work out how to enable and rebuild non-clustered indexes on my tables but I also want to disable/enable primary keys. You can't disable the clustered index for the primary key as the table is inaccessible when that is done and my attempt to do a ALTER TABLE for constraints does not work as I think that is only for foreign keys. Do you know of a way to Disable the Primary Key and Re-Enable After SQL Bulk Insert. NOTE: This is over numerous tables and so I don't know the exact primary key specifications eg/name etc

    Read the article

  • what is a TOPIC in Struts2

    - by nacho4d
    HI, I am learning struts 2 with Tiles 2 and the word "topic" shows up very frequently... What is a topic? for example: The sx:a tag (specifically the ajax a template) and the div tag support an ajax event system, providing the ability to broadcast events to topics. You can specify the topics to listen to using a comma separated list in the listenTopics attribute. What this means is that when a topic is published, usually through the ajax a template, the URL specified in the href attribute will be re-requested. Placeholder... Refresh

    Read the article

  • extending spring form tag library attributes

    - by TimmyJ
    I'm using Spring's form tag library in a Spring MVC application that I am developing. The company I am working for has implemented some company-wide policies based on the definition of custom attributes for certain tags. For instance, by default (though the inclusion of a standard javascript file) all tags have their values automatically converted to upper case. In order to disable this one would define their tag with a custom attribute in the following way: <input type="text" uppercase="false" /> The problem is that the addition of these custom attributes to a spring:form tag causes an error at runtime. I've pasted the error below. org.apache.jasper.JasperException: /WEB-INF/jsp/reportCriteria.jsp(45,5) Attribute uppercase invalid for tag input according to TLD My question is: is there any way to extend the TLD to allow for these attributes, or is there any other way add these custom attributes to these spring:form tags?

    Read the article

  • How do I specify a null relation in SQLAlchemy?

    - by Jesse
    Not sure what the correct title for this question should be. I have the following schema: Matters have a one-many relationship to WorkItems. WorkItems have a one-one (or one-zero) relationship to LineItems. I am trying to create the following relation between Matters and WorkItems Matter.unbilled_work_items = orm.relation(WorkItem, primaryjoin = (Matter.id == WorkItem.matter_id) and (WorkItem.line_item_id == None), foreign_keys = [WorkItem.matter_id, WorkItem.line_item_id], viewonly=True ) This throws: AttributeError: '_Null' object has no attribute 'table' That seems to be saying that the second clause in the primaryjoin returns an object of type _Null, but it seems to be expecting something with a "table" attribute. This seems like it should be pretty straightforward to me, am I missing something obvious?

    Read the article

  • (Python) algorithm to randomly select a key based on proportionality/weight

    - by LaundroMat
    Hi - I'm a bit at a loss as to how to find a clean algorithm for doing the following: Suppose I have a dict k: >>> k = {'A': 68, 'B': 62, 'C': 47, 'D': 16, 'E': 81} I now want to randomly select one of these keys, based on the 'weight' they have in the total (i.e. sum) amount of keys. >>> sum(k.values()) >>> 274 So that there's a >>> 68.0/274.0 >>> 0.24817518248175183 24.81% percent change that A is selected. How would you write an algorithm that takes care of this? In other words, that makes sure that on 10.000 random picks, A will be selected 2.481 times?

    Read the article

  • Determining Cross Domain Active Directory Group Membership

    - by thecaptain0220
    I am currently working on a project where I need to query Active Directory to determine group membership of a user. I initially was locating the user and retrieving the memberOf attribute. The problem with this is that there is a domain and a child domain. The groups are universal groups so they can be used in both domains and they don't show up in the memberOf attribute. Unfortunately there doesn't seem to be much info around for Active Directory access with C++. Is there anyway to determine group membership in this case in C++?

    Read the article

< Previous Page | 152 153 154 155 156 157 158 159 160 161 162 163  | Next Page >