changed to public by Udi
177410
public List<Triangle> findTriangleNeighborhood(Triangle firstTriangle, Vector3 point) {
		List<Triangle> triangles = new ArrayList<Triangle>(30);
		triangles.add(firstTriangle);

		Triangle prevTriangle = null;
		Triangle currentTriangle = firstTriangle;
		Triangle nextTriangle = currentTriangle.nextNeighbor(point, prevTriangle);

		while (!nextTriangle.equals(firstTriangle)) {
			//the point is on the perimeter
			if(nextTriangle.isHalfplane()) {
				return null;
			}

			triangles.add(nextTriangle);
			prevTriangle = currentTriangle;
			currentTriangle = nextTriangle;
			nextTriangle = currentTriangle.nextNeighbor(point, prevTriangle);
		}

		return triangles;
	}
392100
private static boolean isPeerChanged(Change change, ChangedIssue issue) {
    Optional<User> assignee = issue.getAssignee();
    return !assignee.isPresent() || !change.isAuthorLogin(assignee.get().getLogin());
  }
319763
private void onPublicKeysGroupRemoved(int uid, int keyGroupId) {
        UserKeys userKeys = getCachedUserKeys(uid);
        if (userKeys == null) {
            return;
        }

        UserKeys updatedUserKeys = userKeys.removeUserKeyGroup(keyGroupId);
        cacheUserKeys(updatedUserKeys);
        context().getEncryption().getEncryptedChatManager(uid)
                .send(new EncryptedPeerActor.KeyGroupUpdated(userKeys));
    }
592902
function (visibilityState) {
    for (const guestInstanceId in guestInstances) {
      const guestInstance = guestInstances[guestInstanceId]
      guestInstance.visibilityState = visibilityState
      if (guestInstance.embedder === embedder) {
        guestInstance.guest._sendInternal('ELECTRON_GUEST_INSTANCE_VISIBILITY_CHANGE', visibilityState)
      }
    }
  }
83274
function updateSigninStatus(isSignedIn) {

        if (isSignedIn) {
            //$("#signInButton").hide();

            var user = gapi.auth2.getAuthInstance().currentUser.get();
            var profile = user.getBasicProfile();
            var username = profile.getName();
            $("#switchUserLink").html("Logged in as: " + username);

        }

    }
855534
def workspace_state_changed(ob, event):
    
    workspace = event.object
    roles = ['Guest', ]
    if event.new_state.id == 'open':
        api.group.grant_roles(
            groupname=INTRANET_USERS_GROUP_ID,
            obj=workspace,
            roles=roles,
        )
        workspace.reindexObjectSecurity()
    elif event.old_state.id == 'open':
        api.group.revoke_roles(
            groupname=INTRANET_USERS_GROUP_ID,
            obj=workspace,
            roles=roles,
        )
        workspace.reindexObjectSecurity()
1286205
def switch(self, idx, u):
        """"""
        self.u[self.uid[idx]] = u
        self.rebuild = True
        self.system.dae.factorize = True
        logger.debug('<Line> Status switch to {} on idx {}.'.format(u, idx))
32058
function (isPublic, name, data, ttl, published_at, coreid) {
        var rawFn = function (msg) {
            try {
                msg.setMaxAge(parseInt((ttl && (ttl >= 0)) ? ttl : 60));
                if (published_at) {
                    msg.setTimestamp(moment(published_at).toDate());
                }
            }
            catch (ex) {
                logger.error("onCoreHeard - " + ex);
            }
            return msg;
        };

        var msgName = (isPublic) ? "PublicEvent" : "PrivateEvent";
        var userID = (this.userID || "").toLowerCase() + "/";
        name = (name) ? name.toString() : name;
        if (name && name.indexOf && (name.indexOf(userID) == 0)) {
            name = name.substring(userID.length);
        }

        data = (data) ? data.toString() : data;
        this.sendNONTypeMessage(msgName, { event_name: name, _raw: rawFn }, data);
    }
388555
def _change_kind(self, post_uid):
        '''
        
        '''

        post_data = self.get_post_data()

        logger.info('admin post update: {0}'.format(post_data))

        MPost.update_misc(post_uid, kind=post_data['kcat'])
        # self.update_category(post_uid)

        update_category(post_uid, post_data)
        self.redirect('/{0}/{1}'.format(router_post[post_data['kcat']], post_uid))
1097508
def _public(self, command, **params):
        """"""
        params['command'] = command
        response = self.session.get(self._public_url, params=params)
        return response
818503
private void updateViewDefaultTemplateWhenGovernanceIsNotInstalled(DbSession dbSession, PermissionTemplateDto template, DefaultTemplates defaultTemplates) {
    String viewDefaultTemplateUuid = defaultTemplates.getApplicationsUuid();
    if (viewDefaultTemplateUuid != null && viewDefaultTemplateUuid.equals(template.getUuid())) {
      defaultTemplates.setApplicationsUuid(null);
      dbClient.organizationDao().setDefaultTemplates(dbSession, template.getOrganizationUuid(), defaultTemplates);
    }
  }
902002
def _setPrivate(self, private):
        """"""
        self.private = private
        self.public = pow(self.generator, self.private, self.modulus)
1244174
function make_private() {
  return {
    stats: {
      start: Date.now(),
      act: {
        calls: 0,
        done: 0,
        fails: 0,
        cache: 0
      },
      actmap: {}
    },
    actdef: {},
    transport: {
      register: []
    },
    plugins: {},
    ignore_plugins: {}
  }
}
571143
def changePermission( dbid, uname, view, modify, create, delete, saveviews, admin )

      raise "changePermission: API_ChangePermission is no longer a valid QuickBase HTTP API request."

      @dbid, @uname, @view, @modify, @create, @delete, @saveviews, @admin = dbid, uname, view, modify, create, delete, saveviews, admin

      xmlRequestData = toXML( :dbid, @dbid )
      xmlRequestData << toXML( :uname, @uname )

      viewModifyPermissions = %w{ none any own group }

      if @view
         if viewModifyPermissions.include?( @view )
            xmlRequestData << toXML( :view, @view )
         else
            raise "changePermission: view must be one of " + viewModifyPermissions.join( "," )
         end
      end

      if @modify
         if viewModifyPermissions.include?( @modify )
            xmlRequestData << toXML( :modify, @modify )
         else
            raise "changePermission: modify must be one of " + viewModifyPermissions.join( "," )
         end
      end

      xmlRequestData << toXML( :create, @create ) if @create
      xmlRequestData << toXML( :delete, @delete ) if @delete
      xmlRequestData << toXML( :saveviews, @saveviews ) if @saveviews
      xmlRequestData << toXML( :admin, @admin ) if @admin

      sendRequest( :changePermission, xmlRequestData )

      # not sure the API reference is correct about these return values
      @username = getResponseValue( :username )
      @view = getResponseValue( :view )
      @modify =  getResponseValue( :modify )
      @create =  getResponseValue( :create )
      @delete = getResponseValue( :delete )
      @saveviews = getResponseValue( :saveviews )
      @admin = getResponseValue( :admin )

      @rolename = getResponseValue( :rolename )

      return self if @chainAPIcalls
      return @username, @view, @modify, @create, @delete, @saveviews, @admin, @rolename
    end
38676
private void makeAccessible(List<AccessibleObject> nonPublicAccessibleObjects) {

    if (nonPublicAccessibleObjects.size() > 0) {
      final AccessibleObject[] nonPublicAccessibles = new AccessibleObject[nonPublicAccessibleObjects.size()];
      nonPublicAccessibleObjects.toArray(nonPublicAccessibles);
      // enable reflective access that violates visibility - this will
      // fail if disallowed by security-manager.
      AccessController.doPrivileged(new PrivilegedAction<Object>() {

        @Override
        public Object run() {

          AccessibleObject.setAccessible(nonPublicAccessibles, true);
          return null;
        }
      });
    }
  }
986473
def set_public_lan(lan_id):
    '''
    
    '''
    conn = get_conn()
    datacenter_id = get_datacenter_id()

    try:
        lan = conn.get_lan(datacenter_id=datacenter_id, lan_id=lan_id)
        if not lan['properties']['public']:
            conn.update_lan(datacenter_id=datacenter_id,
                            lan_id=lan_id,
                            public=True)
        return lan['id']
    except Exception:
        lan = conn.create_lan(datacenter_id,
                              LAN(public=True,
                                  name='Public LAN'))
        return lan['id']
1271245
function onUnlinkProvider() {
  var providerId = $('#unlinked-provider-id').val();
  activeUser().unlink(providerId).then(function(user) {
    alertSuccess('Provider unlinked from user.');
    refreshUserData();
  }, onAuthError);
}