This file contains hidden or 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
| <html> | |
| <head></head> | |
| <body> | |
| <audio id="useraudio" autoplay icontrols="true"/> | |
| <script type="text/javascript" src="/janus_protocol.js"></script> | |
| <script type="text/javascript"> | |
| let audio=document.getElementById('useraudio'); | |
| let media_constraints={ | |
| "audio":true, | |
| "video":false |
This file contains hidden or 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
| //janus websocket protocol | |
| let jwsp={}; | |
| jwsp.session_id; | |
| jwsp.transactions={}; | |
| jwsp.handle_ids={}; | |
| jwsp.connect=(ws_address)=>{ | |
| return new Promise((resolve,rejsect)=>{ | |
| ws=new WebSocket(ws_address,'janus-protocol'); | |
| ws.onopen=()=>{ | |
| resolve(); |
This file contains hidden or 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
| const int Motor1=10; | |
| const int Motor2=9; | |
| const int Motor3=11; | |
| const int Motor4=3; | |
| static int speed; | |
| void setup() { | |
| // put your setup code here, to run once: | |
| Serial.begin(115200); | |
| speed=127; | |
| arm(); |
This file contains hidden or 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
| #include <TimerOne.h> | |
| const int motorPin=9; | |
| static int speed; | |
| void arm(){ | |
| setSpeed(512); | |
| delay(2000); | |
| } | |
| void setSpeed(int speed){ | |
| Timer1.pwm(motorPin,speed); | |
| Serial.println(speed); |
This file contains hidden or 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
| import java.util.Scanner; | |
| public class Main { | |
| private String mTargetString; | |
| public Main(String encString){ | |
| mTargetString=encString; | |
| } | |
| public void solve(){ | |
| StringBuffer sbEven=new StringBuffer(); | |
| StringBuffer sbUnEven=new StringBuffer(); |
This file contains hidden or 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
| import java.util.LinkedList; | |
| import java.util.Queue; | |
| import java.util.Scanner; | |
| public class Main { | |
| private String[] mFriends; | |
| private long[] mFoods; | |
| private long mTargetFoods; | |
| private long mMinFoods; | |
| //private long callCount; |
This file contains hidden or 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
| import java.util.PriorityQueue; | |
| import java.util.Scanner; | |
| public class Main { | |
| private int mNumStr; | |
| private PriorityQueue mPQ; | |
| public Main(int numStr){ | |
| mNumStr=numStr; | |
| mPQ=new PriorityQueue(); | |
| } |
This file contains hidden or 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
| import java.util.PriorityQueue; | |
| import java.util.Scanner; | |
| public class Main { | |
| private PriorityQueue mPQ; | |
| private int mUseItem; | |
| public Main(int numItem,int useItem){ | |
| mPQ=new PriorityQueue(); | |
| mUseItem=useItem; | |
| } |
This file contains hidden or 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
| import java.util.Scanner; | |
| public class Main { | |
| private int mNumPeople; | |
| private int mFinalNum; | |
| public Main(int numPeople,int finalNum){ | |
| mNumPeople=numPeople; | |
| mFinalNum=finalNum; | |
| } |
This file contains hidden or 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
| import java.io.BufferedReader; | |
| import java.io.FileReader; | |
| import java.io.IOException; | |
| import java.util.HashMap; | |
| import org.apache.hadoop.conf.Configuration; | |
| import org.apache.hadoop.conf.Configured; | |
| import org.apache.hadoop.fs.Path; | |
| import org.apache.hadoop.io.Text; |
NewerOlder