begin F196678.10
6738
private int determineHeartbeatTimeout(Map properties) {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(this, tc, "determineHeartbeatTimeout", properties);

        // How often should we heartbeat?
        int heartbeatTimeout = JFapChannelConstants.DEFAULT_HEARTBEAT_TIMEOUT;
        try {
            //669424: using RuntimeInfo.getPropertyWithMsg as this would log a message
            // when the property is different to the default value passed.
            heartbeatTimeout = Integer.parseInt(RuntimeInfo.getPropertyWithMsg(JFapChannelConstants.RUNTIMEINFO_KEY_HEARTBEAT_TIMEOUT, "" + heartbeatTimeout));
        } catch (NumberFormatException nfe) {
            // No FFDC code needed
        }

        if (properties != null) {
            String timeoutStr = (String) properties.get(JFapChannelConstants.CHANNEL_CONFIG_HEARTBEAT_TIMEOUT_PROPERTY);
            if (timeoutStr != null) {
                try {
                    heartbeatTimeout = Integer.parseInt(timeoutStr);
                } catch (NumberFormatException nfe) {
                    // No FFDC code needed
                }
            }
        }

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.exit(this, tc, "determineHeartbeatTimeout", heartbeatTimeout);

        return heartbeatTimeout;
    }
1210817
public static void main(String[] args) throws TwiMLException, URISyntaxException {

        Twilio.init(ACCOUNT_SID, AUTH_TOKEN);

        Iterable<Record> usage = Record.reader().read();
        for (Record record : usage) {
            System.out.println(record);
        }

        // Get a number
        IncomingPhoneNumber number = buyNumber();
        System.out.println(number.getPhoneNumber());

        // Send a text message
        Message message = Message.creator(
            ACCOUNT_SID,
            PHONE_NUMBER,
            number.getPhoneNumber(),
            "Hello world!"
        ).create();

        System.out.println(message.getSid());
        System.out.println(message.getBody());

        // Make a phone call
        Call call = new CallCreator(
            ACCOUNT_SID,
            PHONE_NUMBER,
            number.getPhoneNumber(),
            URI.create("https://twilio.com")
        ).create();
        System.out.println(call.getSid());

        // Print all the messages
        Iterable<Message> messages = Message.reader().read();
        for (Message m : messages) {
            System.out.println(m.getSid());
            System.out.println(m.getBody());
        }

        // Get some calls
        Iterable<Call> calls = Call.reader().pageSize(2).read();
        for (Call c : calls) {
            System.out.println(c.getSid());
        }

        Trunk trunk = new TrunkCreator()
            .setFriendlyName("shiny trunk")
            .setSecure(false)
            .create();

        System.out.println(trunk);

        // TwiML
        TwiML twiml = new VoiceResponse.Builder()
            .say(new Say.Builder("Hello World!").build())
            .play(new Play.Builder().url(new URI("https://api.twilio.com/cowbell.mp3")).loop(5).build())
            .build();
        System.out.println(twiml.toXml());
    }
1050446
public static void main(String[] args) {
		log("starting");

		// jnlp prefix to fix:
		// http://stackoverflow.com/questions/19400725/with-java-update-7-45-the-system-properties-no-more-set-from-jnlp-tag-property
		// https://bugs.openjdk.java.net/browse/JDK-8023821
		for (final Object property : Collections.list(System.getProperties().keys())) {
			final String name = String.valueOf(property);
			if (name.startsWith(JnlpPage.JNLP_PREFIX)) {
				final String value = System.getProperty(name);
				System.setProperty(name.substring(JnlpPage.JNLP_PREFIX.length()), value);
			}
		}

		initLookAndFeel();
		// une touche bleu-clair pour avoir une teinte moins grisatre
		UIManager.put("control", new Color(225, 225, 250));

		ShadowPopupFactory.install();
		MSwingUtilities.initEscapeClosesDialogs();
		// on définit le répertoire courant, car par exemple dans JavaWebStart il n'est pas bon par défaut
		System.setProperty("user.dir", System.getProperty("user.home"));

		Thread.setDefaultUncaughtExceptionHandler(new UncaughtExceptionHandler() {
			@Override
			public void uncaughtException(Thread t, Throwable e) {
				MSwingUtilities.showException(e);
			}
		});

		SwingUtilities.invokeLater(new Runnable() {
			@Override
			public void run() {
				try {
					// affichage de la frame dans le thread AWT
					showFrame();
				} catch (final Throwable t) { // NOPMD
					MSwingUtilities.showException(t);
					exit();
				}
			}
		});
	}
161054
private byte[] resolve0() {
    byte[] to = new byte[path.length];
    int nc = getNameCount();
    int[] lastM = new int[nc];
    int lastMOff = -1;
    int m = 0;
    for (int i = 0; i < nc; i++) {
      int n = offsets[i];
      int len = (i == offsets.length - 1) ? (path.length - n)
          : (offsets[i + 1] - n - 1);
      if (len == 1 && path[n] == (byte) '.') {
        if (m == 0 && path[0] == '/') // absolute path
          to[m++] = '/';
        continue;
      }
      if (len == 2 && path[n] == '.' && path[n + 1] == '.') {
        if (lastMOff >= 0) {
          m = lastM[lastMOff--]; // retreat
          continue;
        }
        if (path[0] == '/') { // "/../xyz" skip
          if (m == 0)
            to[m++] = '/';
        } else { // "../xyz" -> "../xyz"
          if (m != 0 && to[m - 1] != '/')
            to[m++] = '/';
          while (len-- > 0)
            to[m++] = path[n++];
        }
        continue;
      }
      if (m == 0 && path[0] == '/' || // absolute path
          m != 0 && to[m - 1] != '/') { // not the first name
        to[m++] = '/';
      }
      lastM[++lastMOff] = m;
      while (len-- > 0)
        to[m++] = path[n++];
    }
    if (m > 1 && to[m - 1] == '/')
      m--;
    return (m == to.length) ? to : Arrays.copyOf(to, m);
  }
216191
public void setL10N(String locale, String language) {
    try {
      JSONObject plistJSON = getPreferenceFile(locale, language);
      writeOnDisk(plistJSON, globalPreferencePlist);
    } catch (Exception e) {
      throw new WebDriverException("cannot configure simulator", e);
    }
  }
1062431
function main() {
	var fpath;
	var fopts;
	var conf;
	var out;
	var len;
	var i;

	fopts = {
		'encoding': 'utf8'
	};

	len = completions.length;
	debug( 'Generating %d completions files...', len );

	for ( i = 0; i < len; i++ ) {
		conf = completions[ i ];

		debug( 'Generating completions (%s)...', conf.name );
		out = {
			'scope': conf.scope,
			'completions': conf.completions
		};
		out = JSON.stringify( out, null, '\t' );

		debug( 'Writing completions file...' );
		fpath = join( DIR, 'stdlib-'+conf.name+'.sublime-completions' );
		writeFileSync( fpath, out, fopts );

		debug( 'Successfully generated completions file.' );
	}
	debug( 'Finished generating completions files.' );
}
105039
public function update_10000001() {
    $composer_json = $this->updater->getComposerJson();
    $template_composer_json = $this->updater->getTemplateComposerJson();
    foreach ($template_composer_json['require'] as $package_name => $package_version) {
      if (empty($composer_json['require'][$package_name])) {
        $composer_json['require'][$package_name] = $package_version;
      }
    }
    $this->updater->writeComposerJson($composer_json);
  }
693556
function modCompletePreDefine(currentId) {
        // HACK: 这里在IE下有个性能陷阱，不能使用任何变量。
        //       否则貌似会形成变量引用和修改的读写锁，导致wait4PreDefine释放困难
        each(wait4PreDefine, function (mod) {
            modPreDefine(
                currentId,
                mod.deps,
                mod.factory
            );
        });

        wait4PreDefine.length = 0;
    }
966537
function (cp) {
	        return (cp < 0x10000) ? String.fromCharCode(cp) :
	            String.fromCharCode(0xD800 + ((cp - 0x10000) >> 10)) +
	                String.fromCharCode(0xDC00 + ((cp - 0x10000) & 1023));
	    }
1096063
function Me(ct,pt,ut){// Remove trailing zeros.
for(var bt=1,ht=pt.length;!pt[--ht];pt.pop());// Calculate the base 10 exponent. First get the number of digits of c[0].
for(ht=pt[0];10<=ht;ht/=10,bt++);// Overflow?
return(ut=bt+ut*Pe-1)>Qe?ct.c=ct.e=null:ut<Ze?ct.c=[ct.e=0]:(ct.e=ut,ct.c=pt),ct}
676861
def initialize(self):
        '''
        '''
        self.fonttype = self.font_types['bitmap']
        self.send(chr(27)+chr(64))
885697
public void begin (float fbufWidth, float fbufHeight, boolean flip) {
    if (begun) throw new IllegalStateException(getClass().getSimpleName() + " mismatched begin()");
    begun = true;
  }
1119304
function update() {
		var f = self.fm.getSelected(0);
		reset();

		self._hash = f.hash;
		self.title.text(f.name);
		self.win.addClass(self.fm.view.mime2class(f.mime));
		self.name.text(f.name);
		self.kind.text(self.fm.view.mime2kind(f.link ? 'symlink' : f.mime)); 
		self.size.text(self.fm.view.formatSize(f.size));
		self.date.text(self.fm.i18n('Modified')+': '+self.fm.view.formatDate(f.date));
		f.dim && self.add.append('<span>'+f.dim+' px</span>').show();
		f.tmb && self.ico.css('background', 'url("'+f.tmb+'") 0 0 no-repeat');
		if (f.url) {
			self.url.text(f.url).attr('href', f.url).show();
			for (var i in self.plugins) {
				if (self.plugins[i].test && self.plugins[i].test(f.mime, self.mimes, f.name)) {
					self.plugins[i].show(self, f);
					return;
				}
			}
		} else {
			self.url.hide();
		}
		
		self.win.css({
			width  : '420px',
			height : 'auto'
		});
	}
677992
def function_begin(self):
        """"""
        self.newline_label(self.shared.function_name, False, True)
        self.push("%14")
        self.move("%15", "%14")
262441
function tryStart() {
  if (started) {
    return;
  }
  started = true;

  var video = document.createElement('video');
  video.src = '//www.marzipano.net/media/video/mercedes-f1-1280x640.mp4';
  video.crossOrigin = 'anonymous';

  video.autoplay = true;
  video.loop = true;

  // Prevent the video from going full screen on iOS.
  video.playsInline = true;
  video.webkitPlaysInline = true;

  video.play();

  waitForReadyState(video, video.HAVE_METADATA, 100, function() {
    waitForReadyState(video, video.HAVE_ENOUGH_DATA, 100, function() {
      asset.setVideo(video);
    });
  });
}
549874
private final void step4() {
        switch (sb.charAt(k)) {
        case 'e':
            if (ends("icate")) 
                r("ic");
            else if (ends("ative"))
                r("");
            else if (ends("alize")) 
                r("al");
            break;
        case 'i':
            if (ends("iciti")) 
                r("ic");
            break;
        case 'l':
            if (ends("ical")) 
                r("ic");
            else if (ends("ful")) 
                r("");
            break;
        case 's':
            if (ends("ness")) r("");
            break;
        }
    }
975254
function() {

		// Header length
		var header_length = 32;

		// Write down null-terminated string lookup table in the end
		var stream8offset = this.stream8.offset;
		for (var i=0; i<this.stringLookup.length; ++i) {
			this.stream8.write( new Buffer( this.stringLookup[i] ) );
			this.stream8.write( new Buffer( [0] ) );
		}
		// console.log("ST: len="+(this.stream8.offset - stream8offset)+", sl=", this.stringLookup );

		// Encode the object signature table
		var stream16offset = this.stream16.offset;
		for (var i=0; i<this.plainObjectSignatureTable.length; ++i)
			this.stream16.write( this.plainObjectSignatureTable[i] );
		// console.log("OT: len="+(this.stream16.offset - stream16offset)+", ot=", this.plainObjectSignatureTable );

		// Finalize individual streams
		this.stream64.finalize();
		this.stream32.finalize();
		this.stream16.finalize();
		this.stream8.finalize();

		// Calculate the value to put on the profile table ID
		var profile_id = 0x00;
		if (this.profile.count == 1) {
			profile_id = this.profile.id;
		}

		// If sparse bundle update stream8
		var totalSize = 0;
		if (this.sparse) {

			// Overwrite header
			this.stream8.writeAt( 2,  pack2b( profile_id ) );  	// Update object table ID
			this.stream8.writeAt( 6,  pack2b( this.profile.count ) ); 	// Number of profile tables
			this.stream8.writeAt( 8,  pack4b( this.stream64.offset ) ); // 64-bit buffer lenght
			this.stream8.writeAt( 12, pack4b( this.stream32.offset ) ); // 32-bit buffer lenght
			this.stream8.writeAt( 16, pack4b( this.stream16.offset ) ); // 16-bit buffer length
			this.stream8.writeAt( 20, pack4b( this.stream8.offset - header_length ) );  // 8-bit buffer length (exclude header)
			this.stream8.writeAt( 24, pack4b( this.stream8.offset - stream8offset ) ); // Length of string table
			this.stream8.writeAt( 28, pack4b( this.stream16.offset - stream16offset ) ); // Length of signature table

			// TODO: Separate stream8 in two in order to load them in parallel

			// Close streams
			this.stream8.close();  this.stream16.close(); 
			this.stream32.close(); this.stream64.close(); 

			// Calculate total size
			totalSize = this.stream8.offset +  this.stream16.offset + 
						this.stream32.offset + this.stream64.offset;

			// Update filename
			this.filename += ".jbbp";

			// Write summar header
			if ((this.logFlags & LOG.SUMM)) {
				console.info("Encoding size =",totalSize,"bytes");
				console.info("     8b chunk =",this.stream8.offset,"bytes");
				console.info("    16b chunk =",this.stream16.offset,"bytes");
				console.info("    32b chunk =",this.stream32.offset,"bytes");
				console.info("    64b chunk =",this.stream64.offset,"bytes");

			}

		}

		// If not separating, merge everything
		else {

			// Open final stream
			var finalStream = new BinaryStream( this.filename + '.jbb', 8 );
			finalStream.write( pack2b( 0x4231 ) );  			 // Magic header
			finalStream.write( pack2b( profile_id ) ); 	 		 // Object Table ID
			finalStream.write( pack2b( VERSION ) );	  			 // Version
			finalStream.write( pack2b( this.profile.count ) );   // Number of profile tables
			finalStream.write( pack4b( this.stream64.offset ) ); // 64-bit buffer lenght
			finalStream.write( pack4b( this.stream32.offset ) ); // 32-bit buffer lenght
			finalStream.write( pack4b( this.stream16.offset ) ); // 16-bit buffer length
			finalStream.write( pack4b( this.stream8.offset ) );  // 8-bit buffer length
			finalStream.write( pack4b( this.stream8.offset - stream8offset ) ); // Length of string table
			finalStream.write( pack4b( this.stream16.offset - stream16offset ) ); // Length of signature table

			// Merge individual streams
			finalStream.merge( this.stream64 ); finalStream.merge( this.stream32 );
			finalStream.merge( this.stream16 ); finalStream.merge( this.stream8 );

			// Close
			finalStream.finalize();
			finalStream.close();
			totalSize = finalStream.offset;

			// Close and delete helper stream files
			this.stream8.close();  fs.unlink( this.filename + '.jbbp' );
			this.stream16.close(); fs.unlink( this.filename + '_b16.jbbp' );
			this.stream32.close(); fs.unlink( this.filename + '_b32.jbbp' );
			this.stream64.close(); fs.unlink( this.filename + '_b64.jbbp' );

			// Update filename
			this.filename += ".jbb";

			// Write summar header
			if ((this.logFlags & LOG.SUMM)) {
				console.info("Encoding size =",finalStream.offset,"bytes");
			}

		}

		// Write protocol overhead table
		if ((this.logFlags & LOG.PDBG) != 0) {
			console.info("-----------------------------------");
			console.info(" Binary Protocol Overhead Analysis");
			console.info("-----------------------------------");
			console.info(" 64-bit Stream       : ", this.stream64.offset, "b");
			console.info(" 32-bit Stream       : ", this.stream32.offset, "b");
			console.info(" 16-bit Stream       : ", this.stream16.offset, "b");
			console.info("  8-bit Stream       : ", this.stream8.offset,  "b");
			console.info("-----------------------------------");
			console.info(" Control Op-Codes    : ", this.counters.op_ctr, "b");
			console.info(" Primitive Op-Codes  : ", this.counters.op_prm, "b");
			console.info(" String References   : ", this.counters.ref_str, "b");
			console.info(" I-Refs              : ", this.counters.op_iref, "b");
			console.info(" X-Refs              : ", this.counters.op_xref, "b");
			console.info(" Array Headers       : ", this.counters.arr_hdr, "b");
			console.info(" Array Steering Data : ", this.counters.arr_dat, "b");
			console.info(" Array Chunks        : ", this.counters.arr_chu, "b");
			console.info(" Buffer Headers      : ", this.counters.dat_hdr, "b");
			var sum = this.counters.op_ctr + this.counters.op_prm + this.counters.arr_dat +
					  this.counters.ref_str + this.counters.op_iref + this.counters.op_xref +
					  this.counters.arr_hdr + this.counters.arr_chu + this.counters.dat_hdr;
			console.info("-----------------------------------");
			console.info(" NUM_DWS             : ",this.counters.arr_dws);
			console.info(" NUM_DELTA_FLOAT     : ",this.counters.arr_delta_float);
			console.info(" NUM_DELTA_INT       : ",this.counters.arr_delta_int);
			console.info(" NUM_REPEATED        : ",this.counters.arr_num_repeated);
			console.info(" NUM_RAW             : ",this.counters.arr_num_raw );
			console.info(" NUM_SHORT           : ",this.counters.arr_num_short);
			console.info(" PRIM_BULK_PLAIN     : ",this.counters.arr_prim_bulk_plain);
			console.info(" PRIM_BULK_KNOWN     : ",this.counters.arr_prim_bulk_known);
			console.info(" PRIM_SHORT          : ",this.counters.arr_prim_short);
			console.info(" PRIM_REPEATED       : ",this.counters.arr_prim_repeated);
			console.info(" PRIM_RAW            : ",this.counters.arr_prim_raw);
			console.info(" PRIM_CHUNK          : ",this.counters.arr_prim_chunk);
			console.info(" EMPTY               : ",this.counters.arr_empty);
			console.info("-----------------------------------");
			console.info("");
			var perc = ((sum / totalSize) * 100).toFixed(2);
			console.info(" Total Overhead     : ",sum,"b ("+perc+" %)");
		}

	}