Search Results

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

Page 95/433 | < Previous Page | 91 92 93 94 95 96 97 98 99 100 101 102  | Next Page >

  • How I can add and remove the attribute "readonly" ?

    - by question_about_the_problem
    $(document).ready(function() { //Check City Value var city_value = parseInt($("#city").val()); if( city_value == 0) { $("#state").attr("readonly", true); //$("#rate").attr("readonly", "readonly"); } else { $("#state").removeAttr("readonly"); //document.getElementById("state").removeAttribute("readonly",0); //get_states(city_value); } /*** //Check State Value var state_value = parseInt($('#state').val()); if( state_value == 0) { $('#rate').attr('readonly', true); } else { $('#rate').attr('readonly', false); } ***/ });

    Read the article

  • How to make a link open in tabbed or new window without target attribute?

    - by Alan McCloud
    In my application an external website places link in my web page and the link does not have target=_blank. More specifically its iframe in my webpage whose src is another domain which I have no control. The content in this iframe contains links that opens in the same window wiping off my ajax driven web page and taking the user to the other domain. Is there a way to intercept this ( via javascript? ) and make the link open in another window or browser tab? It would be even much better if the link opens within the same iframe on my webpage. Is this possible? Is target="_self" makes the link open in the same iframe?

    Read the article

  • Foreign key refering to primary keys across multiple tables?

    - by sanjay bharkatiya
    hi , i have three tables say city,state and road 1) city - city_id(PK),name 2) state- Stt_id(PK),name 3) Road- Edge_id(PK), Admin_id(FK) where Admin_id refers to city_id and Stt_id both. This is done because the tables are too huge. say city_id contains 1,2,3 and Stt_id contains 4,5,6 now if i am inserting 1,2,3,4,5,6 in admin_id it is throuing an error .. what is the solution of my problem, regards sanjay

    Read the article

  • Send music control keys from my app in android.

    - by Hamid
    Is there a simple way to tell the default media player to change track back or forward? I want the ability to send commands to the system media player (Music) to change track back and forward from within my app. Is there a simple way? Code examples or descriptive explanation please, I have not developed for Android before.

    Read the article

  • How do I modify an attribute across all rows in a table?

    - by prgmatic
    Hi folks, My apologies for asking such a novice question but, I need help building a script using either PHP or directly in MySQL that can do the following: Take the values of a column in a table (text) Change them into capitalized words (from "this is a title" to "This Is A Title") Replace the old values (uncapitalized) with the new values (capitalized). Thanks for the help and support.

    Read the article

  • How do I use an array as an object attribute in Perl?

    - by superstar
    Hello guys, I need some help regarding the arrays in Perl This is the constructor i have. sub new { my $class = shift; my @includeobjects = (); my @excludeobjects = (); my $Packet = { _PacketName => shift, _Platform => shift, _Version => shift, @_IncludePath => @includeobjects, }; bless $Packet, $class; return $Packet; } sub SetPacketName { my ( $Packet, $PacketName ) = @_; $Packet->{_PacketName} = $PacketName if defined($PacketName); return $Packet->{_PacketName}; } sub SetIncludePath { my ( $Packet, @IncludePath ) = @_; $Packet->{@_IncludePath} = @IncludePath; return $Packet->{@_IncludePath}; } sub GetPacketName { my( $Packet ) = @_; return $Packet->{_PacketName}; } sub GetIncludePath { my( $Packet ) = @_; return $Packet->{@_IncludePath}; } The get and set methods work fine for PacketName. But since IncludePath is an array, I could not get it work. The declaration is what I am not able to get right.

    Read the article

  • Any "trick" to use some keys to launch an application?

    - by Profete162
    Hello, I am currently developing an free application (TaskOS ) that allow users to have multitasking and switch easily between applications on their mobile ( like alt+tab in Windows ) That work pretty well and user can launch my application by a long press on the "search" button" by adding this line in the manifest: <action android:name="android.intent.action.SEARCH_LONG_PRESS" /> I also succeed to allow to the users to Use the camera button ( they can of course disable that in application settings) and the way to do that is slighlty different: <receiver android:name=".CameraPressed"> <intent-filter android:priority="10000"> <action android:name="android.intent.action.CAMERA_BUTTON"/> </intent-filter> I am now wondering if there are other ways to launch easily my task switcher? ( long press on Home key, long press on trackball, or any other idea.) Reading the Google documentation does not help me a lot. Any other idea/suggestion would be warmly welcome. Christophe

    Read the article

  • Convert Ruby array of tuples into a hash given an array of keys?

    - by Kit Ho
    I have an simple array array = ["apple", "orange", "lemon"] array2 = [["apple", "good taste", "red"], ["orange", "bad taste", "orange"], ["lemon" , "no taste", "yellow"]] how can i convert in to this hash whenever element in array match the first element of each element in array2? hash = {"apple" => ["apple" ,"good taste", "red"], "orange" => ["orange", "bad taste", "orange"], "lemon" => ["lemon" , "no taste", "yellow"] } I am quite new to ruby, and spend a lot to do this manipulation, but no luck, any help ?

    Read the article

  • How do I use the html 'title' attribute with Html.Encode()?

    - by Kai
    Hello, I've been tryin to find an example of the syntax for getting an html 'title' for a string when using Html.Encode(). I want to display the full name in the mouseover title, if it's too long. Is there a way to do this without wrapping the string in a < span , i.e. <span title = "<%=Html.Encode(model.Name) %>"> //displays the full name on mouseover <%=Html.Encode(model.Name.Substring(0, 10))%>... //displays the name up to a max length </span> Or should I just do it this way? Thanks!

    Read the article

  • Adding Data into tables iclueds Foreign Keys but Which New Row created Entity FrameWork ?

    - by programmerist
    Addding Data into kartlar Table (RehberID,KampanyaID,BrimID) is ok. But Which Kart'ID created? i need to learn Which Id created after Adding Data (RehberID,KampanyaID,BrimID) into Kartlar? public static List<Kartlar> SaveKartlar(int RehberID, int KampanyaID, int BrimID, string Notlar) { using (GenSatisModuleEntities genSatisCtx = new GenSatisModuleEntities()) { Kartlar kartlar = new Kartlar(); kartlar.RehberReference.EntityKey = new System.Data.EntityKey("GenSatisModuleEntities.Rehber", "ID", RehberID); kartlar.KampanyaReference.EntityKey = new System.Data.EntityKey("GenSatisModuleEntities.Kampanya", "ID", KampanyaID); kartlar.BirimReference.EntityKey = new System.Data.EntityKey("GenSatisModuleEntities.Birim", "ID", BrimID); kartlar.Notlar = Notlar; genSatisCtx.AddToKartlar(kartlar); genSatisCtx.SaveChanges(); List<Kartlar> kartAddedPatient; kartAddedPatient = (from k in genSatisCtx.Kartlar where k.RehberReference.EntityKey == RehberID && k.KampanyaReference.EntityKey == KampanyaID && k.BirimReference.EntityKey == BrimID select k) return kartAddedPatient ; } } How can i do that? i want to get data from Kartlar which data i added?

    Read the article

  • Scaffolding A model with an attribute of type datetime creates a 10 years range in the form

    - by b_ayan
    For a simple rails application ( 1.86 /2.3.5) , lets say I run a simple scaffold script/generate scaffold blog title:string content:text published:date When I open up the new / edit view for the blog controller in index/new.html.erb , I see that the drop down enabler for date select has a date range of 2005 - 2015 , i.e 5 years +/- I tried to change this default behavior by introducing this code f.date_select :entered, :start_year => 1970, :end_year => 2020 Apparently this has no impact to the behavior mentioned above. How do I increase the date_select range which seems to be default?

    Read the article

  • How can I override the attribute assignment in an active record object?

    - by ryeguy
    I know you can do this with virtual attributes, but what if the column actually exists? For example, my model has a raw_topic column. When raw_topic is set, I want artist and song_title to be set based off of raw_topic's contents. Ideally, I'd like to override the raw_topic= method, but rails doesn't seem to like that. What's the proper way of doing this? Is a callback the only way?

    Read the article

  • How to render an HTML attribute from a Razor view.

    - by ProfK
    I would like to use the same partial view for create, edit, and details views, to avoid duplicating the fieldset structure for an entity. Then, depending on which view renders the partial view, I would like to add a class of "read-only" to a div surrounding my fieldset and handle making the actual input fields read-only on the client, using css or jQuery, or whatever. How can I specify from my Razor view that I need this class added to the "item-details" div? <div class="item-details"> <fieldset> <legend>Product Details</legend> @Html.HiddenFor(model => model.DetailItem.ProductId) <div class="editor-label"> @Html.LabelFor(model => model.DetailItem.Name) </div> <div class="editor-field"> @Html.EditorFor(model => model.DetailItem.Name) @Html.ValidationMessageFor(model => model.DetailItem.Name) </div> <p> <input type="submit" value="Save" /> </p> </fieldset> </div>

    Read the article

  • What are appropriate assembly attribute values for an open source (LGPL) project?

    - by michielvoo
    I have just started working on an open source project. The project is hosted on CodePlex and I work on it in my spare time. What would be appropriate values for the default assembly attributes (listed below)? [assembly: AssemblyCompany("")] [assembly: AssemblyCopyright("")] [assembly: AssemblyTrademark("")] It surprised me to see the AssemblyCompany and AssemblyCopyright attributes on several projects (on CodePlex as well as Google Code): xUnit.net [assembly: AssemblyCopyright("Copyright (C) Microsoft Corporation")] [assembly: AssemblyCompany("Microsoft Corporation")] DotNetNuke: <Assembly: AssemblyCompany("DotNetNuke Corporation")> <Assembly: AssemblyCopyright("DotNetNuke is copyright 2002-2010 by DotNetNuke Corporation. All Rights Reserved.")> Moq: [assembly: AssemblyCompany("Clarius Consulting, Manas Technology Solutions, InSTEDD")]

    Read the article

  • Insert into a generic dictionary with possibility of duplicate keys?

    - by Chris Clark
    Is there any reason to favor one of these approaches over the other when inserting into a generic dictionary with the possibility of a key conflict? I'm building an in-memory version of a static collection so in the case of a conflict it doesn't matter whether the old or new value is used. If Not mySettings.ContainsKey(key) Then mySettings.Add(key, Value) End If Versus mySettings(key) = Value And then of course there is this, which is obviously not the right approach: Try mySettings.Add(key, Value) Catch End Try Clearly the big difference here is that the first and second approaches actually do different things, but in my case it doesn't matter. It seems that the second approach is cleaner, but I'm curious if any of you .net gurus have any deeper insight. Thanks!

    Read the article

  • XSL: Parsing XML to HTML - How do I use value-of an element data as an html attribute?

    - by AtomR
    <input src="LOGO.JPG" type="image" name="imagem"> I have an xml element that contains the image path that needs to be displayed in HTML after the parse. <xsl:value-of select="image"/> returns the string that is stored in the image element but how can I use it to make that string be the src atribute value in an html tag? I tried <input src="<xsl:value-of select="image"/>" type="image" name="imagem"> but obviously that doesn't work so how can it be done? I hope I was clear in my question. Please help!

    Read the article

  • How do I relate two models/tables in Django based on non primary non unique keys?

    - by wizard
    I've got two tables that I need to relate on a single field po_num. The data is imported from another source so while I have a little bit of control over what the tables look like but I can't change them too much. What I want to do is relate these two models so I can look up one from the other based on the po_num fields. What I really need to do is join the two tables so I can do a where on a count of the related table. I would like to do filter for all Order objects that have 0 related EDI856 objects. I tried adding a foreign key to the Order model and specified the db_column and to_fields as po_num but django didn't like that the fact that Edi856.po_num wasn't unique. Here are the important fields of my current models that let me display but not filter for the data that I want. class Edi856(models.Model): po_num = models.CharField(max_length=90, db_index=True ) class Order(models.Model): po_num = models.CharField(max_length=90, db_index=True) def in_edi(self): '''Has the edi been processed?''' return Edi856.objects.filter(po_num = self.po_num).count() Thanks for taking the time to read about my problem. I'm not sure what to do from here.

    Read the article

  • In DBD::CSV what does a /r in the f_ext attribute mean?

    - by sid_com
    Why does only the second example append the extension to the filename and what is the "/r" in ".csv/r" for. #!/usr/bin/env perl use warnings; use strict; use 5.012; use DBI; my $dbh = DBI->connect( "DBI:CSV:f_dir=/home/mm", { RaiseError => 1, f_ext => ".csv/r"} ); my $table = 'new_1'; $dbh->do( "DROP TABLE IF EXISTS $table" ); $dbh->do( "CREATE TABLE $table ( id INT, name CHAR, city CHAR )" ); my $sth_new = $dbh->prepare( "INSERT INTO $table( id, name, city ) VALUES ( ?, ?, ?, )" ); $sth_new->execute( 1, 'Smith', 'Greenville' ); $dbh->disconnect(); # -------------------------------------------------------- $dbh = DBI->connect( "DBI:CSV:f_dir=/home/mm", { RaiseError => 1 } ); $dbh->{f_ext} = ".csv/r"; $table = 'new_2'; $dbh->do( "DROP TABLE IF EXISTS $table" ); $dbh->do( "CREATE TABLE $table ( id INT, name CHAR, city CHAR )" ); $sth_new = $dbh->prepare( "INSERT INTO $table( id, name, city ) VALUES ( ?, ?, ?, )" ); $sth_new->execute( 1, 'Smith', 'Greenville' ); $dbh->disconnect();

    Read the article

< Previous Page | 91 92 93 94 95 96 97 98 99 100 101 102  | Next Page >