Search Results

Search found 50723 results on 2029 pages for 'class loading'.

Page 7/2029 | < Previous Page | 3 4 5 6 7 8 9 10 11 12 13 14  | Next Page >

  • Entity Framework 4, WCF &amp; Lazy Loading Tip

    - by Dane Morgridge
    If you are doing any work with Entity Framework and custom WCF services in EFv1, everything works great.  As soon as you jump to EFv4, you may find yourself getting odd errors that you can’t seem to catch.  The problem is almost always has something to do with the new lazy loading feature in Entity Framework 4.  With Entity Framework 1, you didn’t have lazy loading so this problem didn’t surface.  Assume I have a Person entity and an Address entity where there is a one-to-many relationship between Person and Address (Person has many Addresses). In Entity Framework 1 (or in EFv4 with lazy loading turned off), I would have to load the Address data by hand by either using the Include or Load Method: var people = context.People.Include("Addresses"); or people.Addresses.Load(); Lazy loading works when the first time the Person.Addresses collection is accessed: 1: var people = context.People.ToList(); 2:  3: // only person data is currently in memory 4:  5: foreach(var person in people) 6: { 7: // EF determines that no Address data has been loaded and lazy loads 8: int count = person.Addresses.Count(); 9: } 10:  Lazy loading has the useful (and sometimes not useful) feature of fetching data when requested.  It can make your life easier or it can make it a big pain.  So what does this have to do with WCF?  One word: Serialization. When you need to pass data over the wire with WCF, the data contract is serialized into either XML or binary depending on the binding you are using.  Well, if I am using lazy loading, the Person entity gets serialized and during that process, the Addresses collection is accessed.  When that happens, the Address data is lazy loaded.  Then the Address is serialized, and the Person property is accessed, and then also serialized and then the Addresses collection is accessed.  Now the second time through, lazy loading doesn’t kick in, but you can see the infinite loop caused by this process.  This is a problem with any serialization, but I personally found it trying to use WCF. The fix for this is to simply turn off lazy Loading.  This can be done at each call by using context options: context.ContextOptions.LazyLoadingEnabled = false; Turning lazy loading off will now allow your classes to be serialized properly.  Note, this is if you are using the standard Entity Framework classes.  If you are using POCO,  you will have to do something slightly different.  With POCO, the Entity Framework will create proxy classes by default that allow things like lazy loading to work with POCO.  This proxy basically creates a proxy object that is a full Entity Framework object that sits between the context and the POCO object.  When using POCO with WCF (or any serialization) just turning off lazy loading doesn’t cut it.  You have to turn off the proxy creation to ensure that your classes will serialize properly: context.ContextOptions.ProxyCreationEnabled = false; The nice thing is that you can do this on a call-by-call basis.  If you use a new context for each set of operations (which you should) then you can turn either lazy loading or proxy creation on and off as needed.

    Read the article

  • should I extend or create instance of the class

    - by meWantToLearn
    I have two classes Class A and Class B in Class A, i have three methods that perform the save, delete and select operation based upon the object I pass them. in Class B I perform the logic operations, such as modification to the property of the object before being passed to the methods of Class A, My problem is in Class B, should it extend Class A, and call the methods of class A , by parent::methodName or create instance of class A and then call Class A does not includes any property just methods. class A{ public function save($obj){ //code here } public function delete($obj){ //code here } public function select($obj){ //code here } } //Should I extend class A, and call the method by parent::methodName($obj) or create an instance of class A, call the method $instanceOfA-methodName($obj); class B extends A{ public function checkIfHasSaved($obj){ if($obj->saved == 'Yes'){ parent::save($obj); //**should I call the method like this** $instanceOFA = new A(); //**or create instance of class A and call without extending class A** instanceOFA->save($obj); } //other logic operations here } }

    Read the article

  • Changing multiple objects with a new class name using Jquery

    - by liquilife
    I'd like to click on a trigger and show a specific image. There are multiple triggers which would show a specific image related to it within a set. There are 4 sets The challenge for me is toggling the other images to hide only in this 'set' when one of these triggers are clicked, as there can only be one image showing at a time in each set. Here is the HTML I've put together thus far: <!-- Thumbnails which can be clicked on to toggle the larger preview image --> <div class="materials"> <a href="javascript:;" id="shirtgrey"><img src="/grey_shirt.png" height="122" width="122" /></a> <a href="javascript:;" id="shirtred"><img src="red_shirt.png" height="122" width="122" /></a> <a href="javascript:;" id="shirtblue"><img src="hblue_shirt.png" height="122" width="122" /></a> <a href="javascript:;" id="shirtgreen"><img src="green_shirt.png" height="122" width="122" /></a> </div> <div class="collars"> <a href="javascript:;" id="collargrey"><img src="grey_collar.png" height="122" width="122" /></a> <a href="javascript:;" id="collarred"><img src="red_collar.png" height="122" width="122" /></a> <a href="javascript:;" id="collarblue"><img src="blue_collar.png" height="122" width="122" /></a> <a href="javascript:;" id="collargreen"><img src="green_collar.png" height="122" width="122" /></a> </div> <div class="cuffs"> <a href="javascript:;" id="cuffgrey"><img src="grey_cuff.png" height="122" width="122" /></a> <a href="javascript:;" id="cuffred"><img src="red_cuff.png" height="122" width="122" /></a> <a href="javascript:;" id="cuffblue"><img src="blue_cuff.png" height="122" width="122" /></a> <a href="javascript:;" id="cuffgreen"><img src="/green_cuff.png" height="122" width="122" /></a> </div> <div class="pockets"> <a href="javascript:;" id="pocketgrey"><img src="grey_pocket.png" height="122" width="122" /></a> <a href="javascript:;" id="pocketred"><img src=".png" height="122" width="122" /></a> <a href="javascript:;" id="pocketblue"><img src="blue_pocket.png" height="122" width="122" /></a> <a href="javascript:;" id="pocketgreen"><img src="green_pocket.png" height="122" width="122" /></a> </div> <!-- The larger images where one from each set should be viewable at one time, triggered by the thumb clicked above --> <div class="selectionimg"> <div class="selectShirt"> <img src="grey_shirt.png" height="250" width="250" class="selectShirtGrey show" /> <img src="red_shirt.png" height="250" width="250" class="selectShirtRed hide" /> <img src="blue_shirt.png" height="250" width="250" class="selectShirtBlue hide" /> <img src="green_shirt.png" height="250" width="250" class="selectShirtGreen hide" /> </div> <div class="selectCollar"> <img src="grey_collar.png" height="250" width="250" class="selectCollarGrey show" /> <img src="red_collar.png" height="250" width="250" class="selectCollarRed hide" /> <img src="blue_collar.png" height="250" width="250" class="selectCollarBlue hide" /> <img src="green_collar.png" height="250" width="250" class="selectCollarGreen hide" /> </div> <div class="selectCuff"> <img src="grey_cuff.png" height="250" width="250" class="selectCuffGrey show" /> <img src="red_cuff.png" height="250" width="250" class="selectCuffRed hide" /> <img src="blue_cuff.png" height="250" width="250" class="selectCuffBlue hide" /> <img src="green_cuff.png" height="250" width="250" class="selectCuffGreen hide" /> </div> <div class="selectPocket"> <img src="grey_pocket.png" height="250" width="250" class="selectPocketGrey show" /> <img src="hred_pocket.png" height="250" width="250" class="selectPocketRed hide" /> <img src="blue_pocket.png" height="250" width="250" class="selectPocketBlue hide" /> <img src="green_pocket.png" height="250" width="250" class="selectPocketGreen hide" /> </div> </div> How can jQuery be used to change a class of an image to "show" and ensure that all other images in that same div are set to a class of "hide"? First time posting here. I'm very efficient with HTML and CSS and have a basic understanding of jQuery. I'm learning and this just seems a little bit beyond my abilities at the moment. I hope this all makes sense. Thanks for any help.

    Read the article

  • Getting an object from a 2d array inside of a class

    - by user36324
    I am have a class file that contains two classes, platform and platforms. platform holds the single platform information, and platforms has an 2d array of platforms. Im trying to render all of them in a for loop but it is not working. If you could kindly help me i would greatly appreciate. void Platforms::setUp() { for(int x = 0; x < tilesW; x++){ for(int y = 0; y < tilesH; y++){ Platform tempPlat(x,y,true,renderer,filename,tileSize/scaleW,tileSize/scaleH); platArray[x][y] = tempPlat; } } } void Platforms::show() { for(int x = 0; x < tilesW; x++){ for(int y = 0; y < tilesH; y++){ platArray[x][y].show(renderer,scaleW,scaleH); } } }

    Read the article

  • change the class loading order google app engine java

    - by Shekhar
    I am trying to create an application on google app engine using struts2. Struts2 internally uses freemarker .One of the Freemarker framework classes suppose X internally uses a class javax.swing.Treenode which is not in google app engine jre white list. Now in order to run my application i created a new class X in the same package structure as it was in freemarker framework and copied the class to WEB-INF classes.Then When i run my application it run fine. The problem is that i want to take out the class X from my application sourcecode and move it to newly created jar and place it in WEB-INF/lib folder. So that i can reuse the code in multiple project and my code remains clean of the freemarker code. But when i run the application it picks the old class X from the original freemarker framework.As a result i get ClassNotFoundException. Can anyone provide any help such that i can change the ClassLoading order such that my jar containing X class loads first.

    Read the article

  • C# new class with only single property : derive from base or encapsulate into new ?

    - by Gobol
    I've tried to be descriptive :) It's rather programming-style problem than coding problem in itself. Let's suppose we have : A: public class MyDict { public Dictionary<int,string> dict; // do custom-serialization of "dict" public void SaveToFile(...); // customized deserialization of "dict" public void LoadFromFile(...); } B: public class MyDict : Dictionary<int,string> { } Which option would be better in the matter of programming style ? class B: is to be de/serialized externally. Main problem is : is it better to create new class (which would have only one property - like opt A:) or to create a new class derived - like opt B: ? I don't want any other data processing than adding/removing and de/serializing to stream. Thanks in advance!

    Read the article

  • Static class vs Singleton class in C# [closed]

    - by Floradu88
    Possible Duplicate: What is the difference between all-static-methods and applying a singleton pattern? I need to make a decision for a project I'm working of whether to use static or singleton. After reading an article like this I am inclined to use singleton. What is better to use static class or singleton? Edit 1 : Client Server Desktop Application. Please provide code oriented solutions.

    Read the article

  • How To Disable Loading Of Images In Chrome, Firefox and IE

    - by Gopinath
    Many of us find the necessity to disable loading images in web browsers for various reasons. May be when we are at work place, we don’t our boss to notice flashy browser window or we are connected to low bandwidth connections like GPRS which works faster without images. What ever may be the reason, here are the tips to disable images in Google Chrome, Firefox and Internet Explorer web browsers. Google Chrome – Disable Loading Images To disable loading of images in Google Chrome 1. Click on Tools Icon and choose Options menu item 2. In Google Chrome Options dialog window, switch to the tab Under the hood and click on the button Content Settings 3. Select Images from the list of options available in the left panel and choose the option Do not show any images 4. Close dialog windows and you are done. Firefox – Disable Loading Images To disable loading of images in Firefox 1. Open Firefox 2. Go to Tools -> Options 3. Switch to Content tab 4. Uncheck the option Load images automatically Internet Explorer – Disable Loading Images To disable loading of images in Internet Explorer 1. Launch Internet Explorer 2. Go to Tools -> Internet Options 3. Switch to Advanced tab 4. Uncheck the option Show pictures under Multimedia category cc image credit: flickr/indoloony This article titled,How To Disable Loading Of Images In Chrome, Firefox and IE, was originally published at Tech Dreams. Grab our rss feed or fan us on Facebook to get updates from us.

    Read the article

  • polymorphism, inheritance in c# - base class calling overridden method?

    - by Andrew Johns
    This code doesn't work, but hopefully you'll get what I'm trying to achieve here. I've got a Money class, which I've taken from http://www.noticeablydifferent.com/CodeSamples/Money.aspx, and extended it a little to include currency conversion. The implementation for the actual conversion rate could be different in each project, so I decided to move the actual method for retrieving a conversion rate (GetCurrencyConversionRate) into a derived class, but the ConvertTo method contains code that would work for any implementation assuming the derived class has overriden GetCurrencyConversionRate so it made sense to me to keep it in the parent class? So what I'm trying to do is get an instance of SubMoney, and be able to call the .ConvertTo() method, which would in turn use the overriden GetCurrencyConversionRate, and return a new instance of SubMoney. The problem is, I'm not really understanding some concepts of polymorphism and inheritance yet, so not quite sure what I'm trying to do is even possible in the way I think it is, as what is currently happening is that I end up with an Exception where it has used the base GetCurrencyConversionRate method instead of the derived one. Something tells me I need to move the ConvertTo method down to the derived class, but this seems like I'll be duplicating code in multiple implementations, so surely there's a better way? public class Money { public CurrencyConversionRate { get { return GetCurrencyConversionRate(_regionInfo.ISOCurrencySymbol); } } public static decimal GetCurrencyConversionRate(string isoCurrencySymbol) { throw new Exception("Must override this method if you wish to use it."); } public Money ConvertTo(string cultureName) { // convert to base USD first by dividing current amount by it's exchange rate. Money someMoney = this; decimal conversionRate = this.CurrencyConversionRate; decimal convertedUSDAmount = Money.Divide(someMoney, conversionRate).Amount; // now convert to new currency CultureInfo cultureInfo = new CultureInfo(cultureName); RegionInfo regionInfo = new RegionInfo(cultureInfo.LCID); conversionRate = GetCurrencyConversionRate(regionInfo.ISOCurrencySymbol); decimal convertedAmount = convertedUSDAmount * conversionRate; Money convertedMoney = new Money(convertedAmount, cultureName); return convertedMoney; } } public class SubMoney { public SubMoney(decimal amount, string cultureName) : base(amount, cultureName) {} public static new decimal GetCurrencyConversionRate(string isoCurrencySymbol) { // This would get the conversion rate from some web or database source decimal result = new Decimal(2); return result; } }

    Read the article

  • jQuery only firing last class in multiple-class click

    - by user1134644
    I have a set of links like so: <a href="#internalLink1" class="classA">This has Class A</a> <a href="#internalLink2" class="classB">This has Class B</a> <a href="#internalLink3" class="classA classB">This has Class A and Class B</a> And here's the corresponding jQuery: $('.classA').click(function(){ // do class A stuff }); $('.classB').click(function(){ // do class B stuff }); Currently, when I click on the first link with Class A, it does the Class A stuff like it's supposed to. Similarly, when I click on the second link with Class B, it does the Class B stuff like it's supposed to. No worries there. My issue is, when I click on the third link with BOTH classes, it only fires the function for whichever class comes last (in this case, class B. If I put class A at the end instead, it performs class A's function). I want it to fire both. What am I doing wrong? Thanks in advance. EDIT: To those posting fiddles, nearly all of them work, so as many have said, it's most likely not my code, but the way it displays in my file. For a little more clarification, I was teaching myself some jQuery and decided to try making a (very) simple "Choose Your Own Adventure" type game. Here's a jsfiddle containing the opening of my bare-bones-please-don't-laugh game. Click on "Hide in the bushes", then "Examine the victim", then "Take any valuables and leave, he's dead already" <-- THIS is where the issue is. It's supposed to add 98 gold ("hawks") to your inventory, AND tell you that your alignment has shifted 1 point towards Chaotic. At the moment, it only does the chaotic alert, and no gold gets added to your inventory. The other option (refresh the fiddle to restart) that adds money to your inventory, but DOES NOT make you chaotic, works just fine (if you select "Search him for identification" instead of "take the money and run") Sorry this is so long!

    Read the article

  • Hints to properly design UML class diagram

    - by mic4ael
    Here is the problem. I have just started learning UML and that is why I would like to ask for a few cues from experienced users how I could improve my diagram because I do know it lacks a lot of details, it has mistakes for sure etc. Renovation company hires workers. Each employee has some kind of profession, which is required to work on a particular position. Workers work in groups consisting of at most 15 members - so called production units, which specializes in a specified kind of work. Each production unit is managed by a foreman. Every worker in order to be able to perform job tasks needs proper accessories. There are two kind of tools - light and heavy. To use heavy tools, a worker must have proper privileges. A worker can have at most 3 light tools taken from the warehouse.

    Read the article

  • Isn't class scope purely for organization?

    - by Di-0xide
    Isn't scope just a way to organize classes, preventing outside code from accessing certain things you don't want accessed? More specifically, is there any functional gain to having public, protected, or private-scoped methods? Is there any advantage to classifying method/property scope rather than to, say, just public-ize everything? My presumption says no simply because, in binary code, there is no sense of scope (other than r/w/e, which isn't really scope at all, but rather global permissions for a block of memory). Is this correct? What about in languages like Java and C#[.NET]?

    Read the article

  • What class structure allows for a base class and mix/match of subclasses? (Similar to Users w/ roles)

    - by cdeszaq
    I have a set of base characteristics, and then a number of sub-types. Each instance must be one of the sub-types, but can be multiple sub-types at once. The sub-types of each thing can change. In general, I don't care what subtype I have, but sometimes I do care. This is much like a Users-Roles sort of relationship where a User having a particular Role gives the user additional characteristics. Sort of like duck-typing (ie. If my Foo has a Bar, I can treat it like a ThingWithABar.) Straight inheritance doesn't work, since that doesn't allow mix/match of sub-types. (ie. no multi-inheritance). Straight composition doesn't work because I can't switch that up at runtime. How can I model this?

    Read the article

  • So how I can control the page contents loading sequence in dojo

    - by David Zhao
    Hi there, I'm using dojo for our UI's, and would like to load certain part of page contents in sequence. For example, for a certain stock, I'd like to load stock general information, such as ticker, company name, key stats, etc. and a grid with the last 30 days open/close prices. Different contents will be fetched from the server separately. Now, I'd like first load the grid so the user can have something to look at, then, say, start loading of key stats which is a large data set takes longer time to load. How do I do this. I tried: dojo.addOnLoad(function() { startGrid(); //mock grid startup function which works fine getKeyStats(); //mock key stat getter function also works fine }); But dojo is loading getKeyStats(), then startGrid() here for some reason, and sequence doesn't seem be matter here. So how I can control the loading sequence at will? Thanks in advance! David

    Read the article

  • Help me understand Rails eager loading

    - by aaronrussell
    I'm a little confused as to the mechanics of eager loading in active record. Lets say a Book model has many Pages and I fetch a book using this query: @book = Book.find book_id, :include => :pages Now this where I'm confused. My understanding is that @book.pages is already loaded and won't execute another query. But suppose I want to find a specific page, what would I do? @book.pages.find page_id # OR... @book.pages.to_ary.find{|p| p.id == page_id} Am I right in thinking that the first example will execute another query, and therefore making the eager loading pointless, or is active record clever enough to know that it doesn't need to do another query? Also, my second question, is there an argument that in some cases eager loading is more intensive on the database and sometimes multiple small queries will be more efficient that a single large query? Thanks for your thoughts.

    Read the article

  • Page loading effect with jquery

    - by Andy Simpson
    Hello all, Is there a way to use jquery (or other method) to display a loading div while page loads? I have a table that is populated using PHP/MySQL and can contain several thousand rows. This is then sorted using the tablesorter plugin for jquery. Everything works fine, however the page can sometimes take 4-5 seconds to fully load and it would be nice to display a 'loading...' message within a div which automatically disappears when whole table is loaded. I have heard of loadmask plugin for jquery - would this be suitable for my needs and if not any alternative? No AJAX calls are being made while loading this table if thats relevant. Thanks in advance Andy

    Read the article

  • Creating a loading screen in HTML5

    - by espais
    I am having some issues finding a decent tutorial for generating a loading style screen with regards to HTML5. To be quite honest I'm not sure exactly where to begin... My project is essentially a simple HTML5 game, where I'll be loading in various sprite sheets and tilesets. They'll be reasonably small, but I'd like to show a little loading spinner instead of a blank screen while all the resources are loaded. Much appreciated if somebody could point me in the right direction, be it decent links or code samples to get me going...my Google-fu is lacking today! For clarification, I need to figure out how to load the resources themselves, as opposed to finding a spinner. For instance, how to calculate that X% has loaded.

    Read the article

  • Outlook 2007 - slow loading messages, etc

    - by studiohack
    Outlook 2007 is slow to load messages...Why is this, and what can I do to speed it up? Currently have about 850 messages in the Inbox folder, and the preview pane turned off, thus I view messages by double-clicking. This is where it gets slow, when I double click, it brings up a new window with everything but the actual message loaded. Solutions? Thanks! (running Windows 7)

    Read the article

  • Windows 7 Loading speed

    - by Sergiy Byelozyorov
    I have installed Windows 7 64-bit about two week ago. Since then everything was working alright, but yesterday Windows started to load much slower. Main delay comes while Windows logo is glowing -- it used to be around 10-15 seconds and now it's around 2 minutes. As far as I remember, I have only installed Microsoft IntelliMouse driver recently and removed it today. Unfortunately I found out that I have switched off System Restore some time long ago, so can't even test if the problem can be fixed by restoring old version. How can I troubleshoot the problem? Can I somehow find out what's causing the delay? P.S. Please don't suggest to reinstall Windows. I know that will help, but reinstalling all software and settings is a pain and requires a lot of time.

    Read the article

  • Outlook 2007 - slow loading messages

    - by studiohack
    Outlook 2007 is slow to load messages...Why is this, and what can I do to speed it up? Currently have about 850 messages in the Inbox folder, and the preview pane turned off, thus I view messages by double-clicking. This is where it gets slow, when I double click, it brings up a new window with everything but the actual message loaded, which then takes several more seconds to appear. Solutions? Thanks! (running Windows 7)

    Read the article

  • Windows XP Loading Problem

    - by Sadeq Dousti
    Sometimes, my Windows XP does not load correctly. It shows the login screen, and when I click my username, it load the desktop background, but the Explorer does not show up. So, I cannot see the icons on the desktop, the start menu, etc. If I press Ctrl+Alt+Del to show Task Manager, I can run programs (like media player or browser) from File--New Task (Run...). Also, in the Task Manager, I see Explorer.exe running. I tried to kill and re-run it, but nothing happens. I used Sysinternals Process Explorer to see if there were any odd process or odd behavior, but nothing was fishy. After several restarts, the system finally worked as expected. But this is not permanent: Sometimes, when I restart the system, it works just as described above (Explorer does not show up). But sometimes it works normally. I used Kaspersky to search for viruses, but nothing showed up. I think the info presented above is not enough to pinpoint the problem. Yet you might be able to tell me about a tool or something, which I can use to give you more info, or even solve the problem. PS: I can easily use the Safe Mode. It does not seem to suffer from this problem. Hence, I suspect there's some process (service) for which Explorer is waiting, but that process runs into trouble (say a race ondition, or an infinite loop) and so Explorer stalls as well.

    Read the article

  • Prevent lazy loading in nHibernate

    - by Ciaran
    Hi, I'm storing some blobs in my database, so I have a Document table and a DocumentContent table. Document contains a filename, description etc and has a DocumentContent property. I have a Silverlight client, so I don't want to load up and send the DocumentContent to the client unless I explicity ask for it, but I'm having trouble doing this. I've read the blog post by Davy Brion. I have tried placing lazy=false in my config and removing the virtual access modifier but have had no luck with it as yet. Every time I do a Session.Get(id), the DocumentContent is retrieved via an outer join. I only want this property to be populated when I explicity join onto this table and ask for it. Any help is appreciated. My NHibernate mapping is as follows: <?xml version="1.0" encoding="utf-8" ?> <hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" assembly="Jrm.Model" namespace="Jrm.Model"> <class name="JrmDocument" lazy="false"> <id name="JrmDocumentID"> <generator class="native" /> </id> <property name="FileName"/> <property name="Description"/> <many-to-one name="DocumentContent" class="JrmDocumentContent" unique="true" column="JrmDocumentContentID" lazy="false"/> </class> <class name="JrmDocumentContent" lazy="false"> <id name="JrmDocumentContentID"> <generator class="native" /> </id> <property name="Content" type="BinaryBlob" lazy="false"> <column name="FileBytes" sql-type="varbinary(max)"/> </property> </class> </hibernate-mapping> and my classes are: [DataContract] public class JrmDocument : ModelBase { private int jrmDocumentID; private JrmDocumentContent documentContent; private long maxFileSize; private string fileName; private string description; public JrmDocument() { } public JrmDocument(string fileName, long maxFileSize) { DocumentContent = new JrmDocumentContent(File.ReadAllBytes(fileName)); FileName = new FileInfo(fileName).Name; } [DataMember] public virtual int JrmDocumentID { get { return jrmDocumentID; } set { jrmDocumentID = value; OnPropertyChanged("JrmDocumentID"); } } [DataMember] public JrmDocumentContent DocumentContent { get { return documentContent; } set { documentContent = value; OnPropertyChanged("DocumentContent"); } } [DataMember] public virtual long MaxFileSize { get { return maxFileSize; } set { maxFileSize = value; OnPropertyChanged("MaxFileSize"); } } [DataMember] public virtual string FileName { get { return fileName; } set { fileName = value; OnPropertyChanged("FileName"); } } [DataMember] public virtual string Description { get { return description; } set { description = value; OnPropertyChanged("Description"); } } } [DataContract] public class JrmDocumentContent : ModelBase { private int jrmDocumentContentID; private byte[] content; public JrmDocumentContent() { } public JrmDocumentContent(byte[] bytes) { Content = bytes; } [DataMember] public int JrmDocumentContentID { get { return jrmDocumentContentID; } set { jrmDocumentContentID = value; OnPropertyChanged("JrmDocumentContentID"); } } [DataMember] public byte[] Content { get { return content; } set { content = value; OnPropertyChanged("Content"); } } }

    Read the article

  • how can i select first second or third element with given class name using CSS?

    - by Tumharyyaaden
    ie. i have the following: <div class="myclass">my text1</div> some other code+containers... <div class="myclass">my text2</div> some other code+containers... <div class="myclass">my text3</div> some other code+containers... i have the css class div.myclass {doing things} that applies to all obviously but i also wanted to be able to select the first, second or third like this: div.myclass:first {color:#000;} div.myclass:second {color:#FFF;} div.myclass:third {color:#006;} almost like the jQuery index selection .eq( index ) which is what i am using currently but need a noscript alternative. Thanks in advance!

    Read the article

  • Accessing every child class of parent class in Java

    - by darkie15
    Hi All, I have to implement a logic whereby given a child class, I need to access its parent class and all other child class of that parent class, if any. I did not find any API in Java Reflection which allows us to access all child classes of a parent class. Is there any way to do it? Ex. class B extends class A class C extends class A Now using class B, I can find the superclass by calling getSuperClass(). But is there any way to find all the child classes once I have the parent class i.e. class B and class C?? Regards, darkie

    Read the article

  • Some confusion with a class variable, but with a twist...

    - by Omega
    I have a class called MyPackage.WebServer and it has a property called DBEngine. I am also dynamically loading a module and class using load_module. Inside this class, it attempts to reference MyPackage.WebServer. When it does though, DBEngine is not set to the value given when WebServer is instantiated. It's the default (None). Would the fact that I'm using load_module cause a different object graph to be created and thus isolate my dynamically loaded class from the rest of my python app?

    Read the article

< Previous Page | 3 4 5 6 7 8 9 10 11 12 13 14  | Next Page >