**************** private ****************
347503
def query_options(query, options)
      query.ancestor(options[:ancestor]) if options[:ancestor]
      query.cursor(options[:cursor]) if options[:cursor]
      query.limit(options[:limit]) if options[:limit]
      query_sort(query, options)
      query.select(*options[:select]) if options[:select]
      query.distinct_on(*options[:distinct_on]) if options[:distinct_on]
      query_property_filter(query, options)
    end
139217
def private_config_content(self):
        

        config_file = self.private_config_file
        if config_file is None:
            return None

        try:
            with open(config_file, "rb") as f:
                return f.read().decode("utf-8", errors="replace")
        except OSError as e:
            raise IOUError("Can't read private-config file '{}': {}".format(config_file, e))
1020446
public void setPrivateIpAddresses(java.util.Collection<PrivateIpAddressDetails> privateIpAddresses) {
        if (privateIpAddresses == null) {
            this.privateIpAddresses = null;
            return;
        }

        this.privateIpAddresses = new java.util.ArrayList<PrivateIpAddressDetails>(privateIpAddresses);
    }
76281
def reply_privately(*strings)
      private_source = source.clone
      private_source.private_message!
      @robot.send_messages(private_source, *strings)
    end
745205
def relative_private_config_file(self):
        

        path = os.path.join(self.working_dir, 'private-config.cfg')
        if os.path.exists(path):
            return 'private-config.cfg'
        else:
            return None
1076861
def files_set_public_or_private(self, request, set_public, files_queryset, folders_queryset):
        

        if not self.has_change_permission(request):
            raise PermissionDenied

        if request.method != 'POST':
            return None

        check_files_edit_permissions(request, files_queryset)
        check_folder_edit_permissions(request, folders_queryset)

        # We define it like that so that we can modify it inside the set_files
        # function
        files_count = [0]

        def set_files(files):
            for f in files:
                if f.is_public != set_public:
                    f.is_public = set_public
                    f.save()
                    files_count[0] += 1

        def set_folders(folders):
            for f in folders:
                set_files(f.files)
                set_folders(f.children.all())

        set_files(files_queryset)
        set_folders(folders_queryset)

        if set_public:
            self.message_user(request, _("Successfully disabled permissions for %(count)d files.") % {
                "count": files_count[0],
            })
        else:
            self.message_user(request, _("Successfully enabled permissions for %(count)d files.") % {
                "count": files_count[0],
            })

        return None
30930
function privateBrowsing_stop(useShortcut)
  {
    if (!this.enabled)
      return;

    if (useShortcut) {
      var privateBrowsingCmdKey = utils.getEntity(this.getDtds(), "privateBrowsingCmd.commandkey");
      this._controller.keypress(null, privateBrowsingCmdKey, {accelKey: true, shiftKey: true});
    } else {
      this._controller.click(this._pbMenuItem);
    }

    this.waitForTransistionComplete(false);
  }
1000152
function() {
      var properties = {
        normal: [],
        relational: [],
        derived: []
      };
      var privateProps = this._private || {};
      var relations = _.result(this, 'relations') || {};
      var derived = _.result(this, 'derived') || {};

      var isEditable = function(value) {
        if (!_.isObject(value)) {
          return true;
        } else if (_.isArray(value)) {
          var result = true;
          _.each(value, function(i) {
            result = result && isEditable(i);
          });
          return result;
        } else {
          try {
            JSON.stringify(value);
            return true;
          } catch (ex) {
            return false;
          }
        }
      };

      _.each(this.attributes, function(value, key) {
        if (privateProps[key]) {
          return;
        }
        var prop;
        if (relations && relations[key]) {
          properties.relational.push({
            key: key,
            data: {
              isRelation: true,
              name: value.getDebugName()
            }
          });
        } else if (derived && derived[key]) {
          properties.derived.push({
            key: key,
            data: {
              isDerived: derived[key],
              value: value,
              displayValue: isEditable(value) ? JSON.stringify(value) : Object.prototype.toString.call(value)
            }
          });
        } else {
          prop = {
            key: key,
            data: {
              isEditable: isEditable(value),
              isEditing: false,
              isRemovable: true,
              value: value
            }
          };

          prop.data.displayValue = prop.data.isEditable ? JSON.stringify(value) : Object.prototype.toString.call(value);
          properties.normal.push(prop);
        }
      });

      properties.normal = _.sortBy(properties.normal, 'key');
      properties.relational = _.sortBy(properties.relational, 'key');
      properties.derived = _.sortBy(properties.derived, 'key');

      return properties;
    }
221318
def is_private(ip):
    
    if matches_prefix(ip, '10.0.0.0/8'):
        return True
    if matches_prefix(ip, '172.16.0.0/12'):
        return True
    if matches_prefix(ip, '192.168.0.0/16'):
        return True
    return False
1315080
private static void parseList(XmlPullParser parser, Privacy privacy) throws XmlPullParserException, IOException {
        boolean done = false;
        String listName = parser.getAttributeValue("", "name");
        ArrayList<PrivacyItem> items = new ArrayList<>();
        while (!done) {
            int eventType = parser.next();
            if (eventType == XmlPullParser.START_TAG) {
                if (parser.getName().equals("item")) {
                    // CHECKSTYLE:OFF
                    items.add(parseItem(parser));
                    // CHECKSTYLE:ON
                }
            }
            else if (eventType == XmlPullParser.END_TAG) {
                if (parser.getName().equals("list")) {
                    done = true;
                }
            }
        }

        privacy.setPrivacyList(listName, items);
    // CHECKSTYLE:OFF
    }
217864
def private_messenger():
    
    while __websocket_server_running__:
        pipein = open(PRIVATE_PIPE, 'r')
        line = pipein.readline().replace('\n', '').replace('\r', '')
        if line != '':
            message = json.loads(line)
            WebSocketHandler.send_private_message(user_id=message['user_id'],
                                                  message=message)
            print line
            
            remaining_lines = pipein.read()
            pipein.close()
            pipeout = open(PRIVATE_PIPE, 'w')
            pipeout.write(remaining_lines)
            pipeout.close()
        else:
            pipein.close()
        
        time.sleep(0.05)
424866
def is_private(self):
        
        self.switch_to()
        with self.selenium.context(self.selenium.CONTEXT_CHROME):
            return self.selenium.execute_script(
                """
                Components.utils.import("resource://gre/modules/PrivateBrowsingUtils.jsm");

                let chromeWindow = arguments[0].ownerDocument.defaultView;
                return PrivateBrowsingUtils.isWindowPrivate(chromeWindow);
                """,
                self.document_element,
            )
439548
public function unmarkReadOnly(): void
    {
        $this->readOnly = false;

        /** @var Config $value */
        foreach ($this->data as $value) {
            if ($value instanceof self) {
                $value->unmarkReadOnly();
            }
        }
    }
550758
public static Matcher isPrivate() {
    return new Matcher() {
      @Override public boolean matches(Node node, NodeMetadata metadata) {
        JSDocInfo jsDoc = NodeUtil.getBestJSDocInfo(node);
        if (jsDoc != null) {
          return jsDoc.getVisibility() == Visibility.PRIVATE;
        }
        return false;
      }
    };
  }
1190165
def is_private(self, key, sources):
        """"""
        # aliases are always public.
        if key == ENTRY.ALIAS:
            return False
        return all([
            SOURCE.PRIVATE in self.get_source_by_alias(x)
            for x in sources.split(',')
        ])
1026506
public function init() {

		parent::init();

		// Permission
		$this->crudPermission = CoreGlobal::PERM_USER;

		// Config
		$this->baseUrl	= '/user';
		$this->apixBase	= 'core/user';

		// Services
		$this->modelService = Yii::$app->factory->get( 'userService' );

		$this->optionService = Yii::$app->factory->get( 'optionService' );

		$this->countryService		= Yii::$app->factory->get( 'countryService' );
		$this->provinceService		= Yii::$app->factory->get( 'provinceService' );
		$this->regionService		= Yii::$app->factory->get( 'regionService' );
		$this->addressService		= Yii::$app->factory->get( 'addressService' );
		$this->modelAddressService	= Yii::$app->factory->get( 'modelAddressService' );
	}
1103648
public function isPrivate(): bool
    {
        if ($this->is_private !== null) {
            return $this->is_private;
        }

        $this->is_private = false;
        foreach (static::$private_ranges as $range) {
            if ($this->isIn($range)) {
                $this->is_private = true;
                break;
            }
        }

        return $this->is_private;
    }