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
factorial n = product [1..n] |
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 work is licensed under a Creative Commons | |
// Attribution-ShareAlike 4.0 International License. | |
// © 2016 Rafael Papallas and www.computingstories.com | |
import Foundation | |
import CoreData | |
class DatabaseManager { | |
/// Implements the Singleton Design Pattern | |
static let instance = DatabaseManager() |
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 work is licensed under a Creative Commons | |
// Attribution-ShareAlike 4.0 International License. | |
// © 2016 Rafael Papallas and www.computingstories.com | |
import Foundation | |
import CoreData | |
/// Mock version of DatabaseManager for testing purposes. | |
/// | |
/// This intent of this class it to inherit all functionality from DatabaseManager |
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 XCTest | |
import CoreData | |
@testable import DoIt | |
/// Test the DatabaseManager against a Mock Database Manager. | |
/// | |
/// Note that testing is done against a mock version of the database, linking | |
/// to the memory instead of the actual SQLite file. | |
/// | |
/// - Author: |
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
\usepackage[numbers]{natbib} | |
\usepackage{cleveref} | |
\usepackage{hyperref} | |
\begin{document} | |
Some cite \cite{somepaper} and then with author et al \citet{somepaper}. | |
\bibliographystyle{unsrtnat} | |
\bibliography{refs} | |
\end{document} |
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
def get_xml(arr): | |
rotation = "<RotationMat>" | |
for row in range(0, 3): | |
for col in range(0, 3): | |
rotation += str(arr[row, col]) | |
if row != 2 or col != 2: rotation += " " | |
rotation += "</RotationMat>" | |
translation = "<Translation>" | |
for row in range(0, 3): |
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 program is free software: you can redistribute it and/or modify | |
it under the terms of the GNU General Public License as published by | |
the Free Software Foundation, either version 3 of the License, or | |
(at your option) any later version. | |
This program is distributed in the hope that it will be useful, | |
but WITHOUT ANY WARRANTY; without even the implied warranty of | |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
GNU General Public License for more details. |
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
Rz(θ) = | |
[ cos θ -sin θ 0 ] | |
[ sin θ cos θ 0 ] | |
[ 0 0 1 ] | |
Ry(θ) = | |
[ cos θ 0 sin θ ] | |
[ 0 1 0 ] | |
[ -sin θ 0 cos θ ] |
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 program is free software: you can redistribute it and/or modify | |
it under the terms of the GNU General Public License as published by | |
the Free Software Foundation, either version 3 of the License, or | |
(at your option) any later version. | |
This program is distributed in the hope that it will be useful, | |
but WITHOUT ANY WARRANTY; without even the implied warranty of | |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
GNU General Public License for more details. |
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
// Input: | |
// path: ompl::control::PathControl | |
// penv: OpenRAVE::EnvironmentBasePtr | |
// robot: OpenRAVE::RobotBasePtr | |
// | |
// Output: Will create an OpenRAVE trajectory from the OMPL PathControl and will also parse deltatimes. | |
TrajectoryBasePtr or_traj = RaveCreateTrajectory(penv, ""); | |
auto configuration_specification = robot->GetActiveConfigurationSpecification(); | |
configuration_specification.AddDeltaTimeGroup(); |
OlderNewer