This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
namespace Nmea | |
{ | |
class Parser | |
{ | |
private enum STATES : byte | |
{ | |
begin, body, checksum1, checksum2, checksum_lr, checksum_cf, cf | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$value = "en-us,en;q=0.7,ar-iq;q=0.3"; | |
$accepted = array(); | |
if (preg_match_all("/\s*([^,;]+)(?:;\s*q=([\d.]+))?/", $value, $m, PREG_SET_ORDER)) { | |
foreach ($m as $lang) { | |
$accepted[] = array( | |
'lang' => $lang[1], | |
'q' => isset($lang[2]) ? (float)$lang[2] : 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package snowflake; | |
import org.slf4j.Logger; | |
import org.slf4j.LoggerFactory; | |
import java.util.concurrent.atomic.AtomicLong; | |
/** | |
* Generates unique 64-bit IDs based on a host ID, timestamp, and | |
* incrementing counter. When each instance is given a unique host ID, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
In patch.js.. | |
#1) Look for: | |
c=document.createElement("video"); | |
Add the following after the semicolon: | |
c.setAttribute('playsinline',1); | |
Should now look something like... | |
...,c=document.createElement("video");c.setAttribute('playsinline',1);const d="webcam"+CABLES.uuid();... |