This file contains 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 <iostream> | |
template<typename T, typename U> | |
class Foo | |
{ | |
public: | |
template<typename V> | |
void operator()(V const &) | |
{ | |
std::cout << "default" << std::endl; |
This file contains 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 <iostream> | |
#include <functional> | |
class Foo { }; | |
class MyMessage { }; | |
template<typename Msg_T> | |
void foo( | |
Msg_T const & msg, | |
std::function<Foo(Msg_T const &)> callback) |
This file contains 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 <iostream> | |
#include <boost/variant.hpp> | |
class Message | |
{ | |
public: | |
virtual ~Message() { } | |
}; | |
class Message1 : public Message { }; |
This file contains 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
require 'ffi' | |
module Foo | |
extend FFI::Library | |
ffi_lib 'ruby-1.9.1' | |
attach_function :rb_intern, [:string], :long | |
attach_function :rb_obj_id, [:long], :long | |
attach_function :rb_funcall2, [:long, :long, :int, :pointer], :long | |
end |
This file contains 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
s1 = [ | |
{ | |
"attributes" => { | |
"role"=>"grad-research-assistant", | |
}, | |
"from" => "47baa997c443e40ae6519aae096d9e72", | |
"relationship_type" => "project_role" | |
}, | |
{ | |
"attributes" => { |
This file contains 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
09:42:55,374 ERROR [CdaContentGenerator] Failed to execute: [ pt.webdetails.cda.dataaccess.UnsupportedDataAccessException ] - Failed: ResourceException .( Cause [ org.pentaho.reporting.libraries.resourceloader.ResourceLoadingException ] [test/cda/sparc_test.cda] can not be found or you do not have permission to access it. | |
pt.webdetails.cda.dataaccess.UnsupportedDataAccessException: Failed: ResourceException | |
at pt.webdetails.cda.settings.SettingsManager.parseSettingsFile(SettingsManager.java:135) | |
at pt.webdetails.cda.CdaContentGenerator.listParameters(CdaContentGenerator.java:346) | |
at pt.webdetails.cda.CdaContentGenerator.createContent(CdaContentGenerator.java:149) | |
at org.pentaho.platform.web.servlet.GenericServlet.doGet(GenericServlet.java:261) | |
at javax.servlet.http.HttpServlet.service(HttpServlet.java:617) | |
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) | |
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) | |
at org.apache.catalina.core.Appli |
This file contains 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
t = Thread.new do | |
system("sleep 1000000") | |
end | |
sleep 1 |
This file contains 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
irb(main):001:0> require 'rubygems' | |
=> true | |
irb(main):002:0> require 'win32/mc' | |
=> true | |
irb(main):003:0> m = Win32::MC.new('foo.mc') | |
=> #<Win32::MC:0x803e008 @res_file="foo.res", @mc_file="foo.mc", @dll_file="foo. | |
dll"> | |
irb(main):004:0> m.create_all | |
Win32::MC::Error: No .rc file found: | |
from C:/Ruby187/lib/ruby/gems/1.8/gems/win32-eventlog-0.5.3/lib/win32/mc |
This file contains 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
[3] pry(main)> require 'pry-disasm' | |
=> true | |
[4] pry(main)> class Foo; def foo; 1+1; end; end | |
=> nil | |
[5] pry(main)> disassemble Foo#foo | |
== disasm: <RubyVM::InstructionSequence:foo@(pry)>====================== | |
0000 trace 8 ( 4) | |
0002 trace 1 | |
0004 putobject 1 | |
0006 putobject 1 |
NewerOlder