Search Results

Search found 12126 results on 486 pages for 'property hiding'.

Page 74/486 | < Previous Page | 70 71 72 73 74 75 76 77 78 79 80 81  | Next Page >

  • How can I load a property lazily in JDO (on Google App Engine)?

    - by luciano
    I have this code in one of my @PersistenceCapable classes: @Persistent private Blob data; The Blob can be quite big, so I'd like to load it lazily since most of the times I don't need it. How can I annotate that property to avoid immediate loading? I could create another class that contains the Blob alone and then use a lazy one-to-one, but I'd like to solve this with annotations.

    Read the article

  • Schema to support dynamic properties

    - by Johan Fredrik Varen
    Hi people. I'm working on an editor that enables its users to create "object" definitions in real-time. A definition can contain zero or more properties. A property has a name a type. Once a definition is created, a user can create an object of that definition and set the property values of that object. So by the click of a mouse-button, the user should ie. be able to create a new definition called "Bicycle", and add the property "Size" of type "Numeric". Then another property called "Name" of type "Text", and then another property called "Price" of type "Numeric". Once that is done, the user should be able to create a couple of "Bicycle" objects and fill in the "Name" and "Price" property values of each bike. Now, I've seen this feature in several software products, so it must be a well-known concept. My problem started when I sat down and tried to come up with a DB schema to support this data structure, because I want the property values to be stored using the appropriate column types. Ie. a numeric property value is stored as, say, an INT in the database, and a textual property value is stored as VARCHAR. First, I need a table that will hold all my object definitions: Table obj_defs id | name | ---------------- 1 | "Bicycle" | 2 | "Book" | Then I need a table for holding what sort of properties each object definition should have: Table prop_defs id | obj_def_id | name | type | ------------------------------------ 1 | 1 | "Size" | ? | 2 | 1 | "Name" | ? | 3 | 1 | "Price" | ? | 4 | 2 | "Title" | ? | 5 | 2 | "Author" | ? | 6 | 2 | "ISBN" | ? | I would also need a table that holds each object: Table objects id | created | updated | ------------------------------ 1 | 2011-05-14 | 2011-06-15 | 2 | 2011-05-14 | 2011-06-15 | 3 | 2011-05-14 | 2011-06-15 | Finally, I need a table that will hold the actual property values of each object, and one solution is for this table to have one column for each possible value type, such as this: Table prop_vals id | prop_def_id | object_id | numeric | textual | boolean | ------------------------------------------------------------ 1 | 1 | 1 | 27 | | | 2 | 2 | 1 | | "Trek" | | 3 | 3 | 1 | 1249 | | | 4 | 1 | 2 | 26 | | | 5 | 2 | 2 | | "GT" | | 6 | 3 | 2 | 159 | | | 7 | 4 | 3 | | "It" | | 8 | 5 | 3 | | "King" | | 9 | 6 | 4 | 9 | | | If I implemented this schema, what would the "type" column of the prop_defs table hold? Integers that each map to a column name, varchars that simply hold the column name? Any other possibilities? Would a stored procedure help me out here in some way? And what would the SQL for fetching the "name" property of object 2 look like?

    Read the article

  • jQuery, Animate opacity to 1 then remove the opacity property to make it better looking on IE

    - by Emily
    Hi everyone, I tried the jQuery fadeIn animation in all browsers and it work good, but not that much on IE. the Alpha png images are so creepy after appending the CSS opacity, but i have an idea and i don't know how to implement it using jQuery. The idea is to fadeIn the element and when the animation is finished it will automatically remove the opacity property in order to make the picture quality better. How to do that? Note: i'm using Animate and not FadeIn. Thanks

    Read the article

  • MS Access 2007 - Property for text box to allow end-user to hit enter for return, not next

    - by Justin
    So I have a form that user's use for data entry, and on one form there is a text box there that is basically used. To enter notes. However, if the user hits i need the cursor to stay in that text box, and start a new line (uh....like word would)....but currently it is jumping to the next control (text box). So is there a simple property setting that would do the trick? Or a VBA method to accomplish? Thanks Justin

    Read the article

  • How to delay hiding of a menu with Jquery Dropdown Menu?

    - by Keith Donegan
    I have a dropdown menu that works fine, but I would like it so, that if I hover off the menu, it doesn't immediately hide again. So basically I would like a one second delay. I have read about setTimeout, but not sure if it is what I need? $('#mainnav a').bind('mouseover', function() { $(this).parents('li').children('ul').show(); }); $('#mainnav a').bind('mouseout', function() { $(this).parents('li').children('ul').hide(); });

    Read the article

  • What's the proper and reliable way to store an XML string as a JSON property?

    - by Edwin
    Hi Folks, I want to store a string which itself is an XML string as a property of an JSON object , what's the reliable and proper way of dong this? Should I first encode the XML data into BASE64 first prior saving it to an JSON object, due to the fact that JSON does not support binary data? Example of data I want to store: { "string1" : "...moderately complex XML..." } Thank you in advance for any hints and suggestions!

    Read the article

  • How to define 'Attached property' as 'SelectedValuePath' in ComboBox?

    - by SpudCZ
    Hi, I have a problem with binding in ComboBox. I'd like to bind ComboBox items to ListView columns and as a selected value return value of attached property defined on the selected column. In example bellow you can see working sample that displays width of selected column. If you try to change SelectedValuePath in ComboBox into (loc:SampleBehavior.SampleValue) you get binding error: BindingExpression path error: '(u:SearchableListView.SearchMemberPath)' property not found on 'object' ''GridViewColumn' <Window x:Class="Problem_Sample1.Window1" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:loc="clr-namespace:Problem_Sample1" WindowStartupLocation="CenterScreen" Title="Window1" Height="300" Width="300"> <DockPanel> <ComboBox DockPanel.Dock="Top" x:Name="combobox" ItemsSource="{Binding Path=View.Columns, ElementName=listview}" DisplayMemberPath="Header" SelectedValuePath="Width"> </ComboBox> <StatusBar DockPanel.Dock="Bottom"> <TextBlock> <TextBlock Text="Selected column (value): " /> <TextBlock Text="{Binding Path=SelectedValue, ElementName=combobox}" /> </TextBlock> </StatusBar> <ListView x:Name="listview"> <ListView.View> <GridView> <GridViewColumn Header="Name" Width="101" loc:SampleBehavior.SampleValue="201" /> <GridViewColumn Header="Surname" Width="102" loc:SampleBehavior.SampleValue="202" /> </GridView> </ListView.View> </ListView> </DockPanel> </Window>   SampleBehavior.cs using System.Windows; using System.Windows.Controls; namespace Problem_Sample1 { public static class SampleBehavior { public static readonly DependencyProperty SampleValueProperty = DependencyProperty.RegisterAttached( "SampleValue", typeof (int), typeof (SampleBehavior)); [AttachedPropertyBrowsableForType(typeof(GridViewColumn))] public static int GetSampleValue(GridViewColumn column) { return (int)column.GetValue(SampleValueProperty); } [AttachedPropertyBrowsableForType(typeof(GridViewColumn))] public static void SetSampleValue(GridViewColumn column, int value) { column.SetValue(SampleValueProperty, value); } } }   Thanks for any help or suggestion.

    Read the article

  • Hiding div tag when the user clicks outside the div tag.

    - by Madhu
    Hi friends, I have a div tag and I am populating the search results on a custom grid, which is placed inside this divtag. When a user click on the search button, i am displaying the results in the above mentioned div tag. I have a requirement to close the above div tag when the user clicks outside the div tag. It is similar to google search auto comlete. Thanks in advance.

    Read the article

  • Cross-browser method for hiding page elements until all content is loaded to prevent layout from appearing broken during load?

    - by Ryan
    I have an issue where due to some elements loading faster than others, the page looks broken for a few seconds at the start. An example is the CSS Pie behavior that allows me to do curved corners in IE, it appears before it becomes curved which looks bad. What would be ideal would be it somehow knowing when everything is loaded and then appear all at once, possibly including some kind of elegant visual way of not making the user feel impatient... any ideas or common tricks for doing this?

    Read the article

  • NHibernate Many-to-Many Mapping not working

    - by ClutchDude
    I have a Nhibernate mapping file for a simple user/role mapping. Here are the mapping files: Users.hbm.xml <?xml version="1.0" encoding="utf-8" ?> <hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" assembly="Sample.Persistence" namespace="Sample.Persistence.Model"> <class name="User" table="Users"> <id name="UserKey"> <generator class="identity"/> </id> <property name="UserName" column="UserName" type="String" /> <property name="Password" column="Password" type="Byte[]" /> <property name="FirstName" column="FirstName" type="String" /> <property name="LastName" column="LastName" type="String" /> <property name="Email" column="Email" type="String" /> <property name="Active" column="Active" type="Boolean" /> <property name="Locked" column="Locked" type="Boolean" /> <property name="LoginFailures" column="LoginFailures" type="int" /> <property name="LockoutDate" column="LockoutDate" type="DateTime" generated="insert" /> <property name="Expired" column="Expired" type="Boolean" generated="insert"/> <set name="Roles" table="UsersRolesBridge" lazy="false"> <key column="UserKey" /> <many-to-many class="Role" not-found="exception" column="RoleKey" /> </set> </class> </hibernate-mapping> Role.hbm.xml <?xml version="1.0" encoding="utf-8" ?> <hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" assembly="Sample.Persistence" namespace="Sample.Persistence.Model"> <class name="Role" table="Roles"> <id name="RoleKey"> <generator class="identity"/> </id> <property name="Name" column="Name" type="String" /> <set name="Users" inverse="true" atable="UsersRolesBridge" lazy="false" > <key column="RoleKey" /> <many-to-many class="User" column="UserKey" /> </set> </class> </hibernate-mapping> I am able to retrieve roles for each user via NHibernate but when I go to save a new object, the roles are not saved in the Bridge table. The user is created and insert with no issues. I've checked that the Role collection, a field on the user, is being populated with the proper rolekey before the Session.Save() is called. There is no exception thrown as well.

    Read the article

  • How to Update TreeViewItem's IsExpanded property to false in code behind?

    - by viky
    I am working with WPF TreeView control. I am creating a hierarchical data structure and assigning it to ItemsSource and it will generate TreeviewItems automatically. By default I use IsExpanded of TreeViewItem to true. But in a particular case, I want to set IsExpanded property to false. So that treeview loading doesn't take time to generate all items. How can I set that in code since I don't have reference to TreeViewItem's instance at that time?

    Read the article

  • How to use a class's type as the type argument for an inherited collection property in C#

    - by Edelweiss Peimann
    I am trying to create a representation of various types of card that inherit from a generic card class and which all contain references to their owning decks. I tried re-declaring them, as suggested here, but it still won't convert to the specific card type. The code I currently have is as such: public class Deck<T> : List<T> where T : Card { void Shuffle() { throw new NotImplementedException("Shuffle not yet implemented."); } } public class Card { public Deck<Card> OwningDeck { get; set; } } public class FooCard : Card { public Deck<FooCard> OwningDeck { get { return (Deck<FooCard>)base.OwningDeck; } set { OwningDeck = value; } } } The compile-time error I am getting: Error 2 Cannot convert type 'Game.Cards.Deck' to 'Game.Cards.Deck' And a warning suggesting I use a new operator to specify that the hiding is intentional. Would doing so be a violation of convention? Is there a better way? My question to stackoverflow is this: Can what I am trying to do be done elegantly in the .NET type system? If so, can some examples be provided?

    Read the article

  • How to map a Entity Data Model conceptual model property to a storage model column using the "Serial

    - by codekaizen
    I have a conceptual model in EDM where one of the entities has a property which is essentially a big value object whose properties aren't really useful as columns in the datamodel. I'd like to apply the Serialized LOB pattern to it so that I can fit it into a 192 byte binary column. How do I map this in the EDM v4? Is it even possible at this time? Actually, is it possible in any ORM?

    Read the article

  • How to link a property setter to a delegate?

    - by Danvil
    I would like to give a property setter to a delegate. How is this done? class A { private int count; public int Count { get { return count; } set { count = value; } } } A a = new A(); delegate void ChangeCountDelegate(int x); ChangeCountDelegate dlg = ... ? // should call a.Count = x

    Read the article

  • What is a good naming convention to differentiate a class name from a property in C#?

    - by Andy Stampor
    I run into this frequently enough that I thought I'd see what others had to say about it. Using the StyleCop conventions, I find that I often have a property name that is hard to make different than the class name it is accessing. For example: public class ProjectManager { // Stuff here } public class OtherClass { private ProjectManager ProjectManager { get; set; } } It compiles and runs, but seems like it would be an easy way to confuse things, even with the use of "this".

    Read the article

< Previous Page | 70 71 72 73 74 75 76 77 78 79 80 81  | Next Page >