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
OpenCL.devices.each do |device| | |
info = device.info | |
puts "Trying on #{info[:name]} #{info[:vendor]} #{info[:version]} [#{info[:type]}]" | |
context = device.create_context | |
queue = context.create_command_queue | |
program = context.create_program <<EOF | |
// OpenCL kernel that computes the square of an input array | |
__kernel square( | |
__global float* input, |
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
Trying on GeForce 9400 GT NVIDIA OpenCL 1.0 [gpu] | |
1073741824.0 | |
Trying on GeForce 9400 GT NVIDIA OpenCL 1.0 [gpu] | |
1073741824.0 | |
Trying on Intel(R) Core(TM)2 Duo CPU E8400 @ 3.00GHz Intel OpenCL 1.0 [cpu] | |
1073741824.0 |
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 'rubygems' | |
require 'activity_streams' | |
require 'open-uri' | |
twitter = 'http://api.cliqset.com/feed/?svcuser=rubenfonseca&feedid=twitternotesposted' | |
feed = ActivityStreams::Feed.from_xml(open(twitter).read) | |
feed.entries.size #=> 20 | |
feed.entries.first.verbs.size #=> 1 | |
feed.entries.first.verbs.first #=> "http://activitystrea.ms/schema/1.0/post" |
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
- form_for @user do |f| | |
.small= f.error_messages | |
%fieldset | |
%legend= t(:please_fill_the_following_fields) | |
.box | |
= f.label :name, User.human_attribute_name(:name) | |
= f.text_field :name, :style => 'width: 500px' |
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 'rubygems' | |
require 'oauth' | |
consumer = OAuth::Consumer.new 'ds1UTK4sT3R5MVhYIYV6w', 'RtqyirueGdzUt0tpbuuYnZAxUv71E3xrxxpfnkxt4', { :site => 'http://hireme.goplanapp.com' } | |
request = consumer.get_request_token | |
puts request.authorize_url | |
sleep 20 # give us time to authenticate |
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 'rubygems' | |
require 'oauth' | |
require 'json' | |
consumer = OAuth::Consumer.new 'ds1UTK4sT3R5MVhYIYV6w', 'RtqyirueGdzUt0tpbuuYnZAxUv71E3xrxxpfnkxt4', { :site => 'http://hireme.goplanapp.com' } | |
req = consumer.get_request_token | |
puts req.authorize_url | |
sleep 20 |
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
Biscates.Location = (function() { | |
var WATCH_ID; | |
var POSITION; | |
var GEOLOCATION_OPTIONS = { | |
enableHighAccuracy: true, | |
maximumAge: 600000, | |
timeout: 30000 // 30 seconds | |
}; | |
function _initGeolocation() { |
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 google_analytics = require('com.0x82.google.analytics'); | |
google_analytics.addEventListener('complete', function(e) { | |
Ti.API.log(e); | |
}); | |
google_analytics.startTracker({ | |
accountID: 'UA-2061857-1', | |
debug: true | |
}); |
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
<?xml version="1.0"?> | |
<GMSResponse> | |
<login success="true" hasupdate="true"/> | |
<screen id="homepage"> | |
... | |
</screen> | |
<tabs> | |
<tab icon="icon_selfcare_tab" title="Gestão de Conta" screenid="selfcare"/> | |
<tab icon="icon_services_tab" title="Serviços" screenid="serv_list"/> | |
<tab icon="icon_rateplan_tab" title="Tarifários" screenid="rateplan"/> |