Bootstraps a lovefield binary such that is runnable in nodejs.
@param {string} lovefieldBinary The aboslute path of the binary file.
8480
function bootstrap(lovefieldBinary) {
  // Setting "window" to be Node's global context.
  global.window = global;

  // Setting "self" to be Node's global context. This must be placed after
  // global.window.
  global.self = global;

  // Setting "document" to a dummy object, even though it is not actually used,
  // because it results in a runtime error when using lovefield.min.js.
  global.document = {};

  vmMod.runInThisContext(fsMod.readFileSync(lovefieldBinary), lovefieldBinary);
}
558558
def retrbinary(cmd, blocksize, rest_offset = nil) # :yield: data
      synchronize do
	with_binary(true) do
          conn = transfercmd(cmd, rest_offset)
          loop do
            data = conn.read(blocksize)
            break if data == nil
            yield(data)
          end
          conn.close
          voidresp
        end
      end
    end
334494
function write_binary_type(out, opts) {
	switch(opts.type) {
		case "string":
		case "base64":
		case "binary":
			var bstr = "";
			// $FlowIgnore
			for(var i = 0; i < out.length; ++i) bstr += String.fromCharCode(out[i]);
			return opts.type == 'base64' ? Base64.encode(bstr) : opts.type == 'string' ? utf8read(bstr) : bstr;
		case "file": return write_dl(opts.file, out);
		case "buffer": return out;
		default: throw new Error("Unrecognized type " + opts.type);
	}
}
172964
async function resolveBinary(binaryName) {
  let nodeModulesPath = `./node_modules/.bin/${binaryName}`;
  if (await exists(nodeModulesPath)) {
    return nodeModulesPath;
  } else {
    try {
      await exec(`which ${binaryName}`);
      return binaryName;
    } catch (e) {
      console.log(`${binaryName} binary not found on the PATH or in node_modules.`);
      let rl = readline.createInterface(process.stdin, process.stdout);
      let answer = await rl.question(`Run "npm install -g ${binaryName}"? [Y/n] `);
      rl.close();
      if (answer.toLowerCase().startsWith('n')) {
        throw new CLIError(`${binaryName} must be installed.`);
      }
      console.log(`Installing ${binaryName} globally...`);
      await execLive(`npm install -g ${binaryName}`);
      console.log(`Successfully installed ${binaryName}\n`);
      return binaryName;
    }
  }
}
810344
func CreateBinary(in interface{}) BinaryJSON {
	typeCode, buf, err := appendBinary(nil, in)
	if err != nil {
		panic(err)
	}
	return BinaryJSON{TypeCode: typeCode, Value: buf}
}
167927
function extractBinaryFields(target, spec, data) {
  var offset = 0;

  for (var x = 0; x < spec.length; x++) {
    var item = spec[x];
    if (item.label) {
      if (item.type === 'string') {
        var bytes = new DataView(data.buffer, offset, item.size);
        var str = textDecoder.decode(bytes);
        target[item.label] = str.replace(/\0/g, '');
      } else {
        target[item.label] = data['get' + item.type + (item.size * 8)](offset);
      }
    }
    offset += item.size;
  }

  return offset;
}
309238
function(callback) {
  // Define nodes to bootstrap from
  var nodes = [
    { maintainer: 'Impyy',
      address: '178.62.250.138',
      port: 33445,
      key: '788236D34978D1D5BD822F0A5BEBD2C53C64CC31CD3149350EE27D4D9A2F9B6B' },
    { maintainer: 'sonOfRa',
      address: '144.76.60.215',
      port: 33445,
      key: '04119E835DF3E78BACF0F84235B300546AF8B936F035185E2A8E9E0A67C8924F' }
  ];

  async.mapAsync(nodes, function(node, cb) {
    tox.bootstrapFromAddressAsync(node.address, node.port, node.key).then(function() {
      console.log('Successfully bootstrapped from ' + node.maintainer + ' at ' + node.address + ':' + node.port);
      console.log('... with key ' + node.key);
      cb();
    }).catch(function(err) {
      console.error('Error bootstrapping from ' + node.maintainer + ':', err);
      cb(err);
    });
  }).then(function() {
    // Once all nodes have been bootstrapped from, call our callback
    callback();
  });
}
760568
def putbinaryfile(localfile, remotefile = File.basename(localfile),
		      blocksize = DEFAULT_BLOCKSIZE, &block) # :yield: data
      if @resume
        begin
          rest_offset = size(remotefile)
        rescue Net::FTPPermError
          rest_offset = nil
        end
      else
	rest_offset = nil
      end
      f = open(localfile)
      begin
	f.binmode
	storbinary("STOR " + remotefile, f, blocksize, rest_offset, &block)
      ensure
	f.close
      end
    end
502972
async function bootTymly (options, messages) {
  const loadedComponents = loadComponents(
    options,
    messages
  )

  preBootTymlyRefResolution(
    loadedComponents,
    messages
  )

  const parsedServices = parseServices(
    loadedComponents,
    messages
  )

  const bootedServices = await bootServices(
    parsedServices,
    loadedComponents,
    options,
    messages
  )

  await postBootTymlyRefResolution(
    loadedComponents,
    bootedServices,
    messages
  )

  return bootedServices
}
753681
public static JavaRDD<LabeledPoint> fromBinary(JavaRDD<Tuple2<String, PortableDataStream>> binaryFiles,
                    final RecordReader reader) {
        return fromBinary(JavaPairRDD.fromJavaRDD(binaryFiles), reader);
    }
1008386
function compileReleaseAppBootstrap(options) {
    if (!(options.all || options.app)) {
        return Promise.resolve();
    }
    return new Promise((resolve, reject) => {
        const filePath = setupConfig('tsconfig.release.bootstrap');
        console.log('  app module compiling... ' + 'config.ts');
        console.log('  app module compiling... ' + 'index.ts');
        command.exec('tsc', '-p ./tsconfig.release.bootstrap.json')
        .then(() => {
            fs.removeSync(filePath);
            resolve();
        })
        .catch((reason) => {
            reject(reason);
        });
    });
}
1287654
function checkAndDownloadBinary() {
  if (process.env.SKIP_SASS_BINARY_DOWNLOAD_FOR_CI) {
    console.log('Skipping downloading binaries on CI builds');
    return;
  }

  var cachedBinary = sass.getCachedBinary(),
    cachePath = sass.getBinaryCachePath(),
    binaryPath = sass.getBinaryPath();

  if (sass.hasBinary(binaryPath)) {
    console.log('node-sass build', 'Binary found at', binaryPath);
    return;
  }

  try {
    mkdir.sync(path.dirname(binaryPath));
  } catch (err) {
    console.error('Unable to save binary', path.dirname(binaryPath), ':', err);
    return;
  }

  if (cachedBinary) {
    console.log('Cached binary found at', cachedBinary);
    fs.createReadStream(cachedBinary).pipe(fs.createWriteStream(binaryPath));
    return;
  }

  download(sass.getBinaryUrl(), binaryPath, function(err) {
    if (err) {
      console.error(err);
      return;
    }

    console.log('Binary saved to', binaryPath);

    cachedBinary = path.join(cachePath, sass.getBinaryName());

    if (cachePath) {
      console.log('Caching binary to', cachedBinary);

      try {
        mkdir.sync(path.dirname(cachedBinary));
        fs.createReadStream(binaryPath)
          .pipe(fs.createWriteStream(cachedBinary))
          .on('error', function (err) {
            console.log('Failed to cache binary:', err);
          });
      } catch (err) {
        console.log('Failed to cache binary:', err);
      }
    }
  });
}
1298798
function setProtectedBinary(node, binary) {
    if (binary instanceof ProtectedValue) {
        node.protectedValue = binary;
        node.setAttribute(XmlNames.Attr.Protected, 'True');
    } else if (binary && binary.ref) {
        node.setAttribute(XmlNames.Attr.Ref, binary.ref);
    } else {
        setBytes(node, binary);
    }
}
617178
function patchPackageJSON_preNodeGyp_modulePath(filePath)
{
  let packageReadData = fs.readFileSync(filePath);
  let packageJSON = JSON.parse(packageReadData);
  if ( packageJSON && packageJSON.binary && packageJSON.binary.module_path ) {
    let binaryPathConfiguration = packageJSON.binary.module_path;
    binaryPathConfiguration = binaryPathConfiguration.replace(/\{node_abi\}/g, "node_abi");
    binaryPathConfiguration = binaryPathConfiguration.replace(/\{platform\}/g, "platform");
    binaryPathConfiguration = binaryPathConfiguration.replace(/\{arch\}/g, "arch");
    binaryPathConfiguration = binaryPathConfiguration.replace(/\{target_arch\}/g, "target_arch");
    binaryPathConfiguration = binaryPathConfiguration.replace(/\{libc\}/g, "libc");
    packageJSON.binary.module_path = binaryPathConfiguration;
    let packageWriteData = JSON.stringify(packageJSON, null, 2);
    fs.writeFileSync(filePath, packageWriteData);
  }
}
119477
function installGitDependencies(options, cb) {
  var libsassPath = './src/libsass';

  if (process.env.LIBSASS_EXT || options.libsassExt) {
    cb();
  } else if (fs.access) { // node 0.12+, iojs 1.0.0+
    fs.access(libsassPath, fs.R_OK, function(err) {
      err && err.code === 'ENOENT' ? initSubmodules(cb) : cb();
    });
  } else { // node < 0.12
    fs.exists(libsassPath, function(exists) {
      exists ? cb() : initSubmodules(cb);
    });
  }
}
471443
public void setBinary(File binary) {
    options.get(BINARY).setValue(BINARY.sanitize(binary));
  }
630103
function checkBinary(node) {
            const leftNode = (node.left.typeAnnotation) ? node.left.typeAnnotation : node.left;
            const rightNode = node.right;

            // search for = in AssignmentPattern nodes
            const operator = node.operator || "=";

            const nonSpacedNode = getFirstNonSpacedToken(leftNode, rightNode, operator);

            if (nonSpacedNode) {
                if (!(int32Hint && sourceCode.getText(node).endsWith("|0"))) {
                    report(node, nonSpacedNode);
                }
            }
        }