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
$.getJSON('https://graph.facebook.com/' + location.href, function (json) { | |
if (json) { | |
if (json.shares && json.shares > 0) { | |
$('a#fb-like > span > span.ui-btn-text') | |
.text($('a#fb-like').text().split(' ')[0] + ' ' + json.shares); | |
} | |
if (json.comments && json.comments > 0) { | |
$('a#fb-comment > span > span.ui-btn-text') | |
.text($('a#fb-comment').text().split(' ')[0] + ' ' + json.comments); | |
} |
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 translate = function (locale, singular, plural) { | |
if (locale === undefined) { | |
if (debug) logger.warn('i18n: no locale found'); | |
locale = defaultLocale; | |
} | |
if (!locales[locale]) { | |
read(locale); | |
} | |
var capitalHead = new RegExp('^[A-Z]'); | |
var upperHead = singular.match(capitalHead); |
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
app.configure(function () { | |
app.set('views', __dirname + '/views'); | |
app.set('view engine', 'ejs'); | |
app.use(express.bodyParser()); | |
app.use(express.methodOverride()); | |
app.use(express.cookieParser()); | |
app.configure('production', function () { | |
app.use (function (req, res, next) { | |
var schema = (req.headers['x-forwarded-proto'] || '').toLowerCase(); | |
if (schema === 'https') { |
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
diff --git a/Library/Formula/tinyxml.rb b/Library/Formula/tinyxml.rb | |
index da8a0d6..27a55eb 100644 | |
--- a/Library/Formula/tinyxml.rb | |
+++ b/Library/Formula/tinyxml.rb | |
@@ -16,13 +16,13 @@ class Tinyxml < Formula | |
# The third patch adds a CMakeLists.txt file to build a shared library and provide an install target | |
# submitted upstream as https://sourceforge.net/p/tinyxml/patches/66/ | |
patch do | |
- url "http://patch-tracker.debian.org/patch/series/dl/tinyxml/2.6.2-2/enforce-use-stl.patch" | |
+ url "https://raw.githubusercontent.com/robotology/yarp/master/extern/tinyxml/patches/enforce-use-stl.patch" |
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
// メッセージをPublishするPublisherクラス | |
struct Producer : public rclcpp::Node | |
{ | |
Producer(const std::string & name, const std::string & output) | |
: Node(name, "", true) | |
{ | |
// output名のトピックをPublishするPublisherを作成 | |
pub_ = this->create_publisher<std_msgs::msg::Int32>(output, rmw_qos_profile_default); | |
// decltype(pub_.get())>はrclcpp::Publisher<std_msgs::msg::Int32>* | |
// std::remove_pointer<decltype(pub_.get())>はrclcpp::Publisher<std_msgs::msg::Int32> |
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
// メッセージをSubscribeするSubscriberクラス | |
struct Consumer : public rclcpp::Node | |
{ | |
Consumer(const std::string & name, const std::string & input) | |
: Node(name, "", true) | |
{ | |
// input名のトピックをSubscribeするSubscriberを作成 | |
sub_ = this->create_subscription<std_msgs::msg::Int32>( | |
input, [](std_msgs::msg::Int32::UniquePtr msg) { // std::unique_ptr<std_msgs::msg::Int32>の別名 | |
printf( |
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
int main(int argc, char * argv[]) | |
{ | |
setvbuf(stdout, NULL, _IONBF, BUFSIZ); | |
rclcpp::init(argc, argv); | |
// 複数のノードを単一スレッドで実行させる実行器 | |
rclcpp::executors::SingleThreadedExecutor executor; | |
auto producer = std::make_shared<Producer>("producer", "number"); | |
auto consumer = std::make_shared<Consumer>("consumer", "number"); |
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
explicit Node( | |
const std::string & node_name, | |
const std::string & namespace_ = "", | |
bool use_intra_process_comms = 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
enum class CallbackGroupType | |
{ | |
MutuallyExclusive, | |
Reentrant | |
}; |
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 | |
add_subscription(const rclcpp::subscription::SubscriptionBase::SharedPtr subscription_ptr); | |
void | |
add_timer(const rclcpp::timer::TimerBase::SharedPtr timer_ptr); | |
void | |
add_service(const rclcpp::service::ServiceBase::SharedPtr service_ptr); | |
void |