This file contains hidden or 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 thread | |
| import time | |
| import random | |
| import RPi.GPIO as GPIO | |
| def blinkTask(pin): | |
| state = False | |
| pin = int(pin) | |
| while 1: | |
| state = not state |
This file contains hidden or 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
| # examples/pyuaf/client/easiest_client_example.py | |
| # Start the demo server ($SDK/bin/uaservercpp) of Unified Automation before running this script! | |
| import pyuaf | |
| from pyuaf.util import Address, NodeId | |
| from pyuaf.client import Client | |
| from pyuaf.client.settings import ClientSettings | |
| # create a client named "myClient", and provide the discovery URL of the server (uaservercpp): |
This file contains hidden or 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
| package com.example.projetogps; | |
| import android.app.AlertDialog; | |
| import android.content.Context; | |
| import android.content.DialogInterface; | |
| import android.content.Intent; | |
| import android.location.Location; | |
| import android.location.LocationListener; | |
| import android.location.LocationManager; | |
| import android.provider.Settings; |
This file contains hidden or 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
| locationManager = (LocationManager) getSystemService(Context.LOCATION_SERVICE); | |
| setContentView(R.layout.activity_gps); | |
| latituteField = (TextView) findViewById(R.id.latitudeTextField); | |
| longitudeField = (TextView) findViewById(R.id.longitudeTextField); | |
| altitudeField = (TextView) findViewById(R.id.altitudeTextField); | |
| locationManager.requestLocationUpdates(LocationManager.GPS_PROVIDER, 0, 0, this); | |
| Criteria criteria = new Criteria(); | |
| provider = locationManager.getBestProvider(criteria, false); | |
| Location location = locationManager.getLastKnownLocation(provider); |
This file contains hidden or 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 socket | |
| import thread | |
| import os | |
| def server(clientsock, cliente): | |
| while True: | |
| received = con.recv(1024) | |
| if received: | |
| print received | |
| f.write(received) |
This file contains hidden or 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
| $(function() { | |
| $('a.page-scroll').bind('click', function(event) { | |
| var $anchor = $(this); | |
| $('html, body').stop().animate({ | |
| scrollTop: $($anchor.attr('href')).offset().top | |
| }, 1500, 'easeInOutExpo'); | |
| event.preventDefault(); | |
| }); | |
| }); |
This file contains hidden or 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 glob | |
| import goslate | |
| import os | |
| from pptx import Presentation | |
| path = '/home/miguel/Downloads/slidestraduzir' | |
| presentations=glob.glob(os.path.join(path,'*.pptx')) | |
| gs=goslate.Goslate() |
This file contains hidden or 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
| function enviaEmail(emailData) { | |
| $.ajax({ | |
| type: "POST", | |
| url: "http://fastemail.herokuapp.com/mail", | |
| data: JSON.stringify(emailData), | |
| contentType: 'application/json; charset=utf-8', | |
| dataType: 'json', | |
| cache:false, | |
| async: false, | |
| success: function(data){ |
This file contains hidden or 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
| angular.module('suapraia.services', []) | |
| .factory('BalnFact', BalnFact); | |
| function BalnFact($q) { | |
| var _db; | |
| var _beaches; | |
| var _expire_date; | |
| return { |
This file contains hidden or 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
| angular.module('suapraia', ['ionic', 'ngCordova', 'suapraia.controllers', 'suapraia.beaches']) | |
| .run(function($ionicPlatform) { | |
| $ionicPlatform.ready(function() { | |
| if (window.cordova && window.cordova.plugins.Keyboard) { | |
| cordova.plugins.Keyboard.hideKeyboardAccessoryBar(true); | |
| cordova.plugins.Keyboard.disableScroll(true); | |
| } | |
| if (window.StatusBar) { |
OlderNewer