This is a small tutorial on how to debug a ROS2 C++ node usign VSCode.
This implementation was done using:
def missing(message) | |
if message.is_a? Symbol | |
puts "The environment is missing #{message.to_s.upcase}" | |
else | |
puts message | |
end | |
end | |
desc "Check the environment for proper setup" | |
task :checkenv do |
def missing(message) | |
if message.is_a? Symbol | |
puts "The environment is missing #{message.to_s.upcase}" | |
else | |
puts message | |
end | |
end | |
desc "Check the environment for proper setup" | |
task :checkenv do |
(function(undefined) { | |
// In here, undefined is back to normal, | |
// because we passed the function no params! | |
})(); |
var getRatingText = (function() { | |
var ratingText = { | |
singular: { | |
"Closed": L("1_person_voted_to_get_this_issue_fixed", "1 person voted to get this issue fixed"), | |
"Archived": L("1_person_voted_to_get_this_issue_fixed", "1 person voted to get this issue fixed"), | |
default: L("1_person_wants_this_fixed", "1 person wants this fixed") | |
}, | |
plural: { | |
"Closed": L("people_voted_to_get_this_issue_fixed", "%s people voted to get this issue fixed"), |
ratingText = { | |
singular: { | |
"Closed": L("1_person_voted_to_get_this_issue_fixed", "1 person voted to get this issue fixed"), | |
"Archived": L("1_person_voted_to_get_this_issue_fixed", "1 person voted to get this issue fixed"), | |
default: L("1_person_wants_this_fixed", "1 person wants this fixed") | |
}, | |
plural: { | |
"Closed": L("people_voted_to_get_this_issue_fixed", "%s people voted to get this issue fixed"), | |
"Archived": L("people_voted_to_get_this_issue_fixed", "%s people voted to get this issue fixed"), | |
default: L("people_want_this_fixed", "%s people want this fixed") |
module HasFakeBooleanColumns | |
def self.wallpaper_over_fake(column_name) | |
define_method(column_name) do | |
self.attributes(column_name) == 'true' | |
end | |
define_method("#{column_name)=".to_sym) do |value| | |
self.update_attribute(column_name, value == 'true') | |
end | |
end |
/* | |
* Easing.pde - brings Robert Penner's easing functions into Processing | |
* (c) 2015 cocopon. | |
* | |
* See the following to learn more about these famous functions: | |
* http://www.robertpenner.com/easing/ | |
* | |
* License: | |
* http://www.robertpenner.com/easing_terms_of_use.html | |
*/ |
# @paragraphs is an Array of Strings - various puts'es confirm this. | |
@paragraphs.each do |paragraph| | |
renderer = HH::LessonParaRenderer.new(container) | |
markdown = Redcarpet::Markdown.new(renderer) | |
p paragraph # Just checking - it's a String! | |
# raises: <TypeError: wrong argument type Array (expected String)> | |
markdown.render(paragraph) | |
end |
ruby-1.9.2-p290 :001 > class Foo | |
ruby-1.9.2-p290 :002?> def bonk | |
ruby-1.9.2-p290 :003?> @bonk = nil | |
ruby-1.9.2-p290 :004?> end | |
ruby-1.9.2-p290 :005?> end | |
=> nil | |
ruby-1.9.2-p290 :006 > f = Foo.new | |
=> #<Foo:0x007ff15c1e65b8> | |
ruby-1.9.2-p290 :007 > f.bonk | |
=> nil |