.addOnConnectionFailedListener(this) .addApi(Plus.API, Plus.PlusOptions.builder().build()) .addScope(new Scope("email"));
/** Construct a fresh scope within this scope, with same owner, * which shares its table with the outer scope. Used in connection with * method leave if scope access is stack-like in order to avoid allocation * of fresh tables. */ public Scope dup() { Scope result = new Scope(this, this.owner, this.table); shared++; // System.out.println("====> duping scope " + this.hashCode() + " owned by " + this.owner + " to " + result.hashCode()); // new Error().printStackTrace(System.out); return result; }
Scope.prototype.$new = function() { var new_scope = new Scope(); Object.setPrototypeOf(new_scope, this); return new_scope; }
private GoogleApiClient buildGoogleApiClient() { return new GoogleApiClient.Builder(this) .addConnectionCallbacks(this) .addOnConnectionFailedListener(this) .addApi(Plus.API, Plus.PlusOptions.builder().build()) .addScope(Plus.SCOPE_PLUS_LOGIN) .addScope(new Scope("email")) .build(); }
/** Construct a fresh scope within this scope, with new owner, * which shares its table with the outer scope. Used in connection with * method leave if scope access is stack-like in order to avoid allocation * of fresh tables. */ public Scope dup(Symbol newOwner) { Scope result = new Scope(this, newOwner, this.table, this.nelems); shared++; // System.out.println("====> duping scope " + this.hashCode() + " owned by " + newOwner + " to " + result.hashCode()); // new Error().printStackTrace(System.out); return result; }
/** Construct a fresh scope within this scope, with new owner, * which shares its table with the outer scope. Used in connection with * method leave if scope access is stack-like in order to avoid allocation * of fresh tables. */ public Scope dup(Symbol newOwner) { Scope result = new Scope(this, newOwner, this.table, this.nelems); shared++; // System.out.println("====> duping scope " + this.hashCode() + " owned by " + newOwner + " to " + result.hashCode()); // new Error().printStackTrace(System.out); return result; }
/** Construct a fresh scope within this scope, with new owner, * which shares its table with the outer scope. Used in connection with * method leave if scope access is stack-like in order to avoid allocation * of fresh tables. */ public Scope dup(Symbol newOwner) { Scope result = new Scope(this, newOwner, this.table); shared++; // System.out.println("====> duping scope " + this.hashCode() + " owned by " + newOwner + " to " + result.hashCode()); // new Error().printStackTrace(System.out); return result; }
/** Construct a fresh scope within this scope, with same owner, * which shares its table with the outer scope. Used in connection with * method leave if scope access is stack-like in order to avoid allocation * of fresh tables. */ public Scope dup() { Scope result = new Scope(this, this.owner, this.table); shared++; // System.out.println("====> duping scope " + this.hashCode() + " owned by " + this.owner + " to " + result.hashCode()); // new Error().printStackTrace(System.out); return result; }
googleApiClient = new GoogleApiClient.Builder(this) .addApi(Drive.API) .addScope(new Scope("https://www.googleapis.com/auth/drive")) .addConnectionCallbacks(this) .addOnConnectionFailedListener(this) .build();
/** Construct a fresh scope within this scope, with new owner, * which shares its table with the outer scope. Used in connection with * method leave if scope access is stack-like in order to avoid allocation * of fresh tables. */ public Scope dup(Symbol newOwner) { Scope result = new Scope(this, newOwner, this.table); shared++; // System.out.println("====> duping scope " + this.hashCode() + " owned by " + newOwner + " to " + result.hashCode()); // new Error().printStackTrace(System.out); return result; }
String serverClientId = getString(R.string.server_client_id); GoogleSignInOptions gso = new GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_SIGN_IN) .requestScopes(new Scope("https://www.googleapis.com/auth/user.birthday.read")) .requestServerAuthCode(serverClientId) .build(); GoogleApiClient mGoogleApiClient = new GoogleApiClient.Builder(this) .enableAutoManage(this /* FragmentActivity */, this /* OnConnectionFailedListener */) .addApi(Auth.GOOGLE_SIGN_IN_API, gso) .build();
GoogleSignInOptions gso = state.getGso(); if(gso == null){ gso = new GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_SIGN_IN) .requestScopes(new Scope("https://www.googleapis.com/auth/calendar")) .requestIdToken(getString(R.string.server_client_id)) .requestEmail() .requestServerAuthCode(getString(R.string.server_client_id), false) .requestProfile() .build(); }
String serverClientId = getString(R.string.server_client_id); GoogleSignInOptions gso = new GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_SIGN_IN) .requestScopes(new Scope(/* whatever scope you're needing */)) .requestServerAuthCode(serverClientId, false) .build();
/** Construct a fresh scope within this scope, with same owner, * with a new hash table, whose contents initially are those of * the table of its outer scope. */ public Scope dupUnshared() { return new Scope(this, this.owner, this.table.clone(), this.nelems); }
/** Construct a fresh scope within this scope, with same owner, * with a new hash table, whose contents initially are those of * the table of its outer scope. */ public Scope dupUnshared() { return new Scope(this, this.owner, this.table.clone()); }
/** Construct a fresh scope within this scope, with same owner, * with a new hash table, whose contents initially are those of * the table of its outer scope. */ public Scope dupUnshared() { return new Scope(this, this.owner, this.table.clone()); }
/** Construct a fresh scope within this scope, with same owner, * with a new hash table, whose contents initially are those of * the table of its outer scope. */ public Scope dupUnshared() { return new Scope(this, this.owner, this.table.clone(), this.nelems); }
Scope scope = new Scope(); scope.set("x", 4); scope.set("y", 2); // remember I stored the function f on the object g, just to make a distinction // also, note this is equivalent to g.getNode().eval(scope), because the function stored in g is not a built-in! System.out.println(g.eval(scope));
@Override protected Symbol lookup(Env<AttrContext> env, MethodResolutionPhase phase) { Scope sc = new Scope(syms.arrayClass); MethodSymbol arrayConstr = new MethodSymbol(PUBLIC, name, null, site.tsym); arrayConstr.type = new MethodType(List.<Type>of(syms.intType), site, List.<Type>nil(), syms.methodClass); sc.enter(arrayConstr); return findMethodInScope(env, site, name, argtypes, typeargtypes, sc, methodNotFound, phase.isBoxingRequired(), phase.isVarargsRequired(), false, false); }
@Override protected Symbol lookup(Env<AttrContext> env, MethodResolutionPhase phase) { Scope sc = new Scope(syms.arrayClass); MethodSymbol arrayConstr = new MethodSymbol(PUBLIC, name, null, site.tsym); arrayConstr.type = new MethodType(List.<Type>of(syms.intType), site, List.<Type>nil(), syms.methodClass); sc.enter(arrayConstr); return findMethodInScope(env, site, name, argtypes, typeargtypes, sc, methodNotFound, phase.isBoxingRequired(), phase.isVarargsRequired(), false, false); }