components

Angular 2 : what make a service to be “Outside” angular zone?

主宰稳场 提交于 2019-12-02 16:45:26
问题 After having same issues as many people on StackOverflow i didn't manage to understand what is an "Outside angular zone" Service ? I've checks all existing questions around this subject, and it's exactly why i needer to ask this one : https://github.com/angular/angular/issues/5150 Angular2: view is not updated from inside a subscription https://blog.thoughtram.io/angular/2016/02/22/angular-2-change-detection-explained.html http://blog.assaf.co/angular-2-change-detection-zones-and-an-example/

Install Bower components into two different directories?

橙三吉。 提交于 2019-12-02 15:52:01
When using CSS and JS components, is it possible, or even, does it make sense to install them to different directories? . |-- app |-- scripts |-- components # js components go here |-- backbone-amd |-- etc |-- styles |-- modules |-- partials |-- components # sass components go here |-- normalize.scss |-- etc What's the most efficient way to structure a project organized as such? Is there a good Grunt task to accomplish the goal of integrating bower installed sass components for a development environment? Bower needs to keep track of every component you install. That would be very hard if they

A way to render multiple root elements on VueJS with v-for directive

与世无争的帅哥 提交于 2019-12-02 13:25:02
问题 Right now, I'm trying to make a website that shows recent news posts which is supplied my NodeJS API. I've tried the following: HTML <div id="news" class="media" v-for="item in posts"> <div> <h4 class="media-heading">{{item.title}}</h4> <p>{{item.msg}}</p> </div> </div> Javascript const news = new Vue({ el: '#news', data: { posts: [ {title: 'My First News post', msg: 'This is your fist news!'}, {title: 'Cakes are great food', msg: 'Yummy Yummy Yummy'}, {title: 'How to learnVueJS', msg: 'Start

Cast jzy3d.canvas to awt.component

痞子三分冷 提交于 2019-12-02 11:57:26
I need cast the jzy3d canvas to java.awt.component, I want to display the chart in my frame with JCombobox and button but when I want to cast canvas to component, the program was dropped. Thank you for your answers. I have try this and don't help me. Exception in thread "AWT-EventQueue-0" java.lang.ClassCastException: org.jzy3d.plot3d.rendering.canvas.VoidCanvas cannot be cast to java.awt.Component at cz.bia.Launcher.lambda$setComponents$0(Launcher.java:63) at java.awt.Button.processActionEvent(Button.java:409) at java.awt.Button.processEvent(Button.java:377) Launcher.java: package cz.bia;

Angular 2 : what make a service to be “Outside” angular zone?

风格不统一 提交于 2019-12-02 10:20:17
After having same issues as many people on StackOverflow i didn't manage to understand what is an "Outside angular zone" Service ? I've checks all existing questions around this subject, and it's exactly why i needer to ask this one : https://github.com/angular/angular/issues/5150 Angular2: view is not updated from inside a subscription https://blog.thoughtram.io/angular/2016/02/22/angular-2-change-detection-explained.html http://blog.assaf.co/angular-2-change-detection-zones-and-an-example/ Code Example in any component with default ChangeDetectionStrategy : (considering this.value referenced

Swing GUI doesn't update during data processing

允我心安 提交于 2019-12-02 09:28:22
I'm having a problem where my Swing GUI components aren't updating for me while the program is busy. I'm creating an image editor and while heavy processing is happening, I try to change a "status" label while its working to give the user an idea of whats going on. The label won't update until after the processing is finished though. How can I update the label IMMEDIATELY instead of having to wait? My labels are all on a JPanel by the way. My label isn't set until after the for loop and the following method finishes. labelStatus.setText("Converting RGB data to base 36..."); for (int i = 0; i <

Get a sub property of a component in Delphi using RTTI

前提是你 提交于 2019-12-02 09:09:39
问题 I would like to access the following property using RTTI MyComponent1.Property['variable'].SubProperty I would like something like that: var Ctx: TRttiContext; Typ: TRttiType; SubTyp: TRttiType; Prop: TRttiProperty; SubProp: TRttiProperty; begin Ctx:= TRttiContext.Create; Typ:= Ctx.GetType(MyComponent1.ClassInfo); Prop:= Typ.GetProperty('Property['variable'].Subproperty') //not possible Prop.SetValue(MyComponent1.Property['variable'],'500'); end; Basically I want to access a subproperty of my

CakePHP PaginationRecallComponent, Strict (2048): Declaration of PaginationRecallComponent::initialize()

假装没事ソ 提交于 2019-12-02 08:41:15
问题 I have tried to insert PaginationRecallComponent (http://bakery.cakephp.org/articles/Zaphod/2012/03/27/paginationrecall_for_cakephp_2_x), in App -> Controller -> Component -> PaginationRecallComponent.php UserController: public $components = array('PaginationRecall'); Why I received the following error: Strict (2048): Declaration of PaginationRecallComponent::initialize() should be compatible with Component::initialize(Controller $controller) [APP/Controller/Component

Conditionally displaying JSF components

跟風遠走 提交于 2019-12-02 08:07:41
First, I am new to Java EE, came from a strong ASP .NET development background. I have gone through the net, and I might miss this but it seems like there is no simple and straight-to-the-point tutorials on how I could connect backing bean class to a JSF components. A good example is like this, currently I am trying to create a JSF page where there is a set of links as menu bar and a set of forms. What I am planning to do is, when clicking a link, a particular form will be rendered. In ASP.NET, I could easily retrieve the element and then set the attribute to be displayable. I am wondering if

Knockout components or templates performance gains

↘锁芯ラ 提交于 2019-12-02 07:50:27
I have an observable array. For every array element I generate some html form, very extended, as the observable array items are large objects with observables in turn: var records = ko.observableArray([ { p1: ko.observable("initProp1"), p2: ko.observable("initProp2"), // and so on pN: ko.observable("initPropN") }, //... ]); The html can be large, complex and dynamic, changing on the basis of some of the properties themselves: to achieve this I make use of ko:if bindings, which are known to be expensive computationally speaking ( http://www.knockmeout.net/2012/03/knockoutjs-performance-gotcha