Search Results

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

Page 232/433 | < Previous Page | 228 229 230 231 232 233 234 235 236 237 238 239  | Next Page >

  • How to get number of entries in a Lua table?

    - by romkyns
    Sounds like a "let me google it for you" question, but somehow I can't find an answer. The Lua # operator only counts entries with integer keys, and so does table.getn: tbl = {} tbl["test"] = 47 tbl[1] = 48 print(#tbl, table.getn(tbl)) -- prints "1 1" count = 0 for _ in pairs(tbl) do count = count + 1 end print count -- prints "2" How do I get the number of all entries?

    Read the article

  • How do I use ST_Contains in following case?

    - by Z77
    I have two tables. First with points, and second with polygons. I need to find out which points are in required polygon according to the attribute gid. Using query: SELECT table1.* FROM table1, table2 WHERE table2.gid=1 AND ST_Contains(table2.geom2, table1.geom1); What I get is empty table (only columns without data)... Tnx

    Read the article

  • How to get attributes of container in jquery ?

    - by Rachel
    How can I get attributes values from an container using jquery ? For example: I have container div as: div id = "zone-3a-2f-2f-2fPortal-2fPages-2fHome-2fZones-2fLeft-2f-7ccomponent-3a-2f-2f-2fSpm-2fComponents-2fPromotion-2f" class = "promotion" here how can I get attribute id value using jquery and than how can I trim the value to get component information ? Thanks.

    Read the article

  • Change the key being pressed with C#

    - by Benny
    Hey, I'm trying to write a program in C# that will track the pressing of certain keys (using a keyboard hook), and send different ones instead. For instance, when I press the A key it will instead send the Q key. I used http://www.codeproject.com/KB/cs/CSLLKeyboardHook.aspx this for my hooks and tried to use the SendKeys function, but I get an exception about the garbage collector destroying some object inside the hook class.

    Read the article

  • delete hibernate entity question?

    - by ylazez
    i want to delete a row and cascade all foreign keys in hibernate i am new to hibernate and i want to know if there's a method to delete an entity session.delete(); like the session.save and session.update methods in hibernate?

    Read the article

  • Can I use anything other than BIGINT as Primary Key data type in SQLite?

    - by weenet
    I was psyched about the possibility of using SQLite as a database solution during development so that I could focus on writing the code first and dynamically generating the db at runtime using NHibernate's ShemaExport functionality. However, I'm running into a few issues, not the least of which is that it seems that SQLite requires me to use Int64 for my primary keys (vs, say, Int32 or Guid). Is there any way around this?

    Read the article

  • RegisterClientScriptInclude

    - by mrf
    i use ScriptManager.RegisterClientScriptInclude to include js file after partial postback it works fine here : ** ScriptManager.RegisterClientScriptInclude(this, typeof(test4), "1", Page.ResolveClientUrl("~/slideshow/js/slideshow.js")); ** but i want to load more than one js files so i did this ** ScriptManager.RegisterClientScriptInclude(this,typeof(test4),"one", Page.ResolveClientUrl("~/slideshow/js/slideshow.js")); ScriptManager.RegisterClientScriptInclude(this, typeof(test4), "two", Page.ResolveClientUrl("~/slideshow/js/slideImg.js")); ** with two different string keys the first one works but the second not....please any help

    Read the article

  • CGRect var as property value?

    - by David.Chu.ca
    CGRect type is a structure type. If I want to define a property as this type, should I use assign or retain attribute for this type? @interface MyClass { CGRect rect; ... } @property (nonatomic, assign) rect; // or retain?

    Read the article

  • How to document class attributes with NaturalDocs

    - by HWende
    Via """ Function: myfunc Parameters: a : First parameter b : First parameter """ I can document a function and it gets listed in the class summary. How can I do something similar with attributes? Since I don't declare them in python I was hoping something like """ ---------------------------------------------------------------------------- Attributes: first - First attribute of the class second - Second one """ That is not working at all...

    Read the article

  • Wait set time for user input C# console app

    - by Marlon
    For a Console app, I need to know how to wait at set amount of time (about 10 seconds), for a user to input a key or set of keys, before proceeding with an 'auto run' portion of the application. This is bugging me because I can't quite figure out how the timer works, or threading.sleep, what should I use? Been googling all day.

    Read the article

  • Extending struts 2 "property" data tag

    - by John B.
    Hi, We are currently developing a project with Struts2. We have a module on which we display a large amount of data on read-only fields from a group of beans via the "property" Struts 2 data tag (i.e. <s:property value="aBeanProperty" /) on a jsp file. In some cases most of the fields might come empty, so a blank is being displayed on screen. Our customer is now requesting us to display default string (i.e. "N/A") whenever a property comes empty, so that it is displayed in place of the blank spaces currently shown. We are looking for a way to achieve this in a clean and maintainable way. The 'property' tag comes with a 'default' attribute on which one can define a default value in cases when the accessed property comes as null. However, most of our properties are empty strings, therefore it does not work in our case. Another solution we are thinking of is to define a base class for all of our beans, and define a util method which will validate if a string is null or empty and then return the default value. Then we would call this method from each bean getter. And yes this would be tiresome and kind of ugly :), therefore we are holding out on this one in case of a better solution. Now, we have in mind a solution which we think would be the best but have not had luck on how implement it. We are planning on extending the 'property' tag some way, defining a new 'default' attribute so that besides working on null properties, it also do so on empty strings ("", " ", etc). Therefore we would only need to replace the original s:property tag with our new custom tag, and the desired result would be achieved without touching java code. Do you have an idea on how to do this? Also, any other clever solution (maybe some sort of design pattern?) on how to default the values of a large amount of property beans are welcome too! (Or maybe, even there might be some tag that does this already in Struts2??) Thanks in advance.

    Read the article

  • Retrieve all records in a table with nHibernate

    - by brainimus
    I need to retrieve all the records in a table with nHibernate. If I had the key for all the records in the table I could loop and use nHibernate's Get method (this seems inefficient though) but I don't have the keys. I could also use FindAll but this requires criteria or a stored procedure. How can I get all the records from the table?

    Read the article

  • DisplayFor ignores metadata

    - by Juvaly
    For my Contact class, the property EmailAddress is marked with the [DataType(DataType.EmailAddress)] attribute. In my view, using Html.Display("EmailAddress") and Html.DisplayFor(c => c.EmailAddress) yields different results. The former outputs a mailto: link, which is the expected behavior, while the latter simply outputs the email address as plain text. My question is why the different behavior, I expected these two methods to have the same output.

    Read the article

  • How to see .class content in Eclipse?

    - by mac
    Sometimes, in Eclipse , i press a combination of keys which take me to the editor page that shows contents of my .class file. I never seem to be able to remember what that key combination is. Can someone please let me know?

    Read the article

  • jquery adding required to a dropdownbox [SOLVED]

    - by Crays
    Hi i would like to know how do i add a required attribute to a dropdownbox? I've search numerous ways but none worked, here's my code <script> $(document).ready(function(){ $('.orderingmenu .burgers').change(function(){ var selectVal= $(this).val(); if(selectVal != 'none'){ $(this).next().attr('required', true); } }); }); </script> i am really out of idea on how to do this, i tested the selectors and they're working fine, but it just doesn't seem to add in the required attribute to that select field =/ any help please? what i have tried is $(this).next().prop('required', true); $(this).next().attr('required', 'true'); $(this).next().attr('required', ''); $(this).next().prop('required'); none have worked =/ EDIT the HTML <div class="orderingmenu" style="margin-bottom: 0.5%;"> <select name="burgerlist" class="burgers" style="width: 35%; float: left; font-size: 12px;"> <option selected="selected" value="none">NONE</option> <option value="A">A</option> </select> <select name="option" id="option" class="setornot" style="width: 30%; font-size: 12px;"> <option selected="selected" value="none">NONE</option> <option value="ALA CARTE">ALA CARTE</option> <option value="SET">SET</option> </select> <input type="text" placeholder="ANY REMARKS?" name="remarks" style="width: 30%; float: right; font-size: 12px;"> </div> i had it looped with a php script, but basically what i wanted to do is so that if there is any selection other than 'none', the other selection is required. EDIT 2 found out the problem was that i had the value for none!

    Read the article

  • How to attach a line to a moving object?

    - by snow-spur
    Hello i have designed a maze and i want to draw a path between the cells as the 'person' moves from one cell to the next. So each time i move the cell a line is drawn I have done this so far but do not want to show my full code However i get an error saying Circle has no attribute center my circle which is my cell center = Point(15, 15) c = Circle(center, 12) c.setFill('blue') c.setOutline('yellow') c.draw(win) p1 = Point(c.center().getx(), c.center().gety()) this bit is in my loop p2 = Point(getx(), gety()) line = graphics.Line(p1, p2)

    Read the article

  • C++ STL list vs set

    - by mokaschitta
    Hi, what of those two is faster for random insertions and deletions? I guess list, having the values as the keys as it is with sets seems to be attractive too though. Is performance similar for iterating over the whole container? Thanks!

    Read the article

  • asp.net RequiredFieldValidator with custom control.

    - by Evgeny
    I have custom control with asp textbox inside. And i need to Validate by RequiredFieldValidator my custom control on CLIENT side. I added attribute to custom control class: [ValidationProperty("Text")] public class WatermarkTextBox : System.Web.UI.UserControl { } It looks like working but it always make submit to server. How can i check it only on client side?

    Read the article

  • How do I disable auto- poster image generation on the video tag?

    - by ekallevig
    I'm using the 'poster' attribute on a video tag and the way it seems to work at least in webkit browsers is that it loads the poster image and then once enough of the video has loaded, it replaces that poster with an auto-generated poster from the video file itself. However, my poster images don't match the auto-generated posters which results in a weird experience of one image loading, then being replaced in a few seconds by the auto-generated image. Is there any way to prevent the auto-generated image from being used?

    Read the article

< Previous Page | 228 229 230 231 232 233 234 235 236 237 238 239  | Next Page >