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
| Eigen::Quaterniond MyWorld::quatMult(Eigen::Quaterniond q1, Eigen::Quaterniond q2) { | |
| Eigen::Quaterniond resultQ; | |
| resultQ.setIdentity(); | |
| resultQ.w() = q1.w() * q2.w() - q1.vec().dot(q2.vec()); | |
| resultQ.vec() = q1.w() * q2.vec() + q2.w() * q1.vec() + q1.vec().cross(q2.vec()); | |
| return resultQ; | |
| } |
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
| Eigen::Quaterniond myQuaternion = someFuncThatReturnsQuaternionVals(exampleParam); //The Quaternion to print | |
| std::cout << "Debug: " << "myQuaternion.w() = " << myQuaternion.w() << std::endl; //Print out the scalar | |
| std::cout << "Debug: " << "myQuaternion.vec() = " << myQuaternion.vec() << std::endl; //Print out the orientation vector |
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
| Eigen::MatrixXdd m(5,4); //Creates a Matrix with 5 rows and 4 columns | |
| std::cout << "Rows: " << m.rows() << ", Cols: " << m.cols() << std::endl; | |
| //The above should print "Rows: 5, Cols: 4" |
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
| {{#tooltipText}} | |
| <span title="This is the tooltip text: {{tooltipText}}"></span> | |
| {{/tooltipText}} |
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
| { | |
| "name": "fullstackreduxtutorialserver", | |
| "version": "0.0.1", | |
| "description": "", | |
| "main": "index.js", | |
| "scripts": { | |
| "test": "mocha --compilers js:babel-core/register --recursive", | |
| "test:watch": "npm run test -- --watch" | |
| }, | |
| "babel": { |
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
| # ----------------------------------------------- | |
| # This project should be completed using the | |
| # Python programming language. | |
| # | |
| # Problem: | |
| #---------- | |
| # Please parse the following URL into parts: | |
| # http://www.vandyhacks.org/dostuff/now | |
| # |
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
| void Simulator::midpointStep(Eigen::Vector3d particle) { | |
| Eigen::Vector3d halfTimeStepChangeV = { 0, (mTimeStep * 0.5) * -9.8, 0 }; | |
| particle.mVelocity[1] += halfTimeStepChangeV[1]; | |
| particle.mPosition[1] += (mTimeStep * particle.mVelocity[1]); | |
| } |
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
| var exImg; | |
| function preload() { | |
| exImg = loadImage("COMPUTER/FAKE.png"); | |
| } | |
| function setup() { | |
| exImg.resize((windowHeight/exImg.height) * exImg.width, windowHeight); | |
| } |
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
| public class LongestCharSeq { | |
| public String findLongest(String s) { | |
| StringBuffer result = new StringBuffer(); | |
| s.toLowerCase(); | |
| int lastChar = getAsciiVal(s.charAt(0)) - 1; | |
| StringBuffer currentSeq = new StringBuffer(); | |
| for(int i = 0; i<s.length(); i++) { |
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
| public static void zeroRightShift(int[] A) { | |
| if(A == null) return; | |
| int zeroPtr = A.length - 1; | |
| while(zeroPtr >= 0) { | |
| if(A[zeroPtr] != 0) break; | |
| zeroPtr--; | |
| } | |