This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var country = model.profile().location.country.toString(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var country = null; | |
if (typeof model !== 'undefined' && model && typeof model.profile === 'function') { | |
var profile = model.profile(); | |
if (profile && profile.location && profile.location.country) { | |
country = profile.location.country.toString(); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
country = model?.profile?()?.location?.country?.toString() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
OAuth = require('oauth').OAuth | |
_ = require 'underscore' | |
class LinkedInClient | |
@baseUrl: 'https://api.linkedin.com' | |
@requestTokenUrl: "#{@baseUrl}/uas/oauth/requestToken" | |
@accessTokenUrl: "#{@baseUrl}/uas/oauth/accessToken" | |
@authorizeUrl: "#{@baseUrl}/uas/oauth/authorize" | |
@profileFields: ['id', 'headline', 'first-name', 'last-name', 'public-profile-url', 'picture-url', 'educations', 'positions', 'email-address'] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
LinkedInClient = require('./LinkedInClient').LinkedInClient | |
_ = require 'underscore' | |
url = require 'url' | |
exports.linkedinAuth = (apiKey, apiSecret, baseUrl, secureUrls) -> | |
(req, res, next) -> | |
req.session.tokens ?= {} | |
req.linkedInClient = new LinkedInClient {apiKey: apiKey, apiSecret: apiSecret}, req.session.tokens | |
handleError = (error) -> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
325209.429: [GC 325209.429: [ParNew | |
Desired survivor size 4128768 bytes, new threshold 2 (max 2) | |
- age 1: 1812544 bytes, 1812544 total | |
- age 2: 305568 bytes, 2118112 total | |
: 1034582K->2103K(1040512K), 0.0116910 secs] | |
2598263K->1565814K(3137664K), 0.0118312 secs] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{Time since VM started, in seconds}: [GC {Time since VM started}: [{GC type} | |
Desired survivor size {size of one survivor space} bytes, new threshold {y} (max {x}) <- how many collections objects can stay in the young gen. More on this later | |
- age 1: {a} bytes, {a} total <- How many objects have survived one collection. Next collection, any surviving objects will appear in age 2 | |
- age 2: {b} bytes, {a+b} total | |
: {pre-collection young gen[5] usage}K->{post-collection young gen usage}K({Total young gen size}K), {young gen time} secs] | |
{pre-collection heap size}K->{post-collection heap size}K({total heap size}K), {total collection time} secs] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
294989.748: [GC | |
[1 CMS-initial-mark: 1782676K(2097152K)] 1784501K(3137664K), 0.0067714 secs] | |
295047.329: [Rescan (parallel) , 0.2497803 secs] | |
295047.579: [weak refs processing, 0.1272999 secs] | |
[1 CMS-remark: 1782929K(2097152K)] 2303079K(3137664K), 0.3816787 secs] | |
295049.065: [CMS-concurrent-reset: 0.019/0.019 secs] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{Time since VM started, in seconds}: [GC | |
[1 CMS-initial-mark: {estimated old gen usage}K({total old gen size}K)] {estimated heap usage}K({total heap size}K), {pause time} secs] | |
{Time since VM started, in seconds}: [Rescan (parallel) , {pause time} secs] | |
{Time since VM started, in seconds}: [weak refs processing, {pause time} secs] | |
[1 CMS-remark: {old gen usage}K({total old gen size}K)] {heap usage}K({total heap size}K), {pause time} secs] | |
{Time since VM started, in seconds}: [CMS-concurrent-reset: 0.019/0.019 secs] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class AsyncTest extends Controller | |
{ | |
public static void continuation() | |
{ | |
F.Promise<WS.HttpResponse> remoteCall1 = WS.url("http://www.remote-service.com/data/1").getAsync(); | |
F.Promise<WS.HttpResponse> remoteCall2 = WS.url("http://www.remote-service.com/data/2").getAsync(); | |
F.Promise<WS.HttpResponse> remoteCall3 = WS.url("http://www.remote-service.com/data/3").getAsync(); | |
F.Promise<List<WS.HttpResponse>> promises = F.Promise.waitAll(remoteCall1, remoteCall2, remoteCall3); |