Search Results

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

Page 49/433 | < Previous Page | 45 46 47 48 49 50 51 52 53 54 55 56  | Next Page >

  • Scala: XML Attribute parsing

    - by Chris
    I'm trying to parse a rss feed that looks like this for the attribute "date": <rss version="2.0"> <channel> <item> <y:c date="AA"></y:c> </item> </channel> </rss> I tried several different versions of this: (rssFeed contains the RSS data) println(((rssFeed \\ "channel" \\ "item" \ "y:c" \"date").toString)) But nothing seems to work. What am I missing? Any help would really be appreciated!

    Read the article

  • Navigating by foreign keys in ADO.NET Entity Framework/MySQL

    - by Werg38
    I am using ASP.NET MVC2 on top of a MySQL database in VS2008. I am using the MySQL ADO.NET connector 6.2.3 to provide the connection for the ADO.NET Entity Data Model. This is mostly working ok, however navigating via foreign keys is causing me a real headache! Here is a simplified example.. Car (Table) CarID PK Colour Doors ManufacturerID FK Manufacturer (Table) ManufacturerID PK Name In the edmx file I can see the 1-many relationship shown as a navigation property in the both the Car and Manufacturer tables. I create a Models.CarRepository that allows me to returns a IQueryable. At the View I want to be able to display the Manufacturer.Name for each car. This is not accessible via the object I get returned. What is best way to implement this? Have I encountered a limitation of the Entity Framework/MySQL combination?

    Read the article

  • Take <span> class and put in <a> attribute jquery

    - by Toktik
    Hello, I have html like this. <span class="gallery-open-item year-icon-Yes 2010"> <a href="/year/none"> </a> </span> I need to check by jquery if span.gallery-open-item have year-icon-Yes class take next(for this example is 2010) class and place it in a href attribute like this All this I need in jQuery or JavaScript. I have done some experiments but I can't take 2010 to normal javascript variable. Any ideas? Sorry for my english.

    Read the article

  • m and s keys do not work over vnc connection to ubuntu server

    - by Don
    I'm new at setting a lot of this up, so bear with me. I installed Ubuntu 10.4 server on a 64 bit machine. Then I added vnc so I could manage it while it's racked. I start the server, SSH to it, and run vncserver :1 At this point, all keys work fine. Next I exit out of the SSH session and fire up my client vnc app. I connect via the IP :1, enter my password, and everything seems to be fine. Now when I enter a terminal (through the vnc connection) I cannot type lowercase "s" or "m" (upper case works). I've tried on two different pc's running the vnc client, but it's the same. I also installed the latest updates from Ubuntu as of today. Thanks for any help.

    Read the article

  • how to create a auto-incremented attribute in xcode managed object model

    - by Mausimo
    Hey, what i want to do is to make a int that will be the ID of the entity and auto increment itself whenever a new entity is added (just like a SQL identity property). Is this possible? i tried using indexed (checked on attribute) however there is no description to what indexed even does. EDIT: I am adding annotations to a map, when you click the pin the annotationview with a chevron shows up. Now when you click this button i would like to load an associated picture. However the only way i know how to link the picture to this button is to give the picture a unique id, and then set the button.tag to this id and then load based on the button.tag.

    Read the article

  • Clustered index on frequently changing reference table of one or more foreign keys

    - by Ian
    My specific concern is related to the performance of a clustered index on a reference table that has many rapid inserts and deletes. Table 1 "Collection" collection_pk int (among other fields) Table 2 "Item" item_pk int (among other fields) Reference Table "Collection_Items" collection_pk int, item_pk int (combined primary key) Because the primary key is composed of both pks, a clustered index is created and the data physically ordered in the table according to the combined keys. I have many users creating and deleting collections and adding and removing items to those collections very frequently affecting the "Collection_Items" table, and its clustered index. QUESTION PART: Since the "Collection_Items" table is so dynamic, wouldn't there be a big performance hit on constantly resorting the table rows because of the clustered index ? If yes, what should I do to minimize this ?

    Read the article

  • overiding to_param of a nested attribute

    - by cbrulak
    I'm trying to create a perma link for a nested attribute. For example, look at the links for the answers in SO. I would like to do something similar in rails: I have Project model with multiple tasks and I would like to create a perma link to a task. The task can only viewed with the project, just like Q & A on SO. Ideally, i would do something like: task_helper.rb: def GetTaskURL project = Project.find(:project_id) return project_url(project,:html) + "#" + id end However, i get a method not found. So it seems the only way is to hard-code it: domain.com url + Projects/show/id.html#task.id Must be a better way?

    Read the article

  • VisualStudio: Toggle Archive Attribute When Saving File?

    - by John Dibling
    We use Tortoise CVS in out shop, but in my last job we used Visual SourceSafe. VSS is generally a pile, but it did have one nice feature. You could right-click on a branch and ask it for a list of all the files you had checked-out. As far as I can tell there is no similar feature in CVS. So what I'm looking for is some kind of VS plusgin that will automatically reset (turn off) the archive attribute when saving a file. Then I can recursively dir to find the files I have checked-out. Does anyone know of a VS plugin or something I can do to get this behavior? Or is there something else I can do in CVS to get my ultimately desired result?

    Read the article

  • Jquery set attribute for a label

    - by VictorS
    Is it possible to set "for"(AssociatedControlID) attribute using jQuery? I am trying something like this to set it to the very next control that appears after label: $('label.asssociateClass').each(function() { var toAssociate = $(this).next(':input'); $(this).attr("for", toAssociate.attr("id")); }); The problem is that if I don't set it on a server through AssociatedControlID it never gets here since it's rendered as span instead of label in that case. Is there a way to overcome this or I have to do it on a server?

    Read the article

  • NoneType has no attribute Append

    - by Rosarch
    I'm new to Python. I can't understand why a variable is None at a certain point in my code: class UsersInRoom(webapp.RequestHandler): def get(self): room_id = self.request.get("room_id") username = self.request.get("username") UserInRoom_entities = UserInRoom.gql("WHERE room = :1", room_id).get() if UserInRoom_entities: for user_in_room in UserInRoom_entities: if user_in_room.username == username: user_in_room.put() # last_poll auto updates to now whenenever user_in_room is saved else: user_in_room = UserInRoom() user_in_room.username = username user_in_room.put() UserInRoom_entities = [] UserInRoom_entities.append(user_in_room) // error here # name is `user_at_room` intead of `user_in_room` to avoid confusion usernames = [user_at_room.username for user_at_room in UserInRoom_entities] self.response.out.write(json.dumps(usernames)) The error is: Traceback (most recent call last): File "C:\Program Files\Google\google_appengine\google\appengine\ext\webapp\__init__.py", line 507, in __call__ handler.get(*groups) File "path\to\chat.py", line 160, in get AttributeError: 'NoneType' object has no attribute 'append' How is this possible? I'm setting UserInRoom_entities = [] immediately before that call. Or is something else the None in question?

    Read the article

  • Defining xml in an xsd where an attribute determines the possible contents

    - by SeanJA
    How would one go about defining something like this in an xsd? <start> <request type="typeA"> <elementOnlyFoundInA /> </request> <request type="typeB"> <elementOnlyFoundInB /> </request> </start> I ran xsd.exe just to get an idea of what it might look like, but it does not appear recognize the relationships between the value of type and the contents of the request. Is it even possible to define contents based on an attribute like this in an xsd file?

    Read the article

  • Alt attribute encoding with JavaScript

    - by MainMa
    Hi, Html entities must be encoded in alt attribute of an image in HTML page. So <img id="formula" alt="A &rarr; B" src="formula.png" /> will work well. On the other hand, the same JavaScript code will not work document.getElementById('formula').alt = 'A &rarr; B'; and will produce A &rarr; B instead of A → B. How to do it through JavaScript, when it is not possible to put the special (unencoded) characters in the source code?

    Read the article

  • How to update a record with multiple keys

    - by OceanBlue
    I am trying a database app on Android. I want to use the SQLiteDatabase update(...) convenience method to update a record. Normally, for a WHERE clause of a single key this is working. Following code is working fine:- values.put("testname", "Quiz1"); mDB.update("Tests", values, "id=?", new String[]{"2"}); //this statement works However, I want to update a column in a table which has a combination of two keys as the unique identifier. I tried the following. This executes without exception, but nothing is updated. values.put("score", 60); mDB.update("Results", values, "studentid=? AND testid=?", new String[] { "2,1" }); // this statement does not work How to do it?

    Read the article

  • Set the mouseover Attribute of a div using JQuery

    - by Abs
    Hello all, I would like to set an attribute for a div. I have done this: $('#row-img_1').onmouseover = function (){ alert('foo'); }; $('#row-img_2').onmouseout = function (){ alert('foo2'); }; However, the above has not worked, it does not alert when mouse is over or when it moves out. I have also tried the $('#row-img_1').attr(); and I could not get this to work either. I am aware that I should be using a more effective event handling system but my divs are dynamically generated. Plus this is a small project. ;) Thanks all for any help.

    Read the article

  • querySelectorAll is not finding dynamically added elements with custom attribute

    - by Exception
    I am creating two way binding between JS Object and UI in below fiddle, code is big to post Please check http://jsfiddle.net/bpH6Z/20/ I am using the code like below var elements = document.querySelectorAll("[" + data_attr + "] *[bd='" + prop_name + "']"); I have mentioned the problem line in big comments, can be identified easily. My problem is I am adding elements to binded dynamicaly using JS, when I change the value in UI, the same value is not reflected in other places. The problem is querySelectorAll is faling to find elements with same attribute. It is finding only first occurrence. Please look into the issue.

    Read the article

  • WPF toolkit DataGrid show filds even with browsable attribute set to false

    - by Jonathan
    Hi Hi have an observable collection that I bind to a DataGrid using the itemsource property of the DataGrid. All the properties of the class inside the collection are displayed properly in the DataGrid. Now, I want to hide some fields to the DataGrid using the browsable attribute [Browsable(false)] in the class. It works well in winforms, but it seems not working in WPF. Someone knows why? I can hide the columns later, but I don't want to loss performance in this way. Is there any other solution? Thanks.

    Read the article

  • NUnit [Test] is not a valid attribute

    - by tyndall
    I've included the necessary assemblies into a Windows Class project in VS2008. When I start to try to write a test I get a red squiggle line and the message [Test] is not a valid attribute. I've used NUnit before... maybe an earlier version. What am I doing wrong? I'm on version 2.5.2. using System; using System.Collections.Generic; using System.Linq; using System.Text; using NUnit; using NUnit.Core; using NUnit.Framework; namespace AccessPoint.Web.Test { public class LoginTests { [Test] public void CanLogin() { } } }

    Read the article

  • Push html attribute to array onClick

    - by Hunkeone
    I'm trying to push number attribute of the element to the array onclick with a simple function, but array contains only empty values separated with commas. Here's html code. <button type="button" class="btn btn-success btn-lg" number="12" onclick="basket.push(this.number)">toBakset</button> <button type="button" class="btn btn-success btn-lg" number="15" onclick="basket.push(this.number)">toBakset</button> <button type="button" class="btn btn-success btn-lg" number="18" onclick="basket.push(this.number)">toBakset</button> from the start "basket" array is empty. Seems this question is so dumb but I can't find a solution :(

    Read the article

  • Access attribute values of empty element tag in xml

    - by meenakshik
    Hello, I have a xml where I got some empty complex elements and I need to access the attribute values of this element. <test> <a> <abc-metadata name="testData" value="This is a test"/> </a> </test> I want to get hold of the 'testData' and 'This is a test' values. I do read the document and I tried accessing it document.getElementsByTagName . I am sure there is some way to access attributes of element tags but somehow it throws me nullpointer exception. Thanks in advance

    Read the article

  • Keyup attribute 'name' change not working

    - by dclowd9901
    Hey guys, I've got what I imagine is a simple question, but for some reason, I can't get it working right. Expected Behavior: I type characters into a field, and, through a function, those characters are translated into the value of the name HTML attribute. Actual Behavior: Reflected in Firebug, the value doesn't change or update. The Code: $('input').live('keyup', function() { var name_value = $(this).val().toLowerCase(); $(this).attr('name', name_value); }); Just a side note: I'm using .live() because the element can be cloned, and those clones need to also be able to take on the properties of this .keyup event. Any ideas?

    Read the article

  • overriding callbacks avoiding attribute pollution

    - by pygabriel
    I've a class that has some callbacks and its own interface, something like: class Service: def __init__(self): connect("service_resolved", self.service_resolved) def service_resolved(self, a,b c): ''' This function is called when it's triggered service resolved signal and has a lot of parameters''' the connect function is for example the gtkwidget.connect, but I want that this connection is something more general, so I've decided to use a "twisted like" approach: class MyService(Service): def my_on_service_resolved(self, little_param): ''' it's a decorated version of srvice_resolved ''' def service_resolved(self,a,b,c): super(MyService,self).service_resolved(a,b,c) little_param = "something that's obtained from a,b,c" self.my_on_service_resolved(little_param) So I can use MyService by overriding my_on_service_resolved. The problem is the "attributes" pollution. In the real implementation, Service has some attributes that can accidentally be overriden in MyService and those who subclass MyService. How can I avoid attribute pollution? What I've thought is a "wrapper" like approach but I don't know if it's a good solution: class WrapperService(): def __init__(self): self._service = service_resolved # how to override self._service.service_resolved callback? def my_on_service_resolved(self,param): ''' '''

    Read the article

  • Rails - How to secure foreign keys and still allow association selection

    - by Bryce
    For simplicity, assume that I have a simple has-many-through relationship class User < ActiveRecord::Base has_many :courses, :through => :registrations end class Registration < ActiveRecord::Base belongs_to :user belongs_to :course end class Course < ActiveRecord::Base has_many :users, :through => :registrations end I want to keep my app secure, so I use attr_accessible to whitelist my attributes. My question is twofold: How would I set up my whitelist attributes such that I could create a new Registration object through a form (passing in :user and :course, but not risk allowing those foreign keys to be maliciously updated later? How would I set up my validations such that both belongs_to associations are required BUT also allow for Registration objects to be created in nested forms?

    Read the article

  • Setting an attribute in Jquery not working

    - by Probocop
    Hi, I have the following function which limits the amount of characters you can enter into a text area. What's meant to happen is, if the text length is higher than the text limit, set an attribute of disabled="disabled" on the submit button, but it isn't getting set, my function code is as follows: function limitChars(textid, limit, infodiv) { var text = $('#'+textid).val(); var textlength = text.length; if(textlength > limit) { $('#' + infodiv).html('You cannot write more then '+limit+' characters!'); $('input#submit').attr('disabled', 'disabled'); } else { $('#' + infodiv).html('You have '+ (limit - textlength) +' characters left.'); } } Any ideas?

    Read the article

  • jQuery get attribute

    - by Happy
    There are many class="item" blocks on the page. For each one there is different var item_link and ajax request. Ajax searches for src attribute of .message img and throws it to var src. $(".item").each(function(){ var item_link = "http://..."; $(this).prepend('<div class="src"></div>'); $.get(item_link, function(data) { var src = $('.message img', data).attr('src'); }); }); How to print var src to <div class="src"></div>? Thanks.

    Read the article

  • Javascript handle 2 data attribute

    - by user3530661
    I need to use data attribute in my html like <div id="userlist" data-user="A.A.M"></div> then I need to alert the data-user I used var userlist = document.getElementById("userlist"); var show = userlist.getAttribute("data-user"); alert(show); My question is how to handle many data-user in the html like <div id="userlist" data-user="A.A.M"></div> <div id="userlist2" data-user="A.A.M2"></div> to alert A.A.M and A.A.M2 Thanks in advance and sorry for my bad English.

    Read the article

< Previous Page | 45 46 47 48 49 50 51 52 53 54 55 56  | Next Page >