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
@@ha = 'ha' | |
class A | |
class << self | |
@ha = 'boo' | |
end | |
def self.ha | |
@ha | |
end | |
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
@@ha = 'ha' | |
class A | |
@ha = 'boom' | |
class << self | |
attr_accessor :ha | |
end | |
def self.my_method | |
"k" + self.ha | |
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
@@ha = "a" | |
# definimos a variável de classe @@ha | |
class A | |
@@ha = "b" | |
# definimos novamente a variável de classe @@ha, agora com outro valor e dentro do escopo de uma nova classe. | |
end | |
# ao verificar o valor da variável de classe fora do escopo da classe A vimos que é o mesmo valor que setamos dentro do escopo da classe A. | |
@@ha | |
# => "b" |
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
class A | |
@@ha = 'a' | |
def self.ha | |
@@ha | |
end | |
end | |
class B < A | |
@@ha = 'b' | |
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
do | |
local cnt = 1 | |
function inc () | |
cnt = cnt + 1 | |
return cnt | |
end | |
cnt = 5 -- Value will be changed after creating the function | |
end | |
print(inc()) --> Output 6 |
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
p bloco = -> { | |
vai_danada = 1 | |
def m | |
puts "AAAAAAA" | |
vai_danada += 1 | |
end | |
vai_danada = 5 | |
}.() |
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
def onCreate(bundle) | |
super | |
@handler = Handler.new; | |
@i = 0 | |
@thread = Thread.new do | |
@i += 1 | |
puts "#{@i}" | |
@handler.postDelayed(self, 1000) | |
#or @handler.postDelayed(@thread, 1000) |
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
unsigned char * SReader_ReadCard(int *size) | |
{ | |
int cmdbuf[] = { 0x1b, 0x41, 0x00, 0x00, 0x2f, 0x75 }; | |
// clear buffer; | |
int tmpsize = 0; | |
unsigned char *tmpbuf = get_DataBuffer(&tmpsize); | |
if (tmpbuf) | |
free(tmpbuf); | |
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
class TestHelper | |
if Object.const_defined?(:MTest) | |
def self.case | |
engine::TestCase | |
end | |
def self.engine | |
MTest::Unit | |
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
Generating /Users/thiagoscalone/projects/plano_be/walk/mobile/ruboto_sample/using_bundler/libs/bundle.jar | |
Fetching [email protected]:planobe/posxml_parse.git | |
Fetching gem metadata from https://rubygems.org/.. | |
Resolving dependencies... | |
Using posxml_parse (0.0.2) from [email protected]:planobe/posxml_parse.git (at master) | |
posxml_parse at /Users/thiagoscalone/projects/plano_be/walk/mobile/ruboto_sample/using_bundler/bin/bundle/bundler/gems/posxml_parse-f1f1fa96de14 did not have a valid gemspec. | |
This prevents bundler from installing bins or native extensions, but that may not affect its functionality. | |
The validation message from Rubygems was: | |
"cloudwalk.io" is not a URI |
OlderNewer