Applies the given umask {@link Mode} to this mode.

@param mode the mode to update
@param umask the umask to apply
@return the updated object
972301
private static Mode applyUMask(Mode mode, Mode umask) {
    mode.setOwnerBits(mode.getOwnerBits().and(umask.getOwnerBits().not()));
    mode.setGroupBits(mode.getGroupBits().and(umask.getGroupBits().not()));
    mode.setOtherBits(mode.getOtherBits().and(umask.getOtherBits().not()));
    return mode;
  }
1181629
@TargetApi(Build.VERSION_CODES.FROYO)
    public static UiModeManager getUiModeManager(Context context) {
        return (UiModeManager) context.getSystemService(Context.UI_MODE_SERVICE);
    }
809687
public void updateMode(Boolean developmode) throws SecurityException {
	checkWriteAccess();
	boolean hasAccess = ConfigWebUtil.hasAccess(config, SecurityManager.TYPE_SETTING);
	if (!hasAccess) throw new SecurityException("no access to update scope setting");

	Element mode = _getRootElement("mode");
	mode.setAttribute("develop", Caster.toString(developmode, ""));
    }
277978
public FsPermission applyUMask(FsPermission umask) {
    return new FsPermission(useraction.and(umask.useraction.not()),
        groupaction.and(umask.groupaction.not()),
        otheraction.and(umask.otheraction.not()));
  }
485242
public void setEditMode(final EditMode mode) {

        if (!m_modeSelect.getValue().equals(mode)) {
            m_modeSelect.setValue(mode);
        }
    }
268319
public LockResource get(K key, LockMode mode) {
    ValNode valNode = getValNode(key);
    ReentrantReadWriteLock lock = valNode.mValue;
    switch (mode) {
      case READ:
        return new RefCountLockResource(lock.readLock(), true, valNode.mRefCount);
      case WRITE:
        return new RefCountLockResource(lock.writeLock(), true, valNode.mRefCount);
      default:
        throw new IllegalStateException("Unknown lock mode: " + mode);
    }
  }
1349505
public alluxio.grpc.PModeOrBuilder getModeOrBuilder() {
    return mode_ == null ? alluxio.grpc.PMode.getDefaultInstance() : mode_;
  }
226932
public void setMode(long mode) throws IOException {
        setAttributes(
                new NfsSetAttributes(Long.valueOf(mode), null, null, NfsTime.DO_NOT_CHANGE, NfsTime.DO_NOT_CHANGE));
    }
183140
public static void setUMask(Configuration conf, FsPermission umask) {
    conf.set(UMASK_LABEL, String.format("%1$03o", umask.toShort()));
    conf.setInt(DEPRECATED_UMASK_LABEL, umask.toShort());
  }
1174328
@UnstableApi
    public void verify(MockedMethod method, VerificationMode mode) {
        verify((MockedVoidMethod) method::get, mode);
    }
735192
public static Reader reader(final Mode mode) {
		return new Reader(GPX.xmlReader(Version.V11), mode);
	}
948599
public void matrixMode(MatrixMode mode) {
		switch (mode) {
		case PROJECTION:
			gl.glMatrixMode(GL2.GL_PROJECTION);
			break;
		case MODELVIEW:
			gl.glMatrixMode(GL2.GL_MODELVIEW);
			break;
		default:
			break;
		}
	}
705054
public MethodHandle arrayAccess(VarHandle.AccessMode mode) {
        return invoke(MethodHandles.arrayElementVarHandle(type().parameterType(0)).toMethodHandle(mode));
    }
531490
private static void setMode(Resource file, int mode) throws ApplicationException {
	if (mode == -1 || SystemUtil.isWindows()) return;
	try {
	    file.setMode(mode);
	    // FileUtil.setMode(file,mode);
	}
	catch (IOException e) {
	    throw new ApplicationException("can't change mode of file " + file, e.getMessage());
	}
    }
1287479
def add(mode_id: str) -> list:
    

    if not has(mode_id):
        _current_modes.append(mode_id)
    return _current_modes.copy()
1310521
function mode() {
      var value = (attr.mdMode || "").trim();
      if (value) {
        switch (value) {
          case MODE_DETERMINATE:
          case MODE_INDETERMINATE:
          case MODE_BUFFER:
          case MODE_QUERY:
            break;
          default:
            value = MODE_INDETERMINATE;
            break;
        }
      }
      return value;
    }
461737
public static byte[] setMode(byte pinId, Pin.Mode mode) {
        if (mode == Pin.Mode.UNSUPPORTED) {
            throw new IllegalArgumentException("Cannot set unsupported mode to pin " + pinId);
        }
        return new byte[]{SET_PIN_MODE, pinId, (byte) mode.ordinal()};
    }