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
public void enableLoadingImage() { | |
imageSwitcher = (ImageSwitcher) findViewById(R.id.imageSwitcher1); | |
ImageView image = (ImageView) findViewById(R.id.connectionImage); | |
image.setVisibility(View.GONE); | |
imageSwitcher.setFactory(new ViewFactory() { | |
@Override |
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
#!/usr/bin/env python | |
def FactorialRecu(numero): | |
if (numero==0 or numero ==1): | |
return 1 | |
else: | |
return numero*FactorialRecu(numero-1) | |
if __name__=='__main__': |
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
#!/usr/bin/env python | |
def FiboRecu( numero): | |
if (numero==1 or numero ==2): | |
return 1 | |
else: | |
return FiboRecu(numero-1)+FiboRecu(numero-2) | |
if __name__=='__main__': |
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
#!/usr/bin/env python | |
def FizzBuzz(): | |
i=0 | |
while (i<101): | |
print i | |
if i % 15 == 0: | |
print "FizzBuzz" | |
elif i % 3 == 0: | |
print "Fizz" |
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
var Hello = React.createClass({ | |
getInitialState : function(){ | |
return { dato1 : 'Marcos', dato2 : 1234}; | |
}, | |
render: function() { | |
setTimeout(function(){ this.setState( { dato1 : 'Carlos'}); }.bind(this),5000); | |
return <div>Hello {this.state.dato1}</div>; | |
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
//FizzBuzz in scala | |
object FizzBuzz{ | |
def main(args: Array[String]){ | |
for (i <- 0 until 100){ | |
if (i % 3 == 0){ | |
if(i % 5 == 0){ | |
println(i + " is FizzBuzz") | |
} | |
else | |
{ |
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
import re | |
str = '-1.95' | |
#str = '0.3456' | |
#str = '1.341516' | |
#str = '0.89788' | |
#yes, large regular expression but seems it solves, tested with different scenarios | |
pattern = re.compile(r'''^((-\d*)(.\d*)|(0.\d*)|((0.\d*(e|E)(\+|\-)\d))|((-\d*)(.\d*))(((e|E)(\+|\-)\d)))$''', re.VERBOSE) | |
print pattern.match(str) |
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
import sqlite3 | |
import cherrypy | |
import json | |
class ExposeRealStateDB(object): | |
app = '/tmp/propertyRS.db' | |
@cherrypy.expose | |
def getproperty(self, id): |
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
{ | |
"name": "portal_axios_sample_submission", | |
"version": "0.1.0", | |
"private": true, | |
"engines": { | |
"node": "10.16.x", | |
"npm": "6.x" | |
}, | |
"dependencies": { | |
"@testing-library/jest-dom": "^4.2.4", |
OlderNewer