This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| export class FetchPosts { | |
| static readonly type = '[Posts] Fetch Post'; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { HttpClient, HttpHeaders } from '@angular/common/http'; | |
| import { Action, Selector, State, StateContext } from '@ngxs/store'; | |
| import { FetchPosts } from './post.actions'; | |
| export interface PostStateModel { | |
| posts: Post[]; | |
| loading: boolean; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <div class="middleDiv"> | |
| <p> | |
| <button (click)='addOneToCount()'>Increment</button> | |
| <button (click)='subtractOneFromCount()'>Decrement</button> | |
| </p> | |
| <div class="slidingVertical">{{state.count}}</div> | |
| </div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { ChangeDetectorRef, Component, OnDestroy, OnInit } from '@angular/core'; | |
| import { Select, Store } from '@ngxs/store'; | |
| import { Observable } from 'rxjs/Observable'; | |
| import { Subscription } from 'rxjs/Subscription'; | |
| import { DecrementCount, IncrementCount } from './home.actions'; | |
| import { HomeState, HomeStateModel } from './home.store'; | |
| // tslint:disable-next-line:import-blacklist |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { Action, State, StateContext } from '@ngxs/store'; | |
| import { DecrementCount, IncrementCount } from './home.actions'; | |
| //step 1 | |
| export interface HomeStateModel { | |
| count: number; | |
| } | |
| //step 2 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| export class IncrementCount { | |
| static readonly type = '[Home] Increment Count'; | |
| } | |
| export class DecrementCount { | |
| static readonly type = '[Home] Decrement Count'; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Your init script | |
| # | |
| # Atom will evaluate this file each time a new window is opened. It is run | |
| # after packages are loaded/activated and after the previous editor state | |
| # has been restored. | |
| # | |
| # An example hack to log to the console when each text editor is saved. | |
| # | |
| # atom.workspace.observeTextEditors (editor) -> | |
| # editor.onDidSave -> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public static void CallWaiting(Action fn, int retryAttempts = 100, int threadSleepValue = 1000) | |
| { | |
| // We will try to call the function up to 100 times... | |
| int j = 0; | |
| for (int i = 0; i < retryAttempts; ++i) | |
| { | |
| j = i; | |
| try | |
| { | |
| // We call the function passed in and return the result... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?xml version="1.0" encoding="utf-8" ?> | |
| <hibernate-configuration xmlns="urn:nhibernate-configuration-2.2"> | |
| <session-factory> | |
| <property name="connection.provider">NHibernate.Connection.DriverConnectionProvider</property> | |
| <property name="dialect">NHibernate.Dialect.MsSqlCeDialect</property> | |
| <property name="connection.driver_class">NHibernate.Driver.SqlServerCeDriver</property> | |
| <property name="connection.connection_string">Data Source=FirstSample.sdf</property> | |
| </session-factory> | |
| </hibernate-configuration> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <Target Name="MakeWebConfig"> | |
| <ItemGroup> | |
| <Namespaces Include="Mynamespace"> | |
| <Prefix>x</Prefix> | |
| <Uri>urn:nhibernate-configuration-2.2</Uri> | |
| </Namespaces> | |
| </ItemGroup> | |
| <MSBuild.ExtensionPack.Xml.XmlFile | |
| TaskAction="UpdateElement" | |
| File="%(BuildArtifactsDirWebConfig.FullPath)" |