lazy-loading

No persister for: Castle.Proxies.<EntityName>Proxy and lazy=“true” in NHibernate?

Deadly 提交于 2019-12-08 19:31:48
问题 I am trying to use lazy loading for a property of one of my entities The property mapping is something like this: <property name="Foobar" type="AnsiString" column="FOOBAR" lazy="true"/> However when I am tring to save an instance of this entities (using Linq), it throws a DatabaseQueryException with the following inner exception: NHibernate.MappingException : No persister for: Castle.Proxies.FooEntityProxy" And when I remove the lazy="true" item, the exception doesn't get thrown anymore. What

Castle Windsor lazy load services

左心房为你撑大大i 提交于 2019-12-08 15:59:17
问题 Occasionally I find myself in a situation where I need to resolve a service only if a certain condition is met. For example, a user might select to send an email or an sms notification. I would like to lazy load the email or sms service depending on what the user chooses so that I don't have to load both of them and waste resources (what if there were, for example, 10 options for the user...?). The problem I have is with using the container outside of my bootstrap code (I dont want my code

Why is webpack code splitting not working for me?

ⅰ亾dé卋堺 提交于 2019-12-08 15:33:22
问题 I'm using require.ensure to create split points at react-router paths. However, my build directory still only has app.js in addition to the vendor.js . I was expecting a separate js file for each path I used require.ensure . I used require.ensure at each path like this: <Route path= 'auth' getComponent={(nextState, callback) => { require.ensure([], (require) => { callback(null, require('containers/Authenticate/AuthenticateContainer.js').default) }, 'auth') }}/> my web pack config output for

Angular 7 router '**' wildcard with lazy load module and child routes not working?

爷,独闯天下 提交于 2019-12-08 14:47:29
I'm trying to create a default route using the wildcard '**' from Angular's router. That default route will load a lazy module and then it will have to solve its own routes. The problem is that when I have the following configuration it does not resolve as expected: export const routes = [ { path: '', component: 'DashboardComponent' }, { path: '**', loadChildren: './lazy/lazy.module#LazyModule' } ]; @NgModule({ imports: [ BrowserModule, RouterModule.forRoot(routes) ], declarations: [AppComponent] bootstrap: [AppComponent] }) export class AppModule {} const routes = [ { path: '', component:

Out Of memory error while using LazyList in ListView [duplicate]

旧城冷巷雨未停 提交于 2019-12-08 13:48:36
问题 This question already has answers here : Closed 6 years ago . Possible Duplicate: Out Of memory error using Universal Image Loader and images getting refreshed I have been following the Tutorials on lazy loading the images in a list view and than I implemented LazyList . The code is working properly as per my requirements however it is giving Out Of Memory Errors at some stages. I am using the same code of ImageLoader, Memory cache, LazyAdapter, FileChache and Utils. Here is LazyAdapter class

IRepository Aggregates and Lazy Loading

99封情书 提交于 2019-12-08 11:53:00
问题 I've been trawling stackoverflow and the internet in general all day about the IRepository pattern trying to better understand it before I try and use it in anger. From what I've read (and please do correct me if I'm mistaken) a repoistory encapsulates access to its aggregate root and child objects exposing a common interface that can then be injected or mocked. So in the instance where you have your aggregate root object: class Employee { string FirstName; string LastName; IEnumerable

Angular ui-router and ocLazyLoad

怎甘沉沦 提交于 2019-12-08 09:37:40
问题 Scenario: I have some angular modules like: angular.module('app', ['app.core', 'app.views']); // not lazy load Each module under app.views uses a RouterUtil to register their own route, like: $stateProvider.state('state name', {/* some configs here */}); This RouterUtil also have a method to access all registered states (used to create a dynamic menu). And I'm using the ocLazyLoad, just to load an external module. When the page is loading, ocLazyLoad will perform a request to other js with

Lazy loading module imports in an __init__.py file python

我怕爱的太早我们不能终老 提交于 2019-12-08 08:17:38
I was wondering if anyone had any suggestions for lazy loading imports in an init file? I currently have the following folder structure: /mypackage __init__.py /core __init__.py mymodule.py mymodule2.py The init .py file in the core folder with the following imports: from mymodule import MyModule from mymodule2 import MyModule2 This way I can just do: from mypackage.core import MyModule, MyModule2 However, in the package init .py file, I have another import: from core.exc import MyModuleException This has the effect that whenever I import my package in python, MyModule and MyModule2 get

Jquery LazyLoad.js Issue with Loading after Window Resize

女生的网名这么多〃 提交于 2019-12-08 08:04:26
问题 Im running the LazyLoad script for my website and having an issue with one small aspect of it. Im using Lazy Load on a Horizontal scroll (left to right) with fairly wide images. The script works perfectly and fades in within 200px (or whatever the default is). However I noticed if the window is opened to a smaller size, then opened to full window, the placeholder, Lazy Load has only the image loaded that was "In View" during the smaller window size. It loads once the scroll bar is moved, but

Loading a long page with multiple backgrounds based on vertical scroll value in jQuery?

巧了我就是萌 提交于 2019-12-08 08:04:25
问题 The design I've been given to work with is 960px wide by around 7000px tall, cut into five vertically-stacked segments at arbitrary points. There's a fixed-placed sidebar that scrolls to each segment, depending on which navigation link is clicked. Atop this are a bunch of sliders, transparent PNGs, headlines and paragraphs, predominantly positioned in a relative fashion. I need to ultimately do two things: Hide the corresponding quick-nav links in the sidebar until its related segment's