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 'minitest/autorun' | |
class FlattenArray | |
def self.for(collection) | |
new(collection).call | |
end | |
def initialize(collection) | |
@collection = collection | |
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
require 'net/http' | |
require 'json' | |
KUESKI_TOKEN = 'fbxfDZRWCxmdhxHfM-Q' | |
fibonacci_sequence = [] | |
def fibonacci(x, cache = {}) | |
return x if x <= 1 | |
cache[x] ||= fibonacci(x-1, cache) + fibonacci(x-2, cache) |
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
/* | |
Instructions: | |
Write a function that takes in a string of one or more words, and returns the same string, but with all five or more letter words reversed. Strings passed in will consist of only letters and spaces. Spaces will be included only when more than one word is present. | |
Test Cases: | |
Test.assert_equals(spinWords("Hey fellow warriors"), "Hey wollef sroirraw") | |
Test.assert_equals(spinWords("This is a test"), "This is a test") | |
Test.assert_equals(spinWords("This is another test"), "This is rehtona test") |
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 stringGiven = "(()()(()))", | |
auxContainer = [], | |
finalContainer = []; | |
for(var i=0; i < stringGiven.length; i++){ | |
if(stringGiven[i] === "("){ | |
auxContainer.push(stringGiven[i]); | |
} | |
else{ | |
if(auxContainer.length){ |
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
% PORTADA | |
\begin{titlepage} | |
\begin{center} | |
\vspace*{-1in} | |
\begin{figure}[htb] | |
\begin{center} | |
\includegraphics[width=8cm]{logo_udc} |
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 <18F4550.h> | |
#device adc = 10 | |
#fuses XT, PUT, NODEBUG , NOBROWNOUT , NOPROTECT , NOLVP | |
#use delay(clock=4000000) | |
#use rs232(baud=9600, bits = 8 , parity = N ,xmit=PIN_C6, rcv=PIN_C7) | |
void read_adc_chanel(); | |
void evaluate_aceleration(); | |
float adc_sensor_1 = 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
#include <18F4520.h> | |
#device adc = 10 | |
#fuses XT, PUT, NODEBUG , NOBROWNOUT , NOPROTECT , NOLVP | |
#use delay(clock=16000000) | |
#use rs232(baud=9600, bits = 8 , parity = N ,xmit=PIN_C6, rcv=PIN_C7) | |
void read_adc_chanel(); | |
float adc_sensor_1 = 0; | |
float adc_sensor_2 = 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
_serialPort = new SerialPort(); | |
// Allow the user to set the appropriate properties. | |
_serialPort.PortName = SetPortName(_serialPort.PortName); | |
_serialPort.BaudRate = SetPortBaudRate(_serialPort.BaudRate); | |
_serialPort.Parity = SetPortParity(_serialPort.Parity); | |
_serialPort.DataBits = SetPortDataBits(_serialPort.DataBits); | |
_serialPort.StopBits = SetPortStopBits(_serialPort.StopBits); | |
_serialPort.Handshake = SetPortHandshake(_serialPort.Handshake); |
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
int testLed = 13; | |
int dotDelay = 200; | |
int hertz = 500000; | |
int tonePin = 4; | |
String data; | |
//define the morse code for the alphabet and numbers | |
char* letters[] = { |
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
/* | |
* To change this template, choose Tools | Templates | |
* and open the template in the editor. | |
*/ | |
package com.chukitow.ci.actions; | |
import java.sql.Connection; | |
import java.sql.DriverManager; | |
/** |
NewerOlder