Search Results

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

Page 65/433 | < Previous Page | 61 62 63 64 65 66 67 68 69 70 71 72  | Next Page >

  • What will we use Theory Attribute for ?

    - by Sandbox
    I discovered [Theory] and [Datapoint] attributes in NUnit. I am not very sure about how should I use these. I think they can be used for data-driven testing and this has got me interested. There aren't many resources available on the same. Can someone explain to me how to use them or point me to resources? Thanks.

    Read the article

  • Is it possible to add an attribute to HtmlTextWriter WriteBreak

    - by skyfoot
    Hi, Is it possible to add a class to a br tag when using the HtmlTextWriter.WriteBreak method? writer.AddAttribute(HtmlTextWriterAttribute.Class, "className"); writer.WriteBreak(); I need an xHtml compliant html output and therefore the WriteBreak is perfect as it writes <br /> I want to add a class to the br so that I have <br class="className" />

    Read the article

  • Passing data attribute to TextBoxFor not working

    - by john G
    I have the following code inside my ASP.NET MVC 4 razor view: <div> <span class="f">Old Tag</span> @Html.TextBoxFor(model => model.olfTag, new { data_autocomplete_source = Url.Action("AutoComplete", "Home") }) @Html.ValidationMessageFor(model => model.olfTag) </div> But data_autocomplete_source with TextBoxFor will not work. Can anyone give me some advice?

    Read the article

  • adding the style attribute via code

    - by nourdine
    hello I was wondering how to assign a style via code in adroid. suppose I have a TextView created with the following snippet: TextView myText = new TextView(this); how do I assign the class xxx so that myText will be styled like an hard coded TextView like this: <TextView style="@style/xxx" /> thanks

    Read the article

  • Remove C# attribute of a property dynamically

    - by SysAdmin
    Hi, I have a class with a set of properties As given below. class ContactInfo { [ReadOnly(true)] [Category("Contact Info")] public string Mobile { get; set; } [Category("Contact Info")] public string Name{ get; set; } } The objects of this class is being assigned to a property grid, so that the users can update an existing contact. you can see that Mobile is marked as ReadOnly. But, when I want to add an entirely new Contact, I would want the users to be able to edit the contact Mobile also. For that I need to remove the Readonly property dynamically from the Type, before assigning the object to the property grid. Is it possible?

    Read the article

  • SpringBatch Jaxb2Marshaller: different name of class and xml attribute

    - by user588961
    I try to read an xml file as input for spring batch: Java Class: package de.example.schema.processes.standardprocess; @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "Process", namespace = "http://schema.example.de/processes/process", propOrder = { "input" }) public class Process implements Serializable { @XmlElement(namespace = "http://schema.example.de/processes/process") protected ProcessInput input; public ProcessInput getInput() { return input; } public void setInput(ProcessInput value) { this.input = value; } } SpringBatch dev-job.xml: <bean id="exampleReader" class="org.springframework.batch.item.xml.StaxEventItemReader" scope="step"> <property name="fragmentRootElementName" value="input" /> <property name="resource" value="file:#{jobParameters['dateiname']}" /> <property name="unmarshaller" ref="jaxb2Marshaller" /> </bean> <bean id="jaxb2Marshaller" class="org.springframework.oxm.jaxb.Jaxb2Marshaller"> <property name="classesToBeBound"> <list> <value>de.example.schema.processes.standardprocess.Process</value> <value>de.example.schema.processes.standardprocess.ProcessInput</value> ... </list> </property> </bean> Input file: <?xml version="1.0" encoding="UTF-8"?> <process:process xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:process="http://schema.example.de/processes/process"> <process:input> ... </process:input> </process:process> It fires the following exception: [javax.xml.bind.UnmarshalException: unexpected element (uri:"http://schema.example.de/processes/process", local:"input"). Expected elements are <<{http://schema.example.de/processes/process}processInput] at org.springframework.oxm.jaxb.JaxbUtils.convertJaxbException(JaxbUtils.java:92) at org.springframework.oxm.jaxb.AbstractJaxbMarshaller.convertJaxbException(AbstractJaxbMarshaller.java:143) at org.springframework.oxm.jaxb.Jaxb2Marshaller.unmarshal(Jaxb2Marshaller.java:428) If I change to in xml it work's fine. Unfortunately I can change neither the xml nor the java class. Is there a possibility to make Jaxb2Marshaller map the element 'input' to the class 'ProcessInput'?

    Read the article

  • How to hide keys in application?

    - by WilliamKF
    I have a C++ client/server application where the client and server are my executable. Each time a connection is made between the client and server, I generate a new encryption key for that session and I wish to transmit this session key and encrypt this session key using a static key that is built into both the client and server. However, running strings on my executable reveals the static key. How can I hide the embedded static key in my client and server application so that they are not easily extracted and thus allowing someone to decode my session key.

    Read the article

  • how to get the css keys and values for any html tag

    - by artsince
    I would like to dump all css key/value pairs for an html tag. In particular, I would like to learn the css properties for <audio> tag, so I can try to customize the look. document.getElementById('myaudio').style returns a CSSStyleDeclaration object but length returns 0 and I cannot figure out to iterate over the key/value pairs. Thank you

    Read the article

  • GridView - set selected index by searching through data keys

    - by Cristian Boariu
    Hi, I have a GridView which has DataKey[0] as productId. If i have for instance productId = 54, is there any way to search through all GridView item and set as selected the one who has DataKEy[0] = 54? In drop down list i have : ddlProducts.Items.FindByValue(lblProduct.Text.ToString())).Selected = true Is anything similar for GridView? Thanks in advance.

    Read the article

  • Secondary keys in a B-tree

    - by Phenom
    Let's say that there is a file that contains an unsorted list of student information, which includes a student ID number as well as other information. I want to make a program that retrieves student information based on student ID number. In order to make it efficient, I store the student IDs in a B-tree. So when I enter a student ID number, it searches the B-tree to see if its there or not. It also does one more thing. If it finds the student ID number, then it also returns where in the file that student's information is. This is the secondary key. The program uses this information to locate the rest of the student's information and prints it to screen. Can this be done? Is this how a b-tree works?

    Read the article

  • Where to store Android preference keys?

    - by pixel
    When I create preference activity I define all preferences in xml file. Every preference has a key defined in this xml. But when I access preference I write: SharedPreferences appPreferences = PreferenceManager.getDefaultSharedPreferences(this); boolean foo_value = appPreferences.getBoolean("foo_key_defined_in_xml", false); Is there any way to avoid acessing "foo_key_defined_in_xml" in hard-coded way? Maybe there is a possibility to access it in R style way?

    Read the article

  • Store request.headers in a serialized model attribute

    - by Horace Loeb
    Here's my model: class Comment < ActiveRecord::Base serialize :request_headers end But when I try to do @comment.request_headers = request.headers I get a TypeError (can't dump anonymous class Class) exception. Another way to ask my question: how can I convert request.headers into a Hash? It uses a Hash under the covers so this should be easy, no?

    Read the article

  • Why is Serializable Attribute required for an object to be serialized

    - by Keivan
    Based on my understanding SerializableAttribute provides no compile time checks, as its all done at runtime, then why is it required for classes to be marked as serializable? Couldn't sterilizer just try to serialize an object and just fail? isn't it what it does right-now when something is marked, it tries and fails. wouldn't it be better if you had to mark things as unserializable rather than serializable? that way you wouldn't have the problem of libraries not marking things as serializable?

    Read the article

  • Binding keys from specific device in X.org

    - by Michal Cihar
    I have a remote control for presentations, which generates Next/Prior key events in X.org (Page up/down). I'd like to use these for navigating in playlist (using MPD, but it probably does not matter). The problem is that I want to make this control work all the time (without application having focus) and I don't want to lose Page up/down functionality from normal keyboard. Is there some application which would allow me to bind actions to events from specific keyboard? Or is there simple way to implement such thing on my own?

    Read the article

  • Changing a php "echoed" div attribute with php

    - by Zakaria
    Hi everybody, I'm using PHP to echo a content stored on my database. The content is a DIV carrying any type of data. The problem is that I don't know the ID and I have some problems with these DIVs if I try to display them more that once. So, the idea is to modify the DIV id each time I'd like to display them. Something like this: <?php modify_div_id($data,"id-456"); ?> Is there a solution for this problem? Thank you very much, regards.

    Read the article

  • How to select ancestor based on ancestor's attribute

    - by kman
    I am new to this, so please bear with me... I need to very simply modify content based on a template match: topic/body/section/title This template match works fine. However, I need this to only happen if the topic element has a title element with the value of "Preface". Can someone please help with the code? Here is the code: <topic> <title>Preface</title> <body> <p>This publication was written for...</p> <section> <title>Publication Information/Version</title> I need to be able to modify section/title only when the text of topci/title = "Preface". make sense?

    Read the article

  • Better alternative to autonumber primary keys

    - by Comrad_Durandal
    I am looking for a better primary key than the autonumber data type, namely for the reason that it's limited to a long integer, when I really just need the field to reflect a number or text string that will never ever repeat, no matter HOW many records are added or deleted from the table. The problem is I am not sure how to implement something like turning the current date and time into a hexadecimal string and using that as a unique field I can use as a primary key. Am I just being too paranoid about running out of space?

    Read the article

  • R get rid of rows with duplicate attribute

    - by CatholicEvangelist
    hi there I have a big dataframe with columns such as: ID, time, OS, IP Each row of that dataframe corresponds to one entry. Within that dataframe for some IDs serveral entries (rows) exist. I would like to get rid of those multiple rows (obviously the other attributes will differ for the same ID). Or put different: I only want one single entry (row) for each ID. Could anyone be so kind and help me out on this one? When I use unique, on the ID column, I only recieve the levels (or each unique ID), but I want to keep the other attributes as well... I have tried to use apply(x,2,unique(data$ID)), but this does not work either... Any help is highly appreciated!

    Read the article

  • DataContractJsonSerializer generating Ghost string to JSON keys?

    - by Anil Namde
    DataContractJsonSerializer this is nice class added in the .net framework which can be used to serialize/desirealize object into JSON. Now following is the example i am trying [Serializable] class User { public string name; public string userId; } Now following is the output generated Output : Notice structure where only "name" is expected instead of k__BackingField Now this is the problem after digging so much i am not sure from where < and _BackingField is coming ? { "<name>k__BackingField":"test user", "<userId>k__BackingField":100001}

    Read the article

  • assign a model's attribute through association

    - by justcode
    I'm new to rails and working on a rails app and I'm stuck pondering this issue. I have three models class product < ActiveRecord::Base attr_accessible :name, :issn, :category validates_presence_of :name, :issn, :category validates_numericality_of :issn, :message => "has to be a number" has_many :user_products has_many :users, :through => :user_products end class UserProduct < ActiveRecord::Base attr_accessible :price, :category validates_presence_of :price, :category validates_numericality_of :price, :message = "has to be a number" belongs_to :user belongs_to :product end class user < ActiveRecord::Base # devise authentication here # Setup accessible (or protected) attributes for your model attr_accessible :email, :password, :password_confirmation, :remember_me has_many :user_products has_many :products, :through = :user_products end here is my new.html.erb <div class="MainBodyWrapper"> <div class="span8"> <div id="listBoxWrapper"> <fieldset> <%= form_for(@product, :html => { :class => "form-inline" }, :style => "margin-bottom: 60px" ) do |f| %> <div class="control-group"> <label class="control-label" for="name">name</label> <div class="controls"> <%= f.text_field :price, :class => 'input-xlarge input-name', :id => "name" %> </div> </div> <div class="listingButtons"> <button class="btn btn-info"></i>Add</button> <a class="btn">Upload Pictures (anytime)</a> </div> </fieldset> </div> </div> There are reasons why I want to setup the models this way. So the question is this: I want the user to enter the info for the product in the form but it also involves putting in the price of the product which exists in a different model/table (user_product) that is associated with product. How can I do this? You can see that my form_for uses @product. Any help will be appreciated.

    Read the article

< Previous Page | 61 62 63 64 65 66 67 68 69 70 71 72  | Next Page >